graphiti 1.2.20 → 1.2.21

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
  SHA256:
3
- metadata.gz: db3bae18176af83f5ac1b88c50546cefcf57f38245e69a5fcbb45f3028ca2273
4
- data.tar.gz: 6ee077531421990da7d4fe80bedfada136b299420d7b82566e9261b7f1a2800a
3
+ metadata.gz: 36b58f545ff99d459f7739072dd54045a8eee7f06990f7cee8450c1311788feb
4
+ data.tar.gz: bab55c98392e96c793b51bac6423c63b171782f36fddd3ef57531e4d3f280f9b
5
5
  SHA512:
6
- metadata.gz: 0ceeabdfe64a03c4d709353a763a49224a14eb068633dcbd67c4ef2ee370dbdcd47781b0a4c15f19fe02956712aaca3dda42a17eb514bf44b821725261dc7ddf
7
- data.tar.gz: d329a82610a68dec935625edbd502e85c39907a64261f170d342f632c82dc211c0fab440edbb16210483eb2154f44d403a2f13d5f3b9b7e41d4aafe68c66bf4a
6
+ metadata.gz: dc9a8a3dce388ba6cec8100cbbd16c0c04e7aa0559acd2d3b028d00ce869537fce70c395e524c33351b4066142a48cecd3ee76bbf6c8d8b25e1fb38e997b0556
7
+ data.tar.gz: fbf3374a770546d24e62ebbc96091264f823ddeaaf99329eb0f51dfcfb918df999dcf6025aeb87868754671c079058e9a3e664db15c77cf6e00f1958a1b80ddd
@@ -10,6 +10,8 @@ module Graphiti
10
10
 
11
11
  class << self
12
12
  def on_data(name, start, stop, id, payload)
13
+ return [] unless enabled
14
+
13
15
  took = ((stop - start) * 1000.0).round(2)
14
16
  params = scrub_params(payload[:params])
15
17
 
@@ -24,7 +26,7 @@ module Graphiti
24
26
  end
25
27
  end
26
28
 
27
- def on_data_exception(payload, params)
29
+ private def on_data_exception(payload, params)
28
30
  unless payload[:exception_object].instance_variable_get(:@__graphiti_debug)
29
31
  add_chunk do |logs, json|
30
32
  logs << ["\n=== Graphiti Debug ERROR", :red, true]
@@ -49,11 +51,11 @@ module Graphiti
49
51
  end
50
52
  end
51
53
 
52
- def results(raw_results)
54
+ private def results(raw_results)
53
55
  raw_results.map { |r| "[#{r.class.name}, #{r.id.inspect}]" }.join(", ")
54
56
  end
55
57
 
56
- def on_sideload_data(payload, params, took)
58
+ private def on_sideload_data(payload, params, took)
57
59
  sideload = payload[:sideload]
58
60
  results = results(payload[:results])
59
61
  add_chunk(payload[:resource], payload[:parent]) do |logs, json|
@@ -72,7 +74,7 @@ module Graphiti
72
74
  end
73
75
  end
74
76
 
75
- def on_primary_data(payload, params, took)
77
+ private def on_primary_data(payload, params, took)
76
78
  results = results(payload[:results])
77
79
  add_chunk(payload[:resource], payload[:parent]) do |logs, json|
78
80
  logs << [""]
@@ -90,6 +92,8 @@ module Graphiti
90
92
  end
91
93
 
92
94
  def on_render(name, start, stop, id, payload)
95
+ return [] unless enabled
96
+
93
97
  add_chunk do |logs|
94
98
  took = ((stop - start) * 1000.0).round(2)
95
99
  logs << [""]
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.2.20"
2
+ VERSION = "1.2.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.20
4
+ version: 1.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable