rspec_api_docs 0.4.0 → 0.5.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 +4 -8
- data/lib/rspec_api_docs/version.rb +1 -1
- data/lib/rspec_api_docs.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a6608a92ab8b58f6d615540b792ec5a79c804f90
|
|
4
|
+
data.tar.gz: f67f1c4b85651e2a6f29faa8c840192e3e0a35df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8931352c6f2acdb4ae0ad78823a752ce10a20bc0beac529b7d4f2dac9824da6da4357abad51ad9b07c48495796933d75d7525ea7df9e46c658cb46a9a3e7d653
|
|
7
|
+
data.tar.gz: da88f8e0d83089f4cfaefa4e04ab8fe042e423a8bebbef29de807103c68d1b2901d8fdbaebb4416ecf241c1014b18b0b266a6a8ceb4c1349d8ff6381eac7f90d
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# RspecApiDocs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use RspecApiDocs to generate API documentation from your RSpec tests.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**This gem is still a work in progress.**
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -22,13 +22,9 @@ Or install it yourself as:
|
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
To generate documentation, just run your API tests. eg:
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
-
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
27
|
+
$ rspec spec/controllers/api/
|
|
32
28
|
|
|
33
29
|
## Contributing
|
|
34
30
|
|
data/lib/rspec_api_docs.rb
CHANGED
|
@@ -5,7 +5,7 @@ require "rspec_api_docs/dir"
|
|
|
5
5
|
RSpec.configure do |config|
|
|
6
6
|
config.before(:suite) do
|
|
7
7
|
files_to_run = config.instance_variable_get(:@files_or_directories_to_run)
|
|
8
|
-
next unless files_to_run == ["
|
|
8
|
+
next unless files_to_run == ["spec/controllers/api/"]
|
|
9
9
|
|
|
10
10
|
api_docs_folder_path = RspecApiDocs::Dir.find_or_create_api_docs_folder_in(Rails.root)
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ RSpec.configure do |config|
|
|
|
17
17
|
begin
|
|
18
18
|
# exit unless this is under api/v*
|
|
19
19
|
files_to_run = config.instance_variable_get(:@files_or_directories_to_run)
|
|
20
|
-
next unless files_to_run == ["
|
|
20
|
+
next unless files_to_run == ["spec/controllers/api/"]
|
|
21
21
|
next unless example.metadata[:file_path].match(/api\/v\d*/)
|
|
22
22
|
next unless request && request.try(:symbolized_path_parameters)
|
|
23
23
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_api_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Kadwill
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
93
|
version: '0'
|
|
94
94
|
requirements: []
|
|
95
95
|
rubyforge_project:
|
|
96
|
-
rubygems_version: 2.
|
|
96
|
+
rubygems_version: 2.5.1
|
|
97
97
|
signing_key:
|
|
98
98
|
specification_version: 4
|
|
99
99
|
summary: Generate API blueprint docs when running Rspec
|