graphql-hive 0.1.2 → 0.1.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: 316692ed93602ab226524cc2c83c1ef5e7d419d13157bdfebbae9ea90d864021
4
- data.tar.gz: 44b597d43b0b8d980e848f68a4db4d191a8f56f15fbd4385f2c81d16431e8aac
3
+ metadata.gz: d08b220ca9ddc33299c2135e695d1aacb3101c3be2c4dd31b063d765ec874392
4
+ data.tar.gz: 1cbcfcd9ae42cd5a5a9a919e79dc1bd8c21d6399866eb101c751d190c544b782
5
5
  SHA512:
6
- metadata.gz: 92e5cd6b4b0ef8f5e5696a5b2400f5bdbbe6531ee9c6db5bbd94055bcad9cd4b571a3ea867ac61707fe641e813888c9efae2fcb0ca40cdc4d841df271c76c50a
7
- data.tar.gz: 6eb042181b4b1c529858ead76f02c776c1429e50e00db96f253cd0f8b944e708032f8e62de8768b84d483a02d96fa4a354d277572a608bde1db68cd0334856f8
6
+ metadata.gz: 6b30fe99aa8be0270b6a10aca4c095f983cc1890d3813303113592662b8817a21fb3c672cd5ed4cb6d404f93515a88110dba66f3c8345bddea07edac230d92d4
7
+ data.tar.gz: d927cad8cdc2b2c5aab8d4fe767ea80e184357b1be35ca59ba16d13c77ce7cf57d02a3581896148e2d30244a9441d72254e1f036aea7610591129173def099b1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-hive (0.1.0)
4
+ graphql-hive (0.1.2)
5
5
  graphql (~> 2.0.9)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- graphql-hive (0.1.0)
4
+ graphql-hive (0.1.2)
5
5
  graphql (~> 2.0.9)
6
6
 
7
7
  GEM
@@ -32,8 +32,8 @@ module GraphQL
32
32
  request.body = JSON.generate(body)
33
33
  response = http.request(request)
34
34
 
35
- @options[:logger].debug(response.inspect)
36
- @options[:logger].debug(response.body.inspect)
35
+ @options[:logger].debug(response.inspect) if @options[:debug]
36
+ @options[:logger].debug(response.body.inspect) if @options[:debug]
37
37
  rescue StandardError => e
38
38
  @options[:logger].fatal("Failed to send data: #{e}")
39
39
  end
@@ -34,19 +34,19 @@ module GraphQL
34
34
  @thread = Thread.new do
35
35
  while !@queue.empty? || !@queue.closed?
36
36
  operations = @queue.pop(false)
37
- process_operations operations
37
+ process_operations(operations) if operations
38
38
  end
39
39
  end
40
40
  end
41
41
 
42
42
  def add_operation(operation)
43
- @logger.debug("add operation to buffer: #{operation}")
43
+ @logger.debug("add operation to buffer: #{operation}") if @options[:debug]
44
44
 
45
45
  @operations_buffer << operation
46
46
 
47
47
  return unless @operations_buffer.size >= @buffer_size
48
48
 
49
- @logger.debug('buffer is full, sending!')
49
+ @logger.debug('buffer is full, sending!') if @options[:debug]
50
50
  @queue.push @operations_buffer
51
51
  @operations_buffer = []
52
52
  end
@@ -70,7 +70,7 @@ module GraphQL
70
70
  add_operation_to_report(report, operation)
71
71
  end
72
72
 
73
- @logger.debug("sending report: #{report}")
73
+ @logger.debug("sending report: #{report}") if @options[:debug]
74
74
 
75
75
  @client.send('/usage', report, :usage)
76
76
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Graphql
4
4
  module Hive
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-hive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charly POLY