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.
- data/lib/sinatra/docs/collection.haml +2 -1
- data/lib/sinatra/docs/operation.haml +32 -13
- data/lib/sinatra/rabbit/base.rb +1 -1
- data/sinatra-rabbit.gemspec +1 -1
- metadata +2 -2
@@ -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:
|
16
|
+
%p{ :style => 'width : 400px;font-size:90%;padding-top:1em'}
|
17
17
|
=operation.description
|
18
18
|
|
19
|
-
%h3
|
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
|
-
|
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{ :
|
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'
|
data/lib/sinatra/rabbit/base.rb
CHANGED
@@ -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, :
|
353
|
+
param p, :string, :required, "The #{p} parameter"
|
354
354
|
end unless required_params.nil?
|
355
355
|
end
|
356
356
|
class_eval(&block)
|
data/sinatra-rabbit.gemspec
CHANGED
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.
|
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-
|
12
|
+
date: 2012-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|