diff --git a/.gitignore b/.gitignore index eda60574..f8d98e5d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ coverage gemfiles/*.lock Gemfile.lock spec/examples.txt +.idea diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..cc32da4b --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1 @@ +inherit_from: .rubocop_todo.yml diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..ac0cd6c5 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,443 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2019-04-17 11:50:08 +0200 using RuboCop version 0.65.0. +# 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: 9 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, Include. +# Include: **/*.gemfile, **/Gemfile, **/gems.rb +Bundler/OrderedGems: + Exclude: + - 'gemfiles/rails_4_2.gemfile' + - 'gemfiles/rails_5_0.gemfile' + - 'gemfiles/rails_5_1.gemfile' + - 'gemfiles/rails_5_2.gemfile' + - 'gemfiles/rails_6_0.gemfile' + +# Offense count: 1 +# Configuration parameters: Include. +# Include: **/*.gemspec +Gemspec/DuplicatedAssignment: + Exclude: + - 'cucumber-rails.gemspec' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, Include. +# Include: **/*.gemspec +Gemspec/OrderedDependencies: + Exclude: + - 'cucumber-rails.gemspec' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: outdent, indent +Layout/AccessModifierIndentation: + Exclude: + - 'lib/cucumber/rails/database.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleAlignWith. +# SupportedStylesAlignWith: either, start_of_block, start_of_line +Layout/BlockAlignment: + Exclude: + - 'features/support/env.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/ClosingHeredocIndentation: + Exclude: + - 'features/support/legacy_web_steps_support.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'Rakefile' + - 'dev_tasks/yard.rake' + - 'lib/cucumber/rails/database.rb' + - 'lib/generators/cucumber/install/install_generator.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'Rakefile' + - 'cucumber-rails.gemspec' + - 'spec/cucumber/rails/database_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, no_empty_lines +Layout/EmptyLinesAroundBlockBody: + Exclude: + - 'spec/cucumber/rails/database_spec.rb' + - 'spec/generators/cucumber/install/install_generator_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundExceptionHandlingKeywords: + Exclude: + - 'lib/cucumber/rails/hooks/database_cleaner.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. +Layout/ExtraSpacing: + Exclude: + - 'lib/cucumber/rails/database.rb' + - 'spec/generators/cucumber/install/install_generator_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent +Layout/IndentHeredoc: + Exclude: + - 'features/support/legacy_web_steps_support.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Exclude: + - 'features/support/env.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/MultilineOperationIndentation: + Exclude: + - 'features/support/env.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/SpaceAroundKeyword: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'features/support/env.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceAroundOperators: + Exclude: + - 'dev_tasks/yard.rake' + - 'lib/cucumber/rails/database.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceBeforeBlockBraces: + Exclude: + - 'lib/cucumber/rails.rb' + - 'lib/cucumber/rails/database.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceBeforeComma: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/SpaceInsidePercentLiteralDelimiters: + Exclude: + - 'lib/cucumber/rails/database.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceInsideStringInterpolation: + Exclude: + - 'lib/cucumber/rails/database.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AllowInHeredoc. +Layout/TrailingWhitespace: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'features/support/env.rb' + +# Offense count: 10 +Lint/AmbiguousRegexpLiteral: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + +# Offense count: 2 +Lint/HandleExceptions: + Exclude: + - 'lib/cucumber/rails/hooks/database_cleaner.rb' + - 'lib/cucumber/rails/world.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/ScriptPermission: + Exclude: + - 'lib/generators/cucumber/install/templates/script/cucumber' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'Rakefile' + +# Offense count: 3 +Lint/UselessAssignment: + Exclude: + - 'lib/cucumber/rails/hooks/database_cleaner.rb' + - 'lib/cucumber/rails/rspec.rb' + - 'lib/cucumber/rails/world.rb' + +# Offense count: 4 +Metrics/AbcSize: + Max: 23 + +# Offense count: 4 +# Configuration parameters: CountComments, ExcludedMethods. +# ExcludedMethods: refine +Metrics/BlockLength: + Max: 36 + +# Offense count: 4 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/MethodLength: + Max: 188 + +# Offense count: 1 +# Configuration parameters: CountComments. +Metrics/ModuleLength: + Max: 209 + +# Offense count: 1 +Metrics/PerceivedComplexity: + Max: 8 + +# Offense count: 2 +# Configuration parameters: Blacklist. +# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) +Naming/HeredocDelimiterNaming: + Exclude: + - 'features/support/legacy_web_steps_support.rb' + +# Offense count: 1 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: snake_case, normalcase, non_integer +Naming/VariableNumber: + Exclude: + - 'lib/cucumber/rails/rspec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Performance/Casecmp: + Exclude: + - 'lib/cucumber/rails/capybara/javascript_emulation.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect. +Performance/StartWith: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, conditionals +Style/AndOr: + Exclude: + - 'lib/cucumber/rails/capybara/javascript_emulation.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, EnforcedStyle. +# SupportedStyles: nested, compact +Style/ClassAndModuleChildren: + Exclude: + - 'lib/cucumber/rails/action_controller.rb' + - 'lib/cucumber/rails/application.rb' + - 'lib/cucumber/rails/capybara/javascript_emulation.rb' + - 'lib/cucumber/rails/hooks/active_record.rb' + +# Offense count: 1 +Style/CommentedKeyword: + Exclude: + - 'lib/cucumber/rails/world.rb' + +# Offense count: 14 +Style/Documentation: + Exclude: + - 'spec/**/*' + - 'test/**/*' + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'features/support/bundler_pre_support.rb' + - 'features/support/env.rb' + - 'features/support/legacy_web_steps_support.rb' + - 'lib/cucumber/rails/action_controller.rb' + - 'lib/cucumber/rails/capybara/javascript_emulation.rb' + - 'lib/cucumber/rails/database.rb' + - 'lib/cucumber/rails/hooks/active_record.rb' + - 'lib/generators/cucumber/install/install_generator.rb' + +# Offense count: 1 +Style/DoubleNegation: + Exclude: + - 'lib/cucumber/rails/action_controller.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/Encoding: + Exclude: + - 'Rakefile' + - 'cucumber-rails.gemspec' + - 'spec/cucumber/rails/database_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/ExpandPathArguments: + Exclude: + - 'cucumber-rails.gemspec' + - 'lib/generators/cucumber/install/install_generator.rb' + - 'spec/generators/cucumber/install/install_generator_spec.rb' + +# Offense count: 1 +# Configuration parameters: . +# SupportedStyles: annotated, template, unannotated +Style/FormatStringToken: + EnforcedStyle: template + +# Offense count: 3 +# Configuration parameters: MinBodyLength. +Style/GuardClause: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'lib/cucumber/rails/database.rb' + - 'lib/generators/cucumber/install/install_generator.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Style/IfUnlessModifier: + Exclude: + - 'Rakefile' + - 'dev_tasks/yard.rake' + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'lib/cucumber/rails/database.rb' + +# Offense count: 1 +Style/MixinUsage: + Exclude: + - 'lib/cucumber/rails/rspec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: literals, strict +Style/MutableConstant: + Exclude: + - 'lib/cucumber/rails/database.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Whitelist. +# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +Style/NestedParenthesizedCalls: + Exclude: + - 'lib/cucumber/rails/capybara/select_dates_and_times.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedOctalStyle. +# SupportedOctalStyles: zero_with_o, zero_only +Style/NumericLiteralPrefix: + Exclude: + - 'lib/generators/cucumber/install/install_generator.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Exclude: + - 'lib/cucumber/rails/database.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +Style/RedundantSelf: + Exclude: + - 'lib/cucumber/rails/capybara/javascript_emulation.rb' + - 'lib/cucumber/rails/hooks/active_record.rb' + - 'spec/spec_helper.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, AllowInnerSlashes. +# SupportedStyles: slashes, percent_r, mixed +Style/RegexpLiteral: + Exclude: + - 'lib/cucumber/rails.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowIfMethodIsEmpty. +Style/SingleLineMethods: + Exclude: + - 'lib/cucumber/rails/world.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: use_perl_names, use_english_names +Style/SpecialGlobalVars: + Exclude: + - 'Rakefile' + - 'features/support/env.rb' + +# Offense count: 90 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Exclude: + - 'Appraisals' + - 'Gemfile' + - 'Rakefile' + - 'cucumber-rails.gemspec' + - 'dev_tasks/yard.rake' + - 'features/step_definitions/cucumber_rails_steps.rb' + - 'gemfiles/rails_4_2.gemfile' + - 'gemfiles/rails_5_0.gemfile' + - 'gemfiles/rails_5_1.gemfile' + - 'gemfiles/rails_5_2.gemfile' + - 'gemfiles/rails_6_0.gemfile' + - 'spec/spec_helper.rb' + +# Offense count: 11 +# Cop supports --auto-correct. +# Configuration parameters: MinSize. +# SupportedStyles: percent, brackets +Style/SymbolArray: + EnforcedStyle: brackets + +# Offense count: 2 +# Cop supports --auto-correct. +Style/UnneededInterpolation: + Exclude: + - 'features/step_definitions/cucumber_rails_steps.rb' + +# Offense count: 51 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Metrics/LineLength: + Max: 254 diff --git a/Appraisals b/Appraisals index a2576403..a04d2209 100644 --- a/Appraisals +++ b/Appraisals @@ -1,25 +1,29 @@ appraise "rails_4_2" do gem "railties", "~> 4.2.1" - gem "i18n", "< 1.6.0", platform: :mri_22 + gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] + gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] end appraise "rails_5_0" do gem "railties", "~> 5.0.0" - gem "i18n", "< 1.6.0", platform: :mri_22 + gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] + gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] end appraise "rails_5_1" do gem "railties", "~> 5.1.0" - gem "i18n", "< 1.6.0", platform: :mri_22 + gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] + gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] end appraise "rails_5_2" do gem "railties", "~> 5.2" - gem "i18n", "< 1.6.0", platform: :mri_22 + gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] + gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] end appraise "rails_6_0" do diff --git a/CHANGELOG.md b/CHANGELOG.md index e5938509..74736863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,37 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO ## [master](https://github.com/cucumber/cucumber-rails/compare/v1.6.0...master) (Not yet released) There are currently no unreleased changes. +## [v1.7.0](https://github.com/cucumber/cucumber-rails/compare/v1.6.0...v1.7.0) (2019-04-17) + +### Changed + + * Drop rails `4.0` / `4.1` support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez](https://github.com/deivid-rodriguez)) + * Allow Ruby `2.6` users to `ERB.new` ([#399](https://github.com/cucumber/cucumber-rails/pull/399) [koic](https://github.com/koic)) + * Allow Rails to be used in the `6.x` series (Currently as of release only beta1 is supported) ([#405](https://github.com/cucumber/cucumber-rails/pull/405) [kotovalexarian](https://github.com/kotovalexarian)) + * Update CI to test most relevant Rubies ([#411](https://github.com/cucumber/cucumber-rails/pull/411) [olleolleolle](https://github.com/olleolleolle)) + +### Fixed + + * Appraisals fixes (Up-to-date `geckodriver`, standardised the various `.gemfile`s) + [#389](https://github.com/cucumber/cucumber-rails/pull/389) / + [#394](https://github.com/cucumber/cucumber-rails/pull/394) / + [#395](https://github.com/cucumber/cucumber-rails/pull/395) / + [#408](https://github.com/cucumber/cucumber-rails/pull/408) + [xtrasimplicity](https://github.com/xtrasimplicity) / + [deivid-rodriguez](https://github.com/deivid-rodriguez) / + [mvz](https://github.com/mvz) + + * Various build issues that had built up over the previous year + [#403](https://github.com/cucumber/cucumber-rails/pull/403) / + [#404](https://github.com/cucumber/cucumber-rails/pull/404) / + [#410](https://github.com/cucumber/cucumber-rails/pull/410) + [koic](https://github.com/koic) / + [mvz](https://github.com/mvz) ## [v1.6.0](https://github.com/cucumber/cucumber-rails/compare/v1.5.0...v1.6.0) (2018-04-23) ### Changed + * Renamed History.md to CHANGELOG.md, added contributing note, and this line in accordance with [cucumber/cucumber #251](https://github.com/cucumber/cucumber/issues/251) ([#345](https://github.com/cucumber/cucumber-rails/pull/345) [jaysonesmith](https://github.com/jaysonesmith)) * Update .travis.yml with ruby versions ([#341](https://github.com/cucumber/cucumber-rails/pull/341) Jun Aruga) * Removed support for Ruby <= 2.1, to keep in line with [cucumber-ruby](https://github.com/cucumber/cucumber-ruby/blob/master/CHANGELOG.md#302-2017-11-11) ([#360](https://github.com/cucumber/cucumber-rails/pull/360) [xtrasimplicity](https://github.com/xtrasimplicity)). @@ -67,6 +94,7 @@ There are currently no unreleased changes. * Various code enhancements based on PullReview suggestions (Kosmas Chatzimichalis) ### Removed Features + * Mongo step definition ([#263](https://github.com/cucumber/cucumber-rails/issues/263) Aslak Hellesøy) ### Bugfixes @@ -89,7 +117,6 @@ There are currently no unreleased changes. * Added recommendation in README.md for running install scripts after upgrading (Joost Baaij) * Describe configuration option 'autorun_database_cleaner' in README ([#255](https://github.com/cucumber/cucumber-rails/pull/255) Martin Eismann) - ### Changed Features * Gemspec in 1.3.1 doesn't allow usage with rails 4 ([#244](https://github.com/cucumber/cucumber-rails/issues/244) Fabian Schwahn) @@ -141,9 +168,11 @@ There are currently no unreleased changes. ## [v1.2.0](https://github.com/cucumber/cucumber-rails/compare/v1.1.1...v1.2.0) (2011-11-03) ### Removed features + * The (deprecated) tableish method has been removed. See https://gist.github.com/1299371 for an alternative. (Aslak Hellesøy) ### Bugfixes + * Non-threadsafe database connections shared between threads ([#166](https://github.com/cucumber/cucumber-rails/issues/166) Matt Wynne) ## [v1.1.1](https://github.com/cucumber/cucumber-rails/compare/v1.1.0...v1.1.1) (2011-10-03) @@ -197,22 +226,26 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v1.0.6](https://github.com/cucumber/cucumber-rails/compare/v1.0.5...v1.0.6) (2011-09-25) ### Bugfixes + * Fix deprecation warnings ([#169](https://github.com/cucumber/cucumber-rails/issues/169), [#170](https://github.com/cucumber/cucumber-rails/pull/170) Micah Geisel) * Deprecate #tableish. The Capybara::Node::Finders API has obsoleted the need for it. ([#145](https://github.com/cucumber/cucumber-rails/issues/145) Aslak Hellesøy) ## [v1.0.5](https://github.com/cucumber/cucumber-rails/compare/v1.0.4...v1.0.5) (2011-09-14) ### Bugfixes + * No = dependencies in gemspec, since rubies with old YAML (sych) can't read them. (Aslak Hellesøy) ## [v1.0.4](https://github.com/cucumber/cucumber-rails/compare/v1.0.3...v1.0.4) (2011-09-12) ### Bugfixes + * Active_record hook prevents features that access multiple database from running correctly ([#152](https://github.com/cucumber/cucumber-rails/issues/152) winnipegtransit) ## [v1.0.3](https://github.com/cucumber/cucumber-rails/compare/v1.0.2...v1.0.3) (2011-09-11) ### Bugfixes + * sqlite3-ruby is now sqlite3 ([#158](https://github.com/cucumber/cucumber-rails/pull/158) Trung Le) * Broken link in the USAGE file of the features generator ([#156](https://github.com/cucumber/cucumber-rails/pull/156) Pablo Alonso García) * Rails destroy cucumber:feature deletes the steps folder, even though it's not empty. ([#154](https://github.com/cucumber/cucumber-rails/pull/154]), [#111](https://github.com/cucumber/cucumber-rails/issues/111) mblake) @@ -223,28 +256,33 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v1.0.2](https://github.com/cucumber/cucumber-rails/compare/v1.0.1...v1.0.2) (2011-06-26) ### Bugfixes + * Removed the dependency on rack-test, since it is not used directly. v1.0.1 was incompatible with Rails 3.0.9. (Aslak Hellesøy) ## [v1.0.1](https://github.com/cucumber/cucumber-rails/compare/v1.0.0...v1.0.1) (2011-06-25) ### New Features -* Added a @no-database-cleaner tag you can add if you don't want to run DatabaseCleaner. Useful for debugging if you want to leave data in the database. Typical use case is to run `rails server --environment test` to look at/try app with data from test. (Aslak Hellesøy) + +* Added a `@no-database-cleaner` tag you can add if you don't want to run DatabaseCleaner. Useful for debugging if you want to leave data in the database. Typical use case is to run `rails server --environment test` to look at/try app with data from test. (Aslak Hellesøy) * History file is now in Markdown format. (Aslak Hellesøy) ## [v1.0.0](https://github.com/cucumber/cucumber-rails/compare/v0.5.2...v1.0.0) (2011-06-20) ### New Features -* Upgraded Cucumber dependency to 1.0.0. (Aslak Hellesøy) + +* Upgraded Cucumber dependency to `1.0.0` (Aslak Hellesøy) ## [v0.5.2](https://github.com/cucumber/cucumber-rails/compare/v0.5.1...v0.5.2) (2011-06-07) ### New Features + * Upgraded to Capybara 1.0.0.rc1 (Aslak Hellesøy) * Add stats to generator (#144 Aslak Hellesøy) ## [v0.5.1](https://github.com/cucumber/cucumber-rails/compare/v0.5.0...v0.5.1) (2011-05-25) ### Bugfixes + * Mixed DB access feature for @javascript drivers (#142 Alexander Mankuta) * cucumber:feature and integers. not creating feature correctly (#30 John Ivanoff, Aslak Hellesøy) * New project can't find capybara's "visit" (#143 Aslak Hellesøy) @@ -253,6 +291,7 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v0.5.0](https://github.com/cucumber/cucumber-rails/compare/v0.5.0.beta1...v0.5.0) (2011-05-17) ### Bugfixes + * undefined method `add_assertion' for nil:NilClass (#96, #97, #98 Aslak Hellesøy) * Capybara name error from env.rb (#125 Aslak Hellesøy) * Fixed date-localization bug (#138 Michael Opitz) @@ -260,11 +299,13 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v0.5.0.beta1](https://github.com/cucumber/cucumber-rails/compare/v0.4.1...v0.5.0.beta1) (2011-05-09) ### Removed features + * Dropped support for Rails 2 (Aslak Hellesøy) * Dropped support for Webrat (Aslak Hellesøy) * Removed database cleaner strategy overrides (#134 Daniel Morrison, Daniel Duvall) ### Improvements + * Upgrade to Capybara 1.0.0.beta1 or newer (#129, #130 Simon Menke, Klaus Hartl, Aslak Hellesøy) * Generated paths.rb cleanup (#133 Tim Pope) * Allow css pseudo-classes in scopers (#122 twalpole) @@ -272,6 +313,7 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v0.4.1](https://github.com/cucumber/cucumber-rails/compare/v0.4.0...v0.4.1) (2011-04-05) ### Bugfixes + * Fixed incorrect warning in generated files. (#115 Emanuele Vicentini) * Fixed incorrect hooks for DatabaseCleaner (#113 Markus Bengts) * Throw an error if the user forgot to add DatabaseCleaner to the Gemfile, allowing them to decide whether or not to use it. (#36 Aslak Hellesøy, Ryan Bigg) @@ -279,11 +321,13 @@ You can learn more about what Capybara has to offer in Capybara's [README](https ## [v0.4.0](https://github.com/cucumber/cucumber-rails/compare/v0.3.2...v0.4.0) (2011-03-20) ### New Features + * Add selectors helper (#63 Bodaniel Jeanes) * Capybara date stepdefs (#66 Rob Holland) * The World now includes Rack::Test::Methods, allowing get, post, put delete (Aslak Hellesøy) ### Bugfixes + * Allow setting rails root (#102, #103, Fabio Kreusch) * Fix Date selection steps and helpers (#93, #99, #100, #101, #109 James Herdman, John Ferlito, twalpole, Geoff Drake, Ricky Robinson, Michael Fleet) * Can not run cucumber-rails (0.4.0.beta.1) with cucumber (0.10.0) (#89 Aslak Hellesøy) @@ -294,6 +338,7 @@ You can learn more about what Capybara has to offer in Capybara's [README](https * Gem dependency on Nokogiri (for #tableish). (#53 Aslak Hellesøy) ### Removed Features + * Automatic detection of RSpec, Capybara and Webrat for install generator. Set gems explicitly in your Gemfile (Rails3) or environment.rb (Rails2) * Then /^(?:|I )should see JSON:$/. Use #get and #last_response instead. See features/rails3.feature. (Aslak Hellesøy) * Cucumber::Rails::World.use_transactional_fixtures. TODO: Explain what to do instead. @@ -339,34 +384,39 @@ This is a major release since we're now supporting both Rails 3 and RSpec 2. Old (Rails 2 and RSpec 1) are still supported. ### New Features + * Support for both Rails-2.x and Rails-3.x (#10 Kristian Mandrup, Aleksey Gureiev, Ashley Moran, Aslak Hellesøy) * Support for both RSpec-1.x and RSpec-2.x (Louis Rose, Aslak Hellesøy) * Features will default to Javascript emulation unless you turn it off with @culerity, (Aslak Hellesøy) * Japanese translation. (MOROHASHI Kyosuke) ### Bugfixes + * Support projects that don't use ActiveRecord (#14 Aslak Hellesøy) * Running test/unit tests when creating a skeleton (#12 Aleksey Gureiev) * Inform that config/database.yml is overwritten, be smarter about it and inform the user that it is forced. (#15 Aslak Hellesøy) * Reverts changes from issue #5 where verification of query string params was added to the step for being on a page. Adds step discussed in issue #11 for verification of query string. (#5, #11 Eric Milford) * Fixed typos in Capybara's web steps (has_not_xpath? => has_no_xpath?) (Thorbjørn Hermansen, Carlos Antonio da Silva) - ### New Features + * Added Danish translation (Kristian Mandrup) * Using Gemfile for Rails 3. Tidies it up and adds cucumber gems only if not already present! (Kristian Mandrup) * Added Generators wrapper module for Rails 3 generators so they are now all in Cucumber::Generators (Kristian Mandrup) ### Bugfixes + * Started to work on solutions for generating suitable support files depending on Rails version - see skeleton_base.rb#create_feature_support and templates/support ## [v0.2.4](https://github.com/cucumber/cucumber-rails/compare/v0.2.3...v0.2.4) (2010-01-18) ### New Features + * Added Spanish translation (Gabriel) ### Bugfixes + * Fixed some broken Webrat/Test::Unit step definitions. (Aslak Hellesøy) * Better Javascript emulation with Capybara (#7 Thorbjørn Hermansen) * Removed stray quote in i18n web_steps.rb (Gabriel) @@ -379,9 +429,11 @@ This is a major release since we're now supporting both Rails 3 and RSpec 2. Old ## [v0.2.3](https://github.com/cucumber/cucumber-rails/compare/v0.2.2...v0.2.3) (2010-01-03) ### New Features + * The #tableish Proc can return Strings as well as Nokogiri nodes now. (Aslak Hellesøy) ### Bugfixes + * Handle all types of URIs in "I should be on ..." steps. (#5 Andrew D. Smith) ## [v0.2.2](https://github.com/cucumber/cucumber-rails/compare/v0.2.1...v0.2.2) (2009-12-21) @@ -393,6 +445,7 @@ This is a major release since we're now supporting both Rails 3 and RSpec 2. Old * cucumber.rake finds the wrong vendored cucumber when a plugin name starts with "cucumber" (#4 James Herdman, Paco Benavent, Aslak Hellesøy) ### New features + * Czech translations. (Jiří Zajpt) ## [v0.2.1](https://github.com/cucumber/cucumber-rails/compare/v0.2.0...v0.2.1) (2009-12-16) @@ -409,12 +462,12 @@ and to celebrate that cucumber-rails now supports Capybara as an alternative to ### UPGRADING FROM A PREVIOUS CUCUMBER SETUP -1. Remove your features/support/version_check.rb -1. Remove your features/step_definitions/webrat_steps.rb +1. Remove your `features/support/version_check.rb` +2. Remove your `features/step_definitions/webrat_steps.rb` If you have added your own custom step definitions to this file, put them in a different file under features/step_definitions -1. run "ruby script/generate cucumber --help" to see what options you have. -1. run "ruby script/generate cucumber" - plus whatever options you think fit for you. +3. run `ruby script/generate cucumber --help` to see what options you have. +4. run `ruby script/generate cucumber` - plus whatever options you think fit for you. Answer "n" (no) when asked to overwrite paths.rb. Answer "y" (yes) when asked to overwrite other files, but do "d" (diff) first. If you have edits in some of these files that you want to keep, store the diff @@ -422,9 +475,9 @@ and to celebrate that cucumber-rails now supports Capybara as an alternative to adding your custom code to another file that won't be overwritten the next time you upgrade. - Many people have edits in their env.rb file. This is something you should try + Many people have edits in their `env.rb` file. This is something you should try to avoid in the future. Instead, keep your custom setup in a different file - under features/support - Cucumber loads all files under features/**/*.rb anyway. + under `features/support` - Cucumber loads all files under `features/**/*.rb` anyway. If you have a Spork setup, see the end of this thread: http://groups.google.com/group/cukes/browse_thread/thread/475385cc26377215 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ccac5a2..ba055df8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,16 +13,14 @@ We appreciate that. But before you do, please learn our basic rules: # Contributing to cucumber-rails -This document is a guide for those maintaining cucumber-Rails, and others who would like to submit patches. +This document is a guide for those maintaining Cucumber-Rails, and others who would like to submit patches. ## Note on Patches/Pull Requests * Fork the project. Make a branch for your change. * Make your feature addition or bug fix. -* Make sure your patch is well covered by tests. We don't accept changes to cucumber-rails that aren't tested. -* Please do not change the Rakefile, version, or history. - (if you want to have your own version, that is fine but - bump version in a commit by itself so we can ignore when we merge your change) +* Make sure your patch is well covered by tests. We don't accept changes to `cucumber-rails` that aren't tested. +* Please do not change the Rakefile, version, or CHANGELOG. * Send us a pull request. ## Running tests @@ -35,9 +33,9 @@ This document is a guide for those maintaining cucumber-Rails, and others who wo ## Release Process -* Make sure `History.md` is updated with the upcoming version number, and has entries for all fixes. -* No need to add a `History.md` header at this point - this should be done when a new change is made, later. -* Make sure you have up-to-date and clean copy of cucumber/cucumber.github.com.git at the same level as cucumber repo. +* Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes. +* No need to add a new version header at this point - this should be done when a new release is made, later. +* Make sure you have up-to-date and clean copy of `cucumber/cucumber.github.com.git` at the same level as cucumber repo. Now release it @@ -57,11 +55,12 @@ If after running the rake release task you get an error similar to this: ! [rejected] rails-2.3.x -> rails-2.3.x (non-fast-forward) error: failed to push some refs to 'git@github.com:cucumber/cucumber-rails.git' -make sure that you have pulled all the recent changes from both the master and the rails-2.3.x branch +make sure that you have pulled all the recent changes from the master branch ## Gaining Release Karma -To become a release manager, create a pull request adding your name to the list below, and include your Rubygems email address in the ticket. One of the existing Release managers will then add you. +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 @@ -72,4 +71,3 @@ Current release managers: To grant release karma, issue the following command: gem owner cucumber-rails --add - diff --git a/LICENSE b/LICENSE index 40e03fd1..d89fee85 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2008,2009,2010,2011,2012,2013 Aslak Hellesøy and the Cucumber Team. +Copyright (c) 2008-2019 Aslak Hellesøy and the Cucumber Team. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README.md b/README.md index 2cae4411..ce098e13 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails) [![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails) -Cucumber-Rails brings Cucumber to Rails 4.2 and Rails 5.x. +Cucumber-Rails brings Cucumber to Rails 4.2 and Rails 5.x. This gem is also compatible with Rails 6.0+ +but this is currently in a beta phase, so there may be issues. ## Installation diff --git a/cucumber-rails.gemspec b/cucumber-rails.gemspec index 29782422..4af662c6 100644 --- a/cucumber-rails.gemspec +++ b/cucumber-rails.gemspec @@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__) Gem::Specification.new do |s| s.name = 'cucumber-rails' - s.version = '1.6.0' + s.version = '1.7.0' s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"] s.description = "Cucumber Generator and Runtime for Rails" s.summary = "#{s.name}-#{s.version}" @@ -12,7 +12,9 @@ Gem::Specification.new do |s| s.license = 'MIT' - s.add_runtime_dependency('capybara', ['>= 1.1.2', '< 4']) + s.required_ruby_version = '>= 2.2' + + s.add_runtime_dependency('capybara', ['>= 2.3.0', '< 4']) s.add_runtime_dependency('cucumber', ['>= 3.0.2', '< 4']) s.add_runtime_dependency('nokogiri', '~> 1.8') s.add_runtime_dependency('railties', ['>= 4.2', '< 7']) @@ -23,7 +25,8 @@ Gem::Specification.new do |s| s.add_development_dependency('appraisal', '>= 0.5.1') s.add_development_dependency('aruba', '~> 0.14.2') s.add_development_dependency('bundler', '>= 1.3.5') - s.add_development_dependency('rake', '>= 0.9.2.2') + s.add_development_dependency('rubocop', '~> 0.66.0') + s.add_development_dependency('rake', '>= 10.3') s.add_development_dependency('rspec', '~> 3.5') s.add_development_dependency('rails', ['>= 4.2', '< 7']) s.add_development_dependency('sqlite3', '~> 1.3.13') diff --git a/gemfiles/rails_4_2.gemfile b/gemfiles/rails_4_2.gemfile index d319f07e..8e514b54 100644 --- a/gemfiles/rails_4_2.gemfile +++ b/gemfiles/rails_4_2.gemfile @@ -3,7 +3,8 @@ source "https://rubygems.org" gem "railties", "~> 4.2.1" -gem "i18n", "< 1.6.0", platform: :mri_22 +gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] +gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] gemspec path: "../" diff --git a/gemfiles/rails_5_0.gemfile b/gemfiles/rails_5_0.gemfile index 4915c08c..a6e5242c 100644 --- a/gemfiles/rails_5_0.gemfile +++ b/gemfiles/rails_5_0.gemfile @@ -3,7 +3,8 @@ source "https://rubygems.org" gem "railties", "~> 5.0.0" -gem "i18n", "< 1.6.0", platform: :mri_22 +gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] +gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] gemspec path: "../" diff --git a/gemfiles/rails_5_1.gemfile b/gemfiles/rails_5_1.gemfile index 76420e2f..9cd1d7bf 100644 --- a/gemfiles/rails_5_1.gemfile +++ b/gemfiles/rails_5_1.gemfile @@ -3,7 +3,8 @@ source "https://rubygems.org" gem "railties", "~> 5.1.0" -gem "i18n", "< 1.6.0", platform: :mri_22 +gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] +gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] gemspec path: "../" diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile index 9ec3e336..c9f1e527 100644 --- a/gemfiles/rails_5_2.gemfile +++ b/gemfiles/rails_5_2.gemfile @@ -3,7 +3,8 @@ source "https://rubygems.org" gem "railties", "~> 5.2" -gem "i18n", "< 1.6.0", platform: :mri_22 +gem "i18n", "< 1.5.1", platform: :mri_22 gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22] +gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22] gemspec path: "../"