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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 302ecdd5721c0173610c7abc72cd969207e8a1c23e4c7197198e25981c5ad1e3
4
- data.tar.gz: e93566f8824054de7f903f3756b26ae8cc192526237ce43dbe4cc9fda01045ac
3
+ metadata.gz: 95689620c29976c98fa08c869e9bc07b0f7114ac4fca049668e10ea3df1126e5
4
+ data.tar.gz: a9df071953828329ea808924d741098f7f0d23ea4ce92df0e7681ac2de75d123
5
5
  SHA512:
6
- metadata.gz: 4d11145237110fabf1892972efbf1ab7902825de094f55f1418d8a8d8bdc330c0b33359e9ef04877acc2eb83d293ea6570de422effc5db0601990c3e77e59cb4
7
- data.tar.gz: e910706c4e656eb280ae13a19852dcafae51bdf8a02fe28ccda2b803dd59c6c63c3e565fea92ca18f8309a041898925c25f4d1f2e124908a8d76fb54dea874d6
6
+ metadata.gz: 0dd48a863e764690c4ca47e45f5145de10e87fe9654560a34583aec8182a964cc0ddf42a22e3e68e25d672626effe1c248f8cc1368153c17754072ffe4b6e4c4
7
+ data.tar.gz: 22109c2e1fe928b99705b68a022f29438994a3a3096d7bef0a8470a6095f03e2b6cc69586ab8a5a2ad4d12f484587904b9b593025d04381904dda977cd197a8e
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Rspec::Autoswagger
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rspec/autoswagger`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- AUTOSWAGGER=1 bundle exec rspec
50
+ # shell-command
51
+ AUTOSWAGGER=1 rspec
40
52
  ```
41
53
 
42
54
  ## Development
@@ -1,5 +1,5 @@
1
1
  module Rspec
2
2
  module Autoswagger
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -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.2.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-15 00:00:00.000000000 Z
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: '0'
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: '0'
26
+ version: 0.3.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement