diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29d3305..5c6aee1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,9 @@ jobs: - ruby: 3.4.1 gemfile: Gemfile.cucumber-9.2 bundler: 2.6.3 + - ruby: 3.4.1 + gemfile: Gemfile.cucumber-10.1 + bundler: 2.6.3 env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" steps: diff --git a/Gemfile.cucumber-10.1 b/Gemfile.cucumber-10.1 new file mode 100644 index 0000000..b74d5be --- /dev/null +++ b/Gemfile.cucumber-10.1 @@ -0,0 +1,20 @@ +source 'https://rubygems.org' + +# Former standard gems, see https://stdgems.org/ +gem 'ostruct' # Bundled gem since Ruby 3.4 +gem 'base64' # Bundled gem since Ruby 3.4 +gem 'bigdecimal' # Bundled gem since Ruby 3.4 +gem 'mutex_m' # Bundled gem since Ruby 3.4 +gem 'logger' # Bundled gem since Ruby 3.4 + +# Runtime dependencies +gem 'cucumber', '~> 10.1.0' + +# Development dependencies +gem 'rspec', '~> 3.0' +gem 'gemika', '>= 0.8.1' +gem 'rake', '> 10.0' +gem 'aruba', '>= 2.0.0' + +# Gem under test +gem 'cucumber_priority', :path => '.' diff --git a/Gemfile.cucumber-10.1.lock b/Gemfile.cucumber-10.1.lock new file mode 100644 index 0000000..81ef033 --- /dev/null +++ b/Gemfile.cucumber-10.1.lock @@ -0,0 +1,110 @@ +PATH + remote: . + specs: + cucumber_priority (1.0.0) + cucumber + +GEM + remote: https://rubygems.org/ + specs: + aruba (2.3.1) + bundler (>= 1.17, < 3.0) + contracts (>= 0.16.0, < 0.18.0) + cucumber (>= 8.0, < 11.0) + rspec-expectations (~> 3.4) + thor (~> 1.0) + base64 (0.3.0) + bigdecimal (3.2.2) + builder (3.3.0) + contracts (0.17.2) + cucumber (10.1.0) + base64 (~> 0.2) + builder (~> 3.2) + cucumber-ci-environment (> 9, < 11) + cucumber-core (> 15, < 17) + cucumber-cucumber-expressions (> 17, < 19) + cucumber-html-formatter (> 20.3, < 22) + diff-lcs (~> 1.5) + logger (~> 1.6) + mini_mime (~> 1.1) + multi_test (~> 1.1) + sys-uname (~> 1.3) + cucumber-ci-environment (10.0.1) + cucumber-core (15.2.1) + cucumber-gherkin (> 27, < 33) + cucumber-messages (> 26, < 30) + cucumber-tag-expressions (> 5, < 7) + cucumber-cucumber-expressions (18.0.1) + bigdecimal + cucumber-gherkin (32.2.0) + cucumber-messages (> 25, < 28) + cucumber-html-formatter (21.14.0) + cucumber-messages (> 19, < 28) + cucumber-messages (27.2.0) + cucumber-tag-expressions (6.1.2) + diff-lcs (1.6.2) + ffi (1.17.2) + ffi (1.17.2-aarch64-linux-gnu) + ffi (1.17.2-aarch64-linux-musl) + ffi (1.17.2-arm-linux-gnu) + ffi (1.17.2-arm-linux-musl) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86-linux-gnu) + ffi (1.17.2-x86-linux-musl) + ffi (1.17.2-x86_64-darwin) + ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.2-x86_64-linux-musl) + gemika (1.0.0) + logger (1.7.0) + memoist (0.16.2) + mini_mime (1.1.5) + multi_test (1.1.0) + mutex_m (0.3.0) + ostruct (0.6.3) + rake (13.3.0) + rspec (3.13.1) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.5) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.5) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.5) + sys-uname (1.4.0) + ffi (~> 1.1) + memoist (~> 0.16.2) + thor (1.4.0) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + ruby + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + aruba (>= 2.0.0) + base64 + bigdecimal + cucumber (~> 10.1.0) + cucumber_priority! + gemika (>= 0.8.1) + logger + mutex_m + ostruct + rake (> 10.0) + rspec (~> 3.0) + +BUNDLED WITH + 2.6.3 diff --git a/README.md b/README.md index 7503da2..971d1f4 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ A non-overridable step will always win over an overridable step regardless of it Supported Cucumber versions ---------------------------- -cucumber_priority is tested against Cucumber 1.3, 2.4, 3.0 and 3.1. +cucumber_priority is tested against Cucumber 1.3, 2.4, 3.0, 3.1, 4.1, 5.3, 9.2 and 10.1. Installation diff --git a/lib/cucumber_priority/require_cucumber.rb b/lib/cucumber_priority/require_cucumber.rb index 8934dad..499cfd1 100644 --- a/lib/cucumber_priority/require_cucumber.rb +++ b/lib/cucumber_priority/require_cucumber.rb @@ -1,6 +1,6 @@ require 'cucumber' -if Cucumber::VERSION >= '3' +if Gem::Version.new(Cucumber::VERSION) > Gem::Version.new('3.0') require 'cucumber/glue/registry_and_more' else require 'cucumber/rb_support/rb_language' diff --git a/lib/cucumber_priority/resolve_ambiguous_error.rb b/lib/cucumber_priority/resolve_ambiguous_error.rb index 91328f6..6d9fdf8 100644 --- a/lib/cucumber_priority/resolve_ambiguous_error.rb +++ b/lib/cucumber_priority/resolve_ambiguous_error.rb @@ -25,7 +25,7 @@ def self.resolve_ambiguity_through_priority(e) end end -if Cucumber::VERSION >= '3' +if Gem::Version.new(Cucumber::VERSION) > Gem::Version.new('3.0') module Cucumber module StepMatchSearch @@ -42,7 +42,7 @@ def call_with_priority(*args) end end -elsif Cucumber::VERSION >= '2.3' +elsif Gem::Version.new(Cucumber::VERSION) >= Gem::Version.new('2.3') # Cucumber 2.3 or higher has methods that return an array of Cucumber::StepMatch objects. diff --git a/lib/cucumber_priority/step_definition_ext.rb b/lib/cucumber_priority/step_definition_ext.rb index e43b585..1f7a017 100644 --- a/lib/cucumber_priority/step_definition_ext.rb +++ b/lib/cucumber_priority/step_definition_ext.rb @@ -1,4 +1,4 @@ -step_definition_class = Cucumber::VERSION >= '3' ? Cucumber::Glue::StepDefinition : Cucumber::RbSupport::RbStepDefinition +step_definition_class = Gem::Version.new(Cucumber::VERSION) > Gem::Version.new('3.0') ? Cucumber::Glue::StepDefinition : Cucumber::RbSupport::RbStepDefinition step_definition_class.class_eval do