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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af1fa8a421fe25c73ee8379ca80b33acab8ff382
4
- data.tar.gz: 3e0618b1ed96673dd43ee51e0b3134e78742a60f
3
+ metadata.gz: 8d0b4f6084fccf7f95d89f277e94386edb1dfa62
4
+ data.tar.gz: bf36ebec14a98f8a76b6e8c9bd2202cad4acde6e
5
5
  SHA512:
6
- metadata.gz: 658df28bd196eedfec20e21a2ce442c28c5ba913c9fc109d8ec4324ad50cc6dea342135faeb2ac27d8ce095eda2cb11b25f6a043a17d193aaf5f8b05d0f9b8b1
7
- data.tar.gz: 300c2f6fb90105b4907ad2bdf7e11b48fde67d8b58db1f5df29d7ecfec974cef5399afad19e762aa86e67a329e648d35591d41c3256d00254ecedbaad72f7aa6
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
- X-Frame-Options
21
- X-XSS-Protection
20
+ Cache-Control
21
+ ETag
22
22
  X-Content-Type-Options
23
- X-UA-Compatible
23
+ X-Frame-Options
24
24
  X-Request-Id
25
25
  X-Runtime
26
- ETag
27
- Cache-Control
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
- REQUEST_METHOD
40
- SERVER_NAME
41
- SERVER_PORT
42
- QUERY_STRING
43
- SCRIPT_NAME
34
+ action_dispatch
44
35
  CONTENT_LENGTH
45
- HTTPS
36
+ HTTP_COOKIE
46
37
  HTTP_HOST
38
+ HTTP_ORIGIN
47
39
  HTTP_USER_AGENT
48
- REMOTE_ADDR
49
- PATH_INFO
40
+ HTTPS
50
41
  ORIGINAL_FULLPATH
51
42
  ORIGINAL_SCRIPT_NAME
52
- HTTP_COOKIE
53
- HTTP_ORIGIN
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
- headers.merge!(key => request.env[key]) if EXCLUDE_REQUEST_HEADER_PATTERNS.all? { |p| !key.starts_with? p }
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
@@ -1,3 +1,3 @@
1
1
  module ReqresRspec
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
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
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-26 00:00:00.000000000 Z
11
+ date: 2014-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay