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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/coverband-service-client.rb +11 -6
- data/lib/coverband/service/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d70bb9e3268a13b06640e0437e517cf00ccc4030f2b7f2c20e7b314d26828e2
|
4
|
+
data.tar.gz: 3400abcd93c90f5f8bb011757933dd08b0619ef907d3f2675a1326bb5eb7a102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd6972fc75a2e8320a6ce2f991e871df0fed4c6a1298e0d2a443c479d309aca58d56f6c9c0aa346731fec7e1a9e12836e2cdb18480bd687667804f7b3d2a802d
|
7
|
+
data.tar.gz: e4bd36b15a82c5ab95fcc770909d04b3426d818a1468b90cf1f45667facd1f4fda9d37809c667c85b822b7b8651f3f8576d8323914c331bf207a6458bad81e99
|
data/Gemfile.lock
CHANGED
@@ -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' && !
|
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) {
|
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['
|
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' ?
|
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
|
|
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.
|
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-
|
12
|
+
date: 2020-05-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|