From 3571b7a0b21c2951814edcdf13511e1e5ca40148 Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Aug 08 2013 07:52:41 +0000 Subject: Initial commit --- diff --git a/.gitignore b/.gitignore index e69de29..107b97d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/sprockets-rails-2.0.0-tests.tgz +/sprockets-rails-2.0.0.gem diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3e97500 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2012 Joshua Peek + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/rubygem-sprockets-rails.spec b/rubygem-sprockets-rails.spec new file mode 100644 index 0000000..e0381cf --- /dev/null +++ b/rubygem-sprockets-rails.spec @@ -0,0 +1,101 @@ +# Generated from sprockets-rails-2.0.0.gem by gem2rpm -*- rpm-spec -*- +%global gem_name sprockets-rails + +# Disable tests for this build due to broken rubygem-rack dep in rawhide +%global enable_test 0 + +Name: rubygem-%{gem_name} +Version: 2.0.0 +Release: 2%{?dist} +Summary: Sprockets Rails integration +Group: Development/Languages +License: MIT +URL: https://github.com/rails/sprockets-rails +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# License file from the git repo +# https://github.com/rails/sprockets-rails/pull/75 +Source1: LICENSE +# Get the tests +# git clone https://github.com/rails/sprockets-rails.git && cd sprockets-rails/ +# git checkout v2.0.0 +# tar czvf sprockets-rails-2.0.0-tests.tgz test/ +Source2: sprockets-rails-%{version}-tests.tgz +Requires: ruby(release) +Requires: ruby(rubygems) +Requires: rubygem(sprockets) => 2.8 +Requires: rubygem(sprockets) < 3 +Requires: rubygem(actionpack) >= 3.0 +Requires: rubygem(activesupport) >= 3.0 +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby +%if 0%{enable_test} > 0 +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rails) >= 3.0 +BuildRequires: rubygem(rake) +%endif +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} + +%description +Provides Sprockets implementation for Rails 4.x (and beyond) Asset Pipeline. + + +%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 + +%build +gem build %{gem_name}.gemspec +%gem_install + +# Move license into place +cp %{SOURCE1} .%{gem_instdir}/LICENSE + +# Move the tests into place +tar xzvf %{SOURCE2} -C .%{gem_instdir} + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +%if 0%{enable_test} > 0 +pushd ./%{gem_instdir} +# Running the test suite separately works fine +testrb -Ilib test/test_helper.rb +testrb -Ilib test/test_task.rb +testrb -Ilib test/test_railtie.rb +popd +%endif + + +%files +%dir %{gem_instdir} +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} +%doc %{gem_instdir}/LICENSE + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/README.md +%{gem_instdir}/test + +%changelog +* Wed Jul 31 2013 Josef Stribny - 2.0.0-2 +- Disable tests for now due to broken deps in Rails + +* Mon Jul 22 2013 Josef Stribny - 2.0.0-1 +- Initial package diff --git a/sources b/sources index e69de29..f69aea9 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +30cede8bc27b94c32da2483c879cc8c6 sprockets-rails-2.0.0-tests.tgz +c4c5759bcb31d9c6194804aa071229f9 sprockets-rails-2.0.0.gem