spreewald 4.6.2 → 4.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +3 -1
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile.ruby266.lock +8 -8
  5. data/Gemfile.ruby320.lock +10 -10
  6. data/README.md +27 -1
  7. data/lib/spreewald/web_steps.rb +16 -0
  8. data/lib/spreewald_support/mail_finder.rb +10 -2
  9. data/lib/spreewald_support/version.rb +1 -1
  10. data/media/logo.dark.shapes.svg +137 -0
  11. data/media/logo.dark.text.svg +107 -0
  12. data/media/logo.light.shapes.svg +136 -0
  13. data/media/logo.light.text.svg +106 -0
  14. data/media/makandra-with-bottom-margin.dark.svg +180 -0
  15. data/media/makandra-with-bottom-margin.light.svg +180 -0
  16. data/spec/steps/show_me_the_mails_spec.rb +22 -0
  17. data/tests/rails-7_capybara-3/Gemfile.lock +2 -2
  18. data/tests/rails-8_capybara-3/.ruby-version +1 -0
  19. data/tests/rails-8_capybara-3/Gemfile +27 -0
  20. data/tests/rails-8_capybara-3/Gemfile.lock +326 -0
  21. data/tests/rails-8_capybara-3/README.md +24 -0
  22. data/tests/rails-8_capybara-3/Rakefile +6 -0
  23. data/tests/rails-8_capybara-3/app/controllers +1 -0
  24. data/tests/rails-8_capybara-3/app/mailers/application_mailer.rb +4 -0
  25. data/tests/rails-8_capybara-3/app/mailers/spreewald_mailer.rb +66 -0
  26. data/tests/rails-8_capybara-3/app/models/application_record.rb +3 -0
  27. data/tests/rails-8_capybara-3/app/views +1 -0
  28. data/tests/rails-8_capybara-3/bin/bundle +114 -0
  29. data/tests/rails-8_capybara-3/bin/rails +4 -0
  30. data/tests/rails-8_capybara-3/bin/rake +4 -0
  31. data/tests/rails-8_capybara-3/bin/setup +33 -0
  32. data/tests/rails-8_capybara-3/config/application.rb +35 -0
  33. data/tests/rails-8_capybara-3/config/boot.rb +3 -0
  34. data/tests/rails-8_capybara-3/config/cucumber.yml +9 -0
  35. data/tests/rails-8_capybara-3/config/database.yml +25 -0
  36. data/tests/rails-8_capybara-3/config/environment.rb +5 -0
  37. data/tests/rails-8_capybara-3/config/environments/development.rb +66 -0
  38. data/tests/rails-8_capybara-3/config/environments/test.rb +56 -0
  39. data/tests/rails-8_capybara-3/config/initializers/application_controller_renderer.rb +8 -0
  40. data/tests/rails-8_capybara-3/config/initializers/backtrace_silencers.rb +8 -0
  41. data/tests/rails-8_capybara-3/config/initializers/content_security_policy.rb +28 -0
  42. data/tests/rails-8_capybara-3/config/initializers/cookies_serializer.rb +5 -0
  43. data/tests/rails-8_capybara-3/config/initializers/filter_parameter_logging.rb +6 -0
  44. data/tests/rails-8_capybara-3/config/initializers/inflections.rb +16 -0
  45. data/tests/rails-8_capybara-3/config/initializers/mime_types.rb +4 -0
  46. data/tests/rails-8_capybara-3/config/initializers/new_framework_defaults_6_1.rb +67 -0
  47. data/tests/rails-8_capybara-3/config/initializers/permissions_policy.rb +11 -0
  48. data/tests/rails-8_capybara-3/config/initializers/wrap_parameters.rb +14 -0
  49. data/tests/rails-8_capybara-3/config/locales/en.yml +33 -0
  50. data/tests/rails-8_capybara-3/config/routes.rb +1 -0
  51. data/tests/rails-8_capybara-3/config.ru +6 -0
  52. data/tests/rails-8_capybara-3/db +1 -0
  53. data/tests/rails-8_capybara-3/features/browser_tab_steps.feature +1 -0
  54. data/tests/rails-8_capybara-3/features/development_steps.feature +1 -0
  55. data/tests/rails-8_capybara-3/features/email_steps.feature +1 -0
  56. data/tests/rails-8_capybara-3/features/iframe_steps.feature +1 -0
  57. data/tests/rails-8_capybara-3/features/overriding.feature +1 -0
  58. data/tests/rails-8_capybara-3/features/session_steps.feature +1 -0
  59. data/tests/rails-8_capybara-3/features/step_definitions/.gitkeep +0 -0
  60. data/tests/rails-8_capybara-3/features/step_definitions/field_error_steps.rb +12 -0
  61. data/tests/rails-8_capybara-3/features/step_definitions/overriding_steps.rb +1 -0
  62. data/tests/rails-8_capybara-3/features/step_definitions/test_steps.rb +1 -0
  63. data/tests/rails-8_capybara-3/features/support/env.rb +66 -0
  64. data/tests/rails-8_capybara-3/features/support/paths.rb +1 -0
  65. data/tests/rails-8_capybara-3/features/support/selectors.rb +1 -0
  66. data/tests/rails-8_capybara-3/features/support/selenium.rb +1 -0
  67. data/tests/rails-8_capybara-3/features/table_steps.feature +1 -0
  68. data/tests/rails-8_capybara-3/features/time_steps.feature +1 -0
  69. data/tests/rails-8_capybara-3/features/web_steps.feature +1 -0
  70. data/tests/rails-8_capybara-3/lib/tasks/.keep +0 -0
  71. data/tests/rails-8_capybara-3/lib/tasks/cucumber.rake +76 -0
  72. data/tests/rails-8_capybara-3/log/.keep +0 -0
  73. data/tests/rails-8_capybara-3/public/404.html +67 -0
  74. data/tests/rails-8_capybara-3/public/422.html +67 -0
  75. data/tests/rails-8_capybara-3/public/500.html +66 -0
  76. data/tests/rails-8_capybara-3/public/favicon.ico +0 -0
  77. data/tests/rails-8_capybara-3/public/fixture_files +1 -0
  78. data/tests/rails-8_capybara-3/script/cucumber +11 -0
  79. data/tests/shared/app/controllers/emails_controller.rb +1 -8
  80. data/tests/shared/app/models/mailer.rb +43 -96
  81. data/tests/shared/features/shared/email_steps.feature +18 -0
  82. data/tests/shared/features/support/selenium.rb +2 -2
  83. metadata +134 -6
@@ -0,0 +1,66 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Do not eager load code on boot.
12
+ config.eager_load = false
13
+
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+ config.action_controller.enable_fragment_cache_logging = true
22
+
23
+ config.cache_store = :memory_store
24
+ config.public_file_server.headers = {
25
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
26
+ }
27
+ else
28
+ config.action_controller.perform_caching = false
29
+
30
+ config.cache_store = :null_store
31
+ end
32
+
33
+ # Don't care if the mailer can't send.
34
+ config.action_mailer.raise_delivery_errors = false
35
+
36
+ config.action_mailer.perform_caching = false
37
+
38
+ # Print deprecation notices to the Rails logger.
39
+ config.active_support.deprecation = :log
40
+
41
+ # Raise exceptions for disallowed deprecations.
42
+ config.active_support.disallowed_deprecation = :raise
43
+
44
+ # Tell Active Support which deprecation messages to disallow.
45
+ config.active_support.disallowed_deprecation_warnings = []
46
+
47
+ # Raise an error on page load if there are pending migrations.
48
+ config.active_record.migration_error = :page_load
49
+
50
+ # Highlight code that triggered database queries in logs.
51
+ config.active_record.verbose_query_logs = true
52
+
53
+
54
+ # Raises error for missing translations.
55
+ # config.i18n.raise_on_missing_translations = true
56
+
57
+ # Annotate rendered view with file names.
58
+ # config.action_view.annotate_rendered_view_with_filenames = true
59
+
60
+ # Use an evented file watcher to asynchronously detect changes in source code,
61
+ # routes, locales, etc. This feature depends on the listen gem.
62
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
63
+
64
+ # Uncomment if you wish to allow Action Cable access from any origin.
65
+ # config.action_cable.disable_request_forgery_protection = true
66
+ end
@@ -0,0 +1,56 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
8
+ Rails.application.configure do
9
+ # Settings specified here will take precedence over those in config/application.rb.
10
+
11
+ config.cache_classes = true
12
+
13
+ # Do not eager load code on boot. This avoids loading your whole application
14
+ # just for the purpose of running a single test. If you are using a tool that
15
+ # preloads Rails for running tests, you may have to set it to true.
16
+ config.eager_load = false
17
+
18
+ # Configure public file server for tests with Cache-Control for performance.
19
+ config.public_file_server.enabled = true
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
22
+ }
23
+
24
+ # Show full error reports and disable caching.
25
+ config.consider_all_requests_local = true
26
+ config.action_controller.perform_caching = false
27
+ config.cache_store = :null_store
28
+
29
+ # Raise exceptions instead of rendering exception templates.
30
+ config.action_dispatch.show_exceptions = false
31
+
32
+ # Disable request forgery protection in test environment.
33
+ config.action_controller.allow_forgery_protection = false
34
+
35
+ config.action_mailer.perform_caching = false
36
+
37
+ # Tell Action Mailer not to deliver emails to the real world.
38
+ # The :test delivery method accumulates sent emails in the
39
+ # ActionMailer::Base.deliveries array.
40
+ config.action_mailer.delivery_method = :test
41
+
42
+ # Print deprecation notices to the stderr.
43
+ config.active_support.deprecation = :stderr
44
+
45
+ # Raise exceptions for disallowed deprecations.
46
+ config.active_support.disallowed_deprecation = :raise
47
+
48
+ # Tell Active Support which deprecation messages to disallow.
49
+ config.active_support.disallowed_deprecation_warnings = []
50
+
51
+ # Raises error for missing translations.
52
+ # config.i18n.raise_on_missing_translations = true
53
+
54
+ # Annotate rendered view with file names.
55
+ # config.action_view.annotate_rendered_view_with_filenames = true
56
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
7
+ # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
8
+ Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
@@ -0,0 +1,28 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+
19
+ # If you are using UJS then enable automatic nonce generation
20
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
+
22
+ # Set the nonce only to specific directives
23
+ # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
24
+
25
+ # Report CSP violations to a specified URI
26
+ # For further information see the following documentation:
27
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
28
+ # Rails.application.config.content_security_policy_report_only = true
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,6 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [
5
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6
+ ]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,67 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 6.1 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Support for inversing belongs_to -> has_many Active Record associations.
10
+ # Rails.application.config.active_record.has_many_inversing = true
11
+
12
+ # Track Active Storage variants in the database.
13
+ # Rails.application.config.active_storage.track_variants = true
14
+
15
+ # Apply random variation to the delay when retrying failed jobs.
16
+ # Rails.application.config.active_job.retry_jitter = 0.15
17
+
18
+ # Stop executing `after_enqueue`/`after_perform` callbacks if
19
+ # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
20
+ # Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
21
+
22
+ # Specify cookies SameSite protection level: either :none, :lax, or :strict.
23
+ #
24
+ # This change is not backwards compatible with earlier Rails versions.
25
+ # It's best enabled when your entire app is migrated and stable on 6.1.
26
+ # Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
27
+
28
+ # Generate CSRF tokens that are encoded in URL-safe Base64.
29
+ #
30
+ # This change is not backwards compatible with earlier Rails versions.
31
+ # It's best enabled when your entire app is migrated and stable on 6.1.
32
+ # Rails.application.config.action_controller.urlsafe_csrf_tokens = true
33
+
34
+ # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
35
+ # UTC offset or a UTC time.
36
+ # ActiveSupport.utc_to_local_returns_utc_offset_times = true
37
+
38
+ # Change the default HTTP status code to `308` when redirecting non-GET/HEAD
39
+ # requests to HTTPS in `ActionDispatch::SSL` middleware.
40
+ # Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
41
+
42
+ # Use new connection handling API. For most applications this won't have any
43
+ # effect. For applications using multiple databases, this new API provides
44
+ # support for granular connection swapping.
45
+ # Rails.application.config.active_record.legacy_connection_handling = false
46
+
47
+ # Make `form_with` generate non-remote forms by default.
48
+ # Rails.application.config.action_view.form_with_generates_remote_forms = false
49
+
50
+ # Set the default queue name for the analysis job to the queue adapter default.
51
+ # Rails.application.config.active_storage.queues.analysis = nil
52
+
53
+ # Set the default queue name for the purge job to the queue adapter default.
54
+ # Rails.application.config.active_storage.queues.purge = nil
55
+
56
+ # Set the default queue name for the incineration job to the queue adapter default.
57
+ # Rails.application.config.action_mailbox.queues.incineration = nil
58
+
59
+ # Set the default queue name for the routing job to the queue adapter default.
60
+ # Rails.application.config.action_mailbox.queues.routing = nil
61
+
62
+ # Set the default queue name for the mail deliver job to the queue adapter default.
63
+ # Rails.application.config.action_mailer.deliver_later_queue_name = nil
64
+
65
+ # Generate a `Link` header that gives a hint to modern browsers about
66
+ # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
67
+ # Rails.application.config.action_view.preload_links_header = true
@@ -0,0 +1,11 @@
1
+ # Define an application-wide HTTP permissions policy. For further
2
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
+ #
4
+ # Rails.application.config.permissions_policy do |f|
5
+ # f.camera :none
6
+ # f.gyroscope :none
7
+ # f.microphone :none
8
+ # f.usb :none
9
+ # f.fullscreen :self
10
+ # f.payment :self, "https://secure.example.com"
11
+ # end
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
@@ -0,0 +1 @@
1
+ ../../shared/config/routes.rb
@@ -0,0 +1,6 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
6
+ Rails.application.load_server
@@ -0,0 +1 @@
1
+ ../shared/db/
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/browser_tab_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/development_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/email_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/iframe_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/overriding.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/session_steps.feature
@@ -0,0 +1,12 @@
1
+ Then /^I set the custom field error class to "([^"]+)"$/ do |error_class|
2
+ Spreewald.field_error_class = error_class
3
+ end
4
+
5
+ Then /^I set the custom error message xpath to "(.+)"$/ do |error_message_xpath|
6
+ Spreewald.error_message_xpath_selector = error_message_xpath
7
+ end
8
+
9
+ After('@field_errors') do
10
+ Spreewald.field_error_class = nil
11
+ Spreewald.error_message_xpath_selector = nil
12
+ end
@@ -0,0 +1 @@
1
+ ../../../shared/features/shared/step_definitions/overriding_steps.rb
@@ -0,0 +1 @@
1
+ ../../../shared/features/shared/step_definitions/test_steps.rb
@@ -0,0 +1,66 @@
1
+ # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
+ # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
+ # files.
6
+
7
+ ENV["RAILS_ENV"] ||= "test"
8
+
9
+ require 'cucumber/rails'
10
+ require 'rspec/expectations'
11
+
12
+ # load Spreewald steps
13
+ require 'spreewald/all_steps'
14
+
15
+ # Capybara defaults to CSS3 selectors rather than XPath.
16
+ # If you'd prefer to use XPath, just uncomment this line and adjust any
17
+ # selectors in your step definitions to use the XPath syntax.
18
+ # Capybara.default_selector = :xpath
19
+
20
+ # By default, any exception happening in your Rails application will bubble up
21
+ # to Cucumber so that your scenario will fail. This is a different from how
22
+ # your application behaves in the production environment, where an error page will
23
+ # be rendered instead.
24
+ #
25
+ # Sometimes we want to override this default behaviour and allow Rails to rescue
26
+ # exceptions and display an error page (just like when the app is running in production).
27
+ # Typical scenarios where you want to do this is when you test your error pages.
28
+ # There are two ways to allow Rails to rescue exceptions:
29
+ #
30
+ # 1) Tag your scenario (or feature) with @allow-rescue
31
+ #
32
+ # 2) Set the value below to true. Beware that doing this globally is not
33
+ # recommended as it will mask a lot of errors for you!
34
+ #
35
+ ActionController::Base.allow_rescue = false
36
+
37
+ # Remove/comment out the lines below if your app doesn't have a database.
38
+ # For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
39
+ begin
40
+ DatabaseCleaner.strategy = :transaction
41
+ rescue NameError
42
+ raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
43
+ end
44
+
45
+ # You may also want to configure DatabaseCleaner to use different strategies for certain features and scenarios.
46
+ # See the DatabaseCleaner documentation for details. Example:
47
+ #
48
+ # Before('@no-txn,@selenium,@culerity,@celerity,@javascript') do
49
+ # # { :except => [:widgets] } may not do what you expect here
50
+ # # as Cucumber::Rails::Database.javascript_strategy overrides
51
+ # # this setting.
52
+ # DatabaseCleaner.strategy = :truncation
53
+ # end
54
+ #
55
+ # Before('~@no-txn', '~@selenium', '~@culerity', '~@celerity', '~@javascript') do
56
+ # DatabaseCleaner.strategy = :transaction
57
+ # end
58
+ #
59
+
60
+ # Possible values are :truncation and :transaction
61
+ # The :transaction strategy is faster, but might give you threading problems.
62
+ # See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature
63
+ Cucumber::Rails::Database.javascript_strategy = :truncation
64
+
65
+ Capybara.default_max_wait_time = 5
66
+ Capybara.server = :webrick
@@ -0,0 +1 @@
1
+ ../../../shared/features/support/paths.rb
@@ -0,0 +1 @@
1
+ ../../../shared/features/support/selectors.rb
@@ -0,0 +1 @@
1
+ ../../../shared/features/support/selenium.rb
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/table_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/time_steps.feature
@@ -0,0 +1 @@
1
+ ../../shared/features/shared/web_steps.feature
File without changes
@@ -0,0 +1,76 @@
1
+ # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
+ # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
+ # files.
6
+
7
+
8
+ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
9
+
10
+ vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
11
+ $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
12
+
13
+ begin
14
+ require 'cucumber/rake/task'
15
+
16
+ namespace :cucumber do
17
+ Cucumber::Rake::Task.new({ok: 'test:prepare'}, 'Run features that should pass') do |t|
18
+ t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
19
+ t.fork = true # You may get faster startup if you set this to false
20
+ t.profile = 'default'
21
+ end
22
+
23
+ Cucumber::Rake::Task.new({wip: 'test:prepare'}, 'Run features that are being worked on') do |t|
24
+ t.binary = vendored_cucumber_bin
25
+ t.fork = true # You may get faster startup if you set this to false
26
+ t.profile = 'wip'
27
+ end
28
+
29
+ Cucumber::Rake::Task.new({rerun: 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
30
+ t.binary = vendored_cucumber_bin
31
+ t.fork = true # You may get faster startup if you set this to false
32
+ t.profile = 'rerun'
33
+ end
34
+
35
+ desc 'Run all features'
36
+ task all: [:ok, :wip]
37
+
38
+ task :statsetup do
39
+ require 'rails/code_statistics'
40
+ ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
41
+ ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
42
+ end
43
+
44
+ task :annotations_setup do
45
+ Rails.application.configure do
46
+ if config.respond_to?(:annotations)
47
+ config.annotations.directories << 'features'
48
+ config.annotations.register_extensions('feature') { |tag| /#\s*(#{tag}):?\s*(.*)$/ }
49
+ end
50
+ end
51
+ end
52
+ end
53
+ desc 'Alias for cucumber:ok'
54
+ task cucumber: 'cucumber:ok'
55
+
56
+ task default: :cucumber
57
+
58
+ task features: :cucumber do
59
+ STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
60
+ end
61
+
62
+ # In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
63
+ task 'test:prepare' do
64
+ end
65
+
66
+ task stats: 'cucumber:statsetup'
67
+
68
+ task notes: 'cucumber:annotations_setup'
69
+ rescue LoadError
70
+ desc 'cucumber rake task not available (cucumber not installed)'
71
+ task :cucumber do
72
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
73
+ end
74
+ end
75
+
76
+ end
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ .rails-default-error-page {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ .rails-default-error-page div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ .rails-default-error-page div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ .rails-default-error-page h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ .rails-default-error-page div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body class="rails-default-error-page">
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>