rpdoc 0.1.13 → 0.1.15
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/.gitlab/.keep +0 -0
- data/.gitlab/issue_templates/.keep +0 -0
- data/.gitlab/issue_templates/Default.md +9 -0
- data/.gitlab/merge_request_templates/.keep +0 -0
- data/.gitlab/merge_request_templates/Default.md +9 -0
- data/.gitlab-ci.yml +2 -2
- data/CHANGELOG.md +9 -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
- data/rpdoc.gemspec +4 -0
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1aefef23fd434bcdaf54e5f5410fff34ae86c53a4d3f2a795b06554311c2f67
|
4
|
+
data.tar.gz: bc37d48a0756e244f275412494db34ebd500462346c5956dfed39868f843b707
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1e38d33361a4934dc65176d65bca4a2c8fc872da02c7a1daf82c515c34043e6514682c7aa0975c2480a2076268b74ff14e33e4a3613d8d9a9e99613f9c5c1b
|
7
|
+
data.tar.gz: a0777048f84cfde4a0bfd6ce6c3d8d161f80c0f9280900dda449c34c6eb7317730afc171e3665fa64f9e3cc77121907dc84a28979154624923269632041aeb24
|
data/.gitlab/.keep
ADDED
File without changes
|
File without changes
|
File without changes
|
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,12 @@
|
|
1
|
+
## [0.1.15] - 2023-05-18
|
2
|
+
- Add gitlab templates.
|
3
|
+
- Update gemspec.
|
4
|
+
|
5
|
+
## [0.1.14] - 2023-02-09
|
6
|
+
- Fix File object method `exists` has been removed error at Ruby 3.2.1.
|
7
|
+
- [Removed deprecated Dir.exists? and File.exists?](https://github.com/ruby/ruby/commit/bf97415c02b11a8949f715431aca9eeb6311add2)
|
8
|
+
- Add the notice at README.md
|
9
|
+
|
1
10
|
## [0.1.13] - 2022-10-03
|
2
11
|
- Clean empty folders by default
|
3
12
|
|
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.15
|
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
data/rpdoc.gemspec
CHANGED
@@ -13,6 +13,10 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/kdan-mobile-software-ltd/rpdoc"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
16
|
+
spec.metadata = {
|
17
|
+
"source_code_uri" => "https://github.com/kdan-mobile-software-ltd/rpdoc",
|
18
|
+
"changelog_uri" => "https://github.com/kdan-mobile-software-ltd/rpdoc/blob/master/CHANGELOG.md"
|
19
|
+
}
|
16
20
|
|
17
21
|
# Specify which files should be added to the gem when it is released.
|
18
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
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.15
|
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-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_requester
|
@@ -90,6 +90,11 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
92
|
- ".gitlab-ci.yml"
|
93
|
+
- ".gitlab/.keep"
|
94
|
+
- ".gitlab/issue_templates/.keep"
|
95
|
+
- ".gitlab/issue_templates/Default.md"
|
96
|
+
- ".gitlab/merge_request_templates/.keep"
|
97
|
+
- ".gitlab/merge_request_templates/Default.md"
|
93
98
|
- ".rubocop.yml"
|
94
99
|
- CHANGELOG.md
|
95
100
|
- Gemfile
|
@@ -113,7 +118,9 @@ files:
|
|
113
118
|
homepage: https://github.com/kdan-mobile-software-ltd/rpdoc
|
114
119
|
licenses:
|
115
120
|
- MIT
|
116
|
-
metadata:
|
121
|
+
metadata:
|
122
|
+
source_code_uri: https://github.com/kdan-mobile-software-ltd/rpdoc
|
123
|
+
changelog_uri: https://github.com/kdan-mobile-software-ltd/rpdoc/blob/master/CHANGELOG.md
|
117
124
|
post_install_message:
|
118
125
|
rdoc_options: []
|
119
126
|
require_paths:
|
@@ -129,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
136
|
- !ruby/object:Gem::Version
|
130
137
|
version: '0'
|
131
138
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
139
|
+
rubygems_version: 3.4.6
|
133
140
|
signing_key:
|
134
141
|
specification_version: 4
|
135
142
|
summary: RSpec to Postman Documentation Tool
|