rpdoc 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +5 -2
- data/LICENSE +1 -1
- data/README.md +14 -0
- data/VERSION.md +1 -1
- data/lib/rpdoc/helper.rb +1 -1
- data/lib/rpdoc/postman_response.rb +2 -2
- data/lib/rpdoc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aa96c76973dbdc52d2bf391d6cd1dd9561be44290e83b7a1b81cf02a067f36a
|
4
|
+
data.tar.gz: 0f93b3d7646b53be728867ce218acc78e7672bae09ae8075657311aa5f43d517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ed1646334c6d66e9a144fbe7f3a7212c94184486b0237e162278ad7a89ce1a7699e6b787aa0861083579bcb277cf27a202f0bb4321e2561f38b2724156a00d
|
7
|
+
data.tar.gz: 1d52b4c71c8188b9e51e07cdbf05a31b26231aa0f0af712b496d89b8c0ce494e50c96f8c5636a0b43dc03685e1cec7d90d183ddfb577e00918d49047ead3e488
|
data/.gitlab-ci.yml
CHANGED
@@ -4,7 +4,7 @@ stages:
|
|
4
4
|
|
5
5
|
rspec:
|
6
6
|
stage: rspec
|
7
|
-
image: ruby:3.
|
7
|
+
image: ruby:3.2.1
|
8
8
|
script:
|
9
9
|
- bundle install
|
10
10
|
- RPDOC_ENABLE=false rspec spec -fd
|
@@ -13,7 +13,7 @@ rspec:
|
|
13
13
|
|
14
14
|
to_gem:
|
15
15
|
stage: publish
|
16
|
-
image: ruby:3.
|
16
|
+
image: ruby:3.2.1
|
17
17
|
script:
|
18
18
|
- mkdir -p ~/.gem
|
19
19
|
- touch ~/.gem/credentials
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [0.1.14] - 2023-02-09
|
2
|
+
- Fix File object method `exists` has been removed error at Ruby 3.2.1.
|
3
|
+
- [Removed deprecated Dir.exists? and File.exists?](https://github.com/ruby/ruby/commit/bf97415c02b11a8949f715431aca9eeb6311add2)
|
4
|
+
- Add the notice at README.md
|
5
|
+
|
1
6
|
## [0.1.13] - 2022-10-03
|
2
7
|
- Clean empty folders by default
|
3
8
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rpdoc (0.1.
|
4
|
+
rpdoc (0.1.14)
|
5
5
|
json_requester (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -47,6 +47,8 @@ GEM
|
|
47
47
|
nokogiri (>= 1.5.9)
|
48
48
|
method_source (1.0.0)
|
49
49
|
minitest (5.16.3)
|
50
|
+
nokogiri (1.13.8-arm64-darwin)
|
51
|
+
racc (~> 1.4)
|
50
52
|
nokogiri (1.13.8-x86_64-darwin)
|
51
53
|
racc (~> 1.4)
|
52
54
|
parallel (1.22.1)
|
@@ -108,6 +110,7 @@ GEM
|
|
108
110
|
zeitwerk (2.6.1)
|
109
111
|
|
110
112
|
PLATFORMS
|
113
|
+
arm64-darwin-20
|
111
114
|
x86_64-darwin-19
|
112
115
|
|
113
116
|
DEPENDENCIES
|
@@ -118,4 +121,4 @@ DEPENDENCIES
|
|
118
121
|
rubocop (~> 1.0)
|
119
122
|
|
120
123
|
BUNDLED WITH
|
121
|
-
2.
|
124
|
+
2.3.4
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2023 Kdan Mobile Software Ltd.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -132,6 +132,20 @@ end
|
|
132
132
|
|
133
133
|
4. You can write description for your Postman collection by creating markdown files (named `description.md`) and putting each of them in corresponding location under `rpdoc` folder.
|
134
134
|
|
135
|
+
## Notice
|
136
|
+
|
137
|
+
If you try to mock the `File.open` method, generating collection data will fail because creating `request.json` use the `File.open` method.
|
138
|
+
|
139
|
+
Solution:
|
140
|
+
|
141
|
+
You can add code in RSpec.
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
after(:each) do
|
145
|
+
allow(File).to receive(:open).and_call_original
|
146
|
+
end
|
147
|
+
```
|
148
|
+
|
135
149
|
## License
|
136
150
|
|
137
151
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/VERSION.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.14
|
data/lib/rpdoc/helper.rb
CHANGED
@@ -6,7 +6,7 @@ RSpec.configure do |config|
|
|
6
6
|
root = Rpdoc.configuration.rpdoc_root
|
7
7
|
if Rpdoc.configuration.rpdoc_enable
|
8
8
|
raise StandardError.new('Configuration Invalid') unless Rpdoc.configuration.valid?
|
9
|
-
FileUtils.mkdir_p(root) unless File.
|
9
|
+
FileUtils.mkdir_p(root) unless File.exist?(root)
|
10
10
|
Dir.glob("#{root}/**/*.json") do |filename|
|
11
11
|
File.delete(filename)
|
12
12
|
end
|
@@ -18,10 +18,10 @@ module Rpdoc
|
|
18
18
|
def save
|
19
19
|
root_path ||= @configuration.rpdoc_root
|
20
20
|
folder_path = "#{root_path}/#{@rspec_example.metadata[:rpdoc_example_folders].join('/')}/#{@rspec_example.metadata[:rpdoc_action_key]}"
|
21
|
-
FileUtils.mkdir_p(folder_path) unless File.
|
21
|
+
FileUtils.mkdir_p(folder_path) unless File.exist?(folder_path)
|
22
22
|
|
23
23
|
request_file_path = "#{folder_path}/#{@configuration.rpdoc_request_filename}"
|
24
|
-
File.open(request_file_path, 'w+') { |f| f.write(JSON.pretty_generate(request_data)) } unless File.
|
24
|
+
File.open(request_file_path, 'w+') { |f| f.write(JSON.pretty_generate(request_data)) } unless File.exist?(request_file_path)
|
25
25
|
|
26
26
|
response_file_path = "#{folder_path}/#{@rspec_example.metadata[:rpdoc_example_key]}.json"
|
27
27
|
File.open(response_file_path, 'w+') { |f| f.write(JSON.pretty_generate(response_data)) }
|
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.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yuntai
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_requester
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.4.6
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: RSpec to Postman Documentation Tool
|