diff --git a/ruby/cucumber-compatibility-kit.gemspec b/ruby/cucumber-compatibility-kit.gemspec index bd30801c..3715f50f 100644 --- a/ruby/cucumber-compatibility-kit.gemspec +++ b/ruby/cucumber-compatibility-kit.gemspec @@ -22,9 +22,9 @@ Gem::Specification.new do |s| } s.add_development_dependency 'rspec', '~> 3.13' - s.add_development_dependency 'rubocop', '~> 1.85.1' + s.add_development_dependency 'rubocop', '~> 1.88.0' s.add_development_dependency 'rubocop-performance', '~> 1.26.1' - s.add_development_dependency 'rubocop-rspec', '~> 3.8.0' + s.add_development_dependency 'rubocop-rspec', '~> 3.10.2' s.files = Dir['README.md', 'LICENSE', 'lib/**/*', 'features/**/*'] s.rdoc_options = ['--charset=UTF-8'] diff --git a/ruby/lib/cucumber/compatibility_kit.rb b/ruby/lib/cucumber/compatibility_kit.rb index 20d22fad..ddc8b717 100644 --- a/ruby/lib/cucumber/compatibility_kit.rb +++ b/ruby/lib/cucumber/compatibility_kit.rb @@ -4,6 +4,18 @@ module Cucumber # CompatibilityKit contains a series of helper methods to determine paths for each relevant item(s) class CompatibilityKit class << self + # Return the path for a specific example scenario based on its name + # + # i.e. 'attachments' would return the fully qualified path to the attachments folder + # which contains the feature, the ndjson file and any applicable assets to run the example + def feature_code_for(example_name) + path = File.join(cck_features_folder_location, example_name) + + return path if File.directory?(path) + + raise ArgumentError, "No feature code directory found in gem for CCK example: #{example_name}" + end + # Return the paths for each example that is of 'gherkin' type def gherkin Dir.entries(cck_features_folder_location).select do |file_or_folder| @@ -23,18 +35,6 @@ def markdown end end - # Return the path for a specific example scenario based on its name - # - # i.e. 'attachments' would return the fully qualified path to the attachments folder - # which contains the feature, the ndjson file and any applicable assets to run the example - def feature_code_for(example_name) - path = File.join(cck_features_folder_location, example_name) - - return path if File.directory?(path) - - raise ArgumentError, "No feature code directory found in gem for CCK example: #{example_name}" - end - private def cck_features_folder_location