-
-
Notifications
You must be signed in to change notification settings - Fork 1
Ruby implementation #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
luke-hill
wants to merge
23
commits into
main
Choose a base branch
from
feature/ruby_implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
45540b4
Initial files
luke-hill 56dca09
Add hidden files
luke-hill 28b8f39
Fix typo
luke-hill 586594e
Add cucumber messages to runtime requirements and port over existing …
luke-hill 43481b2
Add in spec files
luke-hill 0abdd83
Fix up all loading, relations and requirements
luke-hill 592f5fa
Alter error class for new API
luke-hill 31f8e15
Alter all other tests to pass
luke-hill ba58ab9
Auto-gen rubocop config;
luke-hill e1971d4
Add note about duplication of code
luke-hill eb1faf7
Minor linting and starting to unpick redundant pieces of spec support
luke-hill 0a757e8
Lint / DRY up tests
luke-hill d6d50e7
Linting for tests and 1 bug fix where test case started was firing pr…
luke-hill 8ab0e97
Add in legacy ns;
luke-hill 6559a25
Ported over helpers from JS
luke-hill d67d975
Initial implementation of initializer and update method
luke-hill 5907172
Remove un-needed placeholder
luke-hill 3643ae9
Regen the rubocop config;
luke-hill 124d9e0
Remove all legacy query entities
luke-hill fdc3414
Move query into correct NS and rename helpers
luke-hill 28401bd
Remove legacy tests
luke-hill 4d7d73b
Fix readme
luke-hill 96874b4
Remove un-necessary items from package
luke-hill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Gemfile.lock | ||
| *.gem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --require spec_helper | ||
| --color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| inherit_from: .rubocop_todo.yml | ||
|
|
||
| plugins: | ||
| - rubocop-performance | ||
| - rubocop-rspec | ||
|
|
||
| inherit_mode: | ||
| merge: | ||
| - Exclude | ||
|
|
||
| AllCops: | ||
| TargetRubyVersion: 3.2 | ||
| NewCops: enable | ||
|
|
||
| # Stylistic preference for cucumber | ||
| Gemspec/DevelopmentDependencies: | ||
| Enabled: false | ||
|
|
||
| # Disabled on our repo's to enable polyglot-release | ||
| Gemspec/RequireMFA: | ||
| Enabled: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # This configuration was generated by | ||
| # `rubocop --auto-gen-config` | ||
| # on 2025-09-05 19:34:38 UTC using RuboCop version 1.80.2. | ||
| # The point is for the user to remove these configuration records | ||
| # one by one as the offenses are removed from the code base. | ||
| # Note that changes in the inspected code, or installation of new | ||
| # versions of RuboCop, may require this file to be generated again. | ||
|
|
||
| # Offense count: 1 | ||
| # This cop supports safe autocorrection (--autocorrect). | ||
| # Configuration parameters: EnforcedStyle. | ||
| # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines | ||
| Layout/EmptyLinesAroundModuleBody: | ||
| Exclude: | ||
| - 'spec/support/runner_helper.rb' | ||
|
|
||
| # Offense count: 1 | ||
| # This cop supports safe autocorrection (--autocorrect). | ||
| # Configuration parameters: AllowInHeredoc. | ||
| Layout/TrailingWhitespace: | ||
| Exclude: | ||
| - 'spec/cucumber/query/legacy/step_definitions_by_test_step_spec.rb' | ||
|
|
||
| # Offense count: 8 | ||
| # Configuration parameters: AllowComments, AllowEmptyLambdas. | ||
| Lint/EmptyBlock: | ||
| Exclude: | ||
| - 'spec/cucumber/query/legacy/hook_by_test_step_spec.rb' | ||
| - 'spec/cucumber/query/legacy/step_definitions_by_test_step_spec.rb' | ||
|
|
||
| # Offense count: 8 | ||
| # This cop supports safe autocorrection (--autocorrect). | ||
| # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions. | ||
| # NotImplementedExceptions: NotImplementedError | ||
| Lint/UnusedMethodArgument: | ||
| Exclude: | ||
| - 'lib/cucumber/query/query.rb' | ||
|
|
||
| # Offense count: 4 | ||
| # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. | ||
| Metrics/AbcSize: | ||
| Max: 43 | ||
|
|
||
| # Offense count: 1 | ||
| # Configuration parameters: AllowedMethods, AllowedPatterns. | ||
| Metrics/CyclomaticComplexity: | ||
| Max: 14 | ||
|
|
||
| # Offense count: 3 | ||
| # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
| Metrics/MethodLength: | ||
| Max: 24 | ||
|
|
||
| # Offense count: 1 | ||
| # Configuration parameters: AllowedMethods, AllowedPatterns. | ||
| Metrics/PerceivedComplexity: | ||
| Max: 14 | ||
|
|
||
| # Offense count: 8 | ||
| Performance/MethodObjectAsBlock: | ||
| Exclude: | ||
| - 'lib/cucumber/query/legacy/hook_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/pickle_by_test.rb' | ||
| - 'lib/cucumber/query/legacy/pickle_step_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/step_definitions_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/test_case_started_by_test_case.rb' | ||
|
|
||
| # Offense count: 1 | ||
| # Configuration parameters: Prefixes, AllowedPatterns. | ||
| # Prefixes: when, with, without | ||
| RSpec/ContextWording: | ||
| Exclude: | ||
| - 'spec/cucumber/query/legacy/hook_by_test_step_spec.rb' | ||
|
|
||
| # Offense count: 1 | ||
| # Configuration parameters: CountAsOne. | ||
| RSpec/ExampleLength: | ||
| Max: 7 | ||
|
|
||
| # Offense count: 32 | ||
| # Configuration parameters: AssignmentOnly. | ||
| RSpec/InstanceVariable: | ||
| Exclude: | ||
| - 'spec/cucumber/query/legacy/hook_by_test_step_spec.rb' | ||
| - 'spec/cucumber/query/legacy/pickle_by_test_spec.rb' | ||
| - 'spec/cucumber/query/legacy/pickle_step_by_test_step_spec.rb' | ||
| - 'spec/cucumber/query/legacy/step_definitions_by_test_step_spec.rb' | ||
| - 'spec/cucumber/query/legacy/test_case_started_by_test_case_spec.rb' | ||
|
|
||
| # Offense count: 3 | ||
| RSpec/MultipleExpectations: | ||
| Max: 3 | ||
|
|
||
| # Offense count: 12 | ||
| # Configuration parameters: AllowedGroups. | ||
| RSpec/NestedGroups: | ||
| Max: 5 | ||
|
|
||
| # Offense count: 8 | ||
| # Configuration parameters: AllowedConstants. | ||
| Style/Documentation: | ||
| Exclude: | ||
| - 'lib/cucumber/query/helpers.rb' | ||
| - 'lib/cucumber/query/legacy/hook_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/pickle_by_test.rb' | ||
| - 'lib/cucumber/query/legacy/pickle_step_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/step_definitions_by_test_step.rb' | ||
| - 'lib/cucumber/query/legacy/test_case_started_by_test_case.rb' | ||
| - 'lib/cucumber/query/legacy/test_run_started.rb' | ||
| - 'lib/cucumber/query/query.rb' | ||
|
|
||
| # Offense count: 4 | ||
| # This cop supports unsafe autocorrection (--autocorrect-all). | ||
| # Configuration parameters: EnforcedStyle. | ||
| # SupportedStyles: always, always_true, never | ||
| Style/FrozenStringLiteralComment: | ||
| Exclude: | ||
| - 'lib/cucumber/query/helpers.rb' | ||
| - 'lib/cucumber/query/query.rb' | ||
| - 'spec/support/gherkin_helper.rb' | ||
| - 'spec/support/runner_helper.rb' | ||
|
|
||
| # Offense count: 8 | ||
| # This cop supports safe autocorrection (--autocorrect). | ||
| # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings. | ||
| # URISchemes: http, https | ||
| Layout/LineLength: | ||
| Max: 198 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| source 'https://rubygems.org' | ||
|
|
||
| gemspec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| PATH | ||
| remote: . | ||
| specs: | ||
| cucumber-query (21.0.0) | ||
| cucumber-messages (> 25, < 30) | ||
|
|
||
| GEM | ||
| remote: https://rubygems.org/ | ||
| specs: | ||
| ast (2.4.2) | ||
| base64 (0.3.0) | ||
| bigdecimal (3.2.3) | ||
| builder (3.3.0) | ||
| 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.5.1) | ||
| ffi (1.17.2) | ||
| ffi (1.17.2-x86_64-linux-gnu) | ||
| json (2.9.1) | ||
| language_server-protocol (3.17.0.4) | ||
| lint_roller (1.1.0) | ||
| logger (1.7.0) | ||
| memoist3 (1.0.0) | ||
| mini_mime (1.1.5) | ||
| multi_test (1.1.0) | ||
| parallel (1.26.3) | ||
| parser (3.3.9.0) | ||
| ast (~> 2.4.1) | ||
| racc | ||
| prism (1.4.0) | ||
| racc (1.8.1) | ||
| rainbow (3.1.1) | ||
| regexp_parser (2.10.0) | ||
| rspec (3.13.0) | ||
| rspec-core (~> 3.13.0) | ||
| rspec-expectations (~> 3.13.0) | ||
| rspec-mocks (~> 3.13.0) | ||
| rspec-core (3.13.2) | ||
| rspec-support (~> 3.13.0) | ||
| rspec-expectations (3.13.3) | ||
| diff-lcs (>= 1.2.0, < 2.0) | ||
| rspec-support (~> 3.13.0) | ||
| rspec-mocks (3.13.2) | ||
| diff-lcs (>= 1.2.0, < 2.0) | ||
| rspec-support (~> 3.13.0) | ||
| rspec-support (3.13.2) | ||
| rubocop (1.80.2) | ||
| json (~> 2.3) | ||
| language_server-protocol (~> 3.17.0.2) | ||
| lint_roller (~> 1.1.0) | ||
| parallel (~> 1.10) | ||
| parser (>= 3.3.0.2) | ||
| rainbow (>= 2.2.2, < 4.0) | ||
| regexp_parser (>= 2.9.3, < 3.0) | ||
| rubocop-ast (>= 1.46.0, < 2.0) | ||
| ruby-progressbar (~> 1.7) | ||
| unicode-display_width (>= 2.4.0, < 4.0) | ||
| rubocop-ast (1.46.0) | ||
| parser (>= 3.3.7.2) | ||
| prism (~> 1.4) | ||
| rubocop-performance (1.25.0) | ||
| lint_roller (~> 1.1) | ||
| rubocop (>= 1.75.0, < 2.0) | ||
| rubocop-ast (>= 1.38.0, < 2.0) | ||
| rubocop-rspec (3.7.0) | ||
| lint_roller (~> 1.1) | ||
| rubocop (~> 1.72, >= 1.72.1) | ||
| ruby-progressbar (1.13.0) | ||
| sys-uname (1.4.1) | ||
| ffi (~> 1.1) | ||
| memoist3 (~> 1.0.0) | ||
| unicode-display_width (3.1.4) | ||
| unicode-emoji (~> 4.0, >= 4.0.4) | ||
| unicode-emoji (4.0.4) | ||
|
|
||
| PLATFORMS | ||
| ruby | ||
| x86_64-linux | ||
|
|
||
| DEPENDENCIES | ||
| cucumber (~> 10.1) | ||
| cucumber-query! | ||
| rspec (~> 3.13) | ||
| rubocop (~> 1.80.0) | ||
| rubocop-performance (~> 1.25.0) | ||
| rubocop-rspec (~> 3.7.0) | ||
|
|
||
| BUNDLED WITH | ||
| 2.6.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2020 Cucumber Ltd and contributors | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 21.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| Gem::Specification.new do |s| | ||
| s.name = 'cucumber-query' | ||
| s.version = File.read(File.expand_path('VERSION', __dir__)).strip | ||
| s.authors = ['Luke Hill'] | ||
| s.description = 'Cucumber Query - query messages' | ||
| s.summary = "#{s.name}-#{s.version}" | ||
| s.email = 'cukebot@cucumber.io' | ||
| s.homepage = 'https://github.com/cucumber/query' | ||
| s.platform = Gem::Platform::RUBY | ||
| s.license = 'MIT' | ||
| s.required_ruby_version = '>= 3.2' | ||
| s.required_rubygems_version = '>= 3.2.8' | ||
|
|
||
| s.metadata = { | ||
| 'bug_tracker_uri' => 'https://github.com/cucumber/query/issues', | ||
| 'changelog_uri' => 'https://github.com/cucumber/query/blob/main/CHANGELOG.md', | ||
| 'documentation_uri' => 'https://github.com/cucumber/query/blob/main/README.md', | ||
| 'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/cukes', | ||
| 'source_code_uri' => 'https://github.com/cucumber/query/blob/main/ruby' | ||
| } | ||
|
|
||
| s.add_dependency 'cucumber-messages', '> 25', '< 30' | ||
|
|
||
| s.add_development_dependency 'rspec', '~> 3.13' | ||
| s.add_development_dependency 'rubocop', '~> 1.80.0' | ||
| s.add_development_dependency 'rubocop-performance', '~> 1.25.0' | ||
| s.add_development_dependency 'rubocop-rspec', '~> 3.7.0' | ||
|
|
||
| s.files = Dir['LICENSE', 'lib/**/*'] | ||
| s.rdoc_options = ['--charset=UTF-8'] | ||
| s.require_path = 'lib' | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Cucumber | ||
| module Error | ||
| TestCaseUnknownError = Class.new(StandardError) | ||
| TestStepUnknownError = Class.new(StandardError) | ||
| end | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.