cucumber-rails 1.6.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Appraisals +18 -88
- data/CHANGELOG.md +208 -14
- data/CONTRIBUTING.md +27 -24
- data/Gemfile +2 -4
- data/LICENSE +1 -1
- data/README.md +45 -31
- data/Rakefile +17 -13
- data/bin/install_geckodriver.sh +19 -0
- data/bin/install_webpacker.sh +9 -0
- data/config/cucumber.yml +0 -3
- data/cucumber-rails.gemspec +40 -33
- data/dev_tasks/cucumber.rake +2 -0
- data/dev_tasks/rspec.rake +2 -0
- data/dev_tasks/yard.rake +7 -14
- data/dev_tasks/yard/default/layout/html/setup.rb +6 -1
- data/features/allow_rescue.feature +16 -11
- data/features/annotations.feature +8 -11
- data/features/capybara_javascript_drivers.feature +90 -31
- data/features/choose_javascript_database_strategy.feature +36 -56
- data/features/configuration.feature +48 -0
- data/features/database_cleaner.feature +103 -16
- data/features/disable_automatic_database_cleaning.feature +10 -16
- data/features/emulate_javascript.feature +59 -44
- data/features/install_cucumber_rails.feature +4 -4
- data/features/no_database.feature +6 -6
- data/features/raising_errors.feature +9 -3
- data/features/rerun_profile.feature +5 -4
- data/features/rest_api.feature +11 -11
- data/features/step_definitions/cucumber_rails_steps.rb +43 -100
- data/features/support/aruba.rb +3 -1
- data/features/support/cucumber_rails_helper.rb +86 -0
- data/features/support/env.rb +4 -38
- data/features/support/hooks.rb +8 -0
- data/gemfiles/rails_5_0.gemfile +4 -12
- data/gemfiles/rails_5_1.gemfile +3 -10
- data/gemfiles/rails_5_2.gemfile +2 -10
- data/gemfiles/rails_6_0.gemfile +8 -0
- data/lib/cucumber/rails.rb +23 -17
- data/lib/cucumber/rails/action_dispatch.rb +21 -0
- data/lib/cucumber/rails/application.rb +16 -7
- data/lib/cucumber/rails/capybara.rb +2 -0
- data/lib/cucumber/rails/capybara/javascript_emulation.rb +43 -35
- data/lib/cucumber/rails/capybara/select_dates_and_times.rb +3 -1
- data/lib/cucumber/rails/database.rb +24 -56
- data/lib/cucumber/rails/database/deletion_strategy.rb +11 -0
- data/lib/cucumber/rails/database/shared_connection_strategy.rb +25 -0
- data/lib/cucumber/rails/database/strategy.rb +31 -0
- data/lib/cucumber/rails/database/truncation_strategy.rb +11 -0
- data/lib/cucumber/rails/hooks.rb +2 -0
- data/lib/cucumber/rails/hooks/active_record.rb +8 -4
- data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
- data/lib/cucumber/rails/hooks/database_cleaner.rb +11 -3
- data/lib/cucumber/rails/hooks/mail.rb +3 -1
- data/lib/cucumber/rails/rspec.rb +3 -1
- data/lib/cucumber/rails/world.rb +24 -7
- data/lib/generators/cucumber/{install/USAGE → USAGE} +0 -0
- data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +23 -10
- data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/_rails_prefork.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/capybara.rb +2 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/edit_warning.txt +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/rails.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/rails_spork.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +0 -0
- data/spec/cucumber/rails/database_spec.rb +50 -33
- data/spec/examples.txt +19 -0
- data/spec/generators/cucumber/{install/install_generator_spec.rb → install_generator_spec.rb} +16 -8
- data/spec/spec_helper.rb +4 -2
- data/tmp/aruba/test_app/Gemfile +62 -0
- data/tmp/aruba/test_app/Gemfile.lock +249 -0
- data/tmp/aruba/test_app/README.md +24 -0
- data/tmp/aruba/test_app/Rakefile +6 -0
- data/tmp/aruba/test_app/app/assets/config/manifest.js +3 -0
- data/tmp/aruba/test_app/app/assets/javascripts/application.js +16 -0
- data/tmp/aruba/test_app/app/assets/javascripts/appointments.coffee +3 -0
- data/tmp/aruba/test_app/app/assets/javascripts/cable.js +13 -0
- data/tmp/aruba/test_app/app/assets/stylesheets/application.css +15 -0
- data/tmp/aruba/test_app/app/assets/stylesheets/appointments.scss +3 -0
- data/tmp/aruba/test_app/app/assets/stylesheets/scaffolds.scss +84 -0
- data/tmp/aruba/test_app/app/channels/application_cable/channel.rb +4 -0
- data/tmp/aruba/test_app/app/channels/application_cable/connection.rb +4 -0
- data/tmp/aruba/test_app/app/controllers/application_controller.rb +2 -0
- data/tmp/aruba/test_app/app/controllers/appointments_controller.rb +74 -0
- data/tmp/aruba/test_app/app/helpers/application_helper.rb +2 -0
- data/tmp/aruba/test_app/app/helpers/appointments_helper.rb +2 -0
- data/tmp/aruba/test_app/app/jobs/application_job.rb +2 -0
- data/tmp/aruba/test_app/app/mailers/application_mailer.rb +4 -0
- data/tmp/aruba/test_app/app/models/application_record.rb +3 -0
- data/tmp/aruba/test_app/app/models/appointment.rb +2 -0
- data/tmp/aruba/test_app/app/views/appointments/_appointment.json.jbuilder +2 -0
- data/tmp/aruba/test_app/app/views/appointments/_form.html.erb +27 -0
- data/tmp/aruba/test_app/app/views/appointments/edit.html.erb +6 -0
- data/tmp/aruba/test_app/app/views/appointments/index.html.erb +29 -0
- data/tmp/aruba/test_app/app/views/appointments/index.json.jbuilder +1 -0
- data/tmp/aruba/test_app/app/views/appointments/new.html.erb +5 -0
- data/tmp/aruba/test_app/app/views/appointments/show.html.erb +14 -0
- data/tmp/aruba/test_app/app/views/appointments/show.json.jbuilder +1 -0
- data/tmp/aruba/test_app/app/views/layouts/application.html.erb +15 -0
- data/tmp/aruba/test_app/app/views/layouts/mailer.html.erb +13 -0
- data/tmp/aruba/test_app/app/views/layouts/mailer.text.erb +1 -0
- data/tmp/aruba/test_app/bin/bundle +3 -0
- data/tmp/aruba/test_app/bin/rails +4 -0
- data/tmp/aruba/test_app/bin/rake +4 -0
- data/tmp/aruba/test_app/bin/setup +36 -0
- data/tmp/aruba/test_app/bin/update +31 -0
- data/tmp/aruba/test_app/bin/yarn +11 -0
- data/tmp/aruba/test_app/config.ru +5 -0
- data/tmp/aruba/test_app/config/application.rb +19 -0
- data/tmp/aruba/test_app/config/boot.rb +3 -0
- data/tmp/aruba/test_app/config/cable.yml +10 -0
- data/tmp/aruba/test_app/config/credentials.yml.enc +1 -0
- data/tmp/aruba/test_app/config/cucumber.yml +9 -0
- data/tmp/aruba/test_app/config/database.yml +25 -0
- data/tmp/aruba/test_app/config/environment.rb +5 -0
- data/tmp/aruba/test_app/config/environments/development.rb +61 -0
- data/tmp/aruba/test_app/config/environments/production.rb +94 -0
- data/tmp/aruba/test_app/config/environments/test.rb +46 -0
- data/tmp/aruba/test_app/config/initializers/application_controller_renderer.rb +8 -0
- data/tmp/aruba/test_app/config/initializers/assets.rb +14 -0
- data/tmp/aruba/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/tmp/aruba/test_app/config/initializers/content_security_policy.rb +25 -0
- data/tmp/aruba/test_app/config/initializers/cookies_serializer.rb +5 -0
- data/tmp/aruba/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/tmp/aruba/test_app/config/initializers/inflections.rb +16 -0
- data/tmp/aruba/test_app/config/initializers/mime_types.rb +4 -0
- data/tmp/aruba/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/tmp/aruba/test_app/config/locales/en.yml +33 -0
- data/tmp/aruba/test_app/config/master.key +1 -0
- data/tmp/aruba/test_app/config/puma.rb +37 -0
- data/tmp/aruba/test_app/config/routes.rb +4 -0
- data/tmp/aruba/test_app/config/storage.yml +34 -0
- data/tmp/aruba/test_app/db/development.sqlite3 +0 -0
- data/tmp/aruba/test_app/db/migrate/20200821080656_create_appointments.rb +10 -0
- data/tmp/aruba/test_app/db/schema.rb +22 -0
- data/tmp/aruba/test_app/db/seeds.rb +7 -0
- data/tmp/aruba/test_app/db/test.sqlite3 +0 -0
- data/tmp/aruba/test_app/features/create_appointment.feature +9 -0
- data/tmp/aruba/test_app/features/create_appointment_steps.rb +19 -0
- data/tmp/aruba/test_app/features/support/env.rb +18 -0
- data/tmp/aruba/test_app/lib/tasks/cucumber.rake +76 -0
- data/tmp/aruba/test_app/log/development.log +27 -0
- data/tmp/aruba/test_app/log/test.log +38 -0
- data/tmp/aruba/test_app/package.json +5 -0
- data/tmp/aruba/test_app/public/404.html +67 -0
- data/tmp/aruba/test_app/public/422.html +67 -0
- data/tmp/aruba/test_app/public/500.html +66 -0
- data/tmp/aruba/test_app/public/apple-touch-icon-precomposed.png +0 -0
- data/tmp/aruba/test_app/public/apple-touch-icon.png +0 -0
- data/tmp/aruba/test_app/public/favicon.ico +0 -0
- data/tmp/aruba/test_app/public/robots.txt +1 -0
- data/tmp/aruba/test_app/script/cucumber +11 -0
- data/tmp/aruba/test_app/test/application_system_test_case.rb +5 -0
- data/tmp/aruba/test_app/test/controllers/appointments_controller_test.rb +48 -0
- data/tmp/aruba/test_app/test/fixtures/appointments.yml +9 -0
- data/tmp/aruba/test_app/test/models/appointment_test.rb +7 -0
- data/tmp/aruba/test_app/test/system/appointments_test.rb +45 -0
- data/tmp/aruba/test_app/test/test_helper.rb +10 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/0I/0I0oT83oN3NKiEi9XIhexiT3XgkA8mKyCbs25v3l20g.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/0W/0WnFNEwHN4bhDiFTvyMWURx02L4yP3gkP7vtjzKQFVo.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/2B/2Bg65dpvTdePrXa_wG6RsHpQzbqVSiHK0FVa0WdOJ4k.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/2r/2r_85kVmIcWzvJH72GapWtLDhaMP2HEziNxykyYpAUg.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/72/72jdZDzrM3-D_zYkIiPdAWQNeaFsqah154_QvcqWqTQ.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/99/99m8UCKl4j8IpsVOK8ltLHyNh8Ae0nHw3GBkC34V_co.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/9O/9OOXnKHBQnaCeE5HDe5csQsItouzWM6rTl8sESvkGTE.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/AF/AFloQwm_M7GZudPY87xx4TA0xEeuX9Psl0SJ94i5EyU.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/AP/APDAc8aUg_16wNWrVhCJcKeqbxyOScYGVhiDVgbrV7U.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/B4/B43LeT9Wba4fLvXw-C_kKq-x9HwYZxnBBiltbIufzzQ.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/EO/EOut5kyDPr7aKrHdvDsNJuYarA8XGnpAlDvBimlaC08.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/GJ/GJzxuc2i_d4Uhxs4IMnbQXhxBc9CTLrnQyzxwTqKOBw.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Ge/Ge2oyaUStbQszLfXjgTi6LkncyS5SKfV8RJwbRA3HbI.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Hv/HvPd_vK17QbhWq8QnCuyhqm0cPaGnHyO9lSzN-icQdg.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/II/IIhUO-5-DcfCyD_rVJeHjRMNVJxLmAmXP8i2XEjFpns.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Ka/KaLHRsUYc4EUxUr4q_UhArFJUTF_EaBklpeU4TsE9SY.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/MZ/MZcwDENEs93Wd9q7A_7UWdfJrWsBXa0pGp03P9mqG2I.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Nw/NwHea3ImBECnlmojPb9X9ZDfvRRuX_dX9sxISdtp9-A.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/PP/PPKuKT7m2PMDHVzBcYjePvXU6CbCW63Iqe3Q2a-Jdh8.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/RE/REtgGrS74n4Y7OKRcGvZsA2EUClg_RM66mVgGpySI20.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Rk/RkQLRXSz5LhJQnH7BT-ZDkVK0Rx8N9KhcVwR2A1HY4M.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Sx/SxtNEQ-KKVBCTtsDD-xf4oJEIdBPIHkGktnLXvG-GRk.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/TL/TLxLzqEAxKzTHH9EwSg5Lvcp3zgGuhjTjed121DSu9U.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/U1/U1D7nCXYBD3VlPnXGs_6mRtlhs-Gvv_vvCUYlTf4Grw.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/U6/U6pXyI-5haNcHRdsB-SoztzlXb98-256hFReXsL31J4.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/UE/UEKUaC9O_XBO5acP8HnxcJ1dtNM_1C7MTofkTQvPgRA.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/UV/UVcnI5bo-eQvULfmzeQUFVTDYEMF2cbAXpsOsh01XNY.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/WK/WK8RpMP5qb9GRQTsTHAzlfo8t2nsTLU6B8CQAc4UfOU.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Xk/Xk8p9O39-syzKbpnoMRChld0TpoZFWlNIzeT5XKw2fQ.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/Zv/ZvCEW2ZyS-k4cHH7Gd8P2nKFE9Uh1VOrfR-1PYY2yz8.cache +5 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/ac/acWu1-1ZAW1jRVKlHYlzlEg28lk-SdHfTq-P-viJMS0.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/b3/b3NiYrQOlN2zxiJYqbl4gmvK6it3Md9gSzAYgsIMhnY.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/c1/c1Pm-rFPEB3LXIjOtswD6x8SEAgI9y2BR16jc8ifcsc.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/em/emTQG2a9zF8NuvElLOnEpNJp0wq3_gVSDAM60vyXAzE.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/fX/fXH3Db_88TmJFhRydoFTx8tZbHAkLzK2ZZ0lsBEg8xA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/gI/gIHntmCf7DbObPL_KZJYSgduAmqX18ZZPOtq85pn8vo.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/kP/kPwbLAUCLjv0x6fe5lvZpmUkgmvQSDHSdEOSdbMyDgY.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/kT/kT98Z_slHI6SgdEmoAtKAHyJQjTHdbe6GAbB27RP2uI.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/mt/mtT4Rwi7H_vHQXdxxPvvzhL4ziA7X9WK-JXzacxWlEA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/mz/mzgD6X_N-fO95dP8Q1Q1sApCrbSmgPgsuEKv65KYcdo.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/oi/oiPhXw8pYdWv5T4qRFzePHaXZLI50xMvvTyfry-ILSo.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/r-/r--YB1ugrZ4F-ogbLLYNwIH3j9pQ2u_ZBjTJxoS7TrM.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/s6/s68UIyg0lNko7IA42JXv_wwy9Ea3WH-zc9h0GYPg88Y.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/si/siT97rfEKbIWcCj6KUBChX7kpRBKI2fAeGGwpsz0tTU.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/st/stqDgDfAemfEq7ZxlEj6YThpn8_1Nfw2bRVA0N03YTw.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/t9/t93lpjyly3MvgKs51_OlLXneJXGyYFGmshXsk4Wr69M.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tE/tEy2QePsDnmFyyAQEric23sSBnfHBst3SEM7p-J7el8.cache +2 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tR/tRV7SyAY9c71G0o-8bElvNI76KcWhc5NVm48xflMPpM.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/tg/tggwa2O6A41xeZTK4SR0qcX0X55aOGg6q8ZWfqma1vM.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/uB/uBKOYcdzL_6Amevsu-uKAMTg7QGW5kgC0t5sAZINrcI.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/uE/uEyPXY2m04nerJV0pn3p-B-BlkJ08oufpQH1G2QXPw4.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/up/upyndqsU9bU6WV8qyMy7MLpcQoybRqgj-qA3C3pjzXY.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/ux/uxx-W2TOCdnAEGX0ZLThb_QIEbLYutX8qCwD0glYCKE.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vC/vCsc-q2WmT8vWM2d2pb6_5hFav8mGlylwEKVWQvsumo.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vc/vcgiILg1wO98x-a4kX678ASAFWA1cL0iVx07VkHLPqA.cache +0 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/vu/vu6xNIGT6zorPmcKfd7edgxBltTmIRXU281uyK51kkU.cache +1 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/w4/w4y_Lms54hD2Nivh5PHeccAmh2DX53sc_HDTQYNyNXw.cache +3 -0
- data/tmp/aruba/test_app/tmp/cache/assets/sprockets/v3.0/yZ/yZpoD5Zf4RAQoOwi5kMVksuta_0KhYSK_Yy_6Ykyt7E.cache +1 -0
- data/tmp/aruba/test_app/tmp/development_secret.txt +1 -0
- metadata +262 -158
- data/.github/ISSUE_TEMPLATE.md +0 -52
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -42
- data/.gitignore +0 -12
- data/.rspec +0 -1
- data/.travis.yml +0 -43
- data/Gemfile.appraisal +0 -3
- data/config/.gitignore +0 -1
- data/features/support/bundler_pre_support.rb +0 -28
- data/features/support/fixtures/bundler-1.0.21.gem +0 -0
- data/features/support/fixtures/bundler-1.1.rc.gem +0 -0
- data/features/support/legacy_web_steps_support.rb +0 -289
- data/gemfiles/rails_4_0.gemfile +0 -22
- data/gemfiles/rails_4_1.gemfile +0 -20
- data/gemfiles/rails_4_2.gemfile +0 -19
- data/lib/cucumber/rails/action_controller.rb +0 -12
data/CONTRIBUTING.md
CHANGED
@@ -13,29 +13,44 @@ We appreciate that. But before you do, please learn our basic rules:
|
|
13
13
|
|
14
14
|
# Contributing to cucumber-rails
|
15
15
|
|
16
|
-
This document is a guide for those maintaining
|
16
|
+
This document is a guide for those maintaining Cucumber-Rails, and others who would like to submit patches.
|
17
17
|
|
18
18
|
## Note on Patches/Pull Requests
|
19
19
|
|
20
20
|
* Fork the project. Make a branch for your change.
|
21
21
|
* Make your feature addition or bug fix.
|
22
|
-
* Make sure your patch is well covered by tests. We don't accept changes to cucumber-rails that aren't tested.
|
23
|
-
* Please do not change the Rakefile, version, or
|
24
|
-
(if you want to have your own version, that is fine but
|
25
|
-
bump version in a commit by itself so we can ignore when we merge your change)
|
22
|
+
* Make sure your patch is well covered by tests. We don't accept changes to `cucumber-rails` that aren't tested.
|
23
|
+
* Please do not change the Rakefile, version, or CHANGELOG.
|
26
24
|
* Send us a pull request.
|
27
25
|
|
28
26
|
## Running tests
|
29
27
|
|
30
28
|
gem install bundler
|
31
29
|
bundle install
|
32
|
-
|
30
|
+
bin/install_geckodriver.sh
|
31
|
+
bin/install_webpacker.sh
|
32
|
+
# Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_6_0.gemfile), run
|
33
|
+
bundle exec appraisal rails_6_0 rake test
|
34
|
+
# Or run tests across the full supported stack. Note that because we support many versions. This takes 5-10 minutes
|
35
|
+
bundle exec rake appraisal
|
36
|
+
|
37
|
+
## Updating Appraisal gems / dependencies of cucumber-rails
|
38
|
+
|
39
|
+
To remove and rebuild the different gemfiles (for example, to update a rails version or its
|
40
|
+
dependencies), use the following:
|
33
41
|
|
42
|
+
[bundle exec] appraisal update
|
43
|
+
|
44
|
+
If you've changed versions of the dependencies, you may find it helpful to forcefully clean
|
45
|
+
each appraisal's gem lock file in `gemfiles/`. You can do this using:
|
46
|
+
|
47
|
+
[bundle exec] rake clean
|
48
|
+
|
34
49
|
## Release Process
|
35
50
|
|
36
|
-
* Make sure `
|
37
|
-
* No need to add a
|
38
|
-
* Make sure you have up-to-date and clean copy of cucumber/cucumber.github.com.git at the same level as cucumber repo.
|
51
|
+
* Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
|
52
|
+
* No need to add a new version header at this point - this should be done when a new release is made, later.
|
53
|
+
* Make sure you have up-to-date and clean copy of `cucumber/cucumber.github.com.git` at the same level as cucumber repo.
|
39
54
|
|
40
55
|
Now release it
|
41
56
|
|
@@ -44,29 +59,17 @@ Now release it
|
|
44
59
|
git commit -m "Release X.Y.Z"
|
45
60
|
rake release
|
46
61
|
|
47
|
-
### NOTE:
|
48
|
-
|
49
|
-
If after running the rake release task you get an error similar to this:
|
50
|
-
|
51
|
-
rake aborted!
|
52
|
-
Couldn't git push. `git push 2>&1' failed with the following output:
|
53
|
-
|
54
|
-
To git@github.com:cucumber/cucumber-rails.git
|
55
|
-
! [rejected] rails-2.3.x -> rails-2.3.x (non-fast-forward)
|
56
|
-
error: failed to push some refs to 'git@github.com:cucumber/cucumber-rails.git'
|
57
|
-
|
58
|
-
make sure that you have pulled all the recent changes from both the master and the rails-2.3.x branch
|
59
|
-
|
60
62
|
## Gaining Release Karma
|
61
63
|
|
62
|
-
To become a release manager, create a pull request adding your name to the list below,
|
64
|
+
To become a release manager, create a pull request adding your name to the list below, including
|
65
|
+
your Rubygems email address in the ticket. One of the existing Release managers will then add you.
|
63
66
|
|
64
67
|
Current release managers:
|
65
68
|
* Kosmas Chatzimichalis
|
66
69
|
* Matt Wynne
|
67
70
|
* Mathieu Jobin
|
71
|
+
* Andrew Walter
|
68
72
|
|
69
73
|
To grant release karma, issue the following command:
|
70
74
|
|
71
75
|
gem owner cucumber-rails --add <NEW OWNER RUBYGEMS EMAIL>
|
72
|
-
|
data/Gemfile
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
# apps do not run bundler for speed reasons. Kept here so they can be
|
5
|
-
# excluded from Appraisal-generated gemfiles.
|
3
|
+
source 'https://rubygems.org'
|
6
4
|
|
7
5
|
gemspec
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2008
|
3
|
+
Copyright (c) 2008-2020 Aslak Hellesøy and the Cucumber Team.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -3,20 +3,21 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/cucumber-rails.svg)](http://badge.fury.io/rb/cucumber-rails)
|
4
4
|
[![Build Status](https://secure.travis-ci.org/cucumber/cucumber-rails.svg?branch=master)](http://travis-ci.org/cucumber/cucumber-rails)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails)
|
6
|
-
[![Dependency Status](https://gemnasium.com/Kosmas/cucumber-rails.svg)](https://gemnasium.com/Kosmas/cucumber-rails)
|
7
6
|
[![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails)
|
8
7
|
|
9
|
-
Cucumber-Rails brings Cucumber to Rails
|
8
|
+
Cucumber-Rails brings Cucumber to Rails 5.x and 6.x.
|
10
9
|
|
11
10
|
## Installation
|
12
11
|
|
13
12
|
Before you can use the generator, add the gem to your project's Gemfile as follows:
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
```ruby
|
15
|
+
group :test do
|
16
|
+
gem 'cucumber-rails', require: false
|
17
|
+
# database_cleaner is not required, but highly recommended
|
18
|
+
gem 'database_cleaner'
|
19
|
+
end
|
20
|
+
```
|
20
21
|
|
21
22
|
Then install it by running:
|
22
23
|
|
@@ -42,11 +43,20 @@ Without Rake:
|
|
42
43
|
|
43
44
|
## Configuration options
|
44
45
|
|
45
|
-
By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean`
|
46
|
+
By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean`
|
47
|
+
before and after your scenarios. You can disable this behaviour like so:
|
46
48
|
|
47
|
-
|
48
|
-
|
49
|
-
|
49
|
+
```ruby
|
50
|
+
# features/support/env.rb
|
51
|
+
# ...
|
52
|
+
Cucumber::Rails::Database.autorun_database_cleaner = false
|
53
|
+
```
|
54
|
+
|
55
|
+
By default, cucumber-rails will auto mix-in the helpers from `Rack::Test` into your default Cucumber World instance. You can prevent this behaviour like so:
|
56
|
+
```ruby
|
57
|
+
# features/support/env.rb
|
58
|
+
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
|
59
|
+
```
|
50
60
|
|
51
61
|
## Upgrading from a previous version
|
52
62
|
|
@@ -56,21 +66,29 @@ When upgrading from a previous version it is recommended that you rerun:
|
|
56
66
|
|
57
67
|
## Bugs and feature requests
|
58
68
|
|
59
|
-
The *only* way to have a bug fixed or a new feature accepted is to describe it with a
|
69
|
+
The *only* way to have a bug fixed or a new feature accepted is to describe it with a
|
70
|
+
Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator.
|
71
|
+
Fork this project, clone it to your workstation and check out a branch with a descriptive name:
|
60
72
|
|
61
73
|
git clone git@github.com:you/cucumber-rails.git
|
62
|
-
git checkout -b
|
74
|
+
git checkout -b bugfix/generator-fails-on-ruby-25
|
63
75
|
|
64
|
-
Start by making sure you can run the existing features. Now, create a feature that demonstrates
|
76
|
+
Start by making sure you can run the existing features. Now, create a feature that demonstrates
|
77
|
+
what's wrong. See the existing features for examples. When you have a failing feature that
|
78
|
+
reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team
|
79
|
+
will review it and hopefully create a fix.
|
65
80
|
|
66
|
-
If you know how to fix the bug yourself, make a second commit (after committing the failing
|
81
|
+
If you know how to fix the bug yourself, make a second commit (after committing the failing
|
82
|
+
feature) before you send the pull request.
|
67
83
|
|
68
84
|
### Setting up your environment
|
69
85
|
|
70
|
-
|
86
|
+
Make sure you have a supported ruby installed, cd into your cucumber-rails repository and:
|
71
87
|
|
72
88
|
gem install bundler
|
73
89
|
bundle install
|
90
|
+
bin/install_geckodriver.sh
|
91
|
+
bin/install_webpacker.sh
|
74
92
|
|
75
93
|
### Running all tests
|
76
94
|
|
@@ -80,24 +98,17 @@ With all dependencies installed, all specs and features should pass:
|
|
80
98
|
|
81
99
|
### Running Appraisal suite
|
82
100
|
|
83
|
-
In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal)
|
101
|
+
In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal)
|
102
|
+
gem is used to generate multiple gemfiles, stored in the `gemfiles/` directory.
|
103
|
+
Normally these will only run on Travis; however, if you want to run the full test suite against
|
104
|
+
all gemfiles, run the following commands:
|
84
105
|
|
85
106
|
[bundle exec] appraisal install
|
86
107
|
[bundle exec] appraisal rake test
|
87
108
|
|
88
109
|
To run the suite against a named gemfile, use the following:
|
89
110
|
|
90
|
-
[bundle exec] appraisal
|
91
|
-
|
92
|
-
To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following:
|
93
|
-
|
94
|
-
[bundle exec] appraisal install
|
95
|
-
|
96
|
-
If you've changed versions of the dependencies, you may find it helpful to forcefully clean each appraisal's gem lock file in `gemfiles/`. You can do this using:
|
97
|
-
|
98
|
-
[bundle exec] rake clean
|
99
|
-
|
100
|
-
|
111
|
+
[bundle exec] appraisal rails_6_0 rake test
|
101
112
|
|
102
113
|
### Adding dependencies
|
103
114
|
|
@@ -105,9 +116,12 @@ To support the multiple-gemfile testing, when adding a new dependency the follow
|
|
105
116
|
|
106
117
|
1. If it's a runtime dependency of the gem, add it to the gemspec
|
107
118
|
2. If it's a primary development dependency, add it to the gemspec
|
108
|
-
3. If it's a dependency of a generated rails app in a test, add it to the
|
119
|
+
3. If it's a dependency of a generated rails app in a test, add it to [the helper] that
|
120
|
+
modifies the `Gemfile`.
|
121
|
+
|
122
|
+
For example, rspec is a primary development dependency, so it lives in the gemspec.
|
109
123
|
|
110
|
-
|
124
|
+
[the helper]: https://github.com/cucumber/cucumber-rails/blob/5e37c530560ae1c1a79521c38a54bae0be94242b/features/step_definitions/cucumber_rails_steps.rb#L15
|
111
125
|
|
112
126
|
### NOTE
|
113
127
|
|
@@ -115,7 +129,7 @@ If you get an error while trying to run the tests locally, similar to the one be
|
|
115
129
|
|
116
130
|
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
|
117
131
|
|
118
|
-
|
132
|
+
You need to install a javascript runtime.
|
119
133
|
|
120
134
|
You can do that in ubuntu by using:
|
121
135
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
CUCUMBER_RAILS_VERSION =
|
4
|
+
Gem::Specification.load("#{File.dirname(__FILE__)}/cucumber-rails.gemspec").version.version
|
3
5
|
require 'rubygems'
|
4
6
|
require 'bundler'
|
5
7
|
require 'bundler/setup'
|
@@ -9,41 +11,43 @@ require 'rake/clean'
|
|
9
11
|
require 'pathname'
|
10
12
|
Bundler::GemHelper.install_tasks
|
11
13
|
|
12
|
-
|
14
|
+
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
|
13
15
|
Dir["#{File.dirname(__FILE__)}/dev_tasks/*.rake"].sort.each { |ext| load ext }
|
14
16
|
|
15
17
|
CLEAN.include('doc', 'tmp')
|
16
18
|
|
17
19
|
task default: :test
|
18
20
|
|
19
|
-
task test: [
|
21
|
+
task test: %i[spec cucumber]
|
20
22
|
|
21
23
|
namespace :test do
|
22
|
-
desc
|
24
|
+
desc 'Run tests against all gemfiles'
|
23
25
|
task :all do
|
24
26
|
Rake::Task['appraisal'].invoke('test')
|
25
27
|
end
|
26
28
|
|
27
|
-
desc
|
28
|
-
task :gemfile, :name do |
|
29
|
+
desc 'Run tests against specified gemfile, e.g. rake test:gemfile[rails_6_0]'
|
30
|
+
task :gemfile, :name do |_task, args|
|
29
31
|
unless args.name && Pathname.new("gemfiles/#{args.name}.gemfile").exist?
|
30
|
-
raise ArgumentError "You must provide the name of an existing Appraisal gemfile,
|
32
|
+
raise ArgumentError, "You must provide the name of an existing Appraisal gemfile,
|
33
|
+
e.g. 'rake test:gemfile[rails_6_0]'"
|
31
34
|
end
|
35
|
+
|
32
36
|
Rake::Task["appraisal:#{args.name}"].invoke('test')
|
33
37
|
end
|
34
38
|
end
|
35
39
|
|
36
40
|
namespace :gemfiles do
|
37
|
-
desc
|
41
|
+
desc 'Install dependencies for all gemfiles'
|
38
42
|
task :install do
|
39
|
-
ENV['BUNDLE_GEMFILE'] =
|
43
|
+
ENV['BUNDLE_GEMFILE'] = 'Gemfile.appraisal'
|
40
44
|
Rake::Task['appraisal:install'].invoke
|
41
45
|
end
|
42
46
|
|
43
47
|
task :clean do
|
44
|
-
FileUtils.rm_rf(
|
48
|
+
FileUtils.rm_rf('gemfiles/*')
|
45
49
|
end
|
46
50
|
|
47
|
-
desc
|
48
|
-
task rebuild: [
|
51
|
+
desc 'Rebuild generated gemfiles and install dependencies'
|
52
|
+
task rebuild: %i[clean install]
|
49
53
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -xeuo pipefail
|
4
|
+
|
5
|
+
curl --silent \
|
6
|
+
--show-error \
|
7
|
+
--location \
|
8
|
+
--fail \
|
9
|
+
--retry 3 \
|
10
|
+
--output /tmp/geckodriver_linux64.tar.gz \
|
11
|
+
https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-linux64.tar.gz
|
12
|
+
|
13
|
+
sudo tar -C /usr/local/bin -xvzf /tmp/geckodriver_linux64.tar.gz geckodriver
|
14
|
+
|
15
|
+
rm /tmp/geckodriver_linux64.tar.gz
|
16
|
+
|
17
|
+
geckodriver --version
|
18
|
+
|
19
|
+
set +x
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -xeuo pipefail
|
4
|
+
|
5
|
+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
6
|
+
echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
|
7
|
+
sudo apt update && sudo apt install --yes yarn
|
8
|
+
|
9
|
+
set +x
|
data/config/cucumber.yml
CHANGED
@@ -12,9 +12,6 @@ opts = [
|
|
12
12
|
"--format rerun -o #{rerun_file}"
|
13
13
|
]
|
14
14
|
rails_version = `bundle exec rails --version`.match(/[\d.]+$/).to_s
|
15
|
-
if Gem::Version.new(rails_version) < Gem::Version.new('4.2')
|
16
|
-
opts << "--tags 'not @requires-rails-version-42'"
|
17
|
-
end
|
18
15
|
optlist = opts.join(' ')
|
19
16
|
%>
|
20
17
|
default: <%= path %> <%= optlist %> --tags 'not @broken'
|
data/cucumber-rails.gemspec
CHANGED
@@ -1,46 +1,53 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake/file_list'
|
4
|
+
$LOAD_PATH.unshift File.expand_path('lib', __dir__)
|
3
5
|
|
4
6
|
Gem::Specification.new do |s|
|
5
7
|
s.name = 'cucumber-rails'
|
6
|
-
s.version = '
|
7
|
-
s.authors = [
|
8
|
-
s.description =
|
8
|
+
s.version = '2.2.0'
|
9
|
+
s.authors = ['Aslak Hellesøy', 'Dennis Blöte', 'Rob Holland']
|
10
|
+
s.description = 'Cucumber Generator and Runtime for Rails'
|
9
11
|
s.summary = "#{s.name}-#{s.version}"
|
10
12
|
s.email = 'cukes@googlegroups.com'
|
11
|
-
s.homepage =
|
13
|
+
s.homepage = 'https://cucumber.io'
|
12
14
|
|
13
15
|
s.license = 'MIT'
|
14
16
|
|
15
|
-
s.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
s.metadata = {
|
18
|
+
'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues',
|
19
|
+
'changelog_uri' => "https://github.com/cucumber/cucumber-rails/blob/v#{s.version}/CHANGELOG.md",
|
20
|
+
'documentation_uri' => 'https://cucumber.io/docs',
|
21
|
+
'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/cukes',
|
22
|
+
'source_code_uri' => "https://github.com/cucumber/cucumber-rails/tree/v#{s.version}"
|
23
|
+
}
|
24
|
+
|
25
|
+
s.add_runtime_dependency('capybara', ['>= 2.18', '< 4']) # We support legacy capybara (But only the last 2.x)
|
26
|
+
s.add_runtime_dependency('cucumber', ['>= 3.0.2', '< 6']) # Support cucumber in the 3.x / 4.x / 5.x revisions
|
27
|
+
s.add_runtime_dependency('mime-types', ['~> 3.2']) # Only support the latest major (3+ years old)
|
28
|
+
s.add_runtime_dependency('nokogiri', '~> 1.8') # Only support the latest major (3+ years old)
|
29
|
+
s.add_runtime_dependency('rails', ['>= 5.0', '< 7']) # We support any version of Rails in the 5.x and 6.x series
|
20
30
|
|
21
31
|
# Main development dependencies
|
22
|
-
s.add_development_dependency('ammeter',
|
23
|
-
s.add_development_dependency('appraisal', '
|
24
|
-
s.add_development_dependency('aruba', '~> 0
|
25
|
-
s.add_development_dependency('
|
26
|
-
s.add_development_dependency('
|
27
|
-
s.add_development_dependency('
|
28
|
-
s.add_development_dependency('
|
29
|
-
s.add_development_dependency('
|
30
|
-
s.add_development_dependency('
|
31
|
-
s.add_development_dependency('rspec', '~>
|
32
|
-
s.add_development_dependency('
|
33
|
-
s.add_development_dependency('sqlite3')
|
32
|
+
s.add_development_dependency('ammeter', '>= 1.1.4')
|
33
|
+
s.add_development_dependency('appraisal', '~> 2.2')
|
34
|
+
s.add_development_dependency('aruba', '~> 1.0')
|
35
|
+
s.add_development_dependency('bundler', '>= 1.17')
|
36
|
+
s.add_development_dependency('rake', '>= 12.0')
|
37
|
+
s.add_development_dependency('rspec', '~> 3.6')
|
38
|
+
s.add_development_dependency('rubocop', '~> 0.89.0')
|
39
|
+
s.add_development_dependency('rubocop-packaging', '~> 0.3.0')
|
40
|
+
s.add_development_dependency('rubocop-performance', '~> 1.7.1')
|
41
|
+
s.add_development_dependency('rubocop-rspec', '~> 1.42.0')
|
42
|
+
s.add_development_dependency('sqlite3', '~> 1.3')
|
34
43
|
|
35
44
|
# For Documentation:
|
36
|
-
s.add_development_dependency('
|
37
|
-
s.add_development_dependency('
|
38
|
-
|
39
|
-
|
40
|
-
s.
|
41
|
-
s.
|
42
|
-
s.
|
43
|
-
s.
|
44
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
45
|
-
s.require_path = "lib"
|
45
|
+
s.add_development_dependency('rdoc', '>= 6.0')
|
46
|
+
s.add_development_dependency('yard', '~> 0.9.10')
|
47
|
+
|
48
|
+
s.required_ruby_version = '>= 2.4.0'
|
49
|
+
s.rubygems_version = '>= 1.6.1'
|
50
|
+
s.files = Rake::FileList['**/*'].exclude(*File.read('.gitignore').split)
|
51
|
+
s.test_files = Dir['{spec,features}/**/*']
|
52
|
+
s.require_path = 'lib'
|
46
53
|
end
|
data/dev_tasks/cucumber.rake
CHANGED