autodoc 0.6.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: c5df2a276ad462f4c7a0cd519a86d7745974e175
4
- data.tar.gz: 68ca9163b226cfb249f85ddc4bc2327c0f057f07
3
+ metadata.gz: f3b9cbcbf086fa37fa5f76719a459cca39e94c60
4
+ data.tar.gz: 8750990ec2349b08a35ba67217a42df8e30c8ba9
5
5
  SHA512:
6
- metadata.gz: eaa168e722506d60067a77d96dae58c0e7b51c2d95c8be05a3ca351c50bbb50d503b08ded3d449f424842983c1ffc1892e399bd250fdd7cd5fc4cea81a77508d
7
- data.tar.gz: c4a2129aaa73e987c2f695b761b26dd3ab423968d08f5559f46634d7a37a6fa8e05ad4f58f93ba6326b5fc9f81748cdccd74efe980f63e830de8df27bd4a7011
6
+ metadata.gz: 064d8e590c9269eb137d56bd02a3d2c180ca205b0d05bb62feb5b59129873320a1cfefcf6aab82ecc5df07e60f6f0cc35527f8217fb520ba9e1a4d8073a8c30e
7
+ data.tar.gz: f01f8e2942f02b98f8cd16a93761fac485c729da02f48b26c1caa0e140222773bf72eb039e0a017e0b53ebf184fb8a63b3ce7f9a47793738ceee44ca25719a78
data/CHANGELOG.md CHANGED
@@ -1,109 +1,149 @@
1
+ ## 0.6.1
2
+
3
+ - Fix Ruby-level warnings (Thx @amatsuda)
4
+
1
5
  ## 0.6.0
6
+
2
7
  - Change the message capitalization rule (Thx @k0kubun)
3
8
 
4
9
  ## 0.5.3
10
+
5
11
  - Fix bugs on pending examples (Thx @taiki45)
6
12
 
7
13
  ## 0.5.2
14
+
8
15
  - Fix version detector (Thx @kachick)
9
16
 
10
17
  ## 0.5.1
18
+
11
19
  - Fix lambda syntax (Thx @highwide)
12
20
 
13
21
  ## 0.5.0
22
+
14
23
  - Add `Autodoc.configuration.document_path_from_example` (Thx @samuraiT)
15
24
 
16
25
  ## 0.4.5
26
+
17
27
  - Support other specs directory than spec/requests (Thx @joe-re)
18
28
 
19
29
  ## 0.4.4
30
+
20
31
  - Support image response (Thx @mzp)
21
32
 
22
33
  ## 0.4.3
34
+
23
35
  - Support nested parameters on weak_parameters (Thx @mzp)
24
36
 
25
37
  ## 0.4.2
38
+
26
39
  - Add HTML Documentation support (Thx @daviddening)
27
40
 
28
41
  ## 0.4.1
42
+
29
43
  - Support RSpec 2.99 (Thx @dex1t)
30
44
 
31
45
  ## 0.4.0
46
+
32
47
  - Support RSpec 3
33
48
 
34
49
  ## 0.3.6
50
+
35
51
  - Show dummy message if Content-Type might be BINARY
36
52
 
37
53
  ## 0.3.5
54
+
38
55
  - Support PATCH method
39
56
 
40
57
  ## 0.3.4
58
+
41
59
  - Some improvements on the document template file
42
60
 
43
61
  ## 0.3.3
62
+
44
63
  - Fix ToC template for specs in sub-directory
45
64
 
46
65
  ## 0.3.2
66
+
47
67
  - Fix template & document bug
48
68
 
49
69
  ## 0.3.1
70
+
50
71
  - prettify JSON request body
51
72
  - filter request & response header by Autodoc.configuration.suppress_{request,response}_header
52
73
 
53
74
  ## 0.3.0
75
+
54
76
  - change Autodoc::Document interface & template to mimic HTTP text
55
77
 
56
78
  ## 0.2.8
79
+
57
80
  - include query string into document template
58
81
 
59
82
  ## 0.2.7
83
+
60
84
  - sort list in ToC
61
85
 
62
86
  ## 0.2.6
87
+
63
88
  - fix ToC generator
64
89
 
65
90
  ## 0.2.5
91
+
66
92
  - add ToC generator
67
93
  - use Autodoc.configuration.path to change documents path
68
94
 
69
95
  ## 0.2.4
96
+
70
97
  - add Documents class
71
98
 
72
99
  ## 0.2.3
100
+
73
101
  - clean up dependencies & implementation
74
102
 
75
103
  ## 0.2.2
104
+
76
105
  - fix default documented headers
77
106
 
78
107
  ## 0.2.1
108
+
79
109
  - fix load dependency on rspec
80
110
 
81
111
  ## 0.2.0
112
+
82
113
  - remove dependency on awesome_print
83
114
 
84
115
  ## 0.1.9
116
+
85
117
  - fix encoding error at ruby 1.9 or earlier versions
86
118
 
87
119
  ## 0.1.8
120
+
88
121
  - support rack-test
89
122
 
90
123
  ## 0.1.7
124
+
91
125
  - change response format from Ruby hash table to JSON object
92
126
 
93
127
  ## 0.1.6
128
+
94
129
  - support WeakParameter's :description option
95
130
 
96
131
  ## 0.1.1
132
+
97
133
  - custom template
98
134
 
99
135
  ## 0.1.0
136
+
100
137
  - AUTODOC environment variable
101
138
 
102
139
  ## 0.0.8
140
+
103
141
  - show request body
104
142
 
105
143
  ## 0.0.3
144
+
106
145
  - configurable response header
107
146
 
108
147
  ## 0.0.1
148
+
109
149
  - 1st release on 2013-06-07
@@ -45,7 +45,7 @@ module Autodoc
45
45
  end
46
46
 
47
47
  def example
48
- if ::RSpec::Core::Version::STRING.match /\A(?:3\.|2.99\.)/
48
+ if ::RSpec::Core::Version::STRING.match(/\A(?:3\.|2.99\.)/)
49
49
  @example
50
50
  else
51
51
  @context.example
@@ -135,10 +135,6 @@ module Autodoc
135
135
  rescue JSON::ParserError
136
136
  end
137
137
 
138
- def response_http_version
139
- response.env["HTTP_VERSION"] || "HTTP/1.1"
140
- end
141
-
142
138
  def response_header
143
139
  table = response.headers.clone
144
140
  table.except!(*Autodoc.configuration.suppressed_response_header)
@@ -36,7 +36,7 @@ module Autodoc
36
36
  ERB.new(Autodoc.configuration.toc_template, nil, "-").result(binding)
37
37
  end
38
38
 
39
- def write_toc_html
39
+ def write_toc_html
40
40
  toc_html_path.parent.mkpath
41
41
  toc_html_path.open("w") {|file| file << render_toc_html }
42
42
  end
@@ -3,8 +3,8 @@
3
3
  <% @table.sort.each do |pathname, documents| -%>
4
4
  <% relative_path = pathname.relative_path_from(Autodoc.configuration.pathname) -%>
5
5
  * [<%= relative_path %>](<%= relative_path %>)
6
- <% documents.group_by(&:title).each do |title, documents| -%>
7
- <% documents.each_with_index do |document, index| -%>
6
+ <% documents.group_by(&:title).each do |title, docs| -%>
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 -%>
@@ -1,3 +1,3 @@
1
1
  module Autodoc
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  describe Autodoc::Documents do
4
4
  describe "#render_toc" do
5
5
  before do
6
- if ::RSpec::Core::Version::STRING.match /\A(?:3|2\.99)\./
6
+ if ::RSpec::Core::Version::STRING.match(/\A(?:3|2\.99)\./)
7
7
  documents.append(context, example)
8
8
  else
9
9
  documents.append(context, double)
@@ -15,7 +15,7 @@ describe Autodoc::Documents do
15
15
  end
16
16
 
17
17
  let(:context) do
18
- if ::RSpec::Core::Version::STRING.match /\A(?:3|2\.99)\./
18
+ if ::RSpec::Core::Version::STRING.match(/\A(?:3|2\.99)\./)
19
19
  mock = double(example: example, request: request, file_path: file_path, full_description: full_description)
20
20
  else
21
21
  mock = double(example: example, request: request)
@@ -86,7 +86,7 @@ describe Autodoc::Documents do
86
86
  context "with document_path_from_example configuration" do
87
87
  around do |example|
88
88
  origin = Autodoc.configuration.document_path_from_example
89
- Autodoc.configuration.document_path_from_example = -> (example) { "test.md" }
89
+ Autodoc.configuration.document_path_from_example = -> (_example) { "test.md" }
90
90
  example.run
91
91
  Autodoc.configuration.document_path_from_example = origin
92
92
  end
data/spec/dummy/spec ADDED
@@ -0,0 +1 @@
1
+ ../../spec
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -175,6 +175,7 @@ files:
175
175
  - spec/dummy/public/500.html
176
176
  - spec/dummy/public/favicon.ico
177
177
  - spec/dummy/script/rails
178
+ - spec/dummy/spec
178
179
  - spec/requests/admin/entries_spec.rb
179
180
  - spec/requests/entries_spec.rb
180
181
  - spec/requests/pending_spec.rb
@@ -200,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
201
  version: '0'
201
202
  requirements: []
202
203
  rubyforge_project:
203
- rubygems_version: 2.4.5
204
+ rubygems_version: 2.5.2
204
205
  signing_key:
205
206
  specification_version: 4
206
207
  summary: Auto-generate JSON API documents from your request-specs.
@@ -249,9 +250,9 @@ test_files:
249
250
  - spec/dummy/public/500.html
250
251
  - spec/dummy/public/favicon.ico
251
252
  - spec/dummy/script/rails
253
+ - spec/dummy/spec
252
254
  - spec/requests/admin/entries_spec.rb
253
255
  - spec/requests/entries_spec.rb
254
256
  - spec/requests/pending_spec.rb
255
257
  - spec/requests/recipes_spec.rb
256
258
  - spec/spec_helper.rb
257
- has_rdoc: