coverband 5.0.0.rc.7 → 5.0.0.rc.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: 48bac64c5afbae512ae05bd206f11e1e520097722787ebf2371e4f82a866c41a
4
- data.tar.gz: a0e1ed588ab6b40b05ebcc2433f945a1a0f67d874ca8ad52f6845fe20a06b1fa
3
+ metadata.gz: 2e236d323d6ce3fdb2d3bf5ea9a7514e2cc5758c50d422573cd0ffe0bf8a3f5b
4
+ data.tar.gz: 93c4a362420b64444efa41f74c4f21259e5891e23481885a3acd7472e2577c63
5
5
  SHA512:
6
- metadata.gz: 3047130d731edaf94cc8fef23b8168d32175d70ea8a5daac8f48facd74e0cbe4f42cd6e622a5b7370cbd4df14ae70894c2288ff12b51cbcb45ee68dcacd31276
7
- data.tar.gz: 74e499709a8270bab88c0f7bbda7c99798ef62eb6958577f8ca9dde51dbea79ce432445a57e0f0edfc13918e201a15331c1ce638ab45ebbdcdf1e40aeef485de
6
+ metadata.gz: ce5500c42de344046f55a277635f7f406e6e6675b7a77cbff0ba9986c86c5b066e3969ea8540043dc4aaa70c91b9648cda531660569209257d7ce04c7831180c
7
+ data.tar.gz: 9927e92ef9749a079ee56774d6e112cfa4ca2c21f9fd56cd60e0896bf588198fc5ff8e133baff74cc1bf1bb2d4ca2d9cbe8f99a655702879db464d90a71a5dbb
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "memory_profiler"
26
26
  spec.add_development_dependency "minitest"
27
27
  spec.add_development_dependency "minitest-fork_executor"
28
+ spec.add_development_dependency "minitest-stub-const"
28
29
  spec.add_development_dependency "mocha", "~> 1.7.0"
29
30
  spec.add_development_dependency "rack"
30
31
  spec.add_development_dependency "rack-test"
@@ -130,7 +130,7 @@ module Coverband
130
130
 
131
131
  def store
132
132
  @store ||= if service?
133
- raise "invalid configuration: unclear default store coverband expects either api_key or redis_url" if redis_url
133
+ raise "invalid configuration: unclear default store coverband expects either api_key or redis_url" if ENV["COVERBAND_REDIS_URL"]
134
134
  require "coverband/adapters/web_service_store"
135
135
  Coverband::Adapters::WebServiceStore.new(service_url)
136
136
  else
@@ -5,5 +5,5 @@
5
5
  # use format '4.2.1.rc.1' ~> 4.2.1.rc to prerelease versions like v4.2.1.rc.2 and v4.2.1.rc.3
6
6
  ###
7
7
  module Coverband
8
- VERSION = "5.0.0.rc.7"
8
+ VERSION = "5.0.0.rc.8"
9
9
  end
@@ -89,17 +89,29 @@ class BaseTest < Minitest::Test
89
89
  end
90
90
  end
91
91
 
92
- test "store raises when api key and redis_url" do
92
+ test "store raises when api key and coverband redis env" do
93
93
  Coverband::Collectors::Coverage.instance.reset_instance
94
94
  Coverband.configuration.reset
95
- assert_raises RuntimeError do
96
- Coverband.configure do |config|
97
- config.api_key = "test-key"
98
- config.redis_url = "redis://localhost:3333"
95
+
96
+ env = ENV.to_hash.merge("COVERBAND_REDIS_URL" => "redis://localhost:3333")
97
+ Object.stub_const(:ENV, env) do
98
+ assert_raises RuntimeError do
99
+ Coverband.configure do |config|
100
+ config.api_key = "test-key"
101
+ end
99
102
  end
100
103
  end
101
104
  end
102
105
 
106
+ test "store doesnt raises when api key and redis_url" do
107
+ Coverband::Collectors::Coverage.instance.reset_instance
108
+ Coverband.configuration.reset
109
+ Coverband.configure do |config|
110
+ config.api_key = "test-key"
111
+ config.redis_url = "redis://localhost:3333"
112
+ end
113
+ end
114
+
103
115
  test "use_oneshot_lines_coverage" do
104
116
  refute Coverband.configuration.use_oneshot_lines_coverage
105
117
 
@@ -6,6 +6,7 @@ require "rubygems"
6
6
  require "simplecov"
7
7
  require "coveralls"
8
8
  require "minitest/autorun"
9
+ require "minitest/stub_const"
9
10
  require "mocha/minitest"
10
11
  require "ostruct"
11
12
  require "json"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coverband
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc.7
4
+ version: 5.0.0.rc.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Mayer
@@ -95,6 +95,20 @@ dependencies:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: minitest-stub-const
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: mocha
100
114
  requirement: !ruby/object:Gem::Requirement
@@ -452,7 +466,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
452
466
  - !ruby/object:Gem::Version
453
467
  version: 1.3.1
454
468
  requirements: []
455
- rubygems_version: 3.0.3
469
+ rubygems_version: 3.1.2
456
470
  signing_key:
457
471
  specification_version: 4
458
472
  summary: Rack middleware to measure production code usage (LOC runtime usage)