diff --git a/.gitignore b/.gitignore index e27928d..78f1c12 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /rspec-core-2.6.4.gem /rspec-core-2.8.0.gem /rspec-core-2.11.1.gem +/rspec-core-2.12.2.gem diff --git a/rubygem-rspec-core-2.11.1-skip-some-tests.patch b/rubygem-rspec-core-2.11.1-skip-some-tests.patch deleted file mode 100644 index eb235a6..0000000 --- a/rubygem-rspec-core-2.11.1-skip-some-tests.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- rspec-core-2.11.1/spec/spec_helper.rb.orig 2012-10-11 17:43:44.550615644 +0900 -+++ rspec-core-2.11.1/spec/spec_helper.rb 2012-10-11 17:45:57.631226844 +0900 -@@ -17,10 +17,10 @@ - Spork.prefork do - require 'rspec/autorun' - require 'autotest/rspec2' -- require 'aruba/api' -- require 'fakefs/spec_helpers' -+ #require 'aruba/api' -+ #require 'fakefs/spec_helpers' - -- Dir['./spec/support/**/*.rb'].map {|f| require f} -+ Dir['./spec/support/**/*.rb'].map {|f| require f unless f.include?("config_options_helper")} - - class NullObject - private -@@ -71,15 +71,15 @@ - c.alias_it_behaves_like_to 'it_has_behavior' - c.around {|example| sandboxed { example.run }} - c.include(RSpecHelpers) -- c.include Aruba::Api, :example_group => { -- :file_path => /spec\/command_line/ -- } -+ #c.include Aruba::Api, :example_group => { -+ #:file_path => /spec\/command_line/ -+ #} - - # runtime options - c.treat_symbols_as_metadata_keys_with_true_values = true - c.color = !in_editor? - c.filter_run :focus -- c.include FakeFS::SpecHelpers, :fakefs -+ #c.include FakeFS::SpecHelpers, :fakefs - c.run_all_when_everything_filtered = true - c.filter_run_excluding :ruby => lambda {|version| - case version.to_s diff --git a/rubygem-rspec-core-2.12.2-spec-test-without-aruba.patch b/rubygem-rspec-core-2.12.2-spec-test-without-aruba.patch new file mode 100644 index 0000000..6a099d4 --- /dev/null +++ b/rubygem-rspec-core-2.12.2-spec-test-without-aruba.patch @@ -0,0 +1,23 @@ +--- rspec-core-2.12.2/spec/spec_helper.rb.fedora 2013-01-02 14:26:16.000000000 +0900 ++++ rspec-core-2.12.2/spec/spec_helper.rb 2013-01-02 14:31:47.000000000 +0900 +@@ -17,7 +17,7 @@ + Spork.prefork do + require 'rspec/autorun' + require 'autotest/rspec2' +- require 'aruba/api' ++ #require 'aruba/api' + + if RUBY_PLATFORM == 'java' + # Works around https://jira.codehaus.org/browse/JRUBY-5678 +@@ -101,9 +101,11 @@ + c.alias_it_behaves_like_to 'it_has_behavior' + c.around {|example| sandboxed { example.run }} + c.include(RSpecHelpers) ++''' + c.include Aruba::Api, :example_group => { + :file_path => /spec\/command_line/ + } ++''' + + # runtime options + c.treat_symbols_as_metadata_keys_with_true_values = true diff --git a/rubygem-rspec-core.spec b/rubygem-rspec-core.spec index 50778ef..66a6125 100644 --- a/rubygem-rspec-core.spec +++ b/rubygem-rspec-core.spec @@ -1,14 +1,11 @@ -%global gemdir %{gem_dir} -%global majorver 2.11.1 +%global majorver 2.12.2 #%%global preminorver .rc6 %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global fullver %{majorver}%{?preminorver} %global fedorarel 1 -%global gemname rspec-core -%global gem_name %{gemname} -%global geminstdir %{gem_instdir} +%global gem_name rspec-core %global rubyabi 1.9.1 @@ -19,16 +16,16 @@ %{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}} Summary: Rspec-2 runner and formatters -Name: rubygem-%{gemname} +Name: rubygem-%{gem_name} Version: %{majorver} Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist} Group: Development/Languages License: MIT URL: http://github.com/rspec/rspec-mocks -Source0: http://rubygems.org/gems/%{gemname}-%{fullver}.gem -# Skip some tests -Patch0: rubygem-rspec-core-2.11.1-skip-some-tests.patch +Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem +# Make spec test executable without Aruba +Patch0: rubygem-rspec-core-2.12.2-spec-test-without-aruba.patch BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: rubygems-devel @@ -52,7 +49,7 @@ Requires: rubygem(rake) #Requires: rubygem(ruby-debug) # Not found in Fedora yet (and optional) #Requires: rubygem(rr) -Provides: rubygem(%{gemname}) = %{version}-%{release} +Provides: rubygem(%{gem_name}) = %{version}-%{release} BuildArch: noarch %description @@ -70,20 +67,14 @@ This package contains documentation for %{name}. %prep %setup -q -c -T -mkdir -p .%{gemdir} -gem install \ - -V \ - --local \ - --install-dir .%{gemdir} \ - --bindir .%{_bindir} \ - --force \ - --rdoc \ - %{SOURCE0} +TOPDIR=$(pwd) +mkdir tmpunpackdir +pushd tmpunpackdir -chmod 0644 .%{gemdir}/cache/%{gemname}-%{fullver}.gem +gem unpack %{SOURCE0} +cd %{gem_name}-%{version} # rpmlint -pushd .%{geminstdir} grep -rl '^#![ \t]*/usr/bin' ./lib| \ xargs sed -i -e '\@^#![ \t]*/usr/bin@d' @@ -99,9 +90,25 @@ EOF %patch0 -p1 +gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec +gem build %{gem_name}.gemspec +mv %{gem_name}-%{version}.gem $TOPDIR + popd +rm -rf tmpunpackdir %build +mkdir -p .%{gem_dir} +gem install \ + -V \ + --local \ + --install-dir .%{gem_dir} \ + --bindir .%{_bindir} \ + --force \ + --rdoc \ + %{gem_name}-%{version}.gem + +#chmod 0644 ./%{gem_cache} %install mkdir -p %{buildroot}%{_prefix} @@ -112,44 +119,40 @@ cp -a .%{_prefix}/* %{buildroot}%{_prefix}/ mv %{buildroot}%{_bindir}/autospec{,2} # cleanups -rm -f %{buildroot}%{geminstdir}/{.document,.gitignore,.treasure_map.rb,.rspec,.travis.yml,spec.txt,.yardopts} +rm -f %{buildroot}%{gem_instdir}/{.document,.gitignore,.treasure_map.rb,.rspec,.travis.yml,spec.txt,.yardopts} %if 0%{?need_bootstrap} < 1 %check -pushd .%{geminstdir} -# spec/autotest/failed_results_re_spec.rb (and others) fail, skipping this for now -# (need investigating) -# and now also some other tests fail -ruby -rubygems -Ilib/ -S exe/rspec \ - $(ls -1 spec/rspec/*_spec.rb spec/rspec/*/*_spec.rb | \ - grep -v configuration_options_spec | \ - grep -v drb_options_spec ) \ - || : +pushd .%{gem_instdir} +# Test failure needs investigation... +ruby -rubygems -Ilib/ -S exe/rspec || : %endif %files %defattr(-,root,root,-) -%dir %{geminstdir} +%dir %{gem_instdir} -%doc %{geminstdir}/License.txt -%doc %{geminstdir}/*.md +%doc %{gem_instdir}/License.txt +%doc %{gem_instdir}/*.md %{_bindir}/autospec2 %{_bindir}/rspec -%{geminstdir}/exe/ -%{geminstdir}/lib/ - -%{gemdir}/cache/%{gemname}-%{fullver}.gem -%{gemdir}/specifications/%{gemname}-%{fullver}.gemspec +%{gem_instdir}/exe/ +%{gem_instdir}/lib/ +%exclude %{gem_cache} +%{gem_spec} %files doc %defattr(-,root,root,-) -%{gemdir}/doc/%{gemname}-%{fullver} -%{geminstdir}/features/ -%{geminstdir}/spec/ +%{gem_docdir} +%{gem_instdir}/features/ +%exclude %{gem_instdir}/spec/ %changelog +* Wed Jan 2 2013 Mamoru TASAKA - 2.12.2-1 +- 2.12.2 + * Thu Oct 11 2012 Mamoru Tasaka - 2.11.1-1 - 2.11.1 - Drop dependency for mocks and expectations diff --git a/sources b/sources index 851c322..7000fbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b7c76f97b14192a91ee096122a7c99ed rspec-core-2.11.1.gem +2ba47d5e7c3464f8e4b95a765eab4935 rspec-core-2.12.2.gem