sinatra-docdsl 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/docdsl.rb +6 -4
  3. metadata +9 -13
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: !binary |-
4
+ Y2Y4M2RhZTNhMjYyYWU0NTc2NmU2M2VjYjUzZTE5Y2QzYTU0MzNmNw==
5
+ data.tar.gz: !binary |-
6
+ MDc3YzZhNzhiOTBkOWQ1YjliYTczZmViYzgzNzkxMjNlYjAwNTBkNQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MzQzYjVlNzA1Yzc3N2I1NzZjM2FiYTAwZThjZjA4Nzg2YmYyOGE4MTVhNmQw
10
+ NGUwNzg4NTI5NTQwZWRhM2FkYWE5NDA3MmFmYzljNTY3ZDcyNzUwZTMzYzAy
11
+ YWViNjAwOWI4NmI2MWZmMDIzZTFhOTNjZWMxZmE3OTdkNjQ4YWQ=
12
+ data.tar.gz: !binary |-
13
+ NTg1OTBmMjA3MTQ4MGQyNjc3ZmRjMjJhOTQ5ZDdlOTJhYjNhOWVlZWU5OTFi
14
+ OTNlMjliOWYxY2NiNjcyYzRkZTlkZTE5OGRiYTIyN2JmOTM4OThiYzQ3OWY1
15
+ OTAwNmY4MmNhMjNlNmZjZjIxNWE1MGNiM2UwOTFmNTMzMjMwYjM=
data/lib/docdsl.rb CHANGED
@@ -8,7 +8,7 @@ module Sinatra
8
8
  @the_title='DocDSL Documentation'
9
9
  @the_header="API"
10
10
  @the_introduction="API Documentation for this resource"
11
- @the_footer="Powered by <strong>Sinatra DocDSL</strong>"
11
+ @the_footer='Powered by <strong><a href="https://github.com/jillesvangurp/sinatra-docdsl">Sinatra DocDSL</a></strong>'
12
12
 
13
13
  if(block)
14
14
  if block.arity == 1
@@ -140,9 +140,9 @@ module Sinatra
140
140
  query_params ||=''
141
141
 
142
142
 
143
- if entry.query_params.length >0
143
+ if entry.headers.length >0
144
144
  headers = entry.headers.inject("<h3>Header Parameters</h3>\n<dl>") { |li,(k,v)|
145
- li << "<dt>:%s</dt><dd>%s</dd>" % [k,v]
145
+ li << "<dt>%s</dt><dd>%s</dd>" % [k,v]
146
146
  }
147
147
  headers << "</dl>\n"
148
148
  end
@@ -153,7 +153,7 @@ module Sinatra
153
153
  end
154
154
  payload ||=''
155
155
  if entry.the_response
156
- response="<dt>Payload</dt><dd>#{entry.the_response}</dd>"
156
+ response="<dt>Response</dt><dd>#{entry.the_response}</dd>"
157
157
  end
158
158
  response ||=''
159
159
 
@@ -180,6 +180,8 @@ module Sinatra
180
180
  <p>#{@page_doc.the_introduction}</p>
181
181
 
182
182
  #{render_docs_list(entries)}
183
+ <br/>
184
+ <hr>
183
185
  <p>#{@page_doc.the_footer}</p>
184
186
  </div>
185
187
  </body>
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-docdsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jilles van Gurp
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-31 00:00:00.000000000 Z
11
+ date: 2013-04-27 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A simple DSL for documenting Sinatra apps and generating a /doc endpoint in a sinatra resource
15
14
  email: incoming@jillesvangurp.xom
@@ -19,7 +18,9 @@ extra_rdoc_files: []
19
18
  files:
20
19
  - lib/docdsl.rb
21
20
  homepage: https://github.com/jillesvangurp/sinatra-docdsl
22
- licenses: []
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
23
24
  post_install_message:
24
25
  rdoc_options: []
25
26
  require_paths:
@@ -28,21 +29,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
28
29
  requirements:
29
30
  - - ">="
30
31
  - !ruby/object:Gem::Version
31
- version: !binary |-
32
- MA==
33
- none: false
32
+ version: '0'
34
33
  required_rubygems_version: !ruby/object:Gem::Requirement
35
34
  requirements:
36
35
  - - ">="
37
36
  - !ruby/object:Gem::Version
38
- version: !binary |-
39
- MA==
40
- none: false
37
+ version: '0'
41
38
  requirements: []
42
39
  rubyforge_project:
43
- rubygems_version: 1.8.24
40
+ rubygems_version: 2.0.3
44
41
  signing_key:
45
- specification_version: 3
42
+ specification_version: 4
46
43
  summary: Documentation DSL for Sinatra
47
44
  test_files: []
48
- has_rdoc: