autodoc 0.7.0 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +29 -0
- data/.gitignore +0 -1
- data/CHANGELOG.md +217 -81
- data/Gemfile +0 -1
- data/Gemfile.lock +176 -0
- data/README.md +4 -0
- data/autodoc.gemspec +1 -1
- data/lib/autodoc/document.rb +3 -3
- data/lib/autodoc/templates/toc.md.erb +1 -1
- data/lib/autodoc/version.rb +1 -1
- data/spec/autodoc/documents_spec.rb +1 -1
- data/spec/dummy/app/controllers/recipes_controller.rb +1 -1
- data/spec/dummy/app/models/recipe.rb +0 -1
- data/spec/dummy/config/application.rb +1 -2
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/requests/recipes_spec.rb +7 -7
- metadata +7 -8
- data/spec/dummy/spec +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3acbd0ba59fffe8699bedf783ae8528444ec317a18ab6d4986b6cdae287f3cf
|
4
|
+
data.tar.gz: 70125ed64d16b22668593f644b2a1261232c9962d14eb5418be83e9614559b3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 713e695c00c58ccd8d0a5081aebfac6e125b30db230a73530206741621a45d97d022ee663ea61e1cfc061dc8f468c963a173897aa131a1d30ade9dec7a677e59
|
7
|
+
data.tar.gz: d23954933a488e1bfadc57ed32bae4fa03623dcf65cc0f0e2d8392f766f8c88b083d98fa8e195f780e97020e4187e1074f497165e681cde7dd05efdedf78f124
|
@@ -0,0 +1,29 @@
|
|
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
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,158 +1,294 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
|
4
|
-
- Use `#to_hash` to response headers if it can respond it
|
3
|
+
All notable changes to this project will be documented in this file.
|
5
4
|
|
6
|
-
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
|
8
|
+
## Unreleased
|
9
9
|
|
10
|
-
## 0.
|
10
|
+
## 0.7.5
|
11
11
|
|
12
|
-
|
12
|
+
### Fixed
|
13
13
|
|
14
|
-
|
14
|
+
- Convert header key to string.
|
15
15
|
|
16
|
-
|
16
|
+
## 0.7.4 - 2020-04-14
|
17
17
|
|
18
|
-
|
18
|
+
### Fixed
|
19
19
|
|
20
|
-
-
|
20
|
+
- Improve error message on no request case.
|
21
21
|
|
22
|
-
## 0.
|
22
|
+
## 0.7.3 - 2019-06-18
|
23
23
|
|
24
|
-
|
24
|
+
### Fixed
|
25
25
|
|
26
|
-
|
26
|
+
- Fix indent in toc template.
|
27
27
|
|
28
|
-
|
28
|
+
## 0.7.2 - 2019-01-09
|
29
29
|
|
30
|
-
|
30
|
+
### Fixed
|
31
31
|
|
32
|
-
-
|
32
|
+
- Fixed broken symlink on spec/dummy/spec.
|
33
33
|
|
34
|
-
## 0.
|
34
|
+
## 0.7.1 - 2018-12-18
|
35
35
|
|
36
|
-
|
36
|
+
## 0.7.0 - 2018-08-30
|
37
37
|
|
38
|
-
|
38
|
+
### Changed
|
39
39
|
|
40
|
-
-
|
40
|
+
- Shell-escape given path.
|
41
|
+
- Use `#to_hash` to response headers if it can respond it.
|
41
42
|
|
42
|
-
## 0.
|
43
|
+
## 0.6.2 - 2017-08-22
|
43
44
|
|
44
|
-
|
45
|
+
### Fixed
|
45
46
|
|
46
|
-
|
47
|
+
- Support multibyte query parameters.
|
47
48
|
|
48
|
-
|
49
|
+
## 0.6.1 - 2017-05-30
|
49
50
|
|
50
|
-
|
51
|
+
### Fixed
|
51
52
|
|
52
|
-
-
|
53
|
+
- Fix Ruby-level warnings.
|
53
54
|
|
54
|
-
## 0.
|
55
|
+
## 0.6.0 - 2016-03-03
|
55
56
|
|
56
|
-
|
57
|
+
### Changed
|
57
58
|
|
58
|
-
|
59
|
+
- Change the message capitalization rule.
|
59
60
|
|
60
|
-
|
61
|
+
## 0.5.3 - 2016-02-19
|
61
62
|
|
62
|
-
|
63
|
+
### Fixed
|
63
64
|
|
64
|
-
-
|
65
|
+
- Fix bugs on pending examples.
|
65
66
|
|
66
|
-
## 0.
|
67
|
+
## 0.5.2 - 2015-09-18
|
67
68
|
|
68
|
-
|
69
|
+
### Fixed
|
69
70
|
|
70
|
-
|
71
|
+
- Fix version detector.
|
71
72
|
|
72
|
-
|
73
|
+
## 0.5.1 - 2015-06-28
|
73
74
|
|
74
|
-
|
75
|
+
### Fixed
|
75
76
|
|
76
|
-
- Fix
|
77
|
+
- Fix lambda syntax.
|
77
78
|
|
78
|
-
## 0.
|
79
|
+
## 0.5.0 - 2015-04-22
|
79
80
|
|
80
|
-
|
81
|
-
- filter request & response header by Autodoc.configuration.suppress_{request,response}_header
|
81
|
+
### Added
|
82
82
|
|
83
|
-
|
83
|
+
- Add `Autodoc.configuration.document_path_from_example`.
|
84
84
|
|
85
|
-
|
85
|
+
## 0.4.5 - 2015-04-10
|
86
86
|
|
87
|
-
|
87
|
+
### Added
|
88
88
|
|
89
|
-
-
|
89
|
+
- Support other specs directory than spec/requests.
|
90
90
|
|
91
|
-
## 0.
|
91
|
+
## 0.4.4 - 2015-03-31
|
92
92
|
|
93
|
-
|
93
|
+
### Added
|
94
94
|
|
95
|
-
|
95
|
+
- Support image response.
|
96
96
|
|
97
|
-
|
97
|
+
## 0.4.3 - 2015-02-28
|
98
98
|
|
99
|
-
|
99
|
+
### Added
|
100
100
|
|
101
|
-
-
|
102
|
-
- use Autodoc.configuration.path to change documents path
|
101
|
+
- Support nested parameters on weak_parameters.
|
103
102
|
|
104
|
-
## 0.2
|
103
|
+
## 0.4.2 - 2015-02-13
|
105
104
|
|
106
|
-
|
105
|
+
### Added
|
107
106
|
|
108
|
-
|
107
|
+
- Add HTML Documentation support.
|
109
108
|
|
110
|
-
|
109
|
+
## 0.4.1 - 2015-01-13
|
111
110
|
|
112
|
-
|
111
|
+
### Added
|
113
112
|
|
114
|
-
-
|
113
|
+
- Support RSpec 2.99.
|
115
114
|
|
116
|
-
## 0.
|
115
|
+
## 0.4.0 - 2014-10-29
|
117
116
|
|
118
|
-
|
117
|
+
### Added
|
119
118
|
|
120
|
-
|
119
|
+
- Support RSpec 3.
|
121
120
|
|
122
|
-
|
121
|
+
## 0.3.6 - 2014-05-19
|
123
122
|
|
124
|
-
|
123
|
+
### Added
|
125
124
|
|
126
|
-
-
|
125
|
+
- Show dummy message if Content-Type might be BINARY.
|
127
126
|
|
128
|
-
## 0.
|
127
|
+
## 0.3.5 - 2014-02-15
|
129
128
|
|
130
|
-
|
129
|
+
### Added
|
131
130
|
|
132
|
-
|
131
|
+
- Support PATCH method.
|
133
132
|
|
134
|
-
|
133
|
+
## 0.3.4 - 2014-01-24
|
135
134
|
|
136
|
-
|
135
|
+
### Added
|
137
136
|
|
138
|
-
-
|
137
|
+
- Some improvements on the document template file.
|
139
138
|
|
140
|
-
## 0.
|
139
|
+
## 0.3.3 - 2013-12-30
|
141
140
|
|
142
|
-
|
141
|
+
### Fixed
|
143
142
|
|
144
|
-
|
143
|
+
- Fix ToC template for specs in sub-directory.
|
145
144
|
|
146
|
-
|
145
|
+
## 0.3.2 - 2013-12-18
|
147
146
|
|
148
|
-
|
147
|
+
### Fixed
|
149
148
|
|
150
|
-
-
|
149
|
+
- Fix template & document bug.
|
151
150
|
|
152
|
-
## 0.
|
151
|
+
## 0.3.1 - 2013-12-17
|
153
152
|
|
154
|
-
|
153
|
+
### Added
|
155
154
|
|
156
|
-
|
155
|
+
- Filter request & response header by Autodoc.configuration.suppress_{request,response}_header.
|
157
156
|
|
158
|
-
|
157
|
+
### Changed
|
158
|
+
|
159
|
+
- Prettify JSON request body.
|
160
|
+
|
161
|
+
## 0.3.0 - 2013-12-17
|
162
|
+
|
163
|
+
### Changed
|
164
|
+
|
165
|
+
- Change Autodoc::Document interface & template to mimic HTTP text.
|
166
|
+
|
167
|
+
## 0.2.8 - 2013-12-17
|
168
|
+
|
169
|
+
### Changed
|
170
|
+
|
171
|
+
- Include query string into document template.
|
172
|
+
|
173
|
+
## 0.2.7 - 2013-12-05
|
174
|
+
|
175
|
+
### Changed
|
176
|
+
|
177
|
+
- Sort list in ToC.
|
178
|
+
|
179
|
+
## 0.2.6 - 2013-12-02
|
180
|
+
|
181
|
+
### Fixed
|
182
|
+
|
183
|
+
- Fix ToC generator.
|
184
|
+
|
185
|
+
## 0.2.5 - 2013-11-30
|
186
|
+
|
187
|
+
### Added
|
188
|
+
|
189
|
+
- Add ToC generator.
|
190
|
+
- Use Autodoc.configuration.path to change documents path.
|
191
|
+
|
192
|
+
## 0.2.4 - 2013-11-30
|
193
|
+
|
194
|
+
### Added
|
195
|
+
|
196
|
+
- Add Documents class.
|
197
|
+
|
198
|
+
## 0.2.3 - 2013-11-30
|
199
|
+
|
200
|
+
### Changed
|
201
|
+
|
202
|
+
- Clean up dependencies & implementation.
|
203
|
+
|
204
|
+
## 0.2.2 - 2013-11-29
|
205
|
+
|
206
|
+
### Fixed
|
207
|
+
|
208
|
+
- Fix default documented headers.
|
209
|
+
|
210
|
+
## 0.2.1 - 2013-11-29
|
211
|
+
|
212
|
+
### Fixed
|
213
|
+
|
214
|
+
- Fix load dependency on rspec.
|
215
|
+
|
216
|
+
## 0.2.0 - 2013-11-29
|
217
|
+
|
218
|
+
### Changed
|
219
|
+
|
220
|
+
- Remove dependency on awesome_print.
|
221
|
+
|
222
|
+
## 0.1.9 - 2013-11-01
|
223
|
+
|
224
|
+
### Fixed
|
225
|
+
|
226
|
+
- Fix encoding error at ruby 1.9 or earlier versions.
|
227
|
+
|
228
|
+
## 0.1.8 - 2013-10-23
|
229
|
+
|
230
|
+
### Added
|
231
|
+
|
232
|
+
- Support rack-test.
|
233
|
+
|
234
|
+
## 0.1.7 - 2013-10-08
|
235
|
+
|
236
|
+
### Changed
|
237
|
+
|
238
|
+
- Change response format from Ruby hash table to JSON object.
|
239
|
+
|
240
|
+
## 0.1.6 - 2013-09-04
|
241
|
+
|
242
|
+
### Added
|
243
|
+
|
244
|
+
- Support WeakParameter's :description option.
|
245
|
+
|
246
|
+
## 0.1.5 - 2013-08-22
|
247
|
+
|
248
|
+
## 0.1.4 - 2013-08-20
|
249
|
+
|
250
|
+
## 0.1.3 - 2013-08-20
|
251
|
+
|
252
|
+
## 0.1.2 - 2013-07-29
|
253
|
+
|
254
|
+
## 0.1.1 - 2013-07-29
|
255
|
+
|
256
|
+
### Added
|
257
|
+
|
258
|
+
- Custom template.
|
259
|
+
|
260
|
+
## 0.1.0 - 2013-07-12
|
261
|
+
|
262
|
+
### Added
|
263
|
+
|
264
|
+
- AUTODOC environment variable.
|
265
|
+
|
266
|
+
## 0.0.9 - 2013-07-08
|
267
|
+
|
268
|
+
## 0.0.8 - 2013-07-08
|
269
|
+
|
270
|
+
### Changed
|
271
|
+
|
272
|
+
- Show request body.
|
273
|
+
|
274
|
+
## 0.0.7 - 2013-06-18
|
275
|
+
|
276
|
+
## 0.0.6 - 2013-06-14
|
277
|
+
|
278
|
+
## 0.0.5 - 2013-06-11
|
279
|
+
|
280
|
+
## 0.0.4 - 2013-06-11
|
281
|
+
|
282
|
+
## 0.0.3 - 2013-06-11
|
283
|
+
|
284
|
+
### Added
|
285
|
+
|
286
|
+
- Configurable response header.
|
287
|
+
|
288
|
+
## 0.0.2 - 2013-06-10
|
289
|
+
|
290
|
+
## 0.0.1 - 2013-06-07
|
291
|
+
|
292
|
+
### Added
|
293
|
+
|
294
|
+
- 1st release on 2013-06-07.
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
autodoc (0.7.5)
|
5
|
+
actionpack
|
6
|
+
activesupport (>= 3.0.0)
|
7
|
+
rspec
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (5.2.2)
|
13
|
+
actionpack (= 5.2.2)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
actionmailer (5.2.2)
|
17
|
+
actionpack (= 5.2.2)
|
18
|
+
actionview (= 5.2.2)
|
19
|
+
activejob (= 5.2.2)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
actionpack (5.2.2)
|
23
|
+
actionview (= 5.2.2)
|
24
|
+
activesupport (= 5.2.2)
|
25
|
+
rack (~> 2.0)
|
26
|
+
rack-test (>= 0.6.3)
|
27
|
+
rails-dom-testing (~> 2.0)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
actionview (5.2.2)
|
30
|
+
activesupport (= 5.2.2)
|
31
|
+
builder (~> 3.1)
|
32
|
+
erubi (~> 1.4)
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
+
activejob (5.2.2)
|
36
|
+
activesupport (= 5.2.2)
|
37
|
+
globalid (>= 0.3.6)
|
38
|
+
activemodel (5.2.2)
|
39
|
+
activesupport (= 5.2.2)
|
40
|
+
activerecord (5.2.2)
|
41
|
+
activemodel (= 5.2.2)
|
42
|
+
activesupport (= 5.2.2)
|
43
|
+
arel (>= 9.0)
|
44
|
+
activestorage (5.2.2)
|
45
|
+
actionpack (= 5.2.2)
|
46
|
+
activerecord (= 5.2.2)
|
47
|
+
marcel (~> 0.3.1)
|
48
|
+
activesupport (5.2.2)
|
49
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
|
+
i18n (>= 0.7, < 2)
|
51
|
+
minitest (~> 5.1)
|
52
|
+
tzinfo (~> 1.1)
|
53
|
+
arel (9.0.0)
|
54
|
+
builder (3.2.3)
|
55
|
+
coderay (1.1.1)
|
56
|
+
concurrent-ruby (1.1.4)
|
57
|
+
crass (1.0.5)
|
58
|
+
diff-lcs (1.3)
|
59
|
+
erubi (1.8.0)
|
60
|
+
globalid (0.4.1)
|
61
|
+
activesupport (>= 4.2.0)
|
62
|
+
i18n (1.3.0)
|
63
|
+
concurrent-ruby (~> 1.0)
|
64
|
+
loofah (2.3.1)
|
65
|
+
crass (~> 1.0.2)
|
66
|
+
nokogiri (>= 1.5.9)
|
67
|
+
mail (2.7.1)
|
68
|
+
mini_mime (>= 0.1.1)
|
69
|
+
marcel (0.3.3)
|
70
|
+
mimemagic (~> 0.3.2)
|
71
|
+
method_source (0.8.2)
|
72
|
+
mimemagic (0.3.3)
|
73
|
+
mini_mime (1.0.1)
|
74
|
+
mini_portile2 (2.5.0)
|
75
|
+
minitest (5.11.3)
|
76
|
+
nio4r (2.3.1)
|
77
|
+
nokogiri (1.11.1)
|
78
|
+
mini_portile2 (~> 2.5.0)
|
79
|
+
racc (~> 1.4)
|
80
|
+
pry (0.10.4)
|
81
|
+
coderay (~> 1.1.0)
|
82
|
+
method_source (~> 0.8.1)
|
83
|
+
slop (~> 3.4)
|
84
|
+
pry-rails (0.3.6)
|
85
|
+
pry (>= 0.10.4)
|
86
|
+
racc (1.5.2)
|
87
|
+
rack (2.2.3)
|
88
|
+
rack-test (1.1.0)
|
89
|
+
rack (>= 1.0, < 3)
|
90
|
+
rails (5.2.2)
|
91
|
+
actioncable (= 5.2.2)
|
92
|
+
actionmailer (= 5.2.2)
|
93
|
+
actionpack (= 5.2.2)
|
94
|
+
actionview (= 5.2.2)
|
95
|
+
activejob (= 5.2.2)
|
96
|
+
activemodel (= 5.2.2)
|
97
|
+
activerecord (= 5.2.2)
|
98
|
+
activestorage (= 5.2.2)
|
99
|
+
activesupport (= 5.2.2)
|
100
|
+
bundler (>= 1.3.0)
|
101
|
+
railties (= 5.2.2)
|
102
|
+
sprockets-rails (>= 2.0.0)
|
103
|
+
rails-dom-testing (2.0.3)
|
104
|
+
activesupport (>= 4.2.0)
|
105
|
+
nokogiri (>= 1.6)
|
106
|
+
rails-html-sanitizer (1.0.4)
|
107
|
+
loofah (~> 2.2, >= 2.2.2)
|
108
|
+
railties (5.2.2)
|
109
|
+
actionpack (= 5.2.2)
|
110
|
+
activesupport (= 5.2.2)
|
111
|
+
method_source
|
112
|
+
rake (>= 0.8.7)
|
113
|
+
thor (>= 0.19.0, < 2.0)
|
114
|
+
rake (13.0.1)
|
115
|
+
redcarpet (3.5.1)
|
116
|
+
responders (2.4.0)
|
117
|
+
actionpack (>= 4.2.0, < 5.3)
|
118
|
+
railties (>= 4.2.0, < 5.3)
|
119
|
+
rspec (3.6.0)
|
120
|
+
rspec-core (~> 3.6.0)
|
121
|
+
rspec-expectations (~> 3.6.0)
|
122
|
+
rspec-mocks (~> 3.6.0)
|
123
|
+
rspec-core (3.6.0)
|
124
|
+
rspec-support (~> 3.6.0)
|
125
|
+
rspec-expectations (3.6.0)
|
126
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
127
|
+
rspec-support (~> 3.6.0)
|
128
|
+
rspec-mocks (3.6.0)
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
+
rspec-support (~> 3.6.0)
|
131
|
+
rspec-rails (3.6.1)
|
132
|
+
actionpack (>= 3.0)
|
133
|
+
activesupport (>= 3.0)
|
134
|
+
railties (>= 3.0)
|
135
|
+
rspec-core (~> 3.6.0)
|
136
|
+
rspec-expectations (~> 3.6.0)
|
137
|
+
rspec-mocks (~> 3.6.0)
|
138
|
+
rspec-support (~> 3.6.0)
|
139
|
+
rspec-support (3.6.0)
|
140
|
+
slop (3.6.0)
|
141
|
+
sprockets (3.7.2)
|
142
|
+
concurrent-ruby (~> 1.0)
|
143
|
+
rack (> 1, < 3)
|
144
|
+
sprockets-rails (3.2.1)
|
145
|
+
actionpack (>= 4.0)
|
146
|
+
activesupport (>= 4.0)
|
147
|
+
sprockets (>= 3.0.0)
|
148
|
+
sqlite3 (1.3.13)
|
149
|
+
thor (0.20.3)
|
150
|
+
thread_safe (0.3.6)
|
151
|
+
tzinfo (1.2.5)
|
152
|
+
thread_safe (~> 0.1)
|
153
|
+
weak_parameters (0.4.2)
|
154
|
+
rails (>= 4.0.0)
|
155
|
+
websocket-driver (0.7.0)
|
156
|
+
websocket-extensions (>= 0.1.0)
|
157
|
+
websocket-extensions (0.1.5)
|
158
|
+
|
159
|
+
PLATFORMS
|
160
|
+
ruby
|
161
|
+
|
162
|
+
DEPENDENCIES
|
163
|
+
autodoc!
|
164
|
+
bundler (~> 1.3)
|
165
|
+
pry-rails
|
166
|
+
rack-test
|
167
|
+
rails (= 5.2.2)
|
168
|
+
rake
|
169
|
+
redcarpet
|
170
|
+
responders
|
171
|
+
rspec-rails
|
172
|
+
sqlite3
|
173
|
+
weak_parameters
|
174
|
+
|
175
|
+
BUNDLED WITH
|
176
|
+
1.17.3
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# Autodoc
|
2
|
+
|
3
|
+
[![CircleCI](https://circleci.com/gh/r7kamura/autodoc.svg?style=svg)](https://circleci.com/gh/r7kamura/autodoc)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/autodoc.svg)](https://rubygems.org/gems/autodoc)
|
5
|
+
|
2
6
|
Generate documentation from your rack application & request-spec.
|
3
7
|
|
4
8
|
## Installation
|
data/autodoc.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "actionpack"
|
22
22
|
spec.add_dependency "rspec"
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
|
-
spec.add_development_dependency "rails", "
|
24
|
+
spec.add_development_dependency "rails", "5.2.2"
|
25
25
|
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "sqlite3"
|
27
27
|
end
|
data/lib/autodoc/document.rb
CHANGED
@@ -73,7 +73,7 @@ module Autodoc
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def method
|
76
|
-
request.
|
76
|
+
request.request_method
|
77
77
|
end
|
78
78
|
|
79
79
|
def request_header
|
@@ -87,8 +87,8 @@ module Autodoc
|
|
87
87
|
|
88
88
|
def request_header_from_http_prefix
|
89
89
|
request.headers.inject({}) do |table, (key, value)|
|
90
|
-
if key.start_with?("HTTP_")
|
91
|
-
table.merge(key.gsub(/^HTTP_/, "") => value)
|
90
|
+
if key.to_s.start_with?("HTTP_")
|
91
|
+
table.merge(key.to_s.gsub(/^HTTP_/, "") => value)
|
92
92
|
else
|
93
93
|
table
|
94
94
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% documents.group_by(&:title).each do |title, docs| -%>
|
7
7
|
<% docs.each_with_index do |document, index| -%>
|
8
8
|
<% suffix = index == 0 ? "" : "-#{index}" -%>
|
9
|
-
|
9
|
+
* [<%= title %>](<%= "#{relative_path}##{document.identifier}#{suffix}" %>)
|
10
10
|
<% end -%>
|
11
11
|
<% end -%>
|
12
12
|
<% end -%>
|
data/lib/autodoc/version.rb
CHANGED
@@ -44,7 +44,6 @@ module Dummy
|
|
44
44
|
# like if you have constraints or database-specific column types
|
45
45
|
# config.active_record.schema_format = :sql
|
46
46
|
|
47
|
-
|
48
|
-
config.assets.version = '1.0'
|
47
|
+
config.active_record.sqlite3.represent_boolean_as_integer = true
|
49
48
|
end
|
50
49
|
end
|
@@ -4,5 +4,5 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.
|
7
|
+
Dummy::Application.config.secret_key_base = '2da8e59639e7c92b0da46798ed97a45be5834c72cdd9a4ad141dadc5b1175f991b05ef02dde00f9c27cadb3790311e642010b89ed1dad598539980a1ae88be61'
|
8
8
|
Dummy::Application.config.secret_key_base = '7bea42a7812ad8da2fa753be701ed39a8b35f014c0cfcc876ad08180f2b25504e67ed24fc4470c51b229bbbc4731454c912e4609902e1c0bba65fb86037f7f1a'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe "Recipes", type: :request do
|
4
|
-
let(:
|
4
|
+
let(:headers) do
|
5
5
|
{ "ACCEPT" => "application/json", "CONTENT_TYPE" => "application/json" }
|
6
6
|
end
|
7
7
|
|
@@ -16,13 +16,13 @@ describe "Recipes", type: :request do
|
|
16
16
|
|
17
17
|
context "with valid condition (using Rack::Test)", autodoc: true do
|
18
18
|
before do
|
19
|
-
|
19
|
+
headers["Content-Type"] = "application/json"
|
20
20
|
end
|
21
21
|
|
22
22
|
include Rack::Test::Methods
|
23
23
|
|
24
24
|
it "returns the recipe" do
|
25
|
-
get "/recipes/#{recipe.id}",
|
25
|
+
get "/recipes/#{recipe.id}", headers: headers, params: params.to_json
|
26
26
|
expect(last_response.status).to eq(200)
|
27
27
|
end
|
28
28
|
end
|
@@ -40,7 +40,7 @@ describe "Recipes", type: :request do
|
|
40
40
|
end
|
41
41
|
|
42
42
|
it "returns 400" do
|
43
|
-
post "/recipes", params.to_json
|
43
|
+
post "/recipes", headers: headers, params: params.to_json
|
44
44
|
expect(response.status).to eq(400)
|
45
45
|
end
|
46
46
|
end
|
@@ -51,7 +51,7 @@ describe "Recipes", type: :request do
|
|
51
51
|
end
|
52
52
|
|
53
53
|
it "returns 400" do
|
54
|
-
post "/recipes", params.to_json
|
54
|
+
post "/recipes", headers: headers, params: params.to_json
|
55
55
|
expect(response.status).to eq(400)
|
56
56
|
end
|
57
57
|
end
|
@@ -62,7 +62,7 @@ describe "Recipes", type: :request do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
it "creates a new recipe" do
|
65
|
-
post "/recipes", params.to_json
|
65
|
+
post "/recipes", headers: headers, params: params.to_json
|
66
66
|
expect(response.status).to eq(201)
|
67
67
|
end
|
68
68
|
end
|
@@ -78,7 +78,7 @@ describe "Recipes", type: :request do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
it "creates a new recipe" do
|
81
|
-
post "/recipes", params.to_json
|
81
|
+
post "/recipes", headers: headers, params: params.to_json
|
82
82
|
expect(response.status).to eq(201)
|
83
83
|
end
|
84
84
|
end
|
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.5
|
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: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 5.2.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 5.2.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,9 +115,11 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".circleci/config.yml"
|
118
119
|
- ".gitignore"
|
119
120
|
- CHANGELOG.md
|
120
121
|
- Gemfile
|
122
|
+
- Gemfile.lock
|
121
123
|
- LICENSE.txt
|
122
124
|
- README.md
|
123
125
|
- Rakefile
|
@@ -175,7 +177,6 @@ files:
|
|
175
177
|
- spec/dummy/public/500.html
|
176
178
|
- spec/dummy/public/favicon.ico
|
177
179
|
- spec/dummy/script/rails
|
178
|
-
- spec/dummy/spec
|
179
180
|
- spec/requests/admin/entries_spec.rb
|
180
181
|
- spec/requests/entries_spec.rb
|
181
182
|
- spec/requests/pending_spec.rb
|
@@ -200,8 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
201
|
- !ruby/object:Gem::Version
|
201
202
|
version: '0'
|
202
203
|
requirements: []
|
203
|
-
|
204
|
-
rubygems_version: 2.6.11
|
204
|
+
rubygems_version: 3.1.4
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: Auto-generate JSON API documents from your request-specs.
|
@@ -250,7 +250,6 @@ test_files:
|
|
250
250
|
- spec/dummy/public/500.html
|
251
251
|
- spec/dummy/public/favicon.ico
|
252
252
|
- spec/dummy/script/rails
|
253
|
-
- spec/dummy/spec
|
254
253
|
- spec/requests/admin/entries_spec.rb
|
255
254
|
- spec/requests/entries_spec.rb
|
256
255
|
- spec/requests/pending_spec.rb
|
data/spec/dummy/spec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
spec/dummy/../../spec
|