hoss-agent 1.0.2 → 1.0.3

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: 85c9ed2a09cb024b273d033e9fd91571d423dc63459e2cc8fd8b1585cba2451a
4
- data.tar.gz: 05f1c4b673467b22347bae003e43b7fcf09ea6a0be7335d02ba0724694ea5f9b
3
+ metadata.gz: 0a5dc8f27616545b119c326f640f637d2771adb92a39f6e60c5efc6f7635f6ea
4
+ data.tar.gz: 3962d5f37d1fe1d2695daa6c51bdc6a8402a6eeb4a7504014de2d31cb06f7809
5
5
  SHA512:
6
- metadata.gz: 47a62689bdcefb7d1ac08072e846af0be500e93356be775d4828d72197b6da7561b3f1f693d5067d32ee137cb7575bb83c4d055c3de95ea78247039a46e8e8c1
7
- data.tar.gz: cc9587bd58578ae997b74fc7fc0681aefb6aeeddcc7247fb7d6b02127057913900f02e8ca4663b04f24fd0b206801daf76d151464b2120fba6d883d97e88011a
6
+ metadata.gz: 4c4eef26d646864c31ddb0aeee65532162f4a85c68b7f563b4babe3b5cec1bbdbca9c420cd9cd1969498a1569c865703eccfa26011040fa149c13e7c4db57a15
7
+ data.tar.gz: 6ad4c3a97be28038aa69e196af7aa559472ed14fbd2ab2d968fc44364f896e78ae9fa48c68a6fb443267ef24e724f03927903c2d3ed6b704314ca2fc8e5c0197
@@ -33,13 +33,14 @@ module Hoss
33
33
  # rubocop:disable Metrics/LineLength, Layout/ExtraSpacing
34
34
  option :config_file, type: :string, default: 'config/hoss.yml'
35
35
  option :api_host, type: :url, default: ENV['HOSS_API_HOST'] || 'https://app.hoss.com'
36
- option :api_key, type: :string
36
+ option :api_key, type: :string, default: ENV['HOSS_API_KEY']
37
37
  option :ingress_host, type: :string, default: ENV['HOSS_INGRESS_HOST'] || 'https://ingress.hoss.com/v1'
38
38
  option :max_queue_size, type: :int, default: 3000
39
39
  option :batch_size, type: :int, default: ENV['HOSS_BATCH_SIZE'] || 512000
40
40
  option :max_event_retries, type: :int, default: 100
41
41
  option :remote_config_fetch_interval, type: :int, default: 300
42
42
  option :agentConfig, type: :dict
43
+ option :debug, type: :boolean, default: ENV['HOSS_DEBUG']
43
44
 
44
45
 
45
46
  option :central_config, type: :bool, default: true
@@ -100,6 +101,14 @@ module Hoss
100
101
  assign(load_config_file)
101
102
  assign(env)
102
103
 
104
+ if self.debug == true || self.debug == 'true'
105
+ assign(
106
+ log_level: Logger::DEBUG,
107
+ debug: true,
108
+ log_path: '-'
109
+ )
110
+ end
111
+
103
112
  warn '[HOSS] No API Key provided' unless self.api_key
104
113
 
105
114
  yield self if block_given?
@@ -143,7 +143,7 @@ module Hoss
143
143
  debug json
144
144
  rescue Exception => e
145
145
  debug 'unable to print body'
146
- puts json
146
+ puts json if config.debug
147
147
  end
148
148
  begin
149
149
  connection.write(json)
@@ -18,5 +18,5 @@
18
18
  # frozen_string_literal: true
19
19
 
20
20
  module Hoss
21
- VERSION = '1.0.2'
21
+ VERSION = '1.0.3'
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoss-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Cooper