Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ruby/cucumber-compatibility-kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
24 changes: 12 additions & 12 deletions ruby/lib/cucumber/compatibility_kit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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
Expand Down