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: 26184f0384cca66afd8b94743448a18b662bbd36
4
- data.tar.gz: a9628d476adf0a5bdfa4a6e7ce2415df5e103a0f
3
+ metadata.gz: 50585e6ff49fb10929b563f1ca8336df6a7908c9
4
+ data.tar.gz: 73b99538ba5e7f9f198b831885ce8ee3d55fb16d
5
5
  SHA512:
6
- metadata.gz: f6d7b2eda271487ed01ed6392c31d6a05b55086cdd7ad376edfa0c7869fb766fe3e7cad6c53c3f232782e6439437c3b1dc29a7ddd594033d4abed7e5e8f3d539
7
- data.tar.gz: 87ed6bb06d5d05498a73ab3f2e20f91aaf907d95af10449628b2fa18f0d705fb92923db933206f1afb33f8f20a4f79747b773749eb12bd88645897e0e48a3f35
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/TrailingCommaInLiteral:
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?
@@ -1,4 +1,3 @@
1
- require 'pry'
2
1
  require 'rake'
3
2
  require 'rspec'
4
3
  require 'json'
@@ -1,3 +1,3 @@
1
1
  module RspecApiDocs
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
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.12.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: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler