testoscope 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddeb0613b42218cffb0e5912ccbaa30bd81a42e9
4
- data.tar.gz: 1f2696ee6700974f56f03f94483b90502425a7bf
3
+ metadata.gz: 16a7a54e9143fbae24da24f0f4bf4b3d07715c3e
4
+ data.tar.gz: 50c375d26c876e98361de309760ccda54ab929ad
5
5
  SHA512:
6
- metadata.gz: 94a1714f3bb809176462ab09609d76a039c7cdc144a87686339ec12be6e6b30bd5ef45ce439727300cd468998b06e6b63c8334dfe1c3bec93a1e3da6bab6d845
7
- data.tar.gz: 94ab034c63bd8d4493f6032d48bc53f57e2cc62b577a64b5f658dcbd1b97c92564cf465eb99db05dcec5fb2e8df4a2daa6f1ddc0cfab19ace748ff25348e1332
6
+ metadata.gz: 6c2670eab141084027a2716a2157a8d64828a7f462c3b1f96c087bbc5e15b9dc662620e33ce2b1ad7618fa44ee95aa4df894f1ca5820273234caf55ff07a344a
7
+ data.tar.gz: 6fc6bbf2a07d94e59eae4cecc1b963121618197c7a10cb8f6a4e98c06341d10e484a839840e6c2eb9aa79bb3de768c350882a32bc708f6c0f693d225968a972c
data/.idea/workspace.xml CHANGED
@@ -33,8 +33,8 @@
33
33
  <file leaf-file-name="testoscope.rb" pinned="false" current-in-tab="false">
34
34
  <entry file="file://$PROJECT_DIR$/lib/testoscope.rb">
35
35
  <provider selected="true" editor-type-id="text-editor">
36
- <state relative-caret-position="75">
37
- <caret line="5" column="84" lean-forward="false" selection-start-line="5" selection-start-column="84" selection-end-line="5" selection-end-column="84" />
36
+ <state relative-caret-position="256">
37
+ <caret line="126" column="31" lean-forward="true" selection-start-line="126" selection-start-column="31" selection-end-line="126" selection-end-column="31" />
38
38
  <folding />
39
39
  </state>
40
40
  </provider>
@@ -182,7 +182,7 @@
182
182
  <option name="number" value="Default" />
183
183
  <option name="presentableId" value="Default" />
184
184
  <updated>1521465490978</updated>
185
- <workItem from="1521465492548" duration="16103000" />
185
+ <workItem from="1521465492548" duration="16210000" />
186
186
  </task>
187
187
  <task id="LOCAL-00001" summary="initial commit">
188
188
  <created>1521545104500</created>
@@ -209,7 +209,7 @@
209
209
  <servers />
210
210
  </component>
211
211
  <component name="TimeTrackingManager">
212
- <option name="totallyTimeSpent" value="16103000" />
212
+ <option name="totallyTimeSpent" value="16210000" />
213
213
  </component>
214
214
  <component name="ToolWindowManager">
215
215
  <frame x="0" y="0" width="1440" height="900" extended-state="0" />
@@ -282,8 +282,8 @@
282
282
  </entry>
283
283
  <entry file="file://$PROJECT_DIR$/lib/testoscope.rb">
284
284
  <provider selected="true" editor-type-id="text-editor">
285
- <state relative-caret-position="75">
286
- <caret line="5" column="84" lean-forward="false" selection-start-line="5" selection-start-column="84" selection-end-line="5" selection-end-column="84" />
285
+ <state relative-caret-position="256">
286
+ <caret line="126" column="31" lean-forward="true" selection-start-line="126" selection-start-column="31" selection-end-line="126" selection-end-column="31" />
287
287
  <folding />
288
288
  </state>
289
289
  </provider>
@@ -1,3 +1,3 @@
1
1
  module Testoscope
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/testoscope.rb CHANGED
@@ -98,6 +98,8 @@ module Testoscope
98
98
 
99
99
  explain = yield
100
100
 
101
+ config.pp_class.method(:pp).arity.abs == 1 ? config.pp_class.new.pp( explain ) : config.pp_class.new.pp( explain, 0 )
102
+
101
103
  app_trace = caller_locations( 2 ).map(&:to_s).select { |st|
102
104
  self.config.back_trace_paths.any?{|pth| st[pth]} && !self.config.back_trace_exclude_paths.any?{|epth| st[epth]}
103
105
  }
@@ -125,8 +127,7 @@ module Testoscope
125
127
  module AdapterUpgrade
126
128
  def exec_query(sql, name = "SQL", binds = [], prepare: false)
127
129
  Testoscope.analyze(sql) {
128
- explain = super( 'EXPLAIN ' + sql, "EXPLAIN", binds, prepare: false)
129
- config.pp_class.method(:pp).arity.abs == 1 ? config.pp_class.new.pp( explain ) : config.pp_class.new.pp( explain, 0 )
130
+ super( 'EXPLAIN ' + sql, "EXPLAIN", binds, prepare: false)
130
131
  }
131
132
  super( sql, name, binds, prepare: prepare )
132
133
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testoscope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl