sinatra-rabbit 1.1.0 → 1.1.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.
@@ -23,7 +23,8 @@
23
23
  %tbody
24
24
  - collection.features.each do |f|
25
25
  %tr
26
- %td=f.name
26
+ %td
27
+ %em=f.name
27
28
  %td
28
29
  - f.constraints.each do |c, v|
29
30
  ="#{c}=#{v}<br/>"
@@ -13,21 +13,40 @@
13
13
  .container
14
14
  %h1.pull-right=operation.operation_name
15
15
  %blockquote.clearfix
16
- %p{ :style => 'width : 400px;font-size:small;padding-top:1em'}
16
+ %p{ :style => 'width : 400px;font-size:90%;padding-top:1em'}
17
17
  =operation.description
18
18
 
19
- %h3 Parameters
19
+ %h3 URL
20
20
  %table.table.table-bordered
21
- %thead
22
- %tr
23
- %th Name
24
- %th Type
25
- %th Valid values
26
- %th Description
27
21
  %tbody
28
- - (operation.params + operation.features_params).each do |p|
22
+ %tr
23
+ %td{:style => 'width:50px;'}
24
+ %strong=operation.http_method.to_s.upcase
25
+ %td
26
+ %a{ :href=> url(operation.full_path) }=operation.full_path
27
+
28
+ %h3 Parameters
29
+ - if (operation.params + operation.features_params).empty?
30
+ .alert
31
+ This operation does not have any query parameters defined.
32
+ - else
33
+ %table.table.table-bordered
34
+ %thead
35
+ %tr.well
36
+ %th Name
37
+ %th Type
38
+ %th Valid values
39
+ %th Description
40
+ %tbody
41
+ - (operation.params + operation.features_params).each do |p|
42
+ %tr
43
+ %td
44
+ %em=p.name
45
+ ="<sup style='color:red;'>*</sup>" if p.required?
46
+ %td=p.klass.capitalize
47
+ %td=p.values
48
+ %td
49
+ %small=p.description
50
+ %tfoot
29
51
  %tr
30
- %td{ :class => p.required? && 'required'}=p.name
31
- %td=p.klass
32
- %td=p.values
33
- %td=p.description
52
+ %td{ :colspan => 4, :style => 'font-size:small;text-align:right;'}='<sup style="color:red;">*</sup> - required parameter'
@@ -350,7 +350,7 @@ module Sinatra
350
350
  if Sinatra::Rabbit::STANDARD_OPERATIONS.has_key? name
351
351
  required_params = Sinatra::Rabbit::STANDARD_OPERATIONS[name][:required_params]
352
352
  required_params.each do |p|
353
- param p, :required, :string, "The #{p} parameter"
353
+ param p, :string, :required, "The #{p} parameter"
354
354
  end unless required_params.nil?
355
355
  end
356
356
  class_eval(&block)
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  a simple REST API using easy to undestand DSL.
30
30
  EOF
31
31
 
32
- s.version = '1.1.0'
32
+ s.version = '1.1.1'
33
33
  s.date = Time.now
34
34
  s.summary = %q{Sinatra REST API DSL}
35
35
  s.files = FileList[
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-rabbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-14 00:00:00.000000000 Z
12
+ date: 2012-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra