%{?scl:%scl_package rubygem-%{gem_name}} %{!?scl:%global pkg_name %{name}} # Generated from jquery-rails-2.0.2.gem by gem2rpm -*- rpm-spec -*- %global gem_name jquery-rails # Unfortunately, lib/jquery/rails/version.rb specifies exact versions of # bundled jquery, so be specific with the require to keep this relieable. %global jquery1_version 1.12.4 %global jquery2_version 2.2.4 %global jquery3_version 3.1.0 Name: %{?scl_prefix}rubygem-%{gem_name} Version: 4.2.1 Release: 1%{?dist} Summary: Use jQuery with Rails 4+ Group: Development/Languages License: MIT URL: https://github.com/rails/jquery-rails Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Requires: %{?scl_prefix_ruby}ruby(release) Requires: %{?scl_prefix_ruby}ruby(rubygems) >= 1.3.6 Requires: %{?scl_prefix}rubygem(railties) >= 4.2.0 Requires: %{?scl_prefix}rubygem(thor) >= 0.14 Requires: %{?scl_prefix}rubygem(thor) < 2.0 Requires: %{?scl_prefix}rubygem(rails-dom-testing) BuildRequires: %{?scl_prefix_ruby}ruby(release) BuildRequires: %{?scl_prefix_ruby}rubygems-devel BuildRequires: %{?scl_prefix_ruby}ruby BuildRequires: %{?scl_prefix}rubygem(activesupport) BuildRequires: %{?scl_prefix}rubygem(nokogiri) BuildRequires: %{?scl_prefix}rubygem(rails-dom-testing) # jquery-ujs is not yet in Fedora. Provides: bundled(jquery-usj) = 1.2.2 Provides: bundled(js-jquery) = %{jquery1_version} Provides: bundled(js-jquery) = %{jquery2_version} Provides: bundled(js-jquery) = %{jquery3_version} BuildArch: noarch Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} # Explicitly require runtime subpackage, as long as older scl-utils do not generate it %{?scl:Requires: %{?scl_prefix}runtime} %description This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application. %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} set -e %gem_install -n %{SOURCE0} %{?scl:EOF} %build %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} %{?scl:scl enable %{scl} - << \EOF} set -e # Check that rpm version dependencies match the versions expected by the # gem package. ruby -Ilib -rjquery/rails/version -e ' exit \ Jquery::Rails::JQUERY_VERSION == "%{jquery1_version}" && \ Jquery::Rails::JQUERY_2_VERSION == "%{jquery2_version}" && \ Jquery::Rails::JQUERY_3_VERSION == "%{jquery3_version}" ' ruby -Itest -rostruct -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' %{?scl:EOF} popd %files # There is no %%license macro on RHEL6. # https://bugzilla.redhat.com/show_bug.cgi?id=1386246 %{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %exclude %{gem_instdir}/.* %license %{gem_instdir}/MIT-LICENSE %{gem_libdir} %{gem_instdir}/vendor %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/VERSIONS.md %{gem_instdir}/Gemfile %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %{gem_instdir}/jquery-rails.gemspec %{gem_instdir}/test %changelog * Wed Dec 14 2016 Jun Aruga - 4.2.1-1 - Update to jquery-rails 4.2.1. * Wed Mar 02 2016 Pavel Valena - 4.0.4-4 - Fix Require of rubygem-railties * Wed Mar 02 2016 Pavel Valena - 4.0.4-3 - Update to 4.0.4 * Mon Feb 02 2015 Vít Ondruch - 3.1.0-2 - Fix thor dependency. * Mon May 26 2014 Josef Stribny - 3.1.0-1 - Update to jquery-rails 3.1.0 - This resolves: rhbz#1086262 * Thu Feb 06 2014 Josef Stribny - 3.0.4-3 - Fix license to MIT * Wed Oct 23 2013 Josef Stribny - 3.0.4-2 - Convert to scl * Wed Oct 23 2013 Josef Stribny - 3.0.4-1 - Update to jquery-rails 3.0.4 * Sun Aug 04 2013 Fedora Release Engineering - 2.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Mar 14 2013 Bohuslav Kabrda - 2.0.2-3 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Thu Feb 14 2013 Fedora Release Engineering - 2.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Jul 23 2012 Bohuslav Kabrda - 2.0.2-1 - Initial package