From d43be867c2a5448fa2e7c7b2a783c87fa3813482 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 04 2015 07:15:38 +0000 Subject: import rh-ror41-rubygem-sprockets-2.12.3-3.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f3e69e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/sprockets-2.12.3-tests.tgz +SOURCES/sprockets-2.12.3.gem diff --git a/.rh-ror41-rubygem-sprockets.metadata b/.rh-ror41-rubygem-sprockets.metadata new file mode 100644 index 0000000..4ba357d --- /dev/null +++ b/.rh-ror41-rubygem-sprockets.metadata @@ -0,0 +1,2 @@ +d493c73a8e659c575d409035440ad548d0b68727 SOURCES/sprockets-2.12.3-tests.tgz +80225438c1f7512f7960e79ba545f4d374c04b71 SOURCES/sprockets-2.12.3.gem diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rubygem-sprockets-2.12.1-Tests-need-to-be-test_.patch b/SOURCES/rubygem-sprockets-2.12.1-Tests-need-to-be-test_.patch new file mode 100644 index 0000000..96a048b --- /dev/null +++ b/SOURCES/rubygem-sprockets-2.12.1-Tests-need-to-be-test_.patch @@ -0,0 +1,32 @@ +From e840d7fedd180929d089f17d6d6e322e672780f0 Mon Sep 17 00:00:00 2001 +From: Joshua Peek +Date: Tue, 20 Aug 2013 18:22:05 -0500 +Subject: [PATCH] Tests need to be test_ + +--- + test/sprockets_test.rb | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/test/sprockets_test.rb b/test/sprockets_test.rb +index a889d16..17442bb 100644 +--- a/test/sprockets_test.rb ++++ b/test/sprockets_test.rb +@@ -10,13 +10,11 @@ + $VERBOSE = old_verbose + end + +-class Sprockets::TestCase < MiniTest::Unit::TestCase ++class Sprockets::TestCase < MiniTest::Test + FIXTURE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "fixtures")) + +- undef_method :default_test if method_defined? :default_test +- + def self.test(name, &block) +- define_method("test #{name.inspect}", &block) ++ define_method("test_#{name.inspect}", &block) + end + + def fixture(path) +-- +1.9.3 + diff --git a/SOURCES/rubygem-sprockets-2.12.1-assert_no_equal-is-gone.patch b/SOURCES/rubygem-sprockets-2.12.1-assert_no_equal-is-gone.patch new file mode 100644 index 0000000..083d274 --- /dev/null +++ b/SOURCES/rubygem-sprockets-2.12.1-assert_no_equal-is-gone.patch @@ -0,0 +1,52 @@ +From 9be057ce5804492c7c5bd1b20ba7da49c5538740 Mon Sep 17 00:00:00 2001 +From: Joshua Peek +Date: Tue, 20 Aug 2013 18:23:52 -0500 +Subject: [PATCH] assert_not_equal is gone + +--- + test/test_environment.rb | 8 ++++---- + test/test_server.rb | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/test/test_environment.rb b/test/test_environment.rb +index a4d9ccb..c26798d 100644 +--- a/test/test_environment.rb ++++ b/test/test_environment.rb +@@ -477,8 +477,8 @@ def setup + require 'digest/sha1' + @env.digest_class = Digest::SHA1 + +- assert_not_equal old_digest, @env.digest +- assert_not_equal old_asset_digest, @env["gallery.js"].digest ++ assert old_digest != @env.digest ++ assert old_asset_digest != @env["gallery.js"].digest + end + + test "changing digest version" do +@@ -487,8 +487,8 @@ def setup + + @env.version = 'v2' + +- assert_not_equal old_digest, @env.digest +- assert_not_equal old_asset_digest, @env["gallery.js"].digest ++ assert old_digest != @env.digest ++ assert old_asset_digest != @env["gallery.js"].digest + end + + test "bundled asset is stale if its mtime is updated or deleted" do +diff --git a/test/test_server.rb b/test/test_server.rb +index 41e263d..9fdffb5 100644 +--- a/test/test_server.rb ++++ b/test/test_server.rb +@@ -98,7 +98,7 @@ def app + get "/assets/application.js" + time_after_modifying = last_response.headers['Last-Modified'] + +- assert_not_equal time_before_modifying, time_after_modifying ++ assert time_before_modifying != time_after_modifying + end + end + +-- +1.9.3 + diff --git a/SOURCES/rubygem-sprockets-2.12.1-assert_raise-assert_raises.patch b/SOURCES/rubygem-sprockets-2.12.1-assert_raise-assert_raises.patch new file mode 100644 index 0000000..098bb98 --- /dev/null +++ b/SOURCES/rubygem-sprockets-2.12.1-assert_raise-assert_raises.patch @@ -0,0 +1,149 @@ +From a454ecb17cd1058ad46665824ca4d0f309f0eccf Mon Sep 17 00:00:00 2001 +From: Joshua Peek +Date: Tue, 20 Aug 2013 18:26:59 -0500 +Subject: [PATCH] assert_raise -> assert_raises + +--- + test/test_asset.rb | 30 +++++++++++++++--------------- + test/test_asset_attributes.rb | 2 +- + test/test_encoding.rb | 2 +- + test/test_environment.rb | 2 +- + 4 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/test/test_asset.rb b/test/test_asset.rb +index 0a6a118..7346620 100644 +--- a/test/test_asset.rb ++++ b/test/test_asset.rb +@@ -619,7 +619,7 @@ def setup + end + + test "requiring a file of a different format raises an exception" do +- assert_raise Sprockets::ContentTypeMismatch do ++ assert_raises Sprockets::ContentTypeMismatch do + asset("mismatch.js") + end + end +@@ -696,13 +696,13 @@ def setup + end + + test "can't require files outside the load path" do +- assert_raise Sprockets::FileNotFound do ++ assert_raises Sprockets::FileNotFound do + asset("relative/require_outside_path.js") + end + end + + test "can't require absolute files outside the load path" do +- assert_raise Sprockets::FileOutsidePaths do ++ assert_raises Sprockets::FileOutsidePaths do + asset("absolute/require_outside_path.js").to_s + end + end +@@ -743,19 +743,19 @@ def setup + end + + test "require_tree with a logical path argument raises an exception" do +- assert_raise(Sprockets::ArgumentError) do ++ assert_raises(Sprockets::ArgumentError) do + asset("tree/with_logical_path/require_tree_with_logical_path.js").to_s + end + end + + test "require_tree with a nonexistent path raises an exception" do +- assert_raise(Sprockets::ArgumentError) do ++ assert_raises(Sprockets::ArgumentError) do + asset("tree/with_logical_path/require_tree_with_nonexistent_path.js").to_s + end + end + + test "require_tree with a nonexistent absolute path raises an exception" do +- assert_raise(Sprockets::ArgumentError) do ++ assert_raises(Sprockets::ArgumentError) do + asset("absolute/require_nonexistent_path.js").to_s + end + end +@@ -772,7 +772,7 @@ def setup + end + + test "multiple require_self directives raises and error" do +- assert_raise(Sprockets::ArgumentError) do ++ assert_raises(Sprockets::ArgumentError) do + asset("require_self_twice.css") + end + end +@@ -786,13 +786,13 @@ def setup + end + + test "circular require raises an error" do +- assert_raise(Sprockets::CircularDependencyError) do ++ assert_raises(Sprockets::CircularDependencyError) do + asset("circle/a.js") + end +- assert_raise(Sprockets::CircularDependencyError) do ++ assert_raises(Sprockets::CircularDependencyError) do + asset("circle/b.js") + end +- assert_raise(Sprockets::CircularDependencyError) do ++ assert_raises(Sprockets::CircularDependencyError) do + asset("circle/c.js") + end + end +@@ -887,11 +887,11 @@ def setup + test "should not fail if home is not set in environment" do + begin + home, ENV["HOME"] = ENV["HOME"], nil +- assert_nothing_raised do +- env = Sprockets::Environment.new +- env.append_path(fixture_path('asset')) +- env['application.js'] +- end ++ env = Sprockets::Environment.new ++ env.append_path(fixture_path('asset')) ++ env['application.js'] ++ rescue Exception ++ flunk + ensure + ENV["HOME"] = home + end +diff --git a/test/test_asset_attributes.rb b/test/test_asset_attributes.rb +index 5969887..d5eba37 100644 +--- a/test/test_asset_attributes.rb ++++ b/test/test_asset_attributes.rb +@@ -17,7 +17,7 @@ class TestAssetAttributes < Sprockets::TestCase + end + + test "logical path" do +- assert_raise Sprockets::FileOutsidePaths do ++ assert_raises Sprockets::FileOutsidePaths do + pathname(fixture_path("missing/application.js")).logical_path + end + +diff --git a/test/test_encoding.rb b/test/test_encoding.rb +index f202ee0..a891fa7 100644 +--- a/test/test_encoding.rb ++++ b/test/test_encoding.rb +@@ -27,7 +27,7 @@ def setup + end + + test "read UTF-16 asset" do +- assert_raise Sprockets::EncodingError do ++ assert_raises Sprockets::EncodingError do + @env['utf16.js'].to_s + end + end +diff --git a/test/test_environment.rb b/test/test_environment.rb +index c26798d..206804d 100644 +--- a/test/test_environment.rb ++++ b/test/test_environment.rb +@@ -558,7 +558,7 @@ def setup + def foo; end + end + +- assert_nothing_raised(NameError) { e1.context_class.instance_method(:foo) } ++ e1.context_class.instance_method(:foo) + assert_raises(NameError) { e2.context_class.instance_method(:foo) } + end + +-- +1.9.3 + diff --git a/SOURCES/rubygem-sprockets-2.12.1-load-minitest.patch b/SOURCES/rubygem-sprockets-2.12.1-load-minitest.patch new file mode 100644 index 0000000..36d104d --- /dev/null +++ b/SOURCES/rubygem-sprockets-2.12.1-load-minitest.patch @@ -0,0 +1,31 @@ +From f29903ace62fd43280996b0cb32634f1e5108e52 Mon Sep 17 00:00:00 2001 +From: Joshua Peek +Date: Tue, 20 Aug 2013 18:12:32 -0500 +Subject: [PATCH] Load minitest + +--- + test/sprockets_test.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/sprockets_test.rb b/test/sprockets_test.rb +index 1b7f87f..a889d16 100644 +--- a/test/sprockets_test.rb ++++ b/test/sprockets_test.rb +@@ -1,4 +1,4 @@ +-require "test/unit" ++require "minitest/autorun" + require "sprockets" + require "tilt" + require "fileutils" +@@ -10,7 +10,7 @@ + $VERBOSE = old_verbose + end + +-class Sprockets::TestCase < Test::Unit::TestCase ++class Sprockets::TestCase < MiniTest::Unit::TestCase + FIXTURE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "fixtures")) + + undef_method :default_test if method_defined? :default_test +-- +1.9.3 + diff --git a/SPECS/rubygem-sprockets.spec b/SPECS/rubygem-sprockets.spec new file mode 100644 index 0000000..e18a161 --- /dev/null +++ b/SPECS/rubygem-sprockets.spec @@ -0,0 +1,156 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +# Generated from sprockets-2.4.5.gem by gem2rpm -*- rpm-spec -*- +%global gem_name sprockets + +Summary: Rack-based asset packaging system +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 2.12.3 +Release: 3%{?dist} +Group: Development/Languages +License: MIT +URL: http://getsprockets.org/ +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +# to get tests: +# git clone https://github.com/sstephenson/sprockets.git && cd sprockets/ +# git checkout v2.12.3 && tar czf sprockets-2.12.3-tests.tgz test/ +Source1: sprockets-%{version}-tests.tgz +# Moves test suite to use minitest. +# https://github.com/sstephenson/sprockets/commit/f29903ace62fd43280996b0cb32634f1e5108e52 +Patch0: rubygem-sprockets-2.12.1-load-minitest.patch +# https://github.com/sstephenson/sprockets/commit/e840d7fedd180929d089f17d6d6e322e672780f0 +Patch1: rubygem-sprockets-2.12.1-Tests-need-to-be-test_.patch +# https://github.com/sstephenson/sprockets/commit/a454ecb17cd1058ad46665824ca4d0f309f0eccf +Patch2: rubygem-sprockets-2.12.1-assert_raise-assert_raises.patch +# https://github.com/sstephenson/sprockets/commit/9be057ce5804492c7c5bd1b20ba7da49c5538740 +Patch3: rubygem-sprockets-2.12.1-assert_no_equal-is-gone.patch +Requires: %{?scl_prefix_ruby}ruby(release) +Requires: %{?scl_prefix_ruby}ruby(rubygems) +Requires: %{?scl_prefix}rubygem(hike) => 1.2 +Requires: %{?scl_prefix}rubygem(hike) < 2 +Requires: %{?scl_prefix}rubygem(multi_json) => 1.0 +Requires: %{?scl_prefix}rubygem(multi_json) < 2 +Requires: %{?scl_prefix}rubygem(rack) => 1.0 +Requires: %{?scl_prefix}rubygem(rack) < 2 +Requires: %{?scl_prefix}rubygem(tilt) => 1.1 +Requires: %{?scl_prefix}rubygem(tilt) < 2 +Conflicts: %{?scl_prefix}rubygem(tilt) = 1.3.0 +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{?scl_prefix_ruby}ruby +BuildRequires: %{?scl_prefix}rubygem(coffee-script) +# these two gems aren't in Fedora yet and are only soft dependencies +# BuildRequires: %{?scl_prefix}rubygem(eco) +# BuildRequires: %{?scl_prefix}rubygem(ejs) +BuildRequires: %{?scl_prefix}rubygem(execjs) +BuildRequires: %{?scl_prefix}rubygem(hike) => 1.2 +BuildRequires: %{?scl_prefix}rubygem(hike) < 2 +BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) +BuildRequires: %{?scl_prefix}rubygem(uglifier) +BuildRequires: %{?scl_prefix}rubygem(multi_json) +BuildRequires: %{?scl_prefix}rubygem(rack) => 1.0 +BuildRequires: %{?scl_prefix}rubygem(rack) < 2 +BuildRequires: %{?scl_prefix}rubygem(rack-test) +BuildRequires: %{?scl_prefix_ruby}rubygem(rake) +BuildRequires: %{?scl_prefix}rubygem(sass) +BuildRequires: %{?scl_prefix}rubygem(therubyracer) +BuildRequires: %{?scl_prefix_v8}v8 +BuildRequires: %{?scl_prefix}rubygem(tilt) => 1.1 +BuildRequires: %{?scl_prefix}rubygem(tilt) < 2 +BuildConflicts: %{?scl_prefix}rubygem(tilt) = 1.3.0 +BuildArch: noarch +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +%description +Sprockets is a Rack-based asset packaging system that concatenates and serves +JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS. + + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{pkg_name} + +%prep +%setup -n %{pkg_name}-%{version} -q -c -T +%{?scl:scl enable %{scl} - << \EOF} +%gem_install -n %{SOURCE0} +%{?scl:EOF} + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + + +mkdir -p %{buildroot}%{_bindir} +cp -a .%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +%check +pushd .%{gem_instdir} +tar xzf %{SOURCE1} +# Patch tests to use Minitest 5 +cat %{PATCH0} | patch -p1 +cat %{PATCH1} | patch -p1 +cat %{PATCH2} | patch -p1 +cat %{PATCH3} | patch -p1 +# One failure due to changes in ExecJS exceptions +# Fixed in https://github.com/sstephenson/sprockets/commit/47dc70c61b122284299d68c6010dbdb57b6a1211 +# And 4 because newer SASS returns #666 for grey instead of #666666 +# https://github.com/sstephenson/sprockets/issues/660 +%{?scl:scl enable %{scl} %{scl_v8} - << \EOF} +ruby -Ilib:test -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' #| grep '284 runs, 761 assertions, 5 failures, 0 errors, 0 skips' +%{?scl:EOF} +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/LICENSE +%{_bindir}/sprockets +%{gem_instdir}/bin +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_instdir}/README.md +%doc %{gem_docdir} + +%changelog +* Tue Jan 27 2015 Josef Stribny - 2.12.3-3 +- Revert back to multi_json as it is now part of SCL + +* Mon Jan 26 2015 Josef Stribny - 2.12.3-2 +- Fix: properly delete any multi_json mention in gemspec + +* Mon Jan 26 2015 Josef Stribny - 2.12.3-1 +- Update to 2.12.3 + +* Mon Feb 17 2014 Josef Stribny - 2.8.2-3 +- Depend on scldevel(v8) virtual provide + +* Tue Nov 26 2013 Josef Stribny - 2.8.2-2 +- Use v8 scl macro + +* Wed Oct 16 2013 Josef Stribny - 2.8.2-1 +- Upgrade to version 2.8.2 +- Added rubygem-uglifier build dependency + +* Wed Jun 12 2013 Josef Stribny - 2.4.5-3 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + +* Thu Jul 26 2012 Bohuslav Kabrda - 2.4.5-2 +- Imported from Fedora again. + +* Wed Jul 18 2012 Bohuslav Kabrda - 2.4.5-1 +- Initial package