capybara-webmock 0.4.0 → 0.4.2

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: 1c8941163a39745ce0f31270cde7858c787e00c1
4
- data.tar.gz: fb8c98139687e3ccd5ecd7beedb46fe92e57663d
3
+ metadata.gz: eca1636a9527763f3f5d28faa28b10f988ff43c7
4
+ data.tar.gz: '0369592381650cb26db26c177d6a4263e594d16c'
5
5
  SHA512:
6
- metadata.gz: 0379818df23512a9e8856657b5da11b01eb7c233c31d9f3f5f22f8b3e4aa74ba82af01d09fa2d9ccd3ae78e82450fd8bcd919fe7211e9a7d1290258fd5a25412
7
- data.tar.gz: b9508aab67d153d8702b58984005130a9890f56361906e96f1f7b30cc54d1fa781bcaddefe16beab82817f88d28faf293e32661e5bc24a457f6a8b977ee843d4
6
+ metadata.gz: 6dcc5772e0bbfc2aee5f6b6826b5deaa05135a18d05ef40e69c11768bb83499352d1f8b0d02f379561993a5cc94fe726568d943e81311fb57916307c7b81254b
7
+ data.tar.gz: 06a4597ce824db9955e076a0833f5603006b0fa33dba03c2ed30766d220ce6c11720c0845aa397ecb741d37eeb877609fc6f0c5e7fdef1d3a01893c18a3ebc00
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "capybara", "~> 2.4"
25
+ spec.add_dependency "capybara", ">= 2.4", "< 4"
26
26
  spec.add_dependency "rack", ">= 1.4"
27
27
  spec.add_dependency "rack-proxy", ">= 0.6.0"
28
28
  spec.add_dependency "selenium-webdriver", "~> 3.0"
@@ -9,6 +9,11 @@ class Capybara::Webmock::Proxy < Rack::Proxy
9
9
  ensure_log_exists
10
10
  end
11
11
 
12
+ def call(env)
13
+ @streaming = true
14
+ super
15
+ end
16
+
12
17
  def perform_request(env)
13
18
  request = Rack::Request.new(env)
14
19
  allowed_urls = ['127.0.0.1', 'localhost', %r{(.*\.|\A)lvh.me}]
@@ -24,6 +29,12 @@ class Capybara::Webmock::Proxy < Rack::Proxy
24
29
  File.delete(PID_FILE) if File.exist?(PID_FILE)
25
30
  end
26
31
 
32
+ def rewrite_response(triplet)
33
+ status, headers, body = triplet
34
+ headers.delete "transfer-encoding"
35
+ triplet
36
+ end
37
+
27
38
  private
28
39
 
29
40
  def allowed_url?(urls, host)
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Webmock
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Worth
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-11 00:00:00.000000000 Z
12
+ date: 2018-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '2.4'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '4'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: '2.4'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '4'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: rack
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
184
  version: '0'
179
185
  requirements: []
180
186
  rubyforge_project:
181
- rubygems_version: 2.5.1
187
+ rubygems_version: 2.6.12
182
188
  signing_key:
183
189
  specification_version: 4
184
190
  summary: Mock external requests