From b3d0ba2b1b6491cbe10c5249cd619c645f4f4ace Mon Sep 17 00:00:00 2001 From: Luke Hill <20105237+luke-hill@users.noreply.github.com> Date: Tue, 21 Jun 2022 09:36:18 +0100 Subject: [PATCH] bugfix: build failures (#548) * Update hacking notes and tidy up gem restrictions * Shoe-horn in psych restrictions * Remove duplicate psych reference * Remove old note references as most are incorrect * Use appraisals to rebuild gemfiles * Remove temporary rdoc restriction * Add in deprecative versions of rhs * Fix rubocop --- Appraisals | 24 +++++++++++++++++------- CONTRIBUTING.md | 20 +++----------------- Rakefile | 5 ++--- cucumber-rails.gemspec | 10 +++++----- gemfiles/rails_5_0.gemfile | 4 +++- gemfiles/rails_5_1.gemfile | 4 +++- gemfiles/rails_5_2.gemfile | 4 +++- gemfiles/rails_6_0.gemfile | 4 +++- gemfiles/rails_6_1.gemfile | 4 +++- gemfiles/rails_7_0.gemfile | 2 +- 10 files changed, 43 insertions(+), 38 deletions(-) diff --git a/Appraisals b/Appraisals index 4d93888c..6602a577 100644 --- a/Appraisals +++ b/Appraisals @@ -1,44 +1,54 @@ # frozen_string_literal: true appraise 'rails_5_0' do + gem 'activerecord' gem 'capybara', '< 3' gem 'cucumber', '< 4' + gem 'psych', '< 4' + gem 'rails-html-sanitizer', '< 1.4' gem 'railties', '~> 5.0.7' - gem 'activerecord' gem 'sqlite3', '~> 1.3.13' end appraise 'rails_5_1' do + gem 'activerecord' gem 'capybara', '< 3.15' gem 'cucumber', '< 5' + gem 'psych', '< 4' + gem 'rails-html-sanitizer', '< 1.4' gem 'railties', '~> 5.1.7' - gem 'activerecord' gem 'sqlite3', '~> 1.3.13' end appraise 'rails_5_2' do + gem 'activerecord' gem 'capybara', '< 3.33' gem 'cucumber', '< 6' + gem 'psych', '< 4' + gem 'rails-html-sanitizer', '< 1.4.3' gem 'railties', '~> 5.2.4' - gem 'activerecord' gem 'sqlite3', '~> 1.3.13' end appraise 'rails_6_0' do - gem 'cucumber', '< 6' - gem 'railties', '~> 6.0.3' gem 'activerecord' + gem 'cucumber', '< 6' + gem 'psych', '< 4' + gem 'rails-html-sanitizer', '< 1.4.3' + gem 'railties', '~> 6.0.3' gem 'sqlite3', '~> 1.4' end appraise 'rails_6_1' do - gem 'railties', '~> 6.1.3' gem 'activerecord' + gem 'cucumber', '< 9' + gem 'psych', '< 4' + gem 'railties', '~> 6.1.3' gem 'sqlite3', '~> 1.4' end appraise 'rails_7_0' do - gem 'railties', '~> 7.0.0' gem 'activerecord' + gem 'railties', '~> 7.0.0' gem 'sqlite3', '~> 1.4' end diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0a482e2..0245ef93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,9 +6,10 @@ We appreciate that. But before you do, please learn our basic rules: * Do you have an idea for a new feature? Then don't expect it to be implemented unless you or someone else sends a [pull request](https://help.github.com/articles/using-pull-requests). You might be better to start a discussion on [the google group](http://groups.google.com/group/cukes). * Reporting a bug? Please tell us: * which version of Cucumber you're using - * which version of Ruby you're using. + * which version of Ruby you're using + * which version of Rails you're using (include all associated gems) * How to reproduce it. Bugs with a failing test in a [pull request](https://help.github.com/articles/using-pull-requests) get fixed much quicker. Some bugs may never be fixed. -* Want to paste some code or output? Put \`\`\` on a line above and below your code/output. See [GFM](https://help.github.com/articles/github-flavored-markdown)'s *Fenced Code Blocks* for details. +* Want to paste some code or output? Put ``` on a line above and below your code/output. See [GFM](https://help.github.com/articles/github-flavored-markdown)'s *Fenced Code Blocks* for details. * We love [pull requests](https://help.github.com/articles/using-pull-requests). But if you don't have a test to go with it we probably won't merge it. # Contributing to cucumber-rails @@ -58,18 +59,3 @@ Now release it bundle exec rake git commit -m "Release X.Y.Z" rake release - -## Gaining Release Karma - -To become a release manager, create a pull request adding your name to the list below, including -your Rubygems email address in the ticket. One of the existing Release managers will then add you. - -Current release managers: - * Kosmas Chatzimichalis - * Matt Wynne - * Mathieu Jobin - * Andrew Walter - -To grant release karma, issue the following command: - - gem owner cucumber-rails --add diff --git a/Rakefile b/Rakefile index c7430a94..6fba0aa8 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ require 'rubygems' require 'bundler' require 'bundler/setup' require 'appraisal' -require 'rdoc' # https://github.com/lsegal/yard/commit/b861dcc2d7f7e1fbbed7b552ac2e4f7caf68bafa +require 'rdoc' require 'rake/clean' require 'pathname' Bundler::GemHelper.install_tasks @@ -40,8 +40,7 @@ end namespace :gemfiles do desc 'Install dependencies for all gemfiles' task :install do - ENV['BUNDLE_GEMFILE'] = 'Gemfile.appraisal' - Rake::Task['appraisal:install'].invoke + system 'bundle exec appraisal update' end task :clean do diff --git a/cucumber-rails.gemspec b/cucumber-rails.gemspec index fc074652..c4293bc6 100644 --- a/cucumber-rails.gemspec +++ b/cucumber-rails.gemspec @@ -21,11 +21,11 @@ Gem::Specification.new do |s| 'source_code_uri' => "https://github.com/cucumber/cucumber-rails/tree/v#{s.version}" } - s.add_runtime_dependency('capybara', ['>= 2.18', '< 4']) # We support legacy capybara (But only the last 2.x) - s.add_runtime_dependency('cucumber', '>= 3.2', '< 9') # Support cucumber in the 3.x <-> 7.x revision range - s.add_runtime_dependency('mime-types', ['~> 3.3']) # Only support the latest major (3+ years old) - s.add_runtime_dependency('nokogiri', '~> 1.10') # Only support the latest major (3+ years old) - s.add_runtime_dependency('railties', ['>= 5.0', '< 8']) # We support any version of Rails in the 5.x, 6.x and 7.x series + s.add_runtime_dependency('capybara', ['>= 2.18', '< 4']) + s.add_runtime_dependency('cucumber', '>= 3.2', '< 9') + s.add_runtime_dependency('mime-types', ['~> 3.3']) + s.add_runtime_dependency('nokogiri', '~> 1.10') + s.add_runtime_dependency('railties', ['>= 5.0', '< 8']) s.add_runtime_dependency('rexml', '~> 3.0') # rexml is a bundled gem from ruby 3 s.add_runtime_dependency('webrick', '~> 1.7') # webrick is a bundled gem from ruby 3 diff --git a/gemfiles/rails_5_0.gemfile b/gemfiles/rails_5_0.gemfile index 520f1af1..32991e21 100644 --- a/gemfiles/rails_5_0.gemfile +++ b/gemfiles/rails_5_0.gemfile @@ -2,10 +2,12 @@ source "https://rubygems.org" +gem "activerecord" gem "capybara", "< 3" gem "cucumber", "< 4" +gem "psych", "< 4" +gem "rails-html-sanitizer", "< 1.4" gem "railties", "~> 5.0.7" -gem "activerecord" gem "sqlite3", "~> 1.3.13" gemspec path: "../" diff --git a/gemfiles/rails_5_1.gemfile b/gemfiles/rails_5_1.gemfile index d07e7fd3..7976117b 100644 --- a/gemfiles/rails_5_1.gemfile +++ b/gemfiles/rails_5_1.gemfile @@ -2,10 +2,12 @@ source "https://rubygems.org" +gem "activerecord" gem "capybara", "< 3.15" gem "cucumber", "< 5" +gem "psych", "< 4" +gem "rails-html-sanitizer", "< 1.4" gem "railties", "~> 5.1.7" -gem "activerecord" gem "sqlite3", "~> 1.3.13" gemspec path: "../" diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile index 99ca557c..3efc3945 100644 --- a/gemfiles/rails_5_2.gemfile +++ b/gemfiles/rails_5_2.gemfile @@ -2,10 +2,12 @@ source "https://rubygems.org" +gem "activerecord" gem "capybara", "< 3.33" gem "cucumber", "< 6" +gem "psych", "< 4" +gem "rails-html-sanitizer", "< 1.4.3" gem "railties", "~> 5.2.4" -gem "activerecord" gem "sqlite3", "~> 1.3.13" gemspec path: "../" diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index 6554f6eb..233edb95 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -2,9 +2,11 @@ source "https://rubygems.org" +gem "activerecord" gem "cucumber", "< 6" +gem "psych", "< 4" +gem "rails-html-sanitizer", "< 1.4.3" gem "railties", "~> 6.0.3" -gem "activerecord" gem "sqlite3", "~> 1.4" gemspec path: "../" diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index 77bcaae2..d82a1b12 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -2,8 +2,10 @@ source "https://rubygems.org" -gem "railties", "~> 6.1.3" gem "activerecord" +gem "cucumber", "< 9" +gem "psych", "< 4" +gem "railties", "~> 6.1.3" gem "sqlite3", "~> 1.4" gemspec path: "../" diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile index f631221c..821e2178 100644 --- a/gemfiles/rails_7_0.gemfile +++ b/gemfiles/rails_7_0.gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" -gem "railties", "~> 7.0.0" gem "activerecord" +gem "railties", "~> 7.0.0" gem "sqlite3", "~> 1.4" gemspec path: "../"