sham_rack 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sham_rack/net_http.rb +8 -2
- data/lib/sham_rack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 163ef7501110df3856e1d434af4af5e54cb3c0dd
|
4
|
+
data.tar.gz: e7a6fa2fdfee306e172fe82072acc4aa643fb046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e04d04e52cb0e2c54ebb0f817e26d5203bda8cc1e001778835b1d2a54b4814ebc7e671e8544646fed44eb65e1f23184bc8663ed77b89de0b25e78b3f09a88b8
|
7
|
+
data.tar.gz: b49a2d92a6e9087e4748d43b425373738d625545d415a3c69ed0e7017f8205e9288e7a2b2360d193cd8d88727354f4ba553876b7e4d3da13352e96a706d67048
|
data/lib/sham_rack/net_http.rb
CHANGED
@@ -66,8 +66,14 @@ module ShamRack
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def request_env(request, body)
|
69
|
-
body ||= request
|
70
|
-
Rack::MockRequest.env_for(request.path, :method => request.method, :input => body
|
69
|
+
body ||= request_body(request)
|
70
|
+
Rack::MockRequest.env_for(request.path, :method => request.method, :input => body)
|
71
|
+
end
|
72
|
+
|
73
|
+
def request_body(request)
|
74
|
+
return request.body unless request.body.nil?
|
75
|
+
return request.body_stream.read unless request.body_stream.nil?
|
76
|
+
""
|
71
77
|
end
|
72
78
|
|
73
79
|
def build_response(rack_response)
|
data/lib/sham_rack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sham_rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project: shamrack
|
67
|
-
rubygems_version: 2.6.
|
67
|
+
rubygems_version: 2.6.12
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: Net::HTTP-to-Rack plumbing
|