autodoc 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: a9ef350c9fbfa8f0c91c49ea5c5acb2a629c6523
4
- data.tar.gz: 39392c1e2cf3561ce80697fdbcd9218fb84978ac
3
+ metadata.gz: bd24e8d72e6159b5a53d09b62ca7df7568bcc51d
4
+ data.tar.gz: c5f8e0065d345aec0b6f3a06916ef00b6388c993
5
5
  SHA512:
6
- metadata.gz: e798ec5836925fe93635c501839d496097730c16bb3aca7687429f2ada856be3ecdce649e7aa30e9fd006c21e7ace1b9cfdafc08cb6b0baeef18e40305d8ef00
7
- data.tar.gz: b2fe73a5cc1732fca123ebcad91f4c60935ac238fbae10727a2125d181a79114019fe0d935efc94cecb6609a7460eafb270e99c5947d481b2c18f2286bc395ac
6
+ metadata.gz: 8e72b89964e79487fa7a1f1863e16714dcacec81381c15bb80c20d2659726d23c83ff13e4030a6a47355ab855a89d533704e9962a4ee377ba0e6f457b3e78fa4
7
+ data.tar.gz: 38c1459ff3956ea43cb0e9b90c4d9aeaf5de07469d6c08717fc0f265b7a613511ece988016b8ae0a2f354f21f168758a78c0104aec7611aca9031cf33a489490
data/README.md CHANGED
@@ -60,31 +60,35 @@ response:
60
60
  </pre>
61
61
 
62
62
  ## Custom template
63
- You can customize autodoc's template ([Example](https://github.com/r7kamura/autodoc/blob/master/lib/autodoc/document.rb#L126-L139)).
63
+ You can customize autodoc's template ([Example](https://github.com/r7kamura/autodoc/blob/master/lib/autodoc/configuration.rb#L18-L33)).
64
64
  Here are avilable variables:
65
65
 
66
66
  * description
67
+ * example
67
68
  * method
68
69
  * parameters_section
69
70
  * path
71
+ * request
70
72
  * request_body_section
73
+ * response
71
74
  * response_body
72
75
  * response_headers
73
76
  * response_status
74
77
 
78
+ ### Example
75
79
  <pre>
76
80
  Autodoc.configuration.template = &lt;&lt;-EOF
77
- ## &lt;%= request.method %&gt; &lt;%= path %&gt;
78
- &lt;%= example.description.capitalize %&gt;.
81
+ ## &lt;%= method %&gt; &lt;%= path %&gt;
82
+ &lt;%= description %&gt;
79
83
  &lt;%= parameters_section %&gt;
80
84
  ### request
81
85
  ```
82
- &lt;%= request.method %&gt; &lt;%= request.path %&gt;
86
+ &lt;%= method %&gt; &lt;%= path %&gt;
83
87
  ```
84
88
  &lt;%= request_body_section %&gt;
85
89
  ### response
86
90
  ```ruby
87
- Status: &lt;%= response.status %&gt;&lt;%= headers %&gt;
91
+ Status: &lt;%= response_status %&gt;&lt;%= response_headers %&gt;
88
92
  response: &lt;%= response_body %&gt;
89
93
  ```
90
94
 
@@ -14,7 +14,7 @@ module Autodoc
14
14
  end
15
15
 
16
16
  def render
17
- ERB.new(Autodoc.configuration.template).result(binding)
17
+ ERB.new(Autodoc.configuration.template, nil, "-").result(binding)
18
18
  end
19
19
 
20
20
  private
@@ -1,3 +1,3 @@
1
1
  module Autodoc
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura