From aaccfb93ec0f148666d5421f25d9feee3d90db53 Mon Sep 17 00:00:00 2001 From: Shinji KOBAYASHI Date: Wed, 6 Jan 2021 14:55:16 +0900 Subject: [PATCH 1/4] updated to pass with Ruby 3.0 --- lib/ammeter/rspec/generator/matchers/have_correct_syntax.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ammeter/rspec/generator/matchers/have_correct_syntax.rb b/lib/ammeter/rspec/generator/matchers/have_correct_syntax.rb index a4a8dde..c752124 100644 --- a/lib/ammeter/rspec/generator/matchers/have_correct_syntax.rb +++ b/lib/ammeter/rspec/generator/matchers/have_correct_syntax.rb @@ -30,7 +30,7 @@ require 'ostruct' begin - view = ActionView::Template::Handlers::ERB.call(OpenStruct.new(:source => code)) + view = ActionView::Template::Handlers::ERB.call(OpenStruct.new({:source => code}), code) eval('__crash_me__; ' + view) rescue SyntaxError false From 64c37c1c522446f65ce16657c4b8d000df4419d7 Mon Sep 17 00:00:00 2001 From: Shinji KOBAYASHI Date: Wed, 6 Jan 2021 15:34:49 +0900 Subject: [PATCH 2/4] updated to catch up rails 6 and ruby 3 --- Rakefile | 10 +++++----- ammeter.gemspec | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index b65c604..e21ca75 100644 --- a/Rakefile +++ b/Rakefile @@ -35,7 +35,7 @@ def create_gem(gem_name) sh "mkdir -p tmp/#{gem_name}/spec" sh "cp '#{template_folder}/spec/spec_helper.rb' tmp/#{gem_name}/spec" Dir.chdir("./tmp/#{gem_name}") do - Bundler.clean_system 'bundle install' + Bundler.unbundled_system 'bundle install' end end @@ -45,10 +45,10 @@ namespace :generate do sh "bundle exec rails new ./tmp/example_app -m 'features/templates/generate_example_app.rb' --skip-test-unit" sh "cp 'features/templates/rspec.rake' ./tmp/example_app/lib/tasks" Dir.chdir("./tmp/example_app/") do - Bundler.clean_system 'bundle install' - Bundler.clean_system 'rake db:migrate' - Bundler.clean_system 'rails g rspec:install' - Bundler.clean_system 'spring stop' + Bundler.unbundled_system 'bundle install' + Bundler.unbundled_system 'rake db:migrate' + Bundler.unbundled_system 'rails g rspec:install' + Bundler.unbundled_system 'spring stop' end end diff --git a/ammeter.gemspec b/ammeter.gemspec index fe9939d..2d13f4c 100644 --- a/ammeter.gemspec +++ b/ammeter.gemspec @@ -21,6 +21,8 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'activesupport', '>= 3.0' s.add_runtime_dependency 'rspec-rails', '>= 2.2' + s.add_runtime_dependency 'bootsnap' + s.add_development_dependency 'rspec', '>= 2.2' s.add_development_dependency 'rails', '>= 3.1' s.add_development_dependency 'uglifier', '>= 1.2.4' From 98092d334376534f1a25e748978798c8b4e1394b Mon Sep 17 00:00:00 2001 From: Shinji KOBAYASHI Date: Wed, 6 Jan 2021 19:04:21 +0900 Subject: [PATCH 3/4] updated ci settings. --- .ruby-version | 1 + .travis.yml | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..ecd7ee5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.5.8 diff --git a/.travis.yml b/.travis.yml index 468a65a..3beaaa0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,16 +2,15 @@ language: ruby sudo: false rvm: - - 2.3.0 - - 2.2 - - 2.1.2 - - 2.0.0 + - 2.6 + - 2.7 + - 3.0 - ruby-head - - jruby-9.1.2.0 + - jruby-9.2.14 env: - RSPEC_VERSION=master - - RSPEC_VERSION='~> 3.0' + - RSPEC_VERSION='~> 3.10' bundler_args: "--retry=3 --jobs=3" From 64cb61535f840b1503058a9c76f1538803c278ca Mon Sep 17 00:00:00 2001 From: Shinji KOBAYASHI Date: Wed, 6 Jan 2021 19:46:09 +0900 Subject: [PATCH 4/4] replaced supported/ unsupported versions of Ruby --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3beaaa0..3f6067b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ script: "bundle exec rake ci --trace" matrix: allow_failures: - rvm: ruby-head - - rvm: jruby-9.1.2.0 + - rvm: jruby-9.2.14.0