Blame SPECS/rubygem-railties.spec

208a8b
%{?scl:%scl_package rubygem-%{gem_name}}
208a8b
%{!?scl:%global pkg_name %{name}}
208a8b
208a8b
# Generated from railties-3.0.3.gem by gem2rpm -*- rpm-spec -*-
208a8b
%global gem_name railties
208a8b
208a8b
%global download_path http://rubygems.org/downloads/
208a8b
208a8b
%global runtests 0
208a8b
208a8b
Summary: Tools for creating, working with, and running Rails applications
208a8b
Name: %{?scl_prefix}rubygem-%{gem_name}
208a8b
Version: 4.2.6
208a8b
Release: 3%{?dist}
208a8b
Group: Development/Languages
208a8b
License: MIT
208a8b
URL: http://www.rubyonrails.org
208a8b
Source0: %{download_path}%{gem_name}-%{version}.gem
208a8b
# ** Take LICENSE file from upstream. **
208a8b
# wget --no-check-certificate https://github.com/rails/rails/raw/master/railties/MIT-LICENSE
208a8b
Source1: http://github.com/rails/rails/raw/master/railties/MIT-LICENSE
208a8b
# to get tests:
208a8b
# git clone http://github.com/rails/rails.git && cd rails/railties/
208a8b
# git checkout v4.2.6 && tar czvf railties-4.2.6-tests.tgz test/
208a8b
Source2: railties-%{version}-tests.tgz
208a8b
# Run bundler with --local
208a8b
Patch0: rubygem-railties-default-to-bundle-install-local.patch
208a8b
208a8b
# Let's keep Requires and BuildRequires sorted alphabeticaly
208a8b
Requires: %{?scl_prefix_ruby}ruby(release)
208a8b
Requires: %{?scl_prefix_ruby}ruby(rubygems)
208a8b
Requires: %{?scl_prefix}rubygem(actionpack) = %{version}
208a8b
Requires: %{?scl_prefix}rubygem(activesupport) = %{version}
208a8b
Requires: %{?scl_prefix_ruby}rubygem(rake) >= 0.8.7
208a8b
Requires: %{?scl_prefix}rubygem(thor) >= 0.18.1
208a8b
Requires: %{?scl_prefix}rubygem(thor) < 2.0
208a8b
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
208a8b
BuildRequires: %{?scl_prefix_ruby}ruby(release)
208a8b
%if 0%{?runtests}
208a8b
BuildRequires: %{?scl_prefix}rubygem(actionpack) = %{version}
208a8b
BuildRequires: %{?scl_prefix}rubygem(activerecord) = %{version}
208a8b
BuildRequires: %{?scl_prefix}rubygem(activesupport) = %{version}
208a8b
BuildRequires: %{?scl_prefix}rubygem(actionmailer) = %{version}
208a8b
BuildRequires: %{?scl_prefix_ruby}rubygem(bundler)
208a8b
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
208a8b
BuildRequires: %{?scl_prefix}rubygem(mocha)
208a8b
BuildRequires: %{?scl_prefix_ruby}rubygem(rake)
208a8b
BuildRequires: %{?scl_prefix}rubygem(sqlite3)
208a8b
BuildRequires: %{?scl_prefix}rubygem(thor)
208a8b
BuildRequires: %{?scl_prefix}rubygem(thread_safe)
208a8b
%endif
208a8b
BuildArch: noarch
208a8b
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
208a8b
208a8b
%description
208a8b
Rails internals: application bootup, plugins, generators, and rake tasks.
208a8b
Railties is responsible to glue all frameworks together. Overall, it:
208a8b
* handles all the bootstrapping process for a Rails application;
208a8b
* manager rails command line interface;
208a8b
* provides Rails generators core;
208a8b
208a8b
%package doc
208a8b
Summary: Documentation for %{pkg_name}
208a8b
Group: Documentation
208a8b
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
208a8b
208a8b
%description doc
208a8b
This package contains documentation for %{pkg_name}.
208a8b
208a8b
%prep
208a8b
%setup -n %{pkg_name}-%{version} -q -c -T
208a8b
mkdir -p .%{_bindir}
208a8b
%{?scl:scl enable %{scl} - << \EOF}
208a8b
%gem_install -n %{SOURCE0}
208a8b
%{?scl:EOF}
208a8b
208a8b
pushd .%{gem_instdir}
208a8b
%patch0 -p1 -F 0
208a8b
popd
208a8b
208a8b
# May by only for v.3.0.3-6
208a8b
#
208a8b
# Some stylesheet seems to be mistakingly marked as executable in the upstream
208a8b
# source
208a8b
find .%{gem_instdir} -name *.css -type f -perm /a+x -exec %{__chmod} -v 644 {} \;
208a8b
208a8b
%build
208a8b
208a8b
%install
208a8b
mkdir -p %{buildroot}%{gem_dir}
208a8b
mkdir -p %{buildroot}%{_bindir}
208a8b
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}
208a8b
cp -a .%{_bindir}/* %{buildroot}%{_bindir}
208a8b
208a8b
cp %{SOURCE1} %{buildroot}%{gem_instdir}
208a8b
208a8b
%check
208a8b
%if 0%{?runtests}
208a8b
# fake RAILS_FRAMEWORK_ROOT
208a8b
ln -s %{gem_dir}/gems/activesupport-%{version}/ .%{gem_dir}/gems/activesupport
208a8b
ln -s %{gem_dir}/gems/actionmailer-%{version}/ .%{gem_dir}/gems/actionmailer
208a8b
ln -s ${PWD}%{gem_instdir} .%{gem_dir}/gems/railties
208a8b
touch .%{gem_dir}/gems/load_paths.rb
208a8b
touch .%{gem_dir}/gems/Gemfile
208a8b
export RUBYOPT="-I${PWD}%{gem_dir}/gems/railties:${PWD}%{gem_dir}/gems/railties/lib:${PWD}%{gem_dir}/gems/railties/test -rrails/all"
208a8b
export PATH="${PWD}%{gem_dir}/gems/railties/bin:$PATH"
208a8b
208a8b
pushd .%{gem_dir}/gems/railties
208a8b
# extract tests
208a8b
tar xzf %{SOURCE2}
208a8b
208a8b
# Get rid of Bundler for now
208a8b
sed -i -e "s|require 'bundler/setup' unless defined?(Bundler)||" test/isolation/abstract_unit.rb
208a8b
208a8b
# TODO: Test are not yet in the best state.
208a8b
#
208a8b
# Additional tests are failing, investigate
208a8b
# https://bugzilla.redhat.com/show_bug.cgi?id=1313974
208a8b
%{?scl:scl enable %{scl} - << \EOF}
208a8b
ruby -I. -rrails/all -e 'Dir.glob("test/**/*_test.rb").sort.each {|t| require t}' \
208a8b
 | egrep "runs, 2[0-9]{3} assertions, [1-2][0-9]{2} failures, 3[0-9]{2} errors, 0"
208a8b
%{?scl:EOF}
208a8b
popd
208a8b
%endif
208a8b
208a8b
%files
208a8b
%{_bindir}/rails
208a8b
%dir %{gem_instdir}
208a8b
%{gem_instdir}/bin
208a8b
%{gem_libdir}
208a8b
%exclude %{gem_cache}
208a8b
%{gem_spec}
208a8b
%doc %{gem_instdir}/MIT-LICENSE
208a8b
208a8b
%files doc
208a8b
%doc %{gem_docdir}
208a8b
%doc %{gem_instdir}/CHANGELOG.md
208a8b
%doc %{gem_instdir}/RDOC_MAIN.rdoc
208a8b
%doc %{gem_instdir}/README.rdoc
208a8b
208a8b
%changelog
208a8b
* Thu Apr 07 2016 Pavel Valena <pvalena@redhat.com> - 4.2.6-3
208a8b
- Apply patch properly
208a8b
208a8b
* Thu Apr 07 2016 Pavel Valena <pvalena@redhat.com> - 4.2.6-2
208a8b
- Fix: apply patch0: run bundler with --local
208a8b
208a8b
* Mon Apr 04 2016 Pavel Valena <pvalena@redhat.com> - 4.2.6-1
208a8b
- Update to 4.2.6
208a8b
208a8b
* Wed Mar 30 2016 vagrant - 4.2.5.1-7
208a8b
- Run bundle install with --local
208a8b
  - Resolves: rhbz#1317078
208a8b
208a8b
* Mon Feb 29 2016 Pavel Valena <pvalena@redhat.com> - 4.2.5.1-6
208a8b
- Enable tests
208a8b
- Add thread_safe build dependency
208a8b
208a8b
* Mon Feb 29 2016 Pavel Valena <pvalena@redhat.com> - 4.2.5.1-5
208a8b
- Fix rubygem-thor dependency prefix
208a8b
208a8b
* Wed Feb 17 2016 Pavel Valena <pvalena@redhat.com> - 4.2.5.1-4
208a8b
- Update to 4.2.5.1
208a8b
208a8b
* Mon Jan 26 2015 Josef Stribny <jstribny@redhat.com> - 4.1.5-1
208a8b
- Update to 4.1.5
208a8b
208a8b
* Wed Jul 23 2014 Josef Stribny <jstribny@redhat.com> - 4.0.2-3
208a8b
- Patch: Run bundle install with --local when creating new app
208a8b
  - Resolves: rhbz#1115079
208a8b
208a8b
* Wed Feb 05 2014 Josef Stribny <jstribny@redhat.com> - 4.0.2-2
208a8b
- Fix license (SyntaxHighlighter is removed in 4.x.x)
208a8b
208a8b
* Wed Dec 04 2013 Josef Stribny <jstribny@redhat.com> - 4.0.2-1
208a8b
- Update to Railties 4.0.2
208a8b
  - Resolves: rhbz#1037985
208a8b
208a8b
* Thu Nov 21 2013 Josef Stribny <jstribny@redhat.com> - 4.0.1-1
208a8b
- Update to Railties 4.0.1
208a8b
208a8b
* Wed Oct 16 2013 Josef Stribny <jstribny@redhat.com> - 4.0.0-2
208a8b
- Convert to scl.
208a8b
208a8b
* Thu Aug 08 2013 Josef Stribny <jstribny@redhat.com> - 4.0.0-1
208a8b
- Update to Railties 4.0.0.
208a8b
208a8b
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.13-2
208a8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
208a8b
208a8b
* Tue Jun 11 2013 Josef Stribny <jstribny@redhat.com> - 3.2.13-1
208a8b
- Fix license.
208a8b
208a8b
* Sat Mar 09 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.12-3
208a8b
- Relax RDoc dependency.
208a8b
208a8b
* Fri Mar 08 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.12-2
208a8b
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
208a8b
208a8b
* Tue Feb 12 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.12-1
208a8b
- Update to Railties 3.2.12.
208a8b
208a8b
* Wed Jan 09 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.11-1
208a8b
- Update to Railties 3.2.11.
208a8b
208a8b
* Fri Jan 04 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.10-1
208a8b
- Update to Railties 3.2.10.
208a8b
208a8b
* Mon Aug 13 2012 Vít Ondruch <vondruch@redhat.com> - 3.2.8-1
208a8b
- Update to Railties 3.2.8.
208a8b
208a8b
* Mon Jul 30 2012 Vít Ondruch <vondruch@redhat.com> - 3.2.7-1
208a8b
- Update to Railties 3.2.7.
208a8b
208a8b
* Mon Jul 23 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.2.6-1
208a8b
- Update to Railties 3.2.6.
208a8b
- Move some files into -doc subpackage.
208a8b
- Remove the unneeded %%defattr.
208a8b
- Introduce %%check section (not running tests yet, as they are part of dependency loop).
208a8b
208a8b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.15-2
208a8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
208a8b
208a8b
* Fri Jun 15 2012 Vít Ondruch <vondruch@redhat.com> - 3.0.15-1
208a8b
- Update to Railties 3.0.15.
208a8b
208a8b
* Fri Jun 01 2012 Vít Ondruch <vondruch@redhat.com> - 3.0.13-1
208a8b
- Update to Railties 3.0.13.
208a8b
208a8b
* Wed Feb 01 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.0.11-1
208a8b
- Rebuilt for Ruby 1.9.3.
208a8b
- Update to Railties 3.0.11.
208a8b
208a8b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.10-2
208a8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
208a8b
208a8b
* Mon Aug 22 2011 Vít Ondruch <vondruch@redhat.com> - 3.0.10-1
208a8b
- Update to Railties 3.0.10
208a8b
208a8b
* Thu Jul 21 2011 Vít Ondruch <vondruch@redhat.com> - 3.0.9-2
208a8b
- Added missing RDoc dependency.
208a8b
208a8b
* Thu Jul 07 2011 Vít Ondruch <vondruch@redhat.com> - 3.0.9-1
208a8b
- Update to Railties 3.0.9
208a8b
208a8b
* Mon Jun 27 2011  <mmorsi@redhat.com> - 3.0.5-2
208a8b
- include fix for BZ #715385
208a8b
208a8b
* Tue Mar 29 2011 Vít Ondruch <vondruch@redhat.com> - 3.0.5-1
208a8b
- Updated to Railties 3.0.5
208a8b
208a8b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-8
208a8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
208a8b
208a8b
* Wed Feb 02 2011  <Minnikhanov@gmail.com> - 3.0.3-7
208a8b
- Fix Comment 11 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c11
208a8b
- Take LICENSE file from upstream.
208a8b
208a8b
* Mon Jan 31 2011  <Minnikhanov@gmail.com> - 3.0.3-6
208a8b
- Fix Comment 9 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c9
208a8b
- Temporarily test suite is blocked.
208a8b
208a8b
* Thu Jan 27 2011  <Minnikhanov@gmail.com> - 3.0.3-5
208a8b
- Fix Comment 7 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c7 
208a8b
208a8b
* Tue Jan 25 2011  <Minnikhanov@gmail.com> - 3.0.3-4
208a8b
- Fix Comment 5 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c5 
208a8b
208a8b
* Mon Jan 24 2011  <Minnikhanov@gmail.com> - 3.0.3-3
208a8b
- Fix Comment 3 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c3 
208a8b
208a8b
* Sun Jan 23 2011  <Minnikhanov@gmail.com> - 3.0.3-2
208a8b
- Fix Comment 1 #665560. https://bugzilla.redhat.com/show_bug.cgi?id=668090#c1 
208a8b
208a8b
* Fri Jan 07 2011  <Minnikhanov@gmail.com> - 3.0.3-1
208a8b
- Initial package