[rubygem-shoulda-context] Update to shoulda-context 1.2.1.
Vít Ondruch
vondruch at fedoraproject.org
Fri Jul 4 08:22:00 UTC 2014
commit cc19f46b5ebc2a7cb0a32bf15a6f3183f6901ab6
Author: Vít Ondruch <vondruch at redhat.com>
Date: Fri Jul 4 10:22:02 2014 +0200
Update to shoulda-context 1.2.1.
.gitignore | 1 +
rubygem-shoulda-context.spec | 71 +++++++++++++++++++++++------------------
sources | 2 +-
3 files changed, 42 insertions(+), 32 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index af9b71d..c064c05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/shoulda-context-1.1.6.gem
+/shoulda-context-1.2.1.gem
diff --git a/rubygem-shoulda-context.spec b/rubygem-shoulda-context.spec
index 1880fc9..8b751aa 100644
--- a/rubygem-shoulda-context.spec
+++ b/rubygem-shoulda-context.spec
@@ -1,22 +1,24 @@
%global gem_name shoulda-context
Name: rubygem-%{gem_name}
-Version: 1.1.6
+Version: 1.2.1
Release: 1%{?dist}
Summary: Context framework extracted from Shoulda
Group: Development/Languages
License: MIT
URL: https://github.com/thoughtbot/shoulda-context
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
-Requires: ruby(release)
-Requires: ruby(rubygems)
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
-BuildRequires: rubygem(rails)
+BuildRequires: rubygem(bundler)
+BuildRequires: rubygem(jquery-rails)
+BuildRequires: rubygem(minitest)
BuildRequires: rubygem(mocha)
+BuildRequires: rubygem(rails)
+BuildRequires: rubygem(sass-rails)
+BuildRequires: rubygem(sqlite3)
BuildRequires: rubygem(test-unit)
BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
%description
Shoulda's contexts make it easy to write understandable and maintainable
@@ -34,7 +36,7 @@ Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
-Documentation for %{name}
+Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
@@ -45,16 +47,13 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
# Fix wrong-file-end-of-line-encoding for rpmlint
sed -i 's/\r$//' MIT-LICENSE
+
# Remove /usr/bin/env from shebang so RPM doesn't consider this a dependency
sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/convert_to_should_syntax
+
# Remove zero-length developer-only file
rm test/fake_rails_root/vendor/plugins/.keep
sed -i 's|"test/fake_rails_root/vendor/plugins/.keep",||' %{gem_name}.gemspec
-# Remove developer-only files.
-for f in Appraisals Gemfile Rakefile; do
- rm $f
- sed -i "s|\"$f\",||g" %{gem_name}.gemspec
-done
%build
@@ -63,11 +62,6 @@ gem build %{gem_name}.gemspec
%gem_install
-# remove unnecessary gemspec
-pushd .%{gem_instdir}
- rm %{gem_name}.gemspec
-popd
-
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
@@ -81,16 +75,24 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
- # The tests currently require test-unit, and will fail with minitest. On
- # Fedora > 19, minitest gets installed from the other buildrequires, so we
- # cannot avoid having minitest in the build root.
- # The long-term solution is to port shoulda-context to work with minitest.
- # https://github.com/thoughtbot/shoulda-context/issues/33
- %if 0%{?fedora} <= 19
- testrb -Ilib:test test/shoulda/*_test.rb
- %else
- echo "tests do not work with minitest. Skipping."
- %endif
+# Remove locks to be able to use system dependencies.
+rm gemfiles/*.lock
+
+# Relax mocha and test-unit dependencies.
+sed -i '/dependency.*mocha/ s/0.9.10/0.9/' shoulda-context.gemspec
+sed -i '/dependency.*test-unit/ s/2.1.0/2.1/' shoulda-context.gemspec
+
+# Get rid of unnecessary dependencies.
+sed -i '/dependency.*appraisal/d' shoulda-context.gemspec
+sed -i '/dependency.*rails/d' shoulda-context.gemspec
+sed -i '/dependency.*rake/d' shoulda-context.gemspec
+
+# Use RoR available in build root.
+sed -i '/gem "rails"/ s/, :github=>"rails\/rails", :branch=>"4-1-stable"//' gemfiles/rails_4_1.gemfile
+
+BUNDLE_GEMFILE=gemfiles/test_unit.gemfile bundle exec ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
+BUNDLE_GEMFILE=gemfiles/minitest_5_x.gemfile bundle exec ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
+BUNDLE_GEMFILE=gemfiles/rails_4_1.gemfile bundle exec ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd
%files
@@ -102,18 +104,25 @@ popd
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
-%{gem_instdir}/gemfiles
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/CONTRIBUTING.md
-%exclude %{gem_instdir}/init.rb
-%exclude %{gem_instdir}/rails/init.rb
-%exclude %{gem_instdir}/tasks
-%exclude %{gem_instdir}/test
+%{gem_instdir}/Appraisals
+%{gem_instdir}/Gemfile
+%{gem_instdir}/gemfiles
+%{gem_instdir}/init.rb
+%{gem_instdir}/rails/init.rb
+%{gem_instdir}/Rakefile
+%{gem_instdir}/shoulda-context.gemspec
+%{gem_instdir}/tasks
+%{gem_instdir}/test
%changelog
+* Wed Jul 02 2014 Vít Ondruch <vondruch at redhat.com> - 1.2.1-1
+- Update to shoulda-context 1.2.1.
+
* Tue Nov 05 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.1.6-2
- Update to shoulda-context 1.1.6
- Clean up comments
diff --git a/sources b/sources
index 76696d1..8c90c03 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-905f532e4c5527e41793b6dd28bb130b shoulda-context-1.1.6.gem
+097d4d245d08c1426614184bbac60ea0 shoulda-context-1.2.1.gem
More information about the scm-commits
mailing list