autodoc 0.8.0 → 0.9.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: 50536334ac5d6f900f9fced708be9ad367e3fe1eddaa00bac5293da40e431e54
4
- data.tar.gz: 13466a0fcf42bc05cb62f58db8f25da29cad54b4542b8f119fcd16834e326532
3
+ metadata.gz: 2d103ef3e95ebc45479ee207be8bc938b808a39d215691503b458a2def2f8d42
4
+ data.tar.gz: a4440e56f1111874df07154a49fba894939619f971670808861dd88676330425
5
5
  SHA512:
6
- metadata.gz: 1d06e79f180dee1d1f52618b867b575a689efbc8f01b950f3dbdbeee5dabb3ada471f0a1d61faf26b4853d8777be2f874592b7a1792a7125ec1e6a32866dba2b
7
- data.tar.gz: 281b298e0ae036992b5b36718c2f9bf71bbe3ca47de3edb744c67cc8c1d33856630a041dd7165faf3094ab9e49abd159c6bf0ebd9d899b49395460a379be63ae
6
+ metadata.gz: 90df38749e88cc2519c724127e0f8a57da873647b41eb8b7eff53af06384db4f34f8a041c142f84e11e6500b5e8fd3d1f4778c1e27cd18f512e5272a6c8d6fc5
7
+ data.tar.gz: 51a5b8d0fb0f9dd523398be6368eee628f662f681f87dbcd2893a563ac0958f5436a1c226b506023cad5710d4a8e184dee813642bfe11ce24ed5f4019dca5395
@@ -0,0 +1,23 @@
1
+ changelog:
2
+ categories:
3
+ - title: Added
4
+ labels:
5
+ - add
6
+ - title: Changed
7
+ labels:
8
+ - change
9
+ - title: Deprecated
10
+ labels:
11
+ - deprecate
12
+ - title: Fixed
13
+ labels:
14
+ - fix
15
+ - title: Removed
16
+ labels:
17
+ - remove
18
+ - title: Security
19
+ labels:
20
+ - security
21
+ - title: Others
22
+ labels:
23
+ - "*"
@@ -0,0 +1,37 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/bump-request.yml':
7
+ - 'actions/checkout@v7.0.1'
8
+ - 'r7kamura/bump-request@v0.7.1'
9
+ - 'ruby/setup-ruby@v1.336.0'
10
+ '.github/workflows/release.yml': []
11
+ '.github/workflows/test.yml':
12
+ - 'actions/checkout@v7.0.1'
13
+ - 'ruby/setup-ruby@v1.336.0'
14
+ dependencies:
15
+ 'actions/checkout@v7.0.1':
16
+ ref: 'v7.0.1'
17
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
18
+ owner_id: 44036562
19
+ repo_id: 197814629
20
+ 'actions/setup-node@v7.1.0':
21
+ ref: 'v7.1.0'
22
+ commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
23
+ owner_id: 44036562
24
+ repo_id: 189476904
25
+ 'r7kamura/bump-request@v0.7.1':
26
+ ref: 'v0.7.1'
27
+ commit: 'sha1-b27937188d404bc0c2fd442403e6de1d20f9b349'
28
+ owner_id: 111689
29
+ repo_id: 533135195
30
+ uses:
31
+ - 'actions/checkout@v7.0.1'
32
+ - 'actions/setup-node@v7.1.0'
33
+ 'ruby/setup-ruby@v1.336.0':
34
+ ref: 'v1.336.0'
35
+ commit: 'sha1-de492cf36cbab201753d720ce4f4e336cd688c94'
36
+ owner_id: 210414
37
+ repo_id: 231208785
@@ -0,0 +1,26 @@
1
+ name: bump-request
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: Version to change to.
8
+ required: true
9
+ type: string
10
+
11
+ jobs:
12
+ run:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v7.0.1
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1.336.0
18
+ with:
19
+ ruby-version: 3.3
20
+ bundler-cache: true
21
+ - uses: r7kamura/bump-request@v0.7.1
22
+ with:
23
+ command: |
24
+ sed -i -r 's/([0-9]+\.[0-9]+\.[0-9]+)/${{ inputs.version }}/' lib/autodoc/version.rb
25
+ bundle install
26
+ version: ${{ inputs.version }}
@@ -0,0 +1,11 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ uses: r7kamura/workflows/.github/workflows/gem-release.yml@main
11
+ if: github.repository_owner == 'r7kamura'
@@ -4,7 +4,7 @@ on:
4
4
  pull_request:
5
5
  push:
6
6
  branches:
7
- - master
7
+ - main
8
8
 
9
9
  jobs:
10
10
  build:
@@ -12,11 +12,13 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  ruby:
15
- - 2.7.2
15
+ - '3.3'
16
+ - '3.4'
17
+ - '4.0'
16
18
  steps:
17
- - uses: actions/checkout@v2
19
+ - uses: actions/checkout@v7.0.1
18
20
  - name: Set up Ruby
19
- uses: ruby/setup-ruby@v1
21
+ uses: ruby/setup-ruby@v1.336.0
20
22
  with:
21
23
  ruby-version: ${{ matrix.ruby }}
22
24
  bundler-cache: true
data/Gemfile CHANGED
@@ -2,6 +2,11 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
+ gem "bundler"
6
+ gem "rails"
7
+ gem "rake"
8
+ gem "sqlite3"
9
+
5
10
  group :test do
6
11
  gem "pry-rails"
7
12
  if ENV['RSPEC2']
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- autodoc (0.7.7)
4
+ autodoc (0.9.0)
5
5
  actionpack
6
6
  activesupport (>= 3.0.0)
7
7
  rspec
@@ -9,168 +9,252 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (5.2.2)
13
- actionpack (= 5.2.2)
12
+ action_text-trix (2.1.19)
13
+ railties
14
+ actioncable (8.1.4)
15
+ actionpack (= 8.1.4)
16
+ activesupport (= 8.1.4)
14
17
  nio4r (~> 2.0)
15
18
  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)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (8.1.4)
21
+ actionpack (= 8.1.4)
22
+ activejob (= 8.1.4)
23
+ activerecord (= 8.1.4)
24
+ activestorage (= 8.1.4)
25
+ activesupport (= 8.1.4)
26
+ mail (>= 2.8.0)
27
+ actionmailer (8.1.4)
28
+ actionpack (= 8.1.4)
29
+ actionview (= 8.1.4)
30
+ activejob (= 8.1.4)
31
+ activesupport (= 8.1.4)
32
+ mail (>= 2.8.0)
33
+ rails-dom-testing (~> 2.2)
34
+ actionpack (8.1.4)
35
+ actionview (= 8.1.4)
36
+ activesupport (= 8.1.4)
37
+ nokogiri (>= 1.8.5)
38
+ rack (>= 2.2.4)
39
+ rack-session (>= 1.0.1)
26
40
  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)
41
+ rails-dom-testing (~> 2.2)
42
+ rails-html-sanitizer (~> 1.6)
43
+ useragent (~> 0.16)
44
+ actiontext (8.1.4)
45
+ action_text-trix (~> 2.1.15)
46
+ actionpack (= 8.1.4)
47
+ activerecord (= 8.1.4)
48
+ activestorage (= 8.1.4)
49
+ activesupport (= 8.1.4)
50
+ globalid (>= 0.6.0)
51
+ nokogiri (>= 1.8.5)
52
+ actionview (8.1.4)
53
+ activesupport (= 8.1.4)
31
54
  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)
55
+ erubi (~> 1.11)
56
+ rails-dom-testing (~> 2.2)
57
+ rails-html-sanitizer (~> 1.6)
58
+ activejob (8.1.4)
59
+ activesupport (= 8.1.4)
37
60
  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.4)
61
+ activemodel (8.1.4)
62
+ activesupport (= 8.1.4)
63
+ activerecord (8.1.4)
64
+ activemodel (= 8.1.4)
65
+ activesupport (= 8.1.4)
66
+ timeout (>= 0.4.0)
67
+ activestorage (8.1.4)
68
+ actionpack (= 8.1.4)
69
+ activejob (= 8.1.4)
70
+ activerecord (= 8.1.4)
71
+ activesupport (= 8.1.4)
72
+ marcel (~> 1.0)
73
+ activesupport (8.1.4)
74
+ base64
75
+ bigdecimal
76
+ concurrent-ruby (~> 1.0, >= 1.3.1)
77
+ connection_pool (>= 2.2.5)
78
+ drb
79
+ i18n (>= 1.6, < 2)
80
+ json
81
+ logger (>= 1.4.2)
82
+ minitest (>= 5.1)
83
+ securerandom (>= 0.3)
84
+ tzinfo (~> 2.0, >= 2.0.5)
85
+ uri (>= 0.13.1)
86
+ base64 (0.3.0)
87
+ bigdecimal (4.1.3)
88
+ builder (3.3.0)
55
89
  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)
90
+ concurrent-ruby (1.3.8)
91
+ connection_pool (3.0.2)
92
+ crass (1.0.8)
93
+ date (3.6.0)
94
+ diff-lcs (1.6.2)
95
+ drb (2.2.3)
96
+ erb (6.0.7)
97
+ erubi (1.13.1)
98
+ globalid (1.4.0)
99
+ activesupport (>= 6.1)
100
+ i18n (1.15.2)
63
101
  concurrent-ruby (~> 1.0)
64
- loofah (2.19.1)
102
+ io-console (0.9.5)
103
+ irb (1.18.0)
104
+ pp (>= 0.6.0)
105
+ prism (>= 1.3.0)
106
+ rdoc (>= 4.0.0)
107
+ reline (>= 0.4.2)
108
+ json (3.1.0)
109
+ logger (1.7.0)
110
+ loofah (2.25.2)
65
111
  crass (~> 1.0.2)
66
- nokogiri (>= 1.5.9)
67
- mail (2.7.1)
112
+ nokogiri (>= 1.12.0)
113
+ mail (2.9.1)
114
+ logger
68
115
  mini_mime (>= 0.1.1)
69
- marcel (0.3.3)
70
- mimemagic (~> 0.3.2)
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.10)
80
- mini_portile2 (~> 2.8.0)
116
+ net-imap
117
+ net-pop
118
+ net-smtp
119
+ marcel (1.2.1)
120
+ method_source (1.1.0)
121
+ mini_mime (1.1.5)
122
+ mini_portile2 (2.8.9)
123
+ minitest (6.0.6)
124
+ drb (~> 2.0)
125
+ prism (~> 1.5)
126
+ net-imap (0.6.8)
127
+ date
128
+ net-protocol
129
+ net-pop (0.1.2)
130
+ net-protocol
131
+ net-protocol (0.4.0)
132
+ timeout
133
+ net-smtp (0.5.2)
134
+ net-protocol
135
+ nio4r (2.7.5)
136
+ nokogiri (1.19.4)
137
+ mini_portile2 (~> 2.8.2)
81
138
  racc (~> 1.4)
82
- pry (0.14.1)
139
+ pp (0.6.4)
140
+ prettyprint
141
+ prettyprint (0.2.1)
142
+ prism (1.9.0)
143
+ pry (0.16.1)
83
144
  coderay (~> 1.1)
84
145
  method_source (~> 1.0)
85
- pry-rails (0.3.9)
86
- pry (>= 0.10.4)
87
- racc (1.6.1)
88
- rack (2.2.3.1)
89
- rack-test (1.1.0)
90
- rack (>= 1.0, < 3)
91
- rails (5.2.2)
92
- actioncable (= 5.2.2)
93
- actionmailer (= 5.2.2)
94
- actionpack (= 5.2.2)
95
- actionview (= 5.2.2)
96
- activejob (= 5.2.2)
97
- activemodel (= 5.2.2)
98
- activerecord (= 5.2.2)
99
- activestorage (= 5.2.2)
100
- activesupport (= 5.2.2)
101
- bundler (>= 1.3.0)
102
- railties (= 5.2.2)
103
- sprockets-rails (>= 2.0.0)
104
- rails-dom-testing (2.0.3)
105
- activesupport (>= 4.2.0)
146
+ reline (>= 0.6.0)
147
+ pry-rails (0.3.11)
148
+ pry (>= 0.13.0)
149
+ racc (1.8.1)
150
+ rack (3.2.8)
151
+ rack-session (2.1.2)
152
+ base64 (>= 0.1.0)
153
+ rack (>= 3.0.0)
154
+ rack-test (2.3.0)
155
+ rack (>= 1.3)
156
+ rackup (2.3.1)
157
+ rack (>= 3)
158
+ rails (8.1.4)
159
+ actioncable (= 8.1.4)
160
+ actionmailbox (= 8.1.4)
161
+ actionmailer (= 8.1.4)
162
+ actionpack (= 8.1.4)
163
+ actiontext (= 8.1.4)
164
+ actionview (= 8.1.4)
165
+ activejob (= 8.1.4)
166
+ activemodel (= 8.1.4)
167
+ activerecord (= 8.1.4)
168
+ activestorage (= 8.1.4)
169
+ activesupport (= 8.1.4)
170
+ bundler (>= 1.15.0)
171
+ railties (= 8.1.4)
172
+ rails-dom-testing (2.3.0)
173
+ activesupport (>= 5.0.0)
174
+ minitest
106
175
  nokogiri (>= 1.6)
107
- rails-html-sanitizer (1.4.4)
108
- loofah (~> 2.19, >= 2.19.1)
109
- railties (5.2.2)
110
- actionpack (= 5.2.2)
111
- activesupport (= 5.2.2)
112
- method_source
113
- rake (>= 0.8.7)
114
- thor (>= 0.19.0, < 2.0)
115
- rake (13.0.6)
116
- redcarpet (3.5.1)
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)
176
+ rails-html-sanitizer (1.7.1)
177
+ loofah (~> 2.25, >= 2.25.2)
178
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
179
+ railties (8.1.4)
180
+ actionpack (= 8.1.4)
181
+ activesupport (= 8.1.4)
182
+ irb (~> 1.13)
183
+ rackup (>= 1.0.0)
184
+ rake (>= 12.2)
185
+ thor (~> 1.0, >= 1.2.2)
186
+ tsort (>= 0.2)
187
+ zeitwerk (~> 2.6)
188
+ rake (13.4.2)
189
+ rbs (4.2.0)
190
+ logger
191
+ prism (>= 1.6.0)
192
+ tsort
193
+ rdoc (8.1.0)
194
+ erb
195
+ prism (>= 1.6.0)
196
+ rbs (>= 4.0.0)
197
+ tsort
198
+ redcarpet (3.6.1)
199
+ reline (0.7.0)
200
+ io-console (~> 0.5)
201
+ responders (3.2.1)
202
+ actionpack (>= 7.0)
203
+ railties (>= 7.0)
204
+ rspec (3.13.2)
205
+ rspec-core (~> 3.13.0)
206
+ rspec-expectations (~> 3.13.0)
207
+ rspec-mocks (~> 3.13.0)
208
+ rspec-core (3.13.6)
209
+ rspec-support (~> 3.13.0)
210
+ rspec-expectations (3.13.5)
127
211
  diff-lcs (>= 1.2.0, < 2.0)
128
- rspec-support (~> 3.11.0)
129
- rspec-mocks (3.11.1)
212
+ rspec-support (~> 3.13.0)
213
+ rspec-mocks (3.13.8)
130
214
  diff-lcs (>= 1.2.0, < 2.0)
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)
215
+ rspec-support (~> 3.13.0)
216
+ rspec-rails (8.0.4)
217
+ actionpack (>= 7.2)
218
+ activesupport (>= 7.2)
219
+ railties (>= 7.2)
220
+ rspec-core (>= 3.13.0, < 5.0.0)
221
+ rspec-expectations (>= 3.13.0, < 5.0.0)
222
+ rspec-mocks (>= 3.13.0, < 5.0.0)
223
+ rspec-support (>= 3.13.0, < 5.0.0)
224
+ rspec-support (3.13.7)
225
+ securerandom (0.4.1)
226
+ sqlite3 (2.10.2)
227
+ mini_portile2 (~> 2.8.0)
228
+ thor (1.5.0)
229
+ timeout (0.6.1)
230
+ tsort (0.2.0)
231
+ tzinfo (2.0.6)
142
232
  concurrent-ruby (~> 1.0)
143
- rack (> 1, < 3)
144
- sprockets-rails (3.4.2)
145
- actionpack (>= 5.2)
146
- activesupport (>= 5.2)
147
- sprockets (>= 3.0.0)
148
- sqlite3 (1.3.13)
149
- thor (1.2.1)
150
- thread_safe (0.3.6)
151
- tzinfo (1.2.10)
152
- thread_safe (~> 0.1)
233
+ uri (1.1.2)
234
+ useragent (0.16.11)
153
235
  weak_parameters (0.5.0)
154
236
  rails (>= 4.0.0)
155
- websocket-driver (0.7.5)
237
+ websocket-driver (0.8.2)
238
+ base64
156
239
  websocket-extensions (>= 0.1.0)
157
240
  websocket-extensions (0.1.5)
241
+ zeitwerk (2.8.3)
158
242
 
159
243
  PLATFORMS
160
244
  ruby
161
245
 
162
246
  DEPENDENCIES
163
247
  autodoc!
164
- bundler (~> 1.3)
248
+ bundler
165
249
  pry-rails
166
250
  rack-test
167
- rails (= 5.2.2)
251
+ rails
168
252
  rake
169
253
  redcarpet
170
254
  responders
171
255
  rspec-rails
172
- sqlite3 (~> 1.3.13)
256
+ sqlite3
173
257
  weak_parameters
174
258
 
175
259
  BUNDLED WITH
176
- 1.17.3
260
+ 2.5.22
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Autodoc
2
2
 
3
3
  [![test](https://github.com/r7kamura/autodoc/actions/workflows/test.yml/badge.svg)](https://github.com/r7kamura/autodoc/actions/workflows/test.yml)
4
- [![Gem Version](https://badge.fury.io/rb/autodoc.svg)](https://rubygems.org/gems/autodoc)
5
4
 
6
5
  Generate documentation from your rack application & request-spec.
7
6
 
@@ -18,7 +17,7 @@ gem "redcarpet", group: :test
18
17
 
19
18
  ## Usage
20
19
  Run rspec with AUTODOC=1 to generate documents for your request-specs tagged with `:autodoc`.
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).
20
+ example: Autodoc generates [doc/recipes.md](https://github.com/r7kamura/autodoc/blob/main/spec/dummy/doc/recipes.md) and [doc/toc.md](https://github.com/r7kamura/autodoc/blob/main/spec/dummy/doc/toc.md) from [spec/requests/recipes_spec.rb](https://github.com/r7kamura/autodoc/blob/main/spec/requests/recipes_spec.rb).
22
21
 
23
22
  ```sh
24
23
  # shell-command
@@ -82,10 +81,10 @@ You can configure `Autodoc.configuration` to change its behavior:
82
81
  * path - [String] location to put files (default: ./doc)
83
82
  * suppressed_request_header - [Strings] filtered request header keys
84
83
  * suppressed_response_header - [Strings] filtered response header keys
85
- * template - [String] ERB template for each document (default: [document.md.erb](https://github.com/r7kamura/autodoc/blob/master/lib/autodoc/templates/document.md.erb))
86
- * toc_template - [String] ERB template for ToC (default: [toc.md.erb](https://github.com/r7kamura/autodoc/blob/master/lib/autodoc/templates/toc.md.erb))
84
+ * template - [String] ERB template for each document (default: [document.md.erb](https://github.com/r7kamura/autodoc/blob/main/lib/autodoc/templates/document.md.erb))
85
+ * toc_template - [String] ERB template for ToC (default: [toc.md.erb](https://github.com/r7kamura/autodoc/blob/main/lib/autodoc/templates/toc.md.erb))
87
86
  * toc - [Boolean] whether to generate toc.md (default: false)
88
- * toc_html_template - [String] ERB template for html ToC (default: [toc.html.erb](https://github.com/r7kamura/autodoc/blob/master/lib/autodoc/templates/toc.html.erb))
87
+ * toc_html_template - [String] ERB template for html ToC (default: [toc.html.erb](https://github.com/r7kamura/autodoc/blob/main/lib/autodoc/templates/toc.html.erb))
89
88
  * toc_html - [Boolean] whether to generate toc.html - a single page documentation with a toc (default: false)
90
89
  * document_path_from_example - [Proc] specify a Proc to change the naming rule of document file paths
91
90
 
data/autodoc.gemspec CHANGED
@@ -6,6 +6,7 @@ require "autodoc/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "autodoc"
8
8
  spec.version = Autodoc::VERSION
9
+ spec.required_ruby_version = ">= 3.3"
9
10
  spec.authors = ["Ryo Nakamura"]
10
11
  spec.email = ["r7kamura@gmail.com"]
11
12
  spec.summary = "Auto-generate JSON API documents from your request-specs."
@@ -20,8 +21,4 @@ Gem::Specification.new do |spec|
20
21
  spec.add_dependency "activesupport", ">= 3.0.0"
21
22
  spec.add_dependency "actionpack"
22
23
  spec.add_dependency "rspec"
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rails", "5.2.2"
25
- spec.add_development_dependency "rake"
26
- spec.add_development_dependency "sqlite3", "~> 1.3.13"
27
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "action_dispatch/http/request"
2
4
  require "active_support/core_ext/hash/slice"
3
5
  require "active_support/core_ext/string/strip"
@@ -230,13 +232,11 @@ module Autodoc
230
232
  end
231
233
 
232
234
  def to_s
233
- string = ""
234
- string << "#{body}#{payload}"
235
+ string = "#{body}#{payload}"
235
236
 
236
237
  if validator.respond_to? :validators
237
238
  validator.validators.each do |x|
238
- string << "\n"
239
- string << Parameter.new(x).to_s.indent(2)
239
+ string += "\n#{Parameter.new(x).to_s.indent(2)}"
240
240
  end
241
241
  end
242
242
 
@@ -254,9 +254,8 @@ module Autodoc
254
254
  end
255
255
 
256
256
  def payload
257
- string = ""
258
- string << " (#{assets.join(', ')})" if assets.any?
259
- string << " - #{validator.options[:description]}" if validator.options[:description]
257
+ string = assets.any? ? " (#{assets.join(', ')})" : ""
258
+ string += " - #{validator.options[:description]}" if validator.options[:description]
260
259
  string
261
260
  end
262
261
 
@@ -1,3 +1,3 @@
1
1
  module Autodoc
2
- VERSION = "0.8.0"
2
+ VERSION = '0.9.0'
3
3
  end
@@ -8,42 +8,6 @@ require "autodoc"
8
8
 
9
9
  module Dummy
10
10
  class Application < Rails::Application
11
- # Settings in config/environments/* take precedence over those specified here.
12
- # Application configuration should go into files in config/initializers
13
- # -- all .rb files in that directory are automatically loaded.
14
-
15
- # Custom directories with classes and modules you want to be autoloadable.
16
- # config.autoload_paths += %W(#{config.root}/extras)
17
-
18
- # Only load the plugins named here, in the order given (default is alphabetical).
19
- # :all can be used as a placeholder for all plugins not explicitly named.
20
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21
-
22
- # Activate observers that should always be running.
23
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24
-
25
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
- # config.time_zone = 'Central Time (US & Canada)'
28
-
29
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
- # config.i18n.default_locale = :de
32
-
33
- # Configure the default encoding used in templates for Ruby 1.9.
34
- config.encoding = "utf-8"
35
-
36
- # Configure sensitive parameters which will be filtered from the log file.
37
- config.filter_parameters += [:password]
38
-
39
- # Enable escaping HTML in JSON.
40
- config.active_support.escape_html_entities_in_json = true
41
-
42
- # Use SQL instead of Active Record's schema dumper when creating the database.
43
- # This is necessary if your schema can't be completely dumped by the schema dumper,
44
- # like if you have constraints or database-specific column types
45
- # config.active_record.schema_format = :sql
46
-
47
- config.active_record.sqlite3.represent_boolean_as_integer = true
11
+ config.load_defaults 7.0
48
12
  end
49
13
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -52,72 +51,18 @@ dependencies:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: bundler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.3'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.3'
69
- - !ruby/object:Gem::Dependency
70
- name: rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '='
74
- - !ruby/object:Gem::Version
75
- version: 5.2.2
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '='
81
- - !ruby/object:Gem::Version
82
- version: 5.2.2
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: sqlite3
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.3.13
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.3.13
111
- description:
112
54
  email:
113
55
  - r7kamura@gmail.com
114
56
  executables: []
115
57
  extensions: []
116
58
  extra_rdoc_files: []
117
59
  files:
60
+ - ".github/release.yml"
61
+ - ".github/workflows/actions.lock"
62
+ - ".github/workflows/bump-request.yml"
63
+ - ".github/workflows/release.yml"
118
64
  - ".github/workflows/test.yml"
119
65
  - ".gitignore"
120
- - CHANGELOG.md
121
66
  - Gemfile
122
67
  - Gemfile.lock
123
68
  - LICENSE.txt
@@ -186,7 +131,6 @@ homepage: https://github.com/r7kamura/autodoc
186
131
  licenses:
187
132
  - MIT
188
133
  metadata: {}
189
- post_install_message:
190
134
  rdoc_options: []
191
135
  require_paths:
192
136
  - lib
@@ -194,15 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
138
  requirements:
195
139
  - - ">="
196
140
  - !ruby/object:Gem::Version
197
- version: '0'
141
+ version: '3.3'
198
142
  required_rubygems_version: !ruby/object:Gem::Requirement
199
143
  requirements:
200
144
  - - ">="
201
145
  - !ruby/object:Gem::Version
202
146
  version: '0'
203
147
  requirements: []
204
- rubygems_version: 3.3.7
205
- signing_key:
148
+ rubygems_version: 4.0.20
206
149
  specification_version: 4
207
150
  summary: Auto-generate JSON API documents from your request-specs.
208
151
  test_files:
data/CHANGELOG.md DELETED
@@ -1,313 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
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
-
8
- ## Unreleased
9
-
10
- ## 0.8.0 - 2022-12-23
11
-
12
- ### Fixed
13
-
14
- - Change the order of documents to match the order of tests.
15
-
16
- ## 0.7.7 - 2022-05-17
17
-
18
- ### Fixed
19
-
20
- - Prefer `#media_type` to `#content_type` (for Rails 7's change).
21
- - Fix `ERB.new` arguments style.
22
-
23
- ## 0.7.6 - 2021-04-22
24
-
25
- ### Fixed
26
-
27
- - Replace `URI.unescape` with `URI.decode_www_form_component` for Ruby 3 support.
28
-
29
- ## 0.7.5 - 2021-02-16
30
-
31
- ### Fixed
32
-
33
- - Convert header key to string.
34
-
35
- ## 0.7.4 - 2020-04-14
36
-
37
- ### Fixed
38
-
39
- - Improve error message on no request case.
40
-
41
- ## 0.7.3 - 2019-06-18
42
-
43
- ### Fixed
44
-
45
- - Fix indent in toc template.
46
-
47
- ## 0.7.2 - 2019-01-09
48
-
49
- ### Fixed
50
-
51
- - Fixed broken symlink on spec/dummy/spec.
52
-
53
- ## 0.7.1 - 2018-12-18
54
-
55
- ## 0.7.0 - 2018-08-30
56
-
57
- ### Changed
58
-
59
- - Shell-escape given path.
60
- - Use `#to_hash` to response headers if it can respond it.
61
-
62
- ## 0.6.2 - 2017-08-22
63
-
64
- ### Fixed
65
-
66
- - Support multibyte query parameters.
67
-
68
- ## 0.6.1 - 2017-05-30
69
-
70
- ### Fixed
71
-
72
- - Fix Ruby-level warnings.
73
-
74
- ## 0.6.0 - 2016-03-03
75
-
76
- ### Changed
77
-
78
- - Change the message capitalization rule.
79
-
80
- ## 0.5.3 - 2016-02-19
81
-
82
- ### Fixed
83
-
84
- - Fix bugs on pending examples.
85
-
86
- ## 0.5.2 - 2015-09-18
87
-
88
- ### Fixed
89
-
90
- - Fix version detector.
91
-
92
- ## 0.5.1 - 2015-06-28
93
-
94
- ### Fixed
95
-
96
- - Fix lambda syntax.
97
-
98
- ## 0.5.0 - 2015-04-22
99
-
100
- ### Added
101
-
102
- - Add `Autodoc.configuration.document_path_from_example`.
103
-
104
- ## 0.4.5 - 2015-04-10
105
-
106
- ### Added
107
-
108
- - Support other specs directory than spec/requests.
109
-
110
- ## 0.4.4 - 2015-03-31
111
-
112
- ### Added
113
-
114
- - Support image response.
115
-
116
- ## 0.4.3 - 2015-02-28
117
-
118
- ### Added
119
-
120
- - Support nested parameters on weak_parameters.
121
-
122
- ## 0.4.2 - 2015-02-13
123
-
124
- ### Added
125
-
126
- - Add HTML Documentation support.
127
-
128
- ## 0.4.1 - 2015-01-13
129
-
130
- ### Added
131
-
132
- - Support RSpec 2.99.
133
-
134
- ## 0.4.0 - 2014-10-29
135
-
136
- ### Added
137
-
138
- - Support RSpec 3.
139
-
140
- ## 0.3.6 - 2014-05-19
141
-
142
- ### Added
143
-
144
- - Show dummy message if Content-Type might be BINARY.
145
-
146
- ## 0.3.5 - 2014-02-15
147
-
148
- ### Added
149
-
150
- - Support PATCH method.
151
-
152
- ## 0.3.4 - 2014-01-24
153
-
154
- ### Added
155
-
156
- - Some improvements on the document template file.
157
-
158
- ## 0.3.3 - 2013-12-30
159
-
160
- ### Fixed
161
-
162
- - Fix ToC template for specs in sub-directory.
163
-
164
- ## 0.3.2 - 2013-12-18
165
-
166
- ### Fixed
167
-
168
- - Fix template & document bug.
169
-
170
- ## 0.3.1 - 2013-12-17
171
-
172
- ### Added
173
-
174
- - Filter request & response header by Autodoc.configuration.suppress_{request,response}_header.
175
-
176
- ### Changed
177
-
178
- - Prettify JSON request body.
179
-
180
- ## 0.3.0 - 2013-12-17
181
-
182
- ### Changed
183
-
184
- - Change Autodoc::Document interface & template to mimic HTTP text.
185
-
186
- ## 0.2.8 - 2013-12-17
187
-
188
- ### Changed
189
-
190
- - Include query string into document template.
191
-
192
- ## 0.2.7 - 2013-12-05
193
-
194
- ### Changed
195
-
196
- - Sort list in ToC.
197
-
198
- ## 0.2.6 - 2013-12-02
199
-
200
- ### Fixed
201
-
202
- - Fix ToC generator.
203
-
204
- ## 0.2.5 - 2013-11-30
205
-
206
- ### Added
207
-
208
- - Add ToC generator.
209
- - Use Autodoc.configuration.path to change documents path.
210
-
211
- ## 0.2.4 - 2013-11-30
212
-
213
- ### Added
214
-
215
- - Add Documents class.
216
-
217
- ## 0.2.3 - 2013-11-30
218
-
219
- ### Changed
220
-
221
- - Clean up dependencies & implementation.
222
-
223
- ## 0.2.2 - 2013-11-29
224
-
225
- ### Fixed
226
-
227
- - Fix default documented headers.
228
-
229
- ## 0.2.1 - 2013-11-29
230
-
231
- ### Fixed
232
-
233
- - Fix load dependency on rspec.
234
-
235
- ## 0.2.0 - 2013-11-29
236
-
237
- ### Changed
238
-
239
- - Remove dependency on awesome_print.
240
-
241
- ## 0.1.9 - 2013-11-01
242
-
243
- ### Fixed
244
-
245
- - Fix encoding error at ruby 1.9 or earlier versions.
246
-
247
- ## 0.1.8 - 2013-10-23
248
-
249
- ### Added
250
-
251
- - Support rack-test.
252
-
253
- ## 0.1.7 - 2013-10-08
254
-
255
- ### Changed
256
-
257
- - Change response format from Ruby hash table to JSON object.
258
-
259
- ## 0.1.6 - 2013-09-04
260
-
261
- ### Added
262
-
263
- - Support WeakParameter's :description option.
264
-
265
- ## 0.1.5 - 2013-08-22
266
-
267
- ## 0.1.4 - 2013-08-20
268
-
269
- ## 0.1.3 - 2013-08-20
270
-
271
- ## 0.1.2 - 2013-07-29
272
-
273
- ## 0.1.1 - 2013-07-29
274
-
275
- ### Added
276
-
277
- - Custom template.
278
-
279
- ## 0.1.0 - 2013-07-12
280
-
281
- ### Added
282
-
283
- - AUTODOC environment variable.
284
-
285
- ## 0.0.9 - 2013-07-08
286
-
287
- ## 0.0.8 - 2013-07-08
288
-
289
- ### Changed
290
-
291
- - Show request body.
292
-
293
- ## 0.0.7 - 2013-06-18
294
-
295
- ## 0.0.6 - 2013-06-14
296
-
297
- ## 0.0.5 - 2013-06-11
298
-
299
- ## 0.0.4 - 2013-06-11
300
-
301
- ## 0.0.3 - 2013-06-11
302
-
303
- ### Added
304
-
305
- - Configurable response header.
306
-
307
- ## 0.0.2 - 2013-06-10
308
-
309
- ## 0.0.1 - 2013-06-07
310
-
311
- ### Added
312
-
313
- - 1st release on 2013-06-07.