webvalve 0.9.8 → 0.9.9

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
  SHA1:
3
- metadata.gz: 097ffca5fb0e9d851d55be1a25b02d80b542c205
4
- data.tar.gz: 80741096839e9434edf5c547cff438b2f5d6fa00
3
+ metadata.gz: ee21f56868562d76912798f434460bb7373336b5
4
+ data.tar.gz: 1a272c0725e2dd5797d233f76f687262fe51cf9a
5
5
  SHA512:
6
- metadata.gz: 6439bcc0b4276542aa3eaeda4d44cd77b28860aa2935c7da4e2365b59e441d4801edd20ae83d2893f72ef84b238f5c9dd2cf34770b845aca925ad86d71cdb810
7
- data.tar.gz: c57f8a23a19a07b903952a9101e394f2542e178ce28c232f59112d02b8b8de444bdcceeb95bd27eb44f9e70cbdca563eceed6ae667e9a6a2dcab84a665389ea2
6
+ metadata.gz: a2e6a9654e68364a26ddee0ff97da75b3d720d39af191842ef8507fc210490e2816ee2ffb650a7bf840c48b58523bf0d34c3a7f747cebd408dfd2bd0415540ac
7
+ data.tar.gz: aafb419aac580481b09d740da59f689b563b5554042f795104e46b0ddd62e84477cd8d3059f6a826be994bbee56bffa6ca0fb5926494e60f9ef4eba36c7ff379
@@ -9,6 +9,10 @@ and this project aims to adhere to [Semantic Versioning](http://semver.org/spec/
9
9
  ### Added
10
10
  ### Removed
11
11
 
12
+ ## [0.9.9] - 2019-05-24
13
+ ### Changed
14
+ - fix integration with `webdrivers` gem so Rails 6 should work out of the box (https://github.com/Betterment/webvalve/pull/32)
15
+
12
16
  ## [0.9.8] - 2019-01-22
13
17
  ### Changed
14
18
  - fix load order of webvalve initializer from @jmileham (https://github.com/Betterment/webvalve/pull/26)
@@ -26,7 +30,8 @@ and this project aims to adhere to [Semantic Versioning](http://semver.org/spec/
26
30
  ### Changed
27
31
  - WebMock 3+ support from @messanjah (https://github.com/Betterment/webvalve/pull/22)
28
32
 
29
- [Unreleased]: https://github.com/Betterment/webvalve/compare/v0.9.8...HEAD
33
+ [Unreleased]: https://github.com/Betterment/webvalve/compare/v0.9.9...HEAD
34
+ [0.9.9]: https://github.com/Betterment/webvalve/compare/v0.9.8...v0.9.9
30
35
  [0.9.8]: https://github.com/Betterment/webvalve/compare/v0.9.7...v0.9.8
31
36
  [0.9.7]: https://github.com/Betterment/webvalve/compare/v0.9.6...v0.9.7
32
37
  [0.9.6]: https://github.com/Betterment/webvalve/compare/v0.9.5...v0.9.6
data/README.md CHANGED
@@ -151,8 +151,34 @@ is a configuration provided.
151
151
  require 'webvalve/rspec'
152
152
  ```
153
153
 
154
- For any other test framework, you will just want to set up a hook before
155
- each test that will run `WebValve.setup`.
154
+ If you are using
155
+ [rspec-retry](https://github.com/NoRedInk/rspec-retry), you'll have to
156
+ manually register your around hook, instead, to ensure that WebValve
157
+ resets its configuration for each retry, e.g.:
158
+
159
+ ```ruby
160
+ # spec/[rails|spec]_helper.rb
161
+
162
+ # your require lines omitted ...
163
+ require 'webmock/rspec' # set up webmock lifecycle hooks - required
164
+
165
+ RSpec.configure do |config|
166
+ # your config lines omitted ...
167
+
168
+ config.around :each do |ex|
169
+ ex.run_with_retry retry: 2
170
+ end
171
+
172
+ config.around :each do |ex|
173
+ WebValve.setup
174
+ ex.run
175
+ end
176
+ end
177
+ ```
178
+
179
+ For any other test framework, you will want to similarly set up webmock
180
+ lifecycle hooks, and add a custom hook that will run `WebValve.setup` before
181
+ each test.
156
182
 
157
183
  ## Setting deterministic fake results in tests
158
184
 
@@ -76,3 +76,4 @@ require 'webvalve/fake_service'
76
76
  require 'webvalve/fake_service_wrapper'
77
77
  require 'webvalve/fake_service_config'
78
78
  require 'webvalve/manager'
79
+ require 'webvalve/monkey_patches'
@@ -0,0 +1,30 @@
1
+ # if the webdrivers gem is included, patch it so that it can make HTTP requests to download
2
+ # drivers when necessary.
3
+ #
4
+ # based on the v3.9.4 release of webdrivers gem
5
+ # https://github.com/titusfortner/webdrivers/blob/v3.9.4/lib/webdrivers/network.rb#L47-L54
6
+ #
7
+ # and the v3.5.1 release of webmock gem
8
+ # https://github.com/bblimke/webmock/blob/v3.5.1/lib/webmock/http_lib_adapters/net_http.rb#L12
9
+ webdrivers = begin
10
+ require "webdrivers"
11
+ true
12
+ rescue LoadError
13
+ false
14
+ end
15
+
16
+ if webdrivers
17
+ class Webdrivers::Network
18
+ class << self
19
+ def http
20
+ client = WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP
21
+ if using_proxy
22
+ client.Proxy(Webdrivers.proxy_addr, Webdrivers.proxy_port,
23
+ Webdrivers.proxy_user, Webdrivers.proxy_pass)
24
+ else
25
+ client
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module WebValve
2
- VERSION = "0.9.8"
2
+ VERSION = "0.9.9"
3
3
  end
@@ -1,32 +1,32 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------------------------ | ------ | --------------- |
3
- ./spec/webvalve/fake_service_config_spec.rb[1:1:1:1] | passed | 0.00015 seconds |
3
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:1:1] | passed | 0.0003 seconds |
4
4
  ./spec/webvalve/fake_service_config_spec.rb[1:1:1:2] | passed | 0.00014 seconds |
5
- ./spec/webvalve/fake_service_config_spec.rb[1:1:2:1] | passed | 0.00019 seconds |
6
- ./spec/webvalve/fake_service_config_spec.rb[1:1:2:2] | passed | 0.00026 seconds |
7
- ./spec/webvalve/fake_service_config_spec.rb[1:1:2:3] | passed | 0.00024 seconds |
8
- ./spec/webvalve/fake_service_config_spec.rb[1:1:3:1] | passed | 0.00016 seconds |
9
- ./spec/webvalve/fake_service_config_spec.rb[1:1:3:2] | passed | 0.00021 seconds |
10
- ./spec/webvalve/fake_service_config_spec.rb[1:1:3:3:1] | passed | 0.00019 seconds |
11
- ./spec/webvalve/fake_service_config_spec.rb[1:1:3:3:2] | passed | 0.00027 seconds |
12
- ./spec/webvalve/fake_service_config_spec.rb[1:2:1] | passed | 0.0002 seconds |
13
- ./spec/webvalve/fake_service_config_spec.rb[1:2:2] | passed | 0.0002 seconds |
14
- ./spec/webvalve/fake_service_config_spec.rb[1:2:3] | passed | 0.00016 seconds |
15
- ./spec/webvalve/fake_service_spec.rb[1:1] | passed | 0.00236 seconds |
16
- ./spec/webvalve/fake_service_spec.rb[1:2:1] | passed | 0.00387 seconds |
17
- ./spec/webvalve/fake_service_spec.rb[1:2:2] | passed | 0.02133 seconds |
18
- ./spec/webvalve/manager_spec.rb[1:1] | passed | 0.00005 seconds |
19
- ./spec/webvalve/manager_spec.rb[1:2:1] | passed | 0.00213 seconds |
20
- ./spec/webvalve/manager_spec.rb[1:3:1] | passed | 0.00019 seconds |
21
- ./spec/webvalve/manager_spec.rb[1:4:1] | passed | 0.00011 seconds |
22
- ./spec/webvalve/manager_spec.rb[1:5:1] | passed | 0.00024 seconds |
23
- ./spec/webvalve/manager_spec.rb[1:5:2] | passed | 0.0084 seconds |
24
- ./spec/webvalve/manager_spec.rb[1:5:3] | passed | 0.00052 seconds |
25
- ./spec/webvalve/manager_spec.rb[1:5:4:1] | passed | 0.00049 seconds |
26
- ./spec/webvalve/manager_spec.rb[1:5:5:1] | passed | 0.0006 seconds |
27
- ./spec/webvalve/manager_spec.rb[1:5:5:2] | passed | 0.00079 seconds |
28
- ./spec/webvalve/manager_spec.rb[1:5:5:3] | passed | 0.0019 seconds |
29
- ./spec/webvalve_spec.rb[1:1] | passed | 0.00012 seconds |
30
- ./spec/webvalve_spec.rb[1:2] | passed | 0.00006 seconds |
31
- ./spec/webvalve_spec.rb[1:3] | passed | 0.00006 seconds |
32
- ./spec/webvalve_spec.rb[1:4] | passed | 0.00107 seconds |
5
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:2:1] | passed | 0.0002 seconds |
6
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:2:2] | passed | 0.00017 seconds |
7
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:2:3] | passed | 0.00019 seconds |
8
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:3:1] | passed | 0.00013 seconds |
9
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:3:2] | passed | 0.00014 seconds |
10
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:3:3:1] | passed | 0.00015 seconds |
11
+ ./spec/webvalve/fake_service_config_spec.rb[1:1:3:3:2] | passed | 0.00039 seconds |
12
+ ./spec/webvalve/fake_service_config_spec.rb[1:2:1] | passed | 0.00247 seconds |
13
+ ./spec/webvalve/fake_service_config_spec.rb[1:2:2] | passed | 0.00161 seconds |
14
+ ./spec/webvalve/fake_service_config_spec.rb[1:2:3] | passed | 0.0002 seconds |
15
+ ./spec/webvalve/fake_service_spec.rb[1:1] | passed | 0.00354 seconds |
16
+ ./spec/webvalve/fake_service_spec.rb[1:2:1] | passed | 0.02646 seconds |
17
+ ./spec/webvalve/fake_service_spec.rb[1:2:2] | passed | 0.02043 seconds |
18
+ ./spec/webvalve/manager_spec.rb[1:1] | passed | 0.00008 seconds |
19
+ ./spec/webvalve/manager_spec.rb[1:2:1] | passed | 0.00228 seconds |
20
+ ./spec/webvalve/manager_spec.rb[1:3:1] | passed | 0.00022 seconds |
21
+ ./spec/webvalve/manager_spec.rb[1:4:1] | passed | 0.0001 seconds |
22
+ ./spec/webvalve/manager_spec.rb[1:5:1] | passed | 0.00046 seconds |
23
+ ./spec/webvalve/manager_spec.rb[1:5:2] | passed | 0.00065 seconds |
24
+ ./spec/webvalve/manager_spec.rb[1:5:3] | passed | 0.01468 seconds |
25
+ ./spec/webvalve/manager_spec.rb[1:5:4:1] | passed | 0.00055 seconds |
26
+ ./spec/webvalve/manager_spec.rb[1:5:5:1] | passed | 0.00053 seconds |
27
+ ./spec/webvalve/manager_spec.rb[1:5:5:2] | passed | 0.00093 seconds |
28
+ ./spec/webvalve/manager_spec.rb[1:5:5:3] | passed | 0.00188 seconds |
29
+ ./spec/webvalve_spec.rb[1:1] | passed | 0.00006 seconds |
30
+ ./spec/webvalve_spec.rb[1:2] | passed | 0.00013 seconds |
31
+ ./spec/webvalve_spec.rb[1:3] | passed | 0.00008 seconds |
32
+ ./spec/webvalve_spec.rb[1:4] | passed | 0.00182 seconds |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webvalve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-22 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -156,6 +156,7 @@ files:
156
156
  - lib/webvalve/instrumentation/log_subscriber.rb
157
157
  - lib/webvalve/instrumentation/middleware.rb
158
158
  - lib/webvalve/manager.rb
159
+ - lib/webvalve/monkey_patches.rb
159
160
  - lib/webvalve/railtie.rb
160
161
  - lib/webvalve/rspec.rb
161
162
  - lib/webvalve/version.rb
@@ -189,7 +190,6 @@ files:
189
190
  - spec/dummy/config/locales/en.yml
190
191
  - spec/dummy/config/routes.rb
191
192
  - spec/dummy/config/secrets.yml
192
- - spec/dummy/log/test.log
193
193
  - spec/dummy/public/404.html
194
194
  - spec/dummy/public/422.html
195
195
  - spec/dummy/public/500.html
@@ -260,7 +260,6 @@ test_files:
260
260
  - spec/dummy/public/422.html
261
261
  - spec/dummy/public/500.html
262
262
  - spec/dummy/public/404.html
263
- - spec/dummy/log/test.log
264
263
  - spec/dummy/README.rdoc
265
264
  - spec/examples.txt
266
265
  - spec/webvalve/fake_service_spec.rb
@@ -1,36 +0,0 @@
1
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
2
- WebValve Request Captured (4.8ms) dummy.dev GET /widgets [200]
3
- WebValve Request Captured (3.0ms) dummy.dev GET /widgets [200]
4
- WebValve Request Captured (0.8ms) dummy.dev GET /foos []
5
- WebValve Request Captured (3.9ms) dummy.dev GET /widgets [200]
6
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
7
- WebValve Request Captured (2.6ms) dummy.dev GET /widgets [200]
8
- WebValve Request Captured (0.5ms) dummy.dev GET /foos []
9
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
10
- WebValve Request Captured (2.2ms) dummy.dev GET /widgets [200]
11
- WebValve Request Captured (0.5ms) dummy.dev GET /foos []
12
- WebValve Request Captured (3.9ms) dummy.dev GET /widgets [200]
13
- WebValve Request Captured (2.1ms) dummy.dev GET /widgets [200]
14
- WebValve Request Captured (0.3ms) dummy.dev GET /foos []
15
- WebValve Request Captured (2.9ms) dummy.dev GET /widgets [200]
16
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
17
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
18
- WebValve Request Captured (4.9ms) dummy.dev GET /widgets [200]
19
- WebValve Request Captured (2.1ms) dummy.dev GET /widgets [200]
20
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
21
- WebValve Request Captured (0.5ms) dummy.dev GET /foos []
22
- WebValve Request Captured (2.2ms) dummy.dev GET /widgets [200]
23
- WebValve Request Captured (0.5ms) dummy.dev GET /foos []
24
- WebValve Request Captured (2.6ms) dummy.dev GET /widgets [200]
25
- WebValve Request Captured (6.6ms) dummy.dev GET /widgets [200]
26
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
27
- WebValve Request Captured (0.5ms) dummy.dev GET /foos []
28
- WebValve Request Captured (2.5ms) dummy.dev GET /widgets [200]
29
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
30
- WebValve Request Captured (2.2ms) dummy.dev GET /widgets [200]
31
- WebValve Request Captured (2.1ms) dummy.dev GET /widgets [200]
32
- WebValve Request Captured (0.3ms) dummy.dev GET /foos []
33
- WebValve Request Captured (2.4ms) dummy.dev GET /widgets [200]
34
- WebValve Request Captured (0.3ms) dummy.dev GET /foos []
35
- WebValve Request Captured (0.4ms) dummy.dev GET /foos []
36
- WebValve Request Captured (2.2ms) dummy.dev GET /widgets [200]