reqres_rspec 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/reqres_rspec/collector.rb +23 -21
- data/lib/reqres_rspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d0b4f6084fccf7f95d89f277e94386edb1dfa62
|
|
4
|
+
data.tar.gz: bf36ebec14a98f8a76b6e8c9bd2202cad4acde6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db47f6f8497c3378b9649ee4abfabc2aa7d527b0cd2f43daa06d494d54f4da4b9807b2bcf13ffae5ebbd2510f9ed8d72f501007a39da2c4932e2b0053d3490ff
|
|
7
|
+
data.tar.gz: 71fe875e04a6e56e687f4fe100172c748cb47481275bec1f6a2f01a43d64eceafecdf992ba9c7a30902e20d2799c42f5deb3e4d247de0341daea03cdf362d52d
|
|
@@ -17,41 +17,41 @@ module ReqresRspec
|
|
|
17
17
|
# response headers contain many unnecessary information,
|
|
18
18
|
# everything from this list will be stripped
|
|
19
19
|
EXCLUDE_RESPONSE_HEADER_PATTERNS = %w[
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Cache-Control
|
|
21
|
+
ETag
|
|
22
22
|
X-Content-Type-Options
|
|
23
|
-
X-
|
|
23
|
+
X-Frame-Options
|
|
24
24
|
X-Request-Id
|
|
25
25
|
X-Runtime
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
X-UA-Compatible
|
|
27
|
+
X-XSS-Protection
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
# request headers contain many unnecessary information,
|
|
31
31
|
# everything that match items from this list will be stripped
|
|
32
32
|
EXCLUDE_REQUEST_HEADER_PATTERNS = %w[
|
|
33
|
-
rack.
|
|
34
|
-
sinatra.commonlogger
|
|
35
|
-
sinatra.route
|
|
36
|
-
ROUTES_
|
|
37
|
-
action_dispatch
|
|
38
33
|
action_controller.
|
|
39
|
-
|
|
40
|
-
SERVER_NAME
|
|
41
|
-
SERVER_PORT
|
|
42
|
-
QUERY_STRING
|
|
43
|
-
SCRIPT_NAME
|
|
34
|
+
action_dispatch
|
|
44
35
|
CONTENT_LENGTH
|
|
45
|
-
|
|
36
|
+
HTTP_COOKIE
|
|
46
37
|
HTTP_HOST
|
|
38
|
+
HTTP_ORIGIN
|
|
47
39
|
HTTP_USER_AGENT
|
|
48
|
-
|
|
49
|
-
PATH_INFO
|
|
40
|
+
HTTPS
|
|
50
41
|
ORIGINAL_FULLPATH
|
|
51
42
|
ORIGINAL_SCRIPT_NAME
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
PATH_INFO
|
|
44
|
+
QUERY_STRING
|
|
45
|
+
rack.
|
|
54
46
|
RAW_POST_DATA
|
|
47
|
+
REMOTE_ADDR
|
|
48
|
+
REQUEST_METHOD
|
|
49
|
+
ROUTES_
|
|
50
|
+
SCRIPT_NAME
|
|
51
|
+
SERVER_NAME
|
|
52
|
+
SERVER_PORT
|
|
53
|
+
sinatra.commonlogger
|
|
54
|
+
sinatra.route
|
|
55
55
|
]
|
|
56
56
|
|
|
57
57
|
def initialize
|
|
@@ -155,7 +155,9 @@ module ReqresRspec
|
|
|
155
155
|
def read_request_headers(request)
|
|
156
156
|
headers = {}
|
|
157
157
|
request.env.keys.each do |key|
|
|
158
|
-
|
|
158
|
+
if EXCLUDE_REQUEST_HEADER_PATTERNS.all? { |p| !key.starts_with? p }
|
|
159
|
+
headers.merge!(key.sub(/^HTTP_/, '') => request.env[key])
|
|
160
|
+
end
|
|
159
161
|
end
|
|
160
162
|
headers
|
|
161
163
|
end
|
data/lib/reqres_rspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reqres_rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- rilian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: coderay
|