# Generated from army-negative-3.1.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name army-negative Name: rubygem-%{gem_name} Version: 3.1.0 Release: 1%{?dist} Summary: Monkey-patches ActiveRecord's MySQL (ARMy) connection adapter to store boolean trues as negative ones License: MIT URL: http://github.com/zettabyte/army-negative Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(cucumber) >= 1.0.5 # BuildRequires: rubygem(cucumber) < 1.1 # BuildRequires: rubygem(rspec) >= 2.6.0 # BuildRequires: rubygem(rspec) < 2.7 BuildArch: noarch %description When this gem is loaded and activated inside your rails app, your MySQL connection adapter for ActiveRecord will be monkey-patched. The patch simply tweaks it to store all boolean "true" values as negative one instead of positive one inside your TINYINT columns. It also patches it to recognize and interpret negative one as "true". Positive one will still be recognized as true as well. Used for special cases, such as developing rails apps that must, for example, work with existing databases that use such a convention. For a rails app version X.Y.Z, use army-negative version "~> X.Y.0". For example, a rails 3.0.x app should use "~> 3.0.0" and a 3.1.x app would use "~> 3.1.0", etc. The exception is that rails 2.3.x apps should just use "~> 2.0" since 2.3 is the earliest version of rails that's supported. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} # cucumber # rspec spec popd %files %dir %{gem_instdir} %exclude %{gem_instdir}/.gitignore %license %{gem_instdir}/LICENSE %{gem_instdir}/dummy %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.rdoc %{gem_instdir}/Gemfile %doc %{gem_instdir}/README.rdoc %{gem_instdir}/Rakefile %{gem_instdir}/army-negative.gemspec %{gem_instdir}/features %changelog * Mon Apr 18 2022 mockbuilder - 3.1.0-1 - Initial package