Permalink
Browse files

fix parameter name, update gems, parameters doesnt choke on empty par…

…ams arrays
  • Loading branch information...
1 parent af43c73 commit 9a5c858a4ce0ba9fe4262eb1a79eb61a99360047 @brandonmwest committed Mar 25, 2013
Showing with 31 additions and 26 deletions.
  1. +3 −2 Gemfile
  2. +22 −18 Gemfile.lock
  3. +2 −2 views/_parameters.haml
  4. +4 −4 views/_templates.haml
View
@@ -1,7 +1,8 @@
-source :rubygems
+source 'https://rubygems.org'
+gem "shotgun"
gem "sinatra"
gem "sinatra-contrib"
gem "haml"
gem "json"
gem "hashie"
-gem "pony"
+gem "pony"
View
@@ -1,38 +1,41 @@
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
specs:
- backports (2.5.1)
- eventmachine (0.12.10)
- haml (3.1.4)
- hashie (1.2.0)
- i18n (0.6.0)
- json (1.6.5)
- mail (2.4.4)
+ backports (3.1.1)
+ eventmachine (1.0.3)
+ haml (4.0.1)
+ tilt
+ hashie (2.0.3)
+ i18n (0.6.4)
+ json (1.7.7)
+ mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.18)
+ mime-types (1.21)
polyglot (0.3.3)
pony (1.4)
mail (> 2.0)
- rack (1.4.1)
- rack-protection (1.2.0)
+ rack (1.5.2)
+ rack-protection (1.5.0)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
- sinatra (1.3.2)
- rack (~> 1.3, >= 1.3.6)
- rack-protection (~> 1.2)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.3.6)
+ rack (~> 1.4)
+ rack-protection (~> 1.3)
tilt (~> 1.3, >= 1.3.3)
- sinatra-contrib (1.3.1)
+ sinatra-contrib (1.3.2)
backports (>= 2.0)
eventmachine
rack-protection
rack-test
sinatra (~> 1.3.0)
tilt (~> 1.3)
- tilt (1.3.3)
- treetop (1.4.10)
+ tilt (1.3.6)
+ treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
@@ -44,5 +47,6 @@ DEPENDENCIES
hashie
json
pony
+ shotgun
sinatra
sinatra-contrib
@@ -1,6 +1,6 @@
%ul.parameters
-param_count = 0
- -if m.parameters
+ -if m.parameters.length > 0
-m.parameters.each do |p|
-param_count=param_count+1
@@ -92,4 +92,4 @@
:value => "#{p.Type}" , |
:style => p.Type == "boolean" || p.Type == "enumerated" ? 'display:none' : ''}
-%input{:type=>"hidden", :value => param_count, :id=>"endpoint#{endpointIndex}Method#{methodIndex}ParameterCounter"}
+%input{:type=>"hidden", :value => param_count, :id=>"endpoint#{endpointIndex}Method#{methodIndex}ParameterCounter"}
@@ -93,10 +93,10 @@
Delete Parameter
.control-group
- %label.control-label{:for => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].ParameterName"} Parameter Name
+ %label.control-label{:for => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].Name"} Parameter Name
.controls
- %input.parameterName{:name => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].ParameterName", |
- :id => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].ParameterName", |
+ %input.parameterName{:name => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].Name", |
+ :id => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].Name", |
:value => "New Parameter"}
.control-group
%label.control-label{:for => "endpoints[!endpoint!].methods[!method!].parameters[!parameter!].Description"} Description
@@ -170,4 +170,4 @@
.template.hide(id = "methodMenuTemplate")
%li
- %span.methodActuator New Method
+ %span.methodActuator New Method

0 comments on commit 9a5c858

Please sign in to comment.