qa_server 0.1.99 → 1.0.0

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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/indexing_bug.md +11 -0
  3. data/.github/ISSUE_TEMPLATE/new_dataset_request.md +22 -0
  4. data/.gitignore +2 -0
  5. data/.rubocop.yml +18 -0
  6. data/.rubocop_fixme.yml +10 -0
  7. data/CHANGELOG.md +12 -0
  8. data/Gemfile +1 -0
  9. data/Gemfile.lock +21 -15
  10. data/README.md +4 -0
  11. data/Rakefile +2 -1
  12. data/app/assets/stylesheets/qa_server/_home-page.scss +2 -2
  13. data/app/assets/stylesheets/qa_server/_styles.scss +4 -0
  14. data/app/controllers/qa_server/authority_list_controller.rb +3 -3
  15. data/app/controllers/qa_server/authority_validation_controller.rb +11 -12
  16. data/app/controllers/qa_server/check_status_controller.rb +6 -6
  17. data/app/controllers/qa_server/homepage_controller.rb +2 -2
  18. data/app/controllers/qa_server/monitor_status_controller.rb +32 -48
  19. data/app/controllers/qa_server/usage_controller.rb +2 -2
  20. data/app/loggers/qa_server/scenario_logger.rb +38 -42
  21. data/app/models/qa_server/authority_scenario.rb +1 -1
  22. data/app/models/qa_server/authority_status.rb +1 -0
  23. data/app/models/qa_server/authority_status_failure.rb +1 -0
  24. data/app/models/qa_server/scenario_run_history.rb +189 -0
  25. data/app/models/qa_server/scenario_run_registry.rb +34 -0
  26. data/app/models/qa_server/scenario_run_summary.rb +44 -0
  27. data/app/models/qa_server/scenarios.rb +15 -17
  28. data/app/models/qa_server/search_scenario.rb +4 -4
  29. data/app/models/qa_server/term_scenario.rb +2 -1
  30. data/app/presenters/qa_server/authority_list_presenter.rb +7 -6
  31. data/app/presenters/qa_server/check_status_presenter.rb +26 -16
  32. data/app/presenters/qa_server/monitor_status_presenter.rb +94 -38
  33. data/app/services/qa_server/authority_lister_service.rb +9 -9
  34. data/app/services/qa_server/authority_loader_service.rb +16 -15
  35. data/app/services/qa_server/authority_validator_service.rb +13 -13
  36. data/app/services/qa_server/database_migrator.rb +1 -0
  37. data/app/services/qa_server/scenarios_loader_service.rb +29 -27
  38. data/app/validators/qa_server/scenario_validator.rb +25 -35
  39. data/app/validators/qa_server/search_scenario_validator.rb +25 -18
  40. data/app/validators/qa_server/term_scenario_validator.rb +2 -1
  41. data/app/views/qa_server/check_status/index.html.erb +1 -1
  42. data/app/views/qa_server/homepage/index.html.erb +3 -3
  43. data/app/views/qa_server/monitor_status/index.html.erb +15 -10
  44. data/app/views/qa_server/usage/index.html.erb +4 -4
  45. data/app/views/shared/_footer.html.erb +1 -1
  46. data/config/routes.rb +1 -0
  47. data/lib/generators/qa_server/assets_generator.rb +1 -0
  48. data/lib/generators/qa_server/config_generator.rb +6 -0
  49. data/lib/generators/qa_server/install_generator.rb +1 -0
  50. data/lib/generators/qa_server/models_generator.rb +1 -0
  51. data/lib/generators/qa_server/templates/config/initializers/qa_server.rb +4 -0
  52. data/lib/generators/qa_server/templates/config/locales/qa_server.en.yml +1 -1
  53. data/lib/generators/qa_server/templates/db/migrate/20180807045549_create_scenario_run_registry.rb.erb +7 -0
  54. data/lib/generators/qa_server/templates/db/migrate/20180807045552_create_scenario_run_history.rb.erb +16 -0
  55. data/lib/generators/qa_server/templates/db/migrate/20180807045554_drop_unused_tables.rb.erb +6 -0
  56. data/lib/generators/qa_server/templates/db/migrate/20180809045552_add_indices_to_scenario_run_history.rb.erb +8 -0
  57. data/lib/qa_server/configuration.rb +6 -0
  58. data/lib/qa_server/engine.rb +10 -1
  59. data/lib/qa_server/version.rb +2 -1
  60. data/lib/qa_server.rb +19 -1
  61. data/lib/tasks/install.rake +1 -0
  62. data/lib/tasks/qa_server_tasks.rake +1 -0
  63. data/qa_server.gemspec +8 -5
  64. data/spec/rails_helper.rb +1 -0
  65. data/spec/spec_helper.rb +98 -98
  66. data/spec/test_app_templates/Gemfile.extra +2 -1
  67. data/tasks/qa_server_dev.rake +1 -0
  68. metadata +49 -7
@@ -1,3 +1,5 @@
1
+ <%= javascript_include_tag "https://www.gstatic.com/charts/loader.js" %>
2
+
1
3
  <div class="page-description">
2
4
  <h2><%= t('qa_server.monitor_status.summary.title') %></h2>
3
5
 
@@ -36,7 +38,7 @@
36
38
  </tr>
37
39
  <% @status_data.each do |status| %>
38
40
  <tr>
39
- <td class="<%= "status-#{status[:status].to_s}" %>"><%= status[:status_label] %></td>
41
+ <td class="<%= @presenter.status_style_class(status) %>"><%= @presenter.status_label(status) %></td>
40
42
  <td><%= status[:authority_name] %></td>
41
43
  <td><%= status[:subauthority_name] %></td>
42
44
  <td><%= status[:service] %></td>
@@ -52,9 +54,11 @@
52
54
  <% if @presenter.history? %>
53
55
  <div id="status-section" class="status-section">
54
56
  <h2><%= t('qa_server.monitor_status.history.title') %></h2>
57
+ <p class="status-update-dtstamp"><%= t('qa_server.monitor_status.history.since', date: @presenter.first_updated) %></p>
58
+ <%#= column_chart @presenter.historical_summary, stacked: true, colors: ["green", "red"], xtitle: 'Authority', ytitle: 'Pass-Fail', legend: 'bottom' %>
59
+ <%= image_tag(@presenter.historical_graph, alt: 'History Graph Unavailable') %>
55
60
 
56
- <h3><%= t('qa_server.monitor_status.history.since', date: @presenter.first_updated) %></h3>
57
-
61
+ <!--
58
62
  <table class="status">
59
63
  <tr>
60
64
  <th><%= t('qa_server.monitor_status.history.days_failing') %></th>
@@ -63,16 +67,17 @@
63
67
  <th><%= t('qa_server.monitor_status.history.service') %></th>
64
68
  <th><%= t('qa_server.monitor_status.history.action') %></th>
65
69
  </tr>
66
- <% @presenter.history.each do |entry| %>
70
+ <%# @presenter.history.each do |entry| %>
67
71
  <tr>
68
- <td><%= entry[:days_failing] %></td>
69
- <td><%= entry[:authority_name] %></td>
70
- <td><%= entry[:subauthority_name] %></td>
71
- <td><%= entry[:service] %></td>
72
- <td><%= entry[:action] %></td>
72
+ <td><%#= entry[:days_failing] %></td>
73
+ <td><%#= entry[:authority_name] %></td>
74
+ <td><%#= entry[:subauthority_name] %></td>
75
+ <td><%#= entry[:service] %></td>
76
+ <td><%#= entry[:action] %></td>
73
77
  </tr>
74
- <% end %>
78
+ <%# end %>
75
79
  </table>
80
+ -->
76
81
  </div>
77
82
  <% end %>
78
83
  </div>
@@ -7,7 +7,7 @@
7
7
  optional parameters, but attempts were made to keep optional parameter names consistent between authorities.</p>
8
8
 
9
9
  <h4>Without subauthority:</h4>
10
- <pre>/<%= QaServer::QA_ENGINE_MOUNT %>/search/linked_data/locnames_ld4l_cache?q=mark%20twain&maxRecords=4&lang=en</pre>
10
+ <pre><%= QaServer::Engine.qa_engine_mount %>/search/linked_data/locnames_ld4l_cache?q=mark%20twain&maxRecords=4&lang=en</pre>
11
11
 
12
12
  where,
13
13
  <ul>
@@ -19,7 +19,7 @@
19
19
  </ul>
20
20
 
21
21
  <h4>With subauthority</h4>
22
- <pre>/<%= QaServer::QA_ENGINE_MOUNT %>/search/linked_data/locnames_ld4l_cache/person?q=mark%20twain&maxRecords=4&lang=en</pre>
22
+ <pre><%= QaServer::Engine.qa_engine_mount %>/search/linked_data/locnames_ld4l_cache/person?q=mark%20twain&maxRecords=4&lang=en</pre>
23
23
 
24
24
  where,
25
25
  <ul>
@@ -59,7 +59,7 @@
59
59
  consistent between authorities.</p>
60
60
 
61
61
  <h4>Fetch by URI</h4>
62
- <pre>/<%= QaServer::QA_ENGINE_MOUNT %>/show/linked_data/locnames_ld4l_cache/http%3A%2F%2Fid%2Eloc%2Egov%2Fauthorities%2Fnames%2Fn92016188</pre>
62
+ <pre><%= QaServer::Engine.qa_engine_mount %>/show/linked_data/locnames_ld4l_cache/http%3A%2F%2Fid%2Eloc%2Egov%2Fauthorities%2Fnames%2Fn92016188</pre>
63
63
  <p><b><%= t('qa_server.warning.chrome_unencoding_msg') %></b></p>
64
64
 
65
65
  where,
@@ -71,7 +71,7 @@
71
71
  </ul>
72
72
 
73
73
  <h4>Fetch by ID</h4>
74
- <pre>/<%= QaServer::QA_ENGINE_MOUNT %>/show/linked_data/oclcfast_ld4l_cache/1914919?lang=en</pre>
74
+ <pre><%= QaServer::Engine.qa_engine_mount %>/show/linked_data/oclcfast_ld4l_cache/1914919?lang=en</pre>
75
75
 
76
76
  where,
77
77
  <ul>
@@ -8,7 +8,7 @@
8
8
  <div class="navbar-right">
9
9
  <div class="navbar-text text-right">
10
10
  <p><%= t('qa_server.footer.copyright_html') %></p>
11
- <p><%= t('qa_server.footer.disclaimer_html') %></p>
11
+ <p><%= t('qa_server.footer.attribution_html') %></p>
12
12
  </div>
13
13
  </div>
14
14
  </div>
data/config/routes.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  QaServer::Engine.routes.draw do
2
3
  # Downloads controller route
3
4
  resources :homepage, only: 'index'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails/generators'
2
3
 
3
4
  class QaServer::AssetsGenerator < Rails::Generators::Base
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails/generators'
2
3
 
3
4
  class QaServer::ConfigGenerator < Rails::Generators::Base
@@ -8,6 +9,7 @@ class QaServer::ConfigGenerator < Rails::Generators::Base
8
9
  * authority configs
9
10
  * authority scenarios
10
11
  * i18n
12
+ * add default configuration initializer
11
13
  """
12
14
 
13
15
  def banner
@@ -28,4 +30,8 @@ class QaServer::ConfigGenerator < Rails::Generators::Base
28
30
  say_status('info', ' -- adding i18n translations', :blue)
29
31
  copy_file 'config/locales/qa_server.en.yml'
30
32
  end
33
+
34
+ def create_initializer_config_file
35
+ copy_file 'config/initializers/qa_server.rb'
36
+ end
31
37
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module QaServer
2
3
  class Install < Rails::Generators::Base
3
4
  source_root File.expand_path('../templates', __FILE__)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class QaServer::ModelsGenerator < Rails::Generators::Base
2
3
  source_root File.expand_path('../templates', __FILE__)
3
4
 
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+ QaServer.config do |config|
3
+ # no configurations at this time
4
+ end
@@ -6,4 +6,4 @@ en:
6
6
  footer:
7
7
  copyright_html: "<strong>Copyright &copy; 2018 Cornell</strong> Licensed under the Apache License, Version 2.0"
8
8
  service_html: A service of <a href="http://www.library.cornell.edu/" class="navbar-link" target="_blank">Cornell University Library</a> and <br /><a href="https://www.slis.uiowa.edu/" class="navbar-link" target="_blank">School of Library and Information Science, University of Iowa</a>.
9
- disclaimer_html: This service is supported by work on <a href="http://ld4l.org" class="navbar-link" target="_blank">Linked Data for Libraries - Labs</a> funded by <br><a href="https://mellon.org/" class="navbar-link" target="_blank">Andrew W. Mellon Foundation</a>, and <a href="http://samvera.org" class="navbar-link" target="_blank">Samvera</a>, an open source community.
9
+ attribution_html: This service is supported by work on <a href="http://ld4l.org" class="navbar-link" target="_blank">Linked Data for Libraries - Labs</a> and <br> <a href="https://wiki.duraspace.org/x/9xgRBg" class="navbar-link" target="_blank">Linked Data for Production</a> funded by <a href="https://mellon.org/" class="navbar-link" target="_blank">Andrew W. Mellon Foundation</a>, <br>and by work on Questioning Authority in <a href="http://samvera.org" class="navbar-link" target="_blank">Samvera</a>, an open source community.
@@ -0,0 +1,7 @@
1
+ class CreateScenarioRunRegistry < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ create_table :scenario_run_registry do |t|
4
+ t.datetime :dt_stamp
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,16 @@
1
+ class CreateScenarioRunHistory < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ create_table :scenario_run_history do |t|
4
+ t.belongs_to :scenario_run_registry
5
+ t.integer :status, default: 2 # :good, :bad, :unknown
6
+ t.string :authority_name
7
+ t.string :subauthority_name
8
+ t.string :service
9
+ t.string :action
10
+ t.string :url
11
+ t.string :err_message
12
+ t.integer :scenario_type, default: 0 # :connection, :accuracy, :performance
13
+ t.decimal :run_time, precision: 10, scale: 4
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,6 @@
1
+ class DropUnusedTables < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ drop_table :authority_status_failure
4
+ drop_table :authority_status
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ class AddIndicesToScenarioRunHistory < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ add_index :scenario_run_history, :url
4
+ add_index :scenario_run_history, :status
5
+ add_index :scenario_run_history, :authority_name
6
+ add_index :scenario_run_history, :scenario_type
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+ module QaServer
3
+ class Configuration
4
+ # no configurations at this time
5
+ end
6
+ end
@@ -1,12 +1,21 @@
1
+ # frozen_string_literal: true
1
2
  module QaServer
2
3
  class Engine < ::Rails::Engine
3
4
  isolate_namespace QaServer
4
5
 
5
6
  require 'qa'
6
7
 
8
+ def self.engine_mount
9
+ QaServer::Engine.routes.find_script_name({})
10
+ end
11
+
12
+ def self.qa_engine_mount
13
+ Qa::Engine.routes.find_script_name({})
14
+ end
15
+
7
16
  # Force these models to be added to Legato's registry in development mode
8
17
  config.eager_load_paths += %W[
9
- #{config.root}/app/models/qa_server/download.rb
18
+ #{config.root}/app/models/qa_server/download.rb
10
19
  #{config.root}/app/models/qa_server/pageview.rb
11
20
  ]
12
21
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module QaServer
2
- VERSION = '0.1.99'
3
+ VERSION = '1.0.0'
3
4
  end
data/lib/qa_server.rb CHANGED
@@ -1,6 +1,24 @@
1
+ # frozen_string_literal: true
1
2
  require 'qa_server/engine'
2
3
  require 'qa_server/version'
3
4
 
4
5
  module QaServer
5
- QA_ENGINE_MOUNT = 'authorities'
6
+ extend ActiveSupport::Autoload
7
+
8
+ autoload :Configuration
9
+
10
+ # @api public
11
+ #
12
+ # Exposes the Questioning Authority configuration
13
+ #
14
+ # @yield [Qa::Configuration] if a block is passed
15
+ # @return [Qa::Configuration]
16
+ # @see Qa::Configuration for configuration options
17
+ def self.config(&block)
18
+ @config ||= QaServer::Configuration.new
19
+
20
+ yield @config if block
21
+
22
+ @config
23
+ end
6
24
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  namespace :qa_server do
2
3
  namespace :install do
3
4
  desc 'Copy migrations from QaServer to application'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # desc "Explaining what the task does"
2
3
  # task :qa_server do
3
4
  # # Task goes here
data/qa_server.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'qa_server/version'
@@ -18,17 +19,19 @@ Gem::Specification.new do |spec|
18
19
  spec.version = QaServer::VERSION
19
20
  spec.license = 'Apache-2.0'
20
21
 
21
- # spec.required_ruby_version = '>= 2.3'
22
-
23
22
  # Note: rails does not follow sem-ver conventions, it's
24
23
  # minor version releases can include breaking changes; see
25
24
  # http://guides.rubyonrails.org/maintenance_policy.html
26
- spec.add_dependency 'rails', '5.1.6'
25
+ spec.add_dependency 'rails', '~> 5.0' # Keep in sync with version supported by Hyrax
27
26
 
28
27
  # Required gems for QA and linked data access
29
- spec.add_dependency 'qa' # loaded specific branch in Gemfile
30
- spec.add_dependency 'linkeddata'
28
+ spec.add_development_dependency 'qa' # loaded specific branch in Gemfile
29
+ spec.add_development_dependency 'linkeddata'
30
+
31
+ # Produces dashboard charts on monitor status page
32
+ spec.add_dependency 'gruff'
31
33
 
34
+ spec.add_development_dependency 'binding_of_caller', '~> 1.0.0' # rubocop styleguide
32
35
  spec.add_development_dependency 'bixby', '~> 1.0.0' # rubocop styleguide
33
36
  # spec.add_development_dependency 'capybara', '~> 2.13'
34
37
  spec.add_development_dependency 'engine_cart', '~> 2.0'
data/spec/rails_helper.rb CHANGED
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  # This file is normaly copied to spec/ when you run 'rails generate rspec:install'
2
3
  # but this is a dummy file to allow qa_server specs to run.
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  ENV["RAILS_ENV"] ||= 'test'
2
3
  require "bundler/setup"
3
4
 
@@ -183,101 +184,100 @@ end
183
184
  # end
184
185
  # end
185
186
 
186
- # config.include(ControllerLevelHelpers, type: :view)
187
- # config.before(:each, type: :view) { initialize_controller_helpers(view) }
188
- #
189
- # config.before(:all, type: :feature) do
190
- # # Assets take a long time to compile. This causes two problems:
191
- # # 1) the profile will show the first feature test taking much longer than it
192
- # # normally would.
193
- # # 2) The first feature test will trigger rack-timeout
194
- # #
195
- # # Precompile the assets to prevent these issues.
196
- # visit "/assets/application.css"
197
- # visit "/assets/application.js"
198
- # end
199
- #
200
- # config.after do
201
- # DatabaseCleaner.clean
202
- # end
203
- #
204
- # # If true, the base class of anonymous controllers will be inferred
205
- # # automatically. This will be the default behavior in future versions of
206
- # # rspec-rails.
207
- # config.infer_base_class_for_anonymous_controllers = false
208
- #
209
- # config.include Shoulda::Matchers::Independent
210
- #
211
- # if Devise::VERSION >= '4.2'
212
- # config.include Devise::Test::ControllerHelpers, type: :controller
213
- # else
214
- # config.include Devise::TestHelpers, type: :controller
215
- # end
216
- #
217
- # config.include EngineRoutes, type: :controller
218
- # config.include Warden::Test::Helpers, type: :request
219
- # config.include Warden::Test::Helpers, type: :feature
220
- # config.after(:each, type: :feature) do
221
- # Warden.test_reset!
222
- # Capybara.reset_sessions!
223
- # page.driver.reset!
224
- # end
225
- #
226
- # config.include Capybara::RSpecMatchers, type: :input
227
- # config.include InputSupport, type: :input
228
- # config.include FactoryBot::Syntax::Methods
229
- # config.include OptionalExample
230
- #
231
- # config.infer_spec_type_from_file_location!
232
- #
233
- # config.expect_with :rspec do |expectations|
234
- # expectations.include_chain_clauses_in_custom_matcher_descriptions = true
235
- # end
236
- #
237
- # config.formatter = 'LoggingFormatter'
238
- # config.default_formatter = 'doc' if config.files_to_run.one?
239
- #
240
- # config.order = :random
241
- # Kernel.srand config.seed
242
- #
243
- # config.shared_context_metadata_behavior = :apply_to_host_groups
244
- #
245
- # config.filter_run_when_matching :focus
246
- #
247
- # config.example_status_persistence_file_path = 'spec/examples.txt'
248
- #
249
- # config.profile_examples = 10
250
- #
251
- # # Use this example metadata when you want to perform jobs inline during testing.
252
- # #
253
- # # describe '#my_method`, :perform_enqueued do
254
- # # ...
255
- # # end
256
- # #
257
- # # If you pass an `Array` of job classes, they will be treated as the filter list.
258
- # #
259
- # # describe '#my_method`, perform_enqueued: [MyJobClass] do
260
- # # ...
261
- # # end
262
- # #
263
- # # Limit to specific job classes with:
264
- # #
265
- # # ActiveJob::Base.queue_adapter.filter = [JobClass]
266
- # #
267
- # config.before(:example, :perform_enqueued) do |example|
268
- # ActiveJob::Base.queue_adapter.filter =
269
- # example.metadata[:perform_enqueued].try(:to_a)
270
- #
271
- # ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
272
- # ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
273
- # end
274
- #
275
- # config.after(:example, :perform_enqueued) do
276
- # ActiveJob::Base.queue_adapter.filter = nil
277
- # ActiveJob::Base.queue_adapter.enqueued_jobs = []
278
- # ActiveJob::Base.queue_adapter.performed_jobs = []
279
- #
280
- # ActiveJob::Base.queue_adapter.perform_enqueued_jobs = false
281
- # ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = false
282
- # end
283
- end
187
+ # config.include(ControllerLevelHelpers, type: :view)
188
+ # config.before(:each, type: :view) { initialize_controller_helpers(view) }
189
+ #
190
+ # config.before(:all, type: :feature) do
191
+ # # Assets take a long time to compile. This causes two problems:
192
+ # # 1) the profile will show the first feature test taking much longer than it
193
+ # # normally would.
194
+ # # 2) The first feature test will trigger rack-timeout
195
+ # #
196
+ # # Precompile the assets to prevent these issues.
197
+ # visit "/assets/application.css"
198
+ # visit "/assets/application.js"
199
+ # end
200
+ #
201
+ # config.after do
202
+ # DatabaseCleaner.clean
203
+ # end
204
+ #
205
+ # # If true, the base class of anonymous controllers will be inferred
206
+ # # automatically. This will be the default behavior in future versions of
207
+ # # rspec-rails.
208
+ # config.infer_base_class_for_anonymous_controllers = false
209
+ #
210
+ # config.include Shoulda::Matchers::Independent
211
+ #
212
+ # if Devise::VERSION >= '4.2'
213
+ # config.include Devise::Test::ControllerHelpers, type: :controller
214
+ # else
215
+ # config.include Devise::TestHelpers, type: :controller
216
+ # end
217
+ #
218
+ # config.include EngineRoutes, type: :controller
219
+ # config.include Warden::Test::Helpers, type: :request
220
+ # config.include Warden::Test::Helpers, type: :feature
221
+ # config.after(:each, type: :feature) do
222
+ # Warden.test_reset!
223
+ # Capybara.reset_sessions!
224
+ # page.driver.reset!
225
+ # end
226
+ #
227
+ # config.include Capybara::RSpecMatchers, type: :input
228
+ # config.include InputSupport, type: :input
229
+ # config.include FactoryBot::Syntax::Methods
230
+ # config.include OptionalExample
231
+ #
232
+ # config.infer_spec_type_from_file_location!
233
+ #
234
+ # config.expect_with :rspec do |expectations|
235
+ # expectations.include_chain_clauses_in_custom_matcher_descriptions = true
236
+ # end
237
+ #
238
+ # config.formatter = 'LoggingFormatter'
239
+ # config.default_formatter = 'doc' if config.files_to_run.one?
240
+ #
241
+ # config.order = :random
242
+ # Kernel.srand config.seed
243
+ #
244
+ # config.shared_context_metadata_behavior = :apply_to_host_groups
245
+ #
246
+ # config.filter_run_when_matching :focus
247
+ #
248
+ # config.example_status_persistence_file_path = 'spec/examples.txt'
249
+ #
250
+ # config.profile_examples = 10
251
+ #
252
+ # # Use this example metadata when you want to perform jobs inline during testing.
253
+ # #
254
+ # # describe '#my_method`, :perform_enqueued do
255
+ # # ...
256
+ # # end
257
+ # #
258
+ # # If you pass an `Array` of job classes, they will be treated as the filter list.
259
+ # #
260
+ # # describe '#my_method`, perform_enqueued: [MyJobClass] do
261
+ # # ...
262
+ # # end
263
+ # #
264
+ # # Limit to specific job classes with:
265
+ # #
266
+ # # ActiveJob::Base.queue_adapter.filter = [JobClass]
267
+ # #
268
+ # config.before(:example, :perform_enqueued) do |example|
269
+ # ActiveJob::Base.queue_adapter.filter =
270
+ # example.metadata[:perform_enqueued].try(:to_a)
271
+ #
272
+ # ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
273
+ # ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
274
+ # end
275
+ #
276
+ # config.after(:example, :perform_enqueued) do
277
+ # ActiveJob::Base.queue_adapter.filter = nil
278
+ # ActiveJob::Base.queue_adapter.enqueued_jobs = []
279
+ # ActiveJob::Base.queue_adapter.performed_jobs = []
280
+ #
281
+ # ActiveJob::Base.queue_adapter.perform_enqueued_jobs = false
282
+ # ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = false
283
+ # end
@@ -2,4 +2,5 @@
2
2
 
3
3
  group :development do
4
4
  gem 'better_errors'
5
- end
5
+ gem 'binding_of_caller'
6
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/core/rake_task'
2
3
  require 'engine_cart/rake_task'
3
4
  require 'rubocop/rake_task'