api_doc_generation 0.0.6 → 0.0.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
  SHA1:
3
- metadata.gz: efc63e80bddcc349ab44b58451186d2a8cfbad04
4
- data.tar.gz: e20a6e3d6621ea10514d813512ef744225556a1d
3
+ metadata.gz: e69b11e694bfdc63ec6469630388ab845e144690
4
+ data.tar.gz: b8998bf6a3c0b39ee0945c40ef2c547764fb7c6f
5
5
  SHA512:
6
- metadata.gz: 21741fec7a85800ac87c17968e6800fe12a89b1d01e5aefb70bdd97173189006fb751cd6e6ad110c28e0da984c0f2dbfeecb4143457eccb26452a3a024f7777f
7
- data.tar.gz: 41d826effb4a3f52517c2d5193e76e6bcc36a7b59bb8ac9f8cffc84c365f988291631ffaa7e11d513adda0e31c7aeeadb8740b52e178c85994c8a8df0d36e5e6
6
+ metadata.gz: af07fb900968d7caf08d9c77346d8fb7b6e7cefecb7eb289775553d9f5ead6bb94b9442154873fc80883f08b70a2a50963ea079c704adbf6a45c5dd12f3d4180
7
+ data.tar.gz: b83693944d15f3cfe2441e6adefc043bdbf73be46c408a9ad324d6011c0291cb0df3feb7c2e9f5f9bceb7a4b1e222128504aee810aab03212ffe8649f11f7ff5
@@ -1,3 +1,3 @@
1
1
  module ApiDocGeneration
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -125,9 +125,10 @@ module ApiDocGeneration; class Generation
125
125
  defaults = journey.defaults
126
126
 
127
127
  if defaults[:controller] == controller && defaults[:action] == action
128
+ req_m = journey.verb.to_s.match(/\^(?<req_method>\w+)\$/)
128
129
  return {
129
130
  :path => journey.path.spec.to_s.gsub(/\(\.\:format\)$/, ''),
130
- :method => journey.verb.to_s.match(/\^(?<req_method>\w+)\$/)[:req_method]
131
+ :method => req_m ? req_m[:req_method] : 'POST | GET'
131
132
  }
132
133
  end
133
134
  end
@@ -126,7 +126,7 @@
126
126
  </thead>
127
127
 
128
128
  <tbody>
129
- <% action['Params'].each do |param| %>
129
+ <% (action['Params'] || []).each do |param| %>
130
130
  <% format_param(param) %>
131
131
 
132
132
  <tr>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_doc_generation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiangzhi.xie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-24 00:00:00.000000000 Z
11
+ date: 2013-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler