autodoc 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/autodoc/document.rb +3 -5
- data/lib/autodoc/templates/document.md.erb +1 -1
- data/lib/autodoc/version.rb +1 -1
- data/spec/dummy/doc/recipes.md +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 937c3ab0cd4c58a348027ba6b9a05d2c87d45e6b
|
4
|
+
data.tar.gz: ee87c40f918c645971f3f14cdb7a26756557371f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6da626b43eab6022fb1d434cd7800ecba703113be0246c6f5230618ee031a6168d8bf43d6250d23964ff19ba03d50321f6e0e1ebc7172e530ad108e3ff63b202
|
7
|
+
data.tar.gz: c5c7e82c7915f3efcedda12a4d88365eeaceacd6c2d8cf8584780fae8808ec0b800fecc3d6b3d8804c2ec1a0bc80ad8e93c4deff51e99f0edb4978b4990fb93e
|
data/CHANGELOG.md
CHANGED
data/lib/autodoc/document.rb
CHANGED
@@ -80,7 +80,9 @@ module Autodoc
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def request_header_from_fixed_keys
|
83
|
-
request.headers
|
83
|
+
table = request.headers
|
84
|
+
table = table.env if table.respond_to?(:env)
|
85
|
+
table.slice("CONTENT_TYPE", "CONTENT_LENGTH", "LOCATION")
|
84
86
|
end
|
85
87
|
|
86
88
|
def request_http_version
|
@@ -124,10 +126,6 @@ module Autodoc
|
|
124
126
|
table.map {|key, value| [key, value].join(": ") }.sort.join("\n")
|
125
127
|
end
|
126
128
|
|
127
|
-
def response_header_from_fixed_keys
|
128
|
-
response.headers.env.slice("CONTENT_TYPE", "CONTENT_LENGTH", "LOCATION")
|
129
|
-
end
|
130
|
-
|
131
129
|
def response_http_version
|
132
130
|
response.header["HTTP_VERSION"] || "HTTP/1.1"
|
133
131
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= parameters_section %>
|
5
5
|
### Example
|
6
6
|
```
|
7
|
-
<%= method %> <%= path %><%= request_query %> <%= request_http_version %>
|
7
|
+
<%= method %> <%= request.path %><%= request_query %> <%= request_http_version %>
|
8
8
|
<%= request_header %><%= request_body_section %>
|
9
9
|
```
|
10
10
|
|
data/lib/autodoc/version.rb
CHANGED
data/spec/dummy/doc/recipes.md
CHANGED
@@ -3,7 +3,7 @@ Returns the recipe.
|
|
3
3
|
|
4
4
|
### Example
|
5
5
|
```
|
6
|
-
GET /recipes
|
6
|
+
GET /recipes/1 HTTP/1.1
|
7
7
|
Content-Length: 0
|
8
8
|
Content-Type: application/json
|
9
9
|
Host: example.org
|
@@ -14,11 +14,11 @@ HTTP/1.1 200
|
|
14
14
|
Cache-Control: max-age=0, private, must-revalidate
|
15
15
|
Content-Length: 111
|
16
16
|
Content-Type: application/json; charset=utf-8
|
17
|
-
ETag: "
|
17
|
+
ETag: "817f9446a34cdb5179ee09b555b507f8"
|
18
18
|
X-Content-Type-Options: nosniff
|
19
19
|
X-Frame-Options: SAMEORIGIN
|
20
|
-
X-Request-Id:
|
21
|
-
X-Runtime: 0.
|
20
|
+
X-Request-Id: a1723cc5-c4f7-4779-8382-5dbf879687e5
|
21
|
+
X-Runtime: 0.017503
|
22
22
|
X-UA-Compatible: chrome=1
|
23
23
|
X-XSS-Protection: 1; mode=block
|
24
24
|
|
@@ -26,8 +26,8 @@ X-XSS-Protection: 1; mode=block
|
|
26
26
|
"id": 1,
|
27
27
|
"name": "test",
|
28
28
|
"type": 2,
|
29
|
-
"created_at": "2013-12-
|
30
|
-
"updated_at": "2013-12-
|
29
|
+
"created_at": "2013-12-18T06:33:23.129Z",
|
30
|
+
"updated_at": "2013-12-18T06:33:23.129Z"
|
31
31
|
}
|
32
32
|
```
|
33
33
|
|
@@ -61,12 +61,12 @@ HTTP/1.1 201
|
|
61
61
|
Cache-Control: max-age=0, private, must-revalidate
|
62
62
|
Content-Length: 111
|
63
63
|
Content-Type: application/json; charset=utf-8
|
64
|
-
ETag: "
|
64
|
+
ETag: "9a32ff7207d60c4e3eca833ed83320f9"
|
65
65
|
Location: http://www.example.com/recipes/1
|
66
66
|
X-Content-Type-Options: nosniff
|
67
67
|
X-Frame-Options: SAMEORIGIN
|
68
|
-
X-Request-Id:
|
69
|
-
X-Runtime: 0.
|
68
|
+
X-Request-Id: 06f2dfe3-3085-419a-b2a8-db3abd1d3156
|
69
|
+
X-Runtime: 0.006099
|
70
70
|
X-UA-Compatible: chrome=1
|
71
71
|
X-XSS-Protection: 1; mode=block
|
72
72
|
|
@@ -74,7 +74,7 @@ X-XSS-Protection: 1; mode=block
|
|
74
74
|
"id": 1,
|
75
75
|
"name": "name",
|
76
76
|
"type": 1,
|
77
|
-
"created_at": "2013-12-
|
78
|
-
"updated_at": "2013-12-
|
77
|
+
"created_at": "2013-12-18T06:33:23.195Z",
|
78
|
+
"updated_at": "2013-12-18T06:33:23.195Z"
|
79
79
|
}
|
80
80
|
```
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|