autodoc 0.7.6 → 0.7.7
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/.github/workflows/test.yml +28 -0
- data/CHANGELOG.md +9 -2
- data/Gemfile.lock +60 -60
- data/README.md +2 -2
- data/Rakefile +8 -1
- data/autodoc.gemspec +1 -1
- data/lib/autodoc/document.rb +2 -2
- data/lib/autodoc/documents.rb +2 -2
- data/lib/autodoc/version.rb +1 -1
- metadata +8 -8
- data/.circleci/config.yml +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90d6e102506091c10a1fc1406473218b594323fed27e1e45bfef8f400ba68224
|
|
4
|
+
data.tar.gz: 6b849d38814134089c42761c74023c00d81f1fd42fd7605cebd6b3ab471288b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a5735483d6d426ca94f09f06b25fcba57d04d9e6c36fc430bea071c09aac59316184f7376525894a8e6b3b38957eabd64efec5dbcd20e1c3c7476af5059ebbc0
|
|
7
|
+
data.tar.gz: 32f6204f0a142cf6b503d2ac9e1ee0b1fc194235eaa18f00651903a33127a6e948b9a2af88ffa82b29d1a2beecf0ea8709d25031e3fd71af6d75e01e381ae68f
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
ruby:
|
|
15
|
+
- 2.7.2
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v2
|
|
18
|
+
- name: Set up Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
|
22
|
+
bundler-cache: true
|
|
23
|
+
- name: rails db:setup
|
|
24
|
+
run: |
|
|
25
|
+
cd spec/dummy
|
|
26
|
+
RAILS_ENV=test bundle exec rails db:setup
|
|
27
|
+
- name: Run the default task
|
|
28
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
|
@@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
-
## 0.7.
|
|
10
|
+
## 0.7.7 - 2022-05-17
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Prefer `#media_type` to `#content_type` (for Rails 7's change).
|
|
15
|
+
- Fix `ERB.new` arguments style.
|
|
16
|
+
|
|
17
|
+
## 0.7.6 - 2021-04-22
|
|
11
18
|
|
|
12
19
|
### Fixed
|
|
13
20
|
|
|
14
21
|
- Replace `URI.unescape` with `URI.decode_www_form_component` for Ruby 3 support.
|
|
15
22
|
|
|
16
|
-
## 0.7.5
|
|
23
|
+
## 0.7.5 - 2021-02-16
|
|
17
24
|
|
|
18
25
|
### Fixed
|
|
19
26
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
autodoc (0.7.
|
|
4
|
+
autodoc (0.7.7)
|
|
5
5
|
actionpack
|
|
6
6
|
activesupport (>= 3.0.0)
|
|
7
7
|
rspec
|
|
@@ -51,39 +51,40 @@ GEM
|
|
|
51
51
|
minitest (~> 5.1)
|
|
52
52
|
tzinfo (~> 1.1)
|
|
53
53
|
arel (9.0.0)
|
|
54
|
-
builder (3.2.
|
|
55
|
-
coderay (1.1.
|
|
56
|
-
concurrent-ruby (1.1.
|
|
57
|
-
crass (1.0.
|
|
58
|
-
diff-lcs (1.
|
|
59
|
-
erubi (1.
|
|
60
|
-
globalid (0.
|
|
61
|
-
activesupport (>=
|
|
62
|
-
i18n (1.
|
|
54
|
+
builder (3.2.4)
|
|
55
|
+
coderay (1.1.3)
|
|
56
|
+
concurrent-ruby (1.1.10)
|
|
57
|
+
crass (1.0.6)
|
|
58
|
+
diff-lcs (1.5.0)
|
|
59
|
+
erubi (1.10.0)
|
|
60
|
+
globalid (1.0.0)
|
|
61
|
+
activesupport (>= 5.0)
|
|
62
|
+
i18n (1.10.0)
|
|
63
63
|
concurrent-ruby (~> 1.0)
|
|
64
|
-
loofah (2.
|
|
64
|
+
loofah (2.16.0)
|
|
65
65
|
crass (~> 1.0.2)
|
|
66
66
|
nokogiri (>= 1.5.9)
|
|
67
67
|
mail (2.7.1)
|
|
68
68
|
mini_mime (>= 0.1.1)
|
|
69
69
|
marcel (0.3.3)
|
|
70
70
|
mimemagic (~> 0.3.2)
|
|
71
|
-
method_source (0.
|
|
72
|
-
mimemagic (0.3.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
method_source (1.0.0)
|
|
72
|
+
mimemagic (0.3.10)
|
|
73
|
+
nokogiri (~> 1)
|
|
74
|
+
rake
|
|
75
|
+
mini_mime (1.1.2)
|
|
76
|
+
mini_portile2 (2.8.0)
|
|
77
|
+
minitest (5.15.0)
|
|
78
|
+
nio4r (2.5.8)
|
|
79
|
+
nokogiri (1.13.4)
|
|
80
|
+
mini_portile2 (~> 2.8.0)
|
|
79
81
|
racc (~> 1.4)
|
|
80
|
-
pry (0.
|
|
81
|
-
coderay (~> 1.1
|
|
82
|
-
method_source (~> 0
|
|
83
|
-
|
|
84
|
-
pry-rails (0.3.6)
|
|
82
|
+
pry (0.14.1)
|
|
83
|
+
coderay (~> 1.1)
|
|
84
|
+
method_source (~> 1.0)
|
|
85
|
+
pry-rails (0.3.9)
|
|
85
86
|
pry (>= 0.10.4)
|
|
86
|
-
racc (1.
|
|
87
|
+
racc (1.6.0)
|
|
87
88
|
rack (2.2.3)
|
|
88
89
|
rack-test (1.1.0)
|
|
89
90
|
rack (>= 1.0, < 3)
|
|
@@ -103,56 +104,55 @@ GEM
|
|
|
103
104
|
rails-dom-testing (2.0.3)
|
|
104
105
|
activesupport (>= 4.2.0)
|
|
105
106
|
nokogiri (>= 1.6)
|
|
106
|
-
rails-html-sanitizer (1.
|
|
107
|
-
loofah (~> 2.
|
|
107
|
+
rails-html-sanitizer (1.4.2)
|
|
108
|
+
loofah (~> 2.3)
|
|
108
109
|
railties (5.2.2)
|
|
109
110
|
actionpack (= 5.2.2)
|
|
110
111
|
activesupport (= 5.2.2)
|
|
111
112
|
method_source
|
|
112
113
|
rake (>= 0.8.7)
|
|
113
114
|
thor (>= 0.19.0, < 2.0)
|
|
114
|
-
rake (13.0.
|
|
115
|
+
rake (13.0.6)
|
|
115
116
|
redcarpet (3.5.1)
|
|
116
|
-
responders (
|
|
117
|
-
actionpack (>=
|
|
118
|
-
railties (>=
|
|
119
|
-
rspec (3.
|
|
120
|
-
rspec-core (~> 3.
|
|
121
|
-
rspec-expectations (~> 3.
|
|
122
|
-
rspec-mocks (~> 3.
|
|
123
|
-
rspec-core (3.
|
|
124
|
-
rspec-support (~> 3.
|
|
125
|
-
rspec-expectations (3.
|
|
117
|
+
responders (3.0.1)
|
|
118
|
+
actionpack (>= 5.0)
|
|
119
|
+
railties (>= 5.0)
|
|
120
|
+
rspec (3.11.0)
|
|
121
|
+
rspec-core (~> 3.11.0)
|
|
122
|
+
rspec-expectations (~> 3.11.0)
|
|
123
|
+
rspec-mocks (~> 3.11.0)
|
|
124
|
+
rspec-core (3.11.0)
|
|
125
|
+
rspec-support (~> 3.11.0)
|
|
126
|
+
rspec-expectations (3.11.0)
|
|
126
127
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
127
|
-
rspec-support (~> 3.
|
|
128
|
-
rspec-mocks (3.
|
|
128
|
+
rspec-support (~> 3.11.0)
|
|
129
|
+
rspec-mocks (3.11.1)
|
|
129
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
|
-
rspec-support (~> 3.
|
|
131
|
-
rspec-rails (
|
|
132
|
-
actionpack (>=
|
|
133
|
-
activesupport (>=
|
|
134
|
-
railties (>=
|
|
135
|
-
rspec-core (~> 3.
|
|
136
|
-
rspec-expectations (~> 3.
|
|
137
|
-
rspec-mocks (~> 3.
|
|
138
|
-
rspec-support (~> 3.
|
|
139
|
-
rspec-support (3.
|
|
140
|
-
|
|
141
|
-
sprockets (3.7.2)
|
|
131
|
+
rspec-support (~> 3.11.0)
|
|
132
|
+
rspec-rails (5.1.1)
|
|
133
|
+
actionpack (>= 5.2)
|
|
134
|
+
activesupport (>= 5.2)
|
|
135
|
+
railties (>= 5.2)
|
|
136
|
+
rspec-core (~> 3.10)
|
|
137
|
+
rspec-expectations (~> 3.10)
|
|
138
|
+
rspec-mocks (~> 3.10)
|
|
139
|
+
rspec-support (~> 3.10)
|
|
140
|
+
rspec-support (3.11.0)
|
|
141
|
+
sprockets (4.0.3)
|
|
142
142
|
concurrent-ruby (~> 1.0)
|
|
143
143
|
rack (> 1, < 3)
|
|
144
|
-
sprockets-rails (3.2
|
|
145
|
-
actionpack (>=
|
|
146
|
-
activesupport (>=
|
|
144
|
+
sprockets-rails (3.4.2)
|
|
145
|
+
actionpack (>= 5.2)
|
|
146
|
+
activesupport (>= 5.2)
|
|
147
147
|
sprockets (>= 3.0.0)
|
|
148
148
|
sqlite3 (1.3.13)
|
|
149
|
-
thor (
|
|
149
|
+
thor (1.2.1)
|
|
150
150
|
thread_safe (0.3.6)
|
|
151
|
-
tzinfo (1.2.
|
|
151
|
+
tzinfo (1.2.9)
|
|
152
152
|
thread_safe (~> 0.1)
|
|
153
|
-
weak_parameters (0.
|
|
153
|
+
weak_parameters (0.5.0)
|
|
154
154
|
rails (>= 4.0.0)
|
|
155
|
-
websocket-driver (0.7.
|
|
155
|
+
websocket-driver (0.7.5)
|
|
156
156
|
websocket-extensions (>= 0.1.0)
|
|
157
157
|
websocket-extensions (0.1.5)
|
|
158
158
|
|
|
@@ -169,7 +169,7 @@ DEPENDENCIES
|
|
|
169
169
|
redcarpet
|
|
170
170
|
responders
|
|
171
171
|
rspec-rails
|
|
172
|
-
sqlite3
|
|
172
|
+
sqlite3 (~> 1.3.13)
|
|
173
173
|
weak_parameters
|
|
174
174
|
|
|
175
175
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Autodoc
|
|
2
2
|
|
|
3
|
-
[](https://github.com/r7kamura/autodoc/actions/workflows/test.yml)
|
|
4
4
|
[](https://rubygems.org/gems/autodoc)
|
|
5
5
|
|
|
6
6
|
Generate documentation from your rack application & request-spec.
|
|
@@ -17,7 +17,7 @@ gem "redcarpet", group: :test
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
|
-
Run rspec with AUTODOC=1 to generate documents for your request-specs tagged with `:autodoc`.
|
|
20
|
+
Run rspec with AUTODOC=1 to generate documents for your request-specs tagged with `:autodoc`.
|
|
21
21
|
example: Autodoc generates [doc/recipes.md](https://github.com/r7kamura/autodoc/blob/master/spec/dummy/doc/recipes.md) and [doc/toc.md](https://github.com/r7kamura/autodoc/blob/master/spec/dummy/doc/toc.md) from [spec/requests/recipes_spec.rb](https://github.com/r7kamura/autodoc/blob/master/spec/requests/recipes_spec.rb).
|
|
22
22
|
|
|
23
23
|
```sh
|
data/Rakefile
CHANGED
data/autodoc.gemspec
CHANGED
|
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
|
24
24
|
spec.add_development_dependency "rails", "5.2.2"
|
|
25
25
|
spec.add_development_dependency "rake"
|
|
26
|
-
spec.add_development_dependency "sqlite3"
|
|
26
|
+
spec.add_development_dependency "sqlite3", "~> 1.3.13"
|
|
27
27
|
end
|
data/lib/autodoc/document.rb
CHANGED
|
@@ -27,7 +27,7 @@ module Autodoc
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def render
|
|
30
|
-
ERB.new(Autodoc.configuration.template,
|
|
30
|
+
ERB.new(Autodoc.configuration.template, trim_mode: "-").result(binding)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def title
|
|
@@ -119,7 +119,7 @@ module Autodoc
|
|
|
119
119
|
else
|
|
120
120
|
@request_body = begin
|
|
121
121
|
case
|
|
122
|
-
when request.try(:
|
|
122
|
+
when request.try(:media_type) == "multipart/form-data"
|
|
123
123
|
"multipart/form-data"
|
|
124
124
|
when request.headers["Content-Type"].try(:include?, "application/json")
|
|
125
125
|
request_body_parsed_as_json
|
data/lib/autodoc/documents.rb
CHANGED
|
@@ -33,7 +33,7 @@ module Autodoc
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def render_toc
|
|
36
|
-
ERB.new(Autodoc.configuration.toc_template,
|
|
36
|
+
ERB.new(Autodoc.configuration.toc_template, trim_mode: "-").result(binding)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def write_toc_html
|
|
@@ -42,7 +42,7 @@ module Autodoc
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def render_toc_html
|
|
45
|
-
ERB.new(Autodoc.configuration.toc_html_template,
|
|
45
|
+
ERB.new(Autodoc.configuration.toc_html_template, trim_mode: "-").result(binding)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def toc_path
|
data/lib/autodoc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autodoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -98,16 +98,16 @@ dependencies:
|
|
|
98
98
|
name: sqlite3
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- - "
|
|
101
|
+
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
103
|
+
version: 1.3.13
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
|
-
- - "
|
|
108
|
+
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
110
|
+
version: 1.3.13
|
|
111
111
|
description:
|
|
112
112
|
email:
|
|
113
113
|
- r7kamura@gmail.com
|
|
@@ -115,7 +115,7 @@ executables: []
|
|
|
115
115
|
extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
|
-
- ".
|
|
118
|
+
- ".github/workflows/test.yml"
|
|
119
119
|
- ".gitignore"
|
|
120
120
|
- CHANGELOG.md
|
|
121
121
|
- Gemfile
|
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
201
201
|
- !ruby/object:Gem::Version
|
|
202
202
|
version: '0'
|
|
203
203
|
requirements: []
|
|
204
|
-
rubygems_version: 3.1.
|
|
204
|
+
rubygems_version: 3.1.6
|
|
205
205
|
signing_key:
|
|
206
206
|
specification_version: 4
|
|
207
207
|
summary: Auto-generate JSON API documents from your request-specs.
|
data/.circleci/config.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
jobs:
|
|
2
|
-
rspec:
|
|
3
|
-
docker:
|
|
4
|
-
- image: ruby:2.5.3
|
|
5
|
-
steps:
|
|
6
|
-
- checkout
|
|
7
|
-
- restore_cache:
|
|
8
|
-
keys:
|
|
9
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
10
|
-
- v1-dependencies-
|
|
11
|
-
- run:
|
|
12
|
-
command: bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
13
|
-
name: bundle install
|
|
14
|
-
- save_cache:
|
|
15
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
16
|
-
paths:
|
|
17
|
-
- ./vendor/bundle
|
|
18
|
-
- run:
|
|
19
|
-
command: cd spec/dummy && RAILS_ENV=test bundle exec rails db:setup
|
|
20
|
-
name: rails db:setup
|
|
21
|
-
- run:
|
|
22
|
-
command: bundle exec rspec
|
|
23
|
-
name: rspec
|
|
24
|
-
version: 2
|
|
25
|
-
workflows:
|
|
26
|
-
version: 2
|
|
27
|
-
test:
|
|
28
|
-
jobs:
|
|
29
|
-
- rspec
|