cookpad-performance 0.3.2 → 0.3.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a404a545801a9cd8708cf2e6cea28697d886b4102fa99fbd59d6a3e0f3f0498
|
4
|
+
data.tar.gz: 5b67a526c158ec16eace9a14f646e78bc0155d6a016b7d86f7f0dce5f9b11f83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e638ac0ed6546d07b77c7655a6ce81756597cef53e93766f217893b847c918e8605b883cbb96b7bc24bf180584d058273ea5f1a57a59911fde6749f9e53e1dd
|
7
|
+
data.tar.gz: baef32dafa0628231d0842f6f8173db4b9808d16e5d6cc585efff3fc914f8335c5f76ef6f4b1f09e05a95fc647ac4829cab4e056b0e6dfcc4a329ea372ba8c90
|
@@ -1,5 +1,5 @@
|
|
1
1
|
if (ENV["LOG_N_PLUS_ONE_QUERIES"] == "true" || ENV["RAISE_N_PLUS_ONE_QUERIES"] == "true") &&
|
2
|
-
|
2
|
+
(Rails.env.development? || Rails.env.test?)
|
3
3
|
require "prosopite"
|
4
4
|
Prosopite.rails_logger = ENV["LOG_N_PLUS_ONE_QUERIES"] == "true"
|
5
5
|
Prosopite.prosopite_logger = true
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Cookpad
|
2
|
+
module Performance
|
3
|
+
class Railtie < ::Rails::Railtie
|
4
|
+
DEFAULTS_IVAR_NAME = "@defaults".freeze
|
5
|
+
private_constant :DEFAULTS_IVAR_NAME
|
6
|
+
|
7
|
+
config.after_initialize do
|
8
|
+
if ENV["PROFILE"] && Rails.env.development? && defined?(Webpacker)
|
9
|
+
default_config = Webpacker.config.instance_variable_get(DEFAULTS_IVAR_NAME)
|
10
|
+
default_config["compile"] = false
|
11
|
+
Webpacker.config.instance_variable_set(DEFAULTS_IVAR_NAME, default_config)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/cookpad/performance.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookpad-performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cookpad Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prosopite
|
@@ -226,6 +226,7 @@ files:
|
|
226
226
|
- lib/cookpad/performance/disable_cached_query_logging.rb
|
227
227
|
- lib/cookpad/performance/engine.rb
|
228
228
|
- lib/cookpad/performance/n_plus_one_detection.rb
|
229
|
+
- lib/cookpad/performance/railtie.rb
|
229
230
|
- lib/cookpad/performance/version.rb
|
230
231
|
homepage: https://github.com/cookpad/cookpad-performance
|
231
232
|
licenses:
|
@@ -235,7 +236,7 @@ metadata:
|
|
235
236
|
source_code_uri: https://github.com/cookpad/cookpad-performance
|
236
237
|
changelog_uri: https://github.com/cookpad/cookpad-performance/blob/main/CHANGELOG
|
237
238
|
rubygems_mfa_required: 'true'
|
238
|
-
post_install_message:
|
239
|
+
post_install_message:
|
239
240
|
rdoc_options: []
|
240
241
|
require_paths:
|
241
242
|
- lib
|
@@ -250,8 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
251
|
- !ruby/object:Gem::Version
|
251
252
|
version: '0'
|
252
253
|
requirements: []
|
253
|
-
rubygems_version: 3.3.
|
254
|
-
signing_key:
|
254
|
+
rubygems_version: 3.3.7
|
255
|
+
signing_key:
|
255
256
|
specification_version: 4
|
256
257
|
summary: Rails app performance tools
|
257
258
|
test_files: []
|