rspec-api-docs 0.12.0 → 0.13.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50585e6ff49fb10929b563f1ca8336df6a7908c9
|
|
4
|
+
data.tar.gz: 73b99538ba5e7f9f198b831885ce8ee3d55fb16d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0e7d6c7e81d08daeb36364438b1fd1bf28c2508c23b05607e3a9a28fadb9f4df3b7b0037dd8ae709fb212ed6e302910176fae35ea2453beb5114c57b6ca3395
|
|
7
|
+
data.tar.gz: 1b3f74d08627bf8966f154136b7c89f6131f92e177f2a5eeca3ac014ccfbcb1a5224aa80903a698f0a96ffaaba6efae404ddd9fb5b4fe3ad01aae89bbebe2dd0
|
data/.rubocop.yml
CHANGED
|
@@ -39,7 +39,10 @@ Layout/SpaceInsideBlockBraces:
|
|
|
39
39
|
Style/StringLiterals:
|
|
40
40
|
EnforcedStyle: single_quotes
|
|
41
41
|
|
|
42
|
-
Style/
|
|
42
|
+
Style/TrailingCommaInArrayLiteral:
|
|
43
|
+
EnforcedStyleForMultiline: comma
|
|
44
|
+
|
|
45
|
+
Style/TrailingCommaInHashLiteral:
|
|
43
46
|
EnforcedStyleForMultiline: comma
|
|
44
47
|
|
|
45
48
|
Style/TrailingCommaInArguments:
|
|
@@ -18,13 +18,15 @@ module RspecApiDocs
|
|
|
18
18
|
:output_dir,
|
|
19
19
|
:renderer,
|
|
20
20
|
:validate_params,
|
|
21
|
-
:exclude_request_headers
|
|
21
|
+
:exclude_request_headers,
|
|
22
|
+
:exclude_response_headers
|
|
22
23
|
|
|
23
24
|
def initialize
|
|
24
25
|
@output_dir = 'docs'
|
|
25
26
|
@renderer = :json
|
|
26
27
|
@validate_params = true
|
|
27
28
|
@exclude_request_headers = []
|
|
29
|
+
@exclude_response_headers = []
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
end
|
|
@@ -63,7 +63,7 @@ module RspecApiDocs
|
|
|
63
63
|
response_status: response.status,
|
|
64
64
|
response_status_text: response_status_text(response.status),
|
|
65
65
|
response_body: response_body(response.body),
|
|
66
|
-
response_headers: response.headers,
|
|
66
|
+
response_headers: response_headers(response.headers),
|
|
67
67
|
response_content_type: response.content_type,
|
|
68
68
|
}
|
|
69
69
|
end
|
|
@@ -111,6 +111,14 @@ module RspecApiDocs
|
|
|
111
111
|
RequestHeaders.call(env)
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
def response_headers(headers)
|
|
115
|
+
excluded_headers = RspecApiDocs.configuration.exclude_response_headers
|
|
116
|
+
|
|
117
|
+
headers.reject do |k, v|
|
|
118
|
+
excluded_headers.include?(k)
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
114
122
|
def request_path(request)
|
|
115
123
|
URI(request.path).tap do |uri|
|
|
116
124
|
uri.query = request.query_string unless request.query_string.empty?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-api-docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Odin Dutton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|