rspec-autoswagger 0.2.0 → 0.3.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 +4 -4
- data/README.md +16 -4
- data/lib/rspec/autoswagger/version.rb +1 -1
- data/rspec-autoswagger.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95689620c29976c98fa08c869e9bc07b0f7114ac4fca049668e10ea3df1126e5
|
4
|
+
data.tar.gz: a9df071953828329ea808924d741098f7f0d23ea4ce92df0e7681ac2de75d123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dd48a863e764690c4ca47e45f5145de10e87fe9654560a34583aec8182a964cc0ddf42a22e3e68e25d672626effe1c248f8cc1368153c17754072ffe4b6e4c4
|
7
|
+
data.tar.gz: 22109c2e1fe928b99705b68a022f29438994a3a3096d7bef0a8470a6095f03e2b6cc69586ab8a5a2ad4d12f484587904b9b593025d04381904dda977cd197a8e
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Rspec::Autoswagger
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Generate Swagger Specification file automatically by running your rspec.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -21,8 +19,18 @@ Or install it yourself as:
|
|
21
19
|
$ gem install rspec-autoswagger
|
22
20
|
|
23
21
|
## Usage
|
22
|
+
Set the location path where the result files to output.
|
23
|
+
|
24
|
+
Example of Rails below.
|
24
25
|
|
26
|
+
```ruby
|
27
|
+
# config/initializers/rspec_autoswagger.rb
|
28
|
+
Rspec::Autoswagger.doc_parts.output_path = Rails.root.to_s + '/tmp/autoswagger'
|
25
29
|
```
|
30
|
+
|
31
|
+
Write Rspec as an example below.
|
32
|
+
|
33
|
+
```ruby
|
26
34
|
# spec/requests/book_spec.rb
|
27
35
|
describe "Books" do
|
28
36
|
describe "POST /books", autoswagger: true do
|
@@ -35,8 +43,12 @@ describe "Books" do
|
|
35
43
|
end
|
36
44
|
```
|
37
45
|
|
46
|
+
Execute the command, then the result files will be generated at the location you specified.
|
47
|
+
When you execute rspec without AUTOSWAGGER=1, this gem doesn't do anything.
|
48
|
+
|
38
49
|
```
|
39
|
-
|
50
|
+
# shell-command
|
51
|
+
AUTOSWAGGER=1 rspec
|
40
52
|
```
|
41
53
|
|
42
54
|
## Development
|
data/rspec-autoswagger.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "swagger_model"
|
31
|
+
spec.add_dependency "swagger_model", '0.3.6'
|
32
32
|
spec.add_dependency "rspec"
|
33
33
|
spec.add_dependency "activesupport"
|
34
34
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-autoswagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joooee0000
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: swagger_model
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.3.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.3.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|