rpdoc 0.2.0 → 0.2.1
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/CHANGELOG.md +4 -0
- data/VERSION.md +1 -1
- data/lib/rpdoc/configuration.rb +1 -1
- data/lib/rpdoc/postman_collection.rb +1 -1
- data/lib/rpdoc/postman_response.rb +4 -2
- data/lib/rpdoc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 614c1855e12f3279570419fc23b7ce0af9849a4f2a8cf9a333b8f53013927cde
|
|
4
|
+
data.tar.gz: f0b61a84a3e26b447227368ccd2fae5e4723f4d15c2b75b42df569b005fd057b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dd60eaf51e2c3a466782a13c028a0a1f4ff99540b73c435ae7b9e4b4c22893bfdb7a405906639995d017d21a3906fae066d5e536ccc3cc91820921603806be6
|
|
7
|
+
data.tar.gz: c6e1c5cb2c221f484905182f112151621d73c2226b9383d26d60f63df8287a807e6ef49a50e53fa3897de79af3f1d9fc39bf47532481800e47b392435318f46d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [0.2.1] - 2024-04-11
|
|
2
|
+
- Fix `rspec_response_identifier` option bug.
|
|
3
|
+
- Fix path bug for redirected requests and `push_and_update` strategy.
|
|
4
|
+
|
|
1
5
|
## [0.2.0] - 2024-04-02
|
|
2
6
|
- Add `rspec_root`, `rspec_response_allow_headers`, and `rspec_response_identifier` options to configuration.
|
|
3
7
|
- Add public method `merge!` for PostmanCollection.
|
data/VERSION.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.1
|
data/lib/rpdoc/configuration.rb
CHANGED
|
@@ -66,7 +66,7 @@ module Rpdoc
|
|
|
66
66
|
def valid?
|
|
67
67
|
return true unless @rpdoc_enable && @rpdoc_auto_push
|
|
68
68
|
return false if @postman_apikey.nil?
|
|
69
|
-
return false unless RSPEC_RESPONSE_IDENTIFIERS.include?(@rspec_response_identifier
|
|
69
|
+
return false unless RSPEC_RESPONSE_IDENTIFIERS.include?(@rspec_response_identifier&.to_sym)
|
|
70
70
|
return false unless RPDOC_AUTO_PUSH_STRATEGIES.include?(@rpdoc_auto_push_strategy.to_sym)
|
|
71
71
|
return false if @rpdoc_auto_push_strategy == :push_and_update && @collection_uid.nil?
|
|
72
72
|
return false if @rpdoc_folder_ordering.present? && (RPDOC_FOLDER_ORDERING.exclude?(@rpdoc_folder_ordering) || !@rpdoc_folder_ordering.is_a?(Array))
|
|
@@ -144,7 +144,7 @@ module Rpdoc
|
|
|
144
144
|
item_hash[from_item_name][:description] = from_item[:description]
|
|
145
145
|
insert_generated_responses_into(item_hash[from_item_name][:item], from_collection_items: from_item[:item].to_a)
|
|
146
146
|
elsif from_item.has_key?(:response) && item_hash[from_item_name].has_key?(:response)
|
|
147
|
-
item_hash[from_item_name][:request]
|
|
147
|
+
item_hash[from_item_name][:request] = from_item[:request].deep_dup
|
|
148
148
|
item_hash[from_item_name][:response] += from_item[:response].deep_dup
|
|
149
149
|
else
|
|
150
150
|
collection_items << from_item.deep_dup
|
|
@@ -84,13 +84,15 @@ module Rpdoc
|
|
|
84
84
|
text: 'text'
|
|
85
85
|
}
|
|
86
86
|
end.compact
|
|
87
|
+
|
|
88
|
+
original_path = @rspec_request.original_fullpath.split('?').first # use original_fullpath instead of path to avoid request being redirected
|
|
87
89
|
{
|
|
88
90
|
method: @rspec_request.method,
|
|
89
91
|
header: filter_headers,
|
|
90
92
|
url: {
|
|
91
|
-
raw: "#{@configuration.rspec_server_host}#{
|
|
93
|
+
raw: "#{@configuration.rspec_server_host}#{original_path}",
|
|
92
94
|
host: [@configuration.rspec_server_host],
|
|
93
|
-
path:
|
|
95
|
+
path: original_path.split('/'),
|
|
94
96
|
query: query_string
|
|
95
97
|
},
|
|
96
98
|
body: original_request_data_body
|
data/lib/rpdoc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rpdoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yuntai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json_requester
|