init rubygem-railties package
This commit is contained in:
parent
0c26b9fb22
commit
58c587b301
BIN
railties-5.2.3.gem
Normal file
BIN
railties-5.2.3.gem
Normal file
Binary file not shown.
@ -0,0 +1,33 @@
|
||||
From b25471833462b769df5d20fb4019aee46881489e Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Fri, 16 Mar 2018 21:40:58 +0100
|
||||
Subject: [PATCH] Check value of result.source_location in
|
||||
test_unit/reporter.rb#format_rerun_snippet
|
||||
|
||||
With Ruby 2.5 format_rerun_snippet can return nil, which crashes the test
|
||||
suite, F.e.:
|
||||
|
||||
TestUnitReporterTest#test_outputs_failures_inline:
|
||||
NoMethodError: undefined method `sub' for nil:NilClass
|
||||
test/test_unit/reporter_test.rb:62:in `block in <class:TestUnitReporterTest>'
|
||||
bin/rails test test/test_unit/reporter_test.rb:61
|
||||
---
|
||||
railties/lib/rails/test_unit/reporter.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb
|
||||
index 28b93ce..86d769d 100644
|
||||
--- a/railties/lib/rails/test_unit/reporter.rb
|
||||
+++ b/railties/lib/rails/test_unit/reporter.rb
|
||||
@@ -68,7 +68,7 @@ def format_line(result)
|
||||
end
|
||||
|
||||
def format_rerun_snippet(result)
|
||||
- location, line = if result.respond_to?(:source_location)
|
||||
+ location, line = if result.respond_to?(:source_location) && result.source_location
|
||||
result.source_location
|
||||
else
|
||||
result.method(result.name).source_location
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
158
rubygem-railties.spec
Normal file
158
rubygem-railties.spec
Normal file
@ -0,0 +1,158 @@
|
||||
%global gem_name railties
|
||||
%{?_with_bootstrap: %global bootstrap 1}
|
||||
%global bootstrap 1
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 5.2.3
|
||||
Release: 1
|
||||
Summary: Tools for creating, working with, and running Rails applications
|
||||
License: MIT
|
||||
URL: http://rubyonrails.org
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: https://github.com/rails/rails/archive/v%{version}.tar.gz
|
||||
# Check value of result.source_location in
|
||||
# test_unit/reporter.rb#format_rerun_snippet
|
||||
# https://github.com/rails/rails/pull/32297
|
||||
Patch0: rubygem-railties-5.1.5-check-value-of-result-source-location.patch
|
||||
Suggests: %{_bindir}/sqlite3
|
||||
BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2 rubygem(actioncable) = %{version}
|
||||
BuildRequires: rubygem(actionmailer) = %{version} rubygem(actionpack) = %{version}
|
||||
BuildRequires: rubygem(activerecord) = %{version} rubygem(activesupport) = %{version}
|
||||
BuildRequires: rubygem(activestorage) = %{version} rubygem(bundler) rubygem(method_source)
|
||||
BuildRequires: rubygem(rake) >= 0.8.7 rubygem(rack-cache) rubygem(sqlite3) rubygem(puma)
|
||||
BuildRequires: rubygem(bootsnap) rubygem(capybara) sqlite rubygem(sprockets-rails)
|
||||
BuildRequires: rubygem(thor) >= 0.18.1 rubygem(turbolinks) git
|
||||
%if ! 0%{?bootstrap}
|
||||
BuildRequires: rubygem(jquery-rails) rubygem(uglifier) rubygem(rails) %{_bindir}/node
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%description
|
||||
Rails internals: application bootup, plugins, generators, and rake tasks.
|
||||
Railties is responsible to glue all frameworks together. Overall, it:
|
||||
* handles all the bootstrapping process for a Rails application;
|
||||
* manages rails command line interface;
|
||||
* provides Rails generators core;
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -c -T
|
||||
%gem_install -n %{SOURCE0}
|
||||
pushd .%{gem_instdir}
|
||||
%patch0 -p2
|
||||
popd
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp -p .%{_bindir}/* \
|
||||
%{buildroot}%{_bindir}/
|
||||
find %{buildroot}%{gem_instdir}/exe -type f | xargs chmod a+x
|
||||
|
||||
%check
|
||||
ln -s %{gem_dir}/specifications/rails-%{version}.gemspec .%{gem_dir}/gems/rails.gemspec
|
||||
ln -s %{gem_dir}/gems/activesupport-%{version}/ .%{gem_dir}/gems/activesupport
|
||||
ln -s %{gem_dir}/gems/activestorage-%{version}/ .%{gem_dir}/gems/activestorage
|
||||
ln -s %{gem_dir}/gems/actionmailer-%{version}/ .%{gem_dir}/gems/actionmailer
|
||||
ln -s %{gem_dir}/gems/activerecord-%{version}/ .%{gem_dir}/gems/activerecord
|
||||
ln -s %{gem_dir}/gems/actionview-%{version}/ .%{gem_dir}/gems/actionview
|
||||
ln -s %{gem_dir}/gems/actioncable-%{version}/ .%{gem_dir}/gems/actioncable
|
||||
ln -s ${PWD}%{gem_instdir} .%{gem_dir}/gems/railties
|
||||
pushd .%{gem_dir}/gems/railties
|
||||
tar xzf %{SOURCE1}
|
||||
ln -s rails-%{version}/railties/test test
|
||||
echo '%{version}' > ../RAILS_VERSION
|
||||
touch ../Gemfile
|
||||
echo 'gem "actioncable"' >> ../Gemfile
|
||||
echo 'gem "actionmailer"' >> ../Gemfile
|
||||
echo 'gem "actionpack"' >> ../Gemfile
|
||||
echo 'gem "activerecord"' >> ../Gemfile
|
||||
echo 'gem "activesupport"' >> ../Gemfile
|
||||
echo 'gem "activestorage"' >> ../Gemfile
|
||||
echo 'gem "method_source"' >> ../Gemfile
|
||||
echo 'gem "rack-test"' >> ../Gemfile
|
||||
echo 'gem "rack-cache"' >> ../Gemfile
|
||||
echo 'gem "rake"' >> ../Gemfile
|
||||
echo 'gem "rdoc"' >> ../Gemfile
|
||||
echo 'gem "sqlite3"' >> ../Gemfile
|
||||
echo 'gem "thor"' >> ../Gemfile
|
||||
echo 'gem "turbolinks"' >> ../Gemfile
|
||||
echo 'gem "sprockets-rails"' >> ../Gemfile
|
||||
echo 'gem "puma"' >> ../Gemfile
|
||||
echo 'gem "bootsnap"' >> ../Gemfile
|
||||
echo 'gem "capybara"' >> ../Gemfile
|
||||
echo 'gem "irb"' >> ../Gemfile
|
||||
%if ! 0%{?bootstrap}
|
||||
echo 'gem "jquery-rails"' >> ../Gemfile
|
||||
echo 'gem "rails"' >> ../Gemfile
|
||||
echo 'gem "uglifier", require: false' >> ../Gemfile
|
||||
%else
|
||||
mv test/application/assets_test.rb{,.disable}
|
||||
mv test/application/asset_debugging_test.rb{,.disable}
|
||||
sed -i '/def test_scaffold_.*tests_pass_by_default$/,/^ end$/ s/^/#/' test/application/rake_test.rb
|
||||
sed -i '/def test_rake_routes_with_rake_options$/,/^ end$/ s/^/#/' test/application/rake_test.rb
|
||||
sed -i '/def test_rails_routes_displays_message_when_no_routes_are_defined$/,/^ end$/ s/^/#/' test/application/rake_test.rb
|
||||
sed -i '/def test_rails_routes_calls_the_route_inspector$/,/^ end$/ s/^/#/' test/application/rake_test.rb
|
||||
sed -i '/def test_generated_controller_works_with_rails_test$/,/^ end$/ s/^/#/' test/application/test_runner_test.rb
|
||||
sed -i '/def test_generated_scaffold_works_with_rails_test$/,/^ end$/ s/^/#/' test/application/test_runner_test.rb
|
||||
mv test/application/bin_setup_test.rb{,.disable}
|
||||
mv test/test_unit/reporter_test.rb{,.disable}
|
||||
mv test/application/configuration/custom_test.rb{,.disable}
|
||||
sed -i '/def test_generation_runs_bundle_install_with_full_and_mountable$/,/^ end$/ s/^/#/' test/generators/plugin_generator_test.rb
|
||||
sed -i '/def test_generate_application_.*_when_does_not_exist_in_mountable_engine$/,/^ end$/ s/^/#/' test/generators/plugin_generator_test.rb
|
||||
sed -i '/def test_controller_tests_pass_by_default_inside_mountable_engine$/,/^ end$/ s/^/#/' test/generators/scaffold_controller_generator_test.rb
|
||||
sed -i '/def test_controller_tests_pass_by_default_inside_full_engine$/,/^ end$/ s/^/#/' test/generators/scaffold_controller_generator_test.rb
|
||||
sed -i '/def test_application_new_exits_with_message_and_non_zero_code_when_generating_inside_existing_rails_directory$/,/^ end$/ s/^/#/' test/generators/app_generator_test.rb
|
||||
sed -i '/def test_application_new_show_help_message_inside_existing_rails_directory$/,/^ end$/ s/^/#/' test/generators/app_generator_test.rb
|
||||
%endif
|
||||
sed -i '/^ def test_sqlite3_db_without_defined_rails_root$/,/^ end$/ s/^/#/' test/commands/dbconsole_test.rb
|
||||
sed -i '/test "database middleware doesn.t initialize when activerecord is not in frameworks" do$/,/^ end$/ s/^/#/' \
|
||||
test/application/initializers/frameworks_test.rb
|
||||
sed -i '/test "i18n files have lower priority than application ones" do$/,/^ end$/ s/^/#/' \
|
||||
test/railties/engine_test.rb
|
||||
sed -i '/def test_system_tests_are_run_through_rake_test_when_given_in_TEST$/,/^ end$/ s/^/#/' \
|
||||
test/application/test_runner_test.rb
|
||||
sed -i '/def test_reset_sessions_before_rollback_on_system_tests$/,/^ end$/ s/^/#/' \
|
||||
test/application/test_runner_test.rb
|
||||
sed -i '/def test_output_inline_by_default$/,/^ end$/ s/^/#/' \
|
||||
test/generators/plugin_test_runner_test.rb
|
||||
mv test/application/rake/dbs_test.rb{,.disable}
|
||||
mv test/commands/dbconsole_test.rb{,.disable}
|
||||
sed -i '/^ def test_new_application_load_defaults$/,/^ end$/ s/^/#/' \
|
||||
test/generators/app_generator_test.rb
|
||||
sed -i 's/^\(\s*secrets\.secret_\)token/\1key_base/' \
|
||||
test/path_generation_test.rb
|
||||
export RUBYOPT="-I${PWD}/../railties/lib"
|
||||
export PATH="${PWD}/../railties/exe:$PATH"
|
||||
export BUNDLE_GEMFILE=${PWD}/../Gemfile
|
||||
find test -type f -name '*_test.rb' -print0 | \
|
||||
sort -z | \
|
||||
xargs -0 -n1 -i sh -c "echo '* Test file: {}'; ruby -Itest -- '{}' || exit 255"
|
||||
popd
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%{_bindir}/rails
|
||||
%license %{gem_instdir}/MIT-LICENSE
|
||||
%{gem_instdir}/exe
|
||||
%{gem_libdir}
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/CHANGELOG.md
|
||||
%doc %{gem_instdir}/RDOC_MAIN.rdoc
|
||||
%doc %{gem_instdir}/README.rdoc
|
||||
|
||||
%changelog
|
||||
* Tue Aug 18 2020 huangyangke <huangyangke@huawei.com> - 5.2.3-1
|
||||
- package init
|
||||
BIN
v5.2.3.tar.gz
Normal file
BIN
v5.2.3.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user