n_plus_one_control 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: a9300b0272c34dffc01ce543fb7e57dbcb9687fd
4
- data.tar.gz: 02dc0a86bdbbcda81c6cceccbbfcc5e36630c87d
3
+ metadata.gz: 75040b2bd6491742878c63c77bc6110f4889f4da
4
+ data.tar.gz: 6e14e8c920c9504ad4c6b6049d9384301d3c4dbc
5
5
  SHA512:
6
- metadata.gz: 6222cc538fa26cd466757c8fd8bed63cf193311c67086eb546e04ec6c6f8d53bf4e84625ec1285cb065eb7a514e1e3a75e1acf512b2b413d86b5a8ed72bdb233
7
- data.tar.gz: 40d1854b93734dc5c141abc8e990476d5e5796888bbe957e974f3527772e754f581685f2b2eef5ec8865557e4a0b0366306bcf80214a0e0f58e84abc539ce5c5
6
+ metadata.gz: 16e0cb53d3662865067564af4b34eecc9e2a6e6581a89443f954348c4c583c3faf44db5b69c4ff4c27e193fab453109b36e0fe8fbc71d6f6e4e3bfbfd232f363
7
+ data.tar.gz: 19b9c5ea7db05dfd7ecd245c395af10a710e7134a2af7d7617ddb9373e6ec18fb078fc67f8718787fbc47b979c315b72c78765e65376479729a86395a9a81f15
data/README.md CHANGED
@@ -154,18 +154,19 @@ There are some global configuration parameters (and their corresponding defaults
154
154
  ```ruby
155
155
  # Default scale factors to use.
156
156
  # We use the smallest possible but representative scale factors by default.
157
- self.default_scale_factors = [2, 3]
157
+ NPlusOneControl.default_scale_factors = [2, 3]
158
158
 
159
159
  # Print performed queries if true in the case of failure
160
- self.verbose = false
160
+ # You can activate verbosity through env variable NPLUSONE_VERBOSE=1
161
+ NPlusOneControl.verbose = false
161
162
 
162
163
  # Ignore matching queries
163
- self.ignore = /^(BEGIN|COMMIT|SAVEPOINT|RELEASE)/
164
+ NPlusOneControl.ignore = /^(BEGIN|COMMIT|SAVEPOINT|RELEASE)/
164
165
 
165
166
  # ActiveSupport notifications event to track queries.
166
167
  # We track ActiveRecord event by default,
167
168
  # but can also track rom-rb events ('sql.rom') as well.
168
- self.event = 'sql.active_record'
169
+ NPlusOneControl.event = 'sql.active_record'
169
170
  ```
170
171
 
171
172
  ## How does it work?
@@ -23,7 +23,7 @@ module NPlusOneControl
23
23
  self.default_scale_factors = [2, 3]
24
24
 
25
25
  # Print performed queries if true
26
- self.verbose = false
26
+ self.verbose = ENV['NPLUSONE_VERBOSE'] == '1'
27
27
 
28
28
  # Ignore matching queries
29
29
  self.ignore = /^(BEGIN|COMMIT|SAVEPOINT|RELEASE)/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NPlusOneControl
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: n_plus_one_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-13 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler