[rubygem-shoulda-matchers] Initial import (rhbz#1115554).

Vít Ondruch vondruch at fedoraproject.org
Mon Jul 7 07:33:03 UTC 2014


commit 6f58083a8eb335065411d901f1e1d78d44837e49
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Jul 3 09:37:54 2014 +0200

    Initial import (rhbz#1115554).

 rubygem-shoulda-matchers.spec |  136 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 136 insertions(+), 0 deletions(-)
---
diff --git a/rubygem-shoulda-matchers.spec b/rubygem-shoulda-matchers.spec
new file mode 100644
index 0000000..5bfc1cc
--- /dev/null
+++ b/rubygem-shoulda-matchers.spec
@@ -0,0 +1,136 @@
+# Generated from shoulda-matchers-2.6.1.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name shoulda-matchers
+
+Name: rubygem-%{gem_name}
+Version: 2.6.1
+Release: 1%{?dist}
+Summary: Making tests easy on the fingers and eyes
+Group: Development/Languages
+License: MIT
+URL: http://thoughtbot.com/community/
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+BuildRequires: ruby >= 1.9.2
+BuildRequires: rubygem(aruba)
+BuildRequires: rubygem(cucumber)
+BuildRequires: rubygem(activeresource)
+BuildRequires: rubygem(bcrypt)
+BuildRequires: rubygem(bourne)
+BuildRequires: rubygem(coffee-rails)
+BuildRequires: rubygem(jbuilder)
+BuildRequires: rubygem(jquery-rails)
+BuildRequires: rubygem(protected_attributes)
+BuildRequires: rubygem(rails)
+BuildRequires: rubygem(rspec-rails)
+BuildRequires: rubygem(sass-rails)
+BuildRequires: rubygem(sdoc)
+BuildRequires: rubygem(spring)
+BuildRequires: rubygem(sqlite3)
+BuildRequires: rubygem(therubyracer)
+BuildRequires: rubygem(turbolinks)
+BuildRequires: rubygem(uglifier)
+BuildArch: noarch
+
+%description
+shoulda-matchers provides Test::Unit- and RSpec-compatible one-liners that
+test common Rails functionality. These tests would otherwise be much longer,
+more complex, and error-prone.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
+%prep
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n  %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+# Fix wrong-file-end-of-line-encoding for rpmlint.
+sed -i 's/\r$//' MIT-LICENSE
+
+%build
+# Create the gem as gem install only works on a gem file
+gem build %{gem_name}.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}
+# Remove unnecessary dependencies.
+sed -i '/dependency(%q<appraisal>/ d' shoulda-matchers.gemspec
+sed -i '/dependency(%q<pry>/ d' shoulda-matchers.gemspec
+sed -i '/dependency(%q<rake>/ d' shoulda-matchers.gemspec
+
+# Remove the explicit Rails version dependency.
+sed -i '/dependency(%q<rails>/ s/, \[.*\]//' shoulda-matchers.gemspec
+
+# Add dependency on ActiveResource.
+echo "gem 'activeresource'" >> Gemfile
+echo "gem 'protected_attributes'" >> Gemfile
+echo "gem 'bcrypt'" >> Gemfile
+
+# We want to use local versions of gems.
+rm Gemfile.lock
+bundle install --local
+
+# Use only locally available gems."
+sed -i "s/'bundle install'/'bundle install --local'/" spec/support/test_application.rb
+
+# JS runtime is needed.
+sed -i '/rails new/ a \    `echo "gem %{therubyracer}" >> #{ROOT_DIR}/Gemfile`' spec/support/test_application.rb
+
+bundle exec rspec spec
+
+# Lets use system dependencies.
+rm gemfiles/*.lock
+
+# bcrypt-ruby was recently renamed.
+sed -i 's/bcrypt-ruby/bcrypt/' gemfiles/4.1.gemfile
+
+# pry seems to be superfluous.
+sed -i "/gem 'pry'/d" features/step_definitions/rails_steps.rb
+
+BUNDLE_GEMFILE=gemfiles/4.1.gemfile cucumber
+popd
+
+%files
+%doc %{gem_instdir}/MIT-LICENSE
+%dir %{gem_instdir}
+%exclude %{gem_instdir}/.*
+%{gem_libdir}
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%{gem_instdir}/Appraisals
+%doc %{gem_instdir}/CONTRIBUTING.md
+%{gem_instdir}/Gemfile*
+%doc %{gem_instdir}/NEWS.md
+%doc %{gem_instdir}/README.md
+%{gem_instdir}/Rakefile
+%{gem_instdir}/features
+%{gem_instdir}/gemfiles
+%{gem_instdir}/shoulda-matchers.gemspec
+%{gem_instdir}/spec
+
+%changelog
+* Mon Jun 30 2014 Vít Ondruch <vondruch at redhat.com> - 2.6.1-1
+- Initial package


More information about the scm-commits mailing list