coverband-service-client 0.0.7 → 0.0.8

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: c91e07a6f8536e144c0cde767a20b91ae1aefcc2d5e1bcda5c9962c8d667de8f
4
- data.tar.gz: ffc9bc012bb68be47b474d4c5b436ffbcc1e2e675e9616545ffb357e274b513b
3
+ metadata.gz: 9d70bb9e3268a13b06640e0437e517cf00ccc4030f2b7f2c20e7b314d26828e2
4
+ data.tar.gz: 3400abcd93c90f5f8bb011757933dd08b0619ef907d3f2675a1326bb5eb7a102
5
5
  SHA512:
6
- metadata.gz: 9879add06ec81ced176e688e5bd5c40d9ae3848deb165437acc099cc3454fa33cf65a49cacc5df1433b496b86c12c169db975b8776969e981ff12388b346b102
7
- data.tar.gz: 441d88a85a8e9d9afa7538c47a14fe028f58d817d65d642b22fdde963dd6f38ce123edc80518913369bf3b81091e34c81f5da2e3477c8323d3654f608052ebc8
6
+ metadata.gz: fd6972fc75a2e8320a6ce2f991e871df0fed4c6a1298e0d2a443c479d309aca58d56f6c9c0aa346731fec7e1a9e12836e2cdb18480bd687667804f7b3d2a802d
7
+ data.tar.gz: e4bd36b15a82c5ab95fcc770909d04b3426d818a1468b90cf1f45667facd1f4fda9d37809c667c85b822b7b8651f3f8576d8323914c331bf207a6458bad81e99
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coverband-service-client (0.0.7)
4
+ coverband-service-client (0.0.8)
5
5
  coverband (~> 4.2.4)
6
6
 
7
7
  GEM
@@ -5,13 +5,18 @@ require 'coverband/service/client/version'
5
5
  require 'securerandom'
6
6
 
7
7
  COVERBAND_ENV = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || (defined?(Rails) ? Rails.env : 'unknown')
8
- COVERBAND_SERVICE_URL = ENV['COVERBAND_URL'] ||
9
- ((COVERBAND_ENV == 'development') ? 'http://127.0.0.1:3456' : 'https://coverband-service.herokuapp.com')
8
+ COVERBAND_SERVICE_URL = ENV['COVERBAND_URL'] || 'https://coverband.io'
10
9
  COVERBAND_TIMEOUT = (COVERBAND_ENV == 'development') ? 5 : 1
10
+ COVERBAND_ENABLE_DEV_MODE = ENV['COVERBAND_ENABLE_DEV_MODE'] || false
11
+ COVERBAND_ENABLE_TEST_MODE = ENV['COVERBAND_ENABLE_TEST_MODE'] || false
12
+ COVERBAND_PROCESS_TYPE = ENV['PROCESS_TYPE'] || 'unknown'
13
+ COVERBAND_REPORT_PERIOD = (ENV['COVERBAND_REPORT_PERIOD'] || 600).to_i
11
14
 
12
15
  module Coverband
13
16
 
14
- if COVERBAND_ENV == 'test' && !ENV['COVERBAND_ENABLE_TEST_MODE']
17
+ if ((COVERBAND_ENV == 'test' && !COVERBAND_ENABLE_TEST_MODE) ||
18
+ COVERBAND_ENV == 'development' && !COVERBAND_ENABLE_DEV_MODE
19
+ )
15
20
  def self.report_coverage
16
21
  # for now disable coverband reporting in test env by default
17
22
  end
@@ -31,7 +36,7 @@ module Coverband
31
36
  def initialize(coverband_url, opts = {})
32
37
  super()
33
38
  @coverband_url = coverband_url
34
- @process_type = opts.fetch(:process_type) { 'unknown' }
39
+ @process_type = opts.fetch(:process_type) { COVERBAND_PROCESS_TYPE }
35
40
  @runtime_env = opts.fetch(:runtime_env) { COVERBAND_ENV }
36
41
  end
37
42
 
@@ -180,10 +185,10 @@ Coverband.configure do |config|
180
185
  config.store = Coverband::Adapters::Service.new(COVERBAND_SERVICE_URL)
181
186
 
182
187
  # default to tracking views true
183
- config.track_views = ENV['COVERBAND_ENABLE_VIEW_TRACKER'] ? true : false
188
+ config.track_views = ENV['COVERBAND_DISABLE_VIEW_TRACKER'] ? false : true
184
189
 
185
190
  # report every 10m by default
186
- config.background_reporting_sleep_seconds = COVERBAND_ENV == 'production' ? 600 : 60
191
+ config.background_reporting_sleep_seconds = COVERBAND_ENV == 'production' ? COVERBAND_REPORT_PERIOD : 60
187
192
  # add a wiggle to avoid service stampede
188
193
  config.reporting_wiggle = COVERBAND_ENV == 'production' ? 90 : 6
189
194
 
@@ -1,7 +1,7 @@
1
1
  module Coverband
2
2
  module Service
3
3
  module Client
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coverband-service-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-04 00:00:00.000000000 Z
12
+ date: 2020-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler