autodoc 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47721414a1cf3631034dbe786a133d21922de3a4ca0689dd5d37112c9267d638
4
- data.tar.gz: 6b398807f034927b9c8ec8749f028c0da00a254afb6a91e09fdd03f9a188602d
3
+ metadata.gz: 90d6e102506091c10a1fc1406473218b594323fed27e1e45bfef8f400ba68224
4
+ data.tar.gz: 6b849d38814134089c42761c74023c00d81f1fd42fd7605cebd6b3ab471288b8
5
5
  SHA512:
6
- metadata.gz: 9602be06ef5819e7edc380dd0ae990ec844cc0e38e4244144ca336de0522f213acffce64cf3df75eab269cce3a4a03bd276352fbfe518e2e9257194fa1ec6074
7
- data.tar.gz: 45030c275296700cd24e69ac95c0ade9f7bbb6e37a4cb23f9056d9037eb97e87f38a302f29164317381bf2da383f968246198890de8a50547fcfa4a158d76cf9
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.6
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.5)
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.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)
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.3.1)
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.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)
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.10.4)
81
- coderay (~> 1.1.0)
82
- method_source (~> 0.8.1)
83
- slop (~> 3.4)
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.5.2)
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.0.4)
107
- loofah (~> 2.2, >= 2.2.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.1)
115
+ rake (13.0.6)
115
116
  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)
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.6.0)
128
- rspec-mocks (3.6.0)
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.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)
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.1)
145
- actionpack (>= 4.0)
146
- activesupport (>= 4.0)
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 (0.20.3)
149
+ thor (1.2.1)
150
150
  thread_safe (0.3.6)
151
- tzinfo (1.2.5)
151
+ tzinfo (1.2.9)
152
152
  thread_safe (~> 0.1)
153
- weak_parameters (0.4.2)
153
+ weak_parameters (0.5.0)
154
154
  rails (>= 4.0.0)
155
- websocket-driver (0.7.0)
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
- [![CircleCI](https://circleci.com/gh/r7kamura/autodoc.svg?style=svg)](https://circleci.com/gh/r7kamura/autodoc)
3
+ [![test](https://github.com/r7kamura/autodoc/actions/workflows/test.yml/badge.svg)](https://github.com/r7kamura/autodoc/actions/workflows/test.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/autodoc.svg)](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
@@ -1 +1,8 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: %i[spec]
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
@@ -27,7 +27,7 @@ module Autodoc
27
27
  end
28
28
 
29
29
  def render
30
- ERB.new(Autodoc.configuration.template, nil, "-").result(binding)
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(:content_type) == "multipart/form-data"
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
@@ -33,7 +33,7 @@ module Autodoc
33
33
  end
34
34
 
35
35
  def render_toc
36
- ERB.new(Autodoc.configuration.toc_template, nil, "-").result(binding)
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, nil, "-").result(binding)
45
+ ERB.new(Autodoc.configuration.toc_html_template, trim_mode: "-").result(binding)
46
46
  end
47
47
 
48
48
  def toc_path
@@ -1,3 +1,3 @@
1
1
  module Autodoc
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.7"
3
3
  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.6
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: 2021-04-21 00:00:00.000000000 Z
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: '0'
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: '0'
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
- - ".circleci/config.yml"
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.4
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