File tree Expand file tree Collapse file tree 7 files changed +17
-33
lines changed
Expand file tree Collapse file tree 7 files changed +17
-33
lines changed Original file line number Diff line number Diff line change 1+ # This file contains paths to ignore for Prosopite N+1 query detection
2+ # Add spec file paths (one per line) that should be excluded from N+1 detection
3+ # Example: spec/system/some_feature
Original file line number Diff line number Diff line change 115115 bugsnag (6.28.0 )
116116 concurrent-ruby (~> 1.0 )
117117 builder (3.3.0 )
118- <<<<<<< HEAD
119- bullet (8.1.0 )
120- activesupport (>= 3.0.0 )
121- uniform_notifier (~> 1.11 )
122- =======
123- >>>>>>> c9fda4adf (WIP replace bullet with prosopite for finding performance issues like db n+1 queries)
124118 bundler-audit (0.9.2 )
125119 bundler (>= 1.2.0 , < 3 )
126120 thor (~> 1.0 )
666660 unicode-display_width (3.2.0 )
667661 unicode-emoji (~> 4.1 )
668662 unicode-emoji (4.1.0 )
669- <<<<<<< HEAD
670- uniform_notifier (1.18.0 )
671- =======
672- >>>>>>> c9fda4adf (WIP replace bullet with prosopite for finding performance issues like db n+1 queries)
673663 useragent (0.16.11 )
674664 view_component (3.22.0 )
675665 activesupport (>= 5.2.0 , < 8.1 )
Original file line number Diff line number Diff line change 6868 # Raises error for missing translations.
6969 # config.i18n.raise_on_missing_translations = true
7070
71- config . after_initialize do
72- Bullet . enable = true
73- Bullet . console = true
74- Bullet . rails_logger = true
75- Bullet . bullet_logger = true
76- end
71+ # Prosopite configuration for N+1 query detection
72+ config . x . prosopite_enabled = true
73+ config . x . prosopite_min_n_queries = 2
7774
7875 # Annotate rendered view with file names.
7976 config . action_view . annotate_rendered_view_with_filenames = true
Original file line number Diff line number Diff line change 6363 # Raises error for missing translations.
6464 config . i18n . raise_on_missing_translations = true
6565
66- config . after_initialize do
67- Bullet . enable = true
68- Bullet . console = true
69- Bullet . bullet_logger = true
70- Bullet . rails_logger = true
71- # Bullet.raise = true # TODO https://github.com/rubyforgood/casa/issues/2441
72- end
66+ # Prosopite configuration for N+1 query detection
67+ # Detailed configuration is in spec/support/prosopite.rb
68+ config . x . prosopite_enabled = false # Managed by spec/support/prosopite.rb
69+ config . x . prosopite_min_n_queries = 2
7370
7471 # Annotate rendered view with file names.
7572 # config.action_view.annotate_rendered_view_with_filenames = true
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- if Rails . configuration . application . prosopite_enabled
3+ if Rails . configuration . x . prosopite_enabled
44 require "prosopite/middleware/rack"
55 Rails . configuration . middleware . use ( Prosopite ::Middleware ::Rack )
66end
77
88Rails . application . config . after_initialize do
9- Prosopite . enabled = Rails . configuration . application . prosopite_enabled
10- Prosopite . min_n_queries = Rails . configuration . application . prosopite_min_n_queries
9+ Prosopite . enabled = Rails . configuration . x . prosopite_enabled
10+ Prosopite . min_n_queries = Rails . configuration . x . prosopite_min_n_queries
1111 Prosopite . rails_logger = true
1212end
Original file line number Diff line number Diff line change 386386 let ( :casa_case_with_contacts ) { volunteer . casa_cases . first }
387387 let ( :nonexistent_path ) { "app/documents/templates/nonexisitent_report_template.docx" }
388388
389- it "raises Zip::Error when generating report" do
389+ it "raises Zip::Error when generating report" , :disable_prosopite do
390390 args = {
391391 case_id : casa_case_with_contacts . id ,
392392 volunteer_id : volunteer . id ,
Original file line number Diff line number Diff line change 121121 raise StandardError . new "\" #{ example . full_description } \" in #{ example . location } timed out."
122122 end
123123
124- # NOTE: not applicable currently, left to show how to skip bullet errrors
125- # config.around :each, :disable_bullet do |example|
126- # Bullet.raise = false
127- # example.run
128- # Bullet.raise = true
129- # end
124+ # NOTE: not applicable currently, left to show how to skip prosopite errors
125+ # You can use the :disable_prosopite metadata tag on specific examples
126+ # See spec/support/prosopite.rb for configuration
130127
131128 config . around do |example |
132129 Capybara . server_port = 7654 + ENV [ "TEST_ENV_NUMBER" ] . to_i
You can’t perform that action at this time.
0 commit comments