whurl_engine 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/whurl_engine/whurl.css.scss +2 -0
- data/app/views/whurl_engine/categories/create.js.haml +2 -2
- data/app/views/whurl_engine/categories/edit.js.haml +1 -1
- data/app/views/whurl_engine/categories/index.html.haml +1 -1
- data/app/views/whurl_engine/categories/update.js.haml +1 -1
- data/app/views/whurl_engine/header_definitions/create.js.haml +1 -1
- data/app/views/whurl_engine/header_definitions/update.js.haml +1 -1
- data/app/views/whurl_engine/parameter_definitions/create.js.haml +1 -1
- data/app/views/whurl_engine/parameter_definitions/update.js.haml +1 -1
- data/app/views/whurl_engine/resources/_form.html.haml +1 -1
- data/app/views/whurl_engine/resources/create.js.haml +1 -1
- data/app/views/whurl_engine/resources/update.js.haml +1 -1
- data/config/initializers/string.rb +16 -11
- data/lib/whurl_engine/version.rb +1 -1
- metadata +26 -26
@@ -1,5 +1,5 @@
|
|
1
|
-
$(".
|
1
|
+
$(".whurl_engine_category").dialog('close');
|
2
2
|
|
3
3
|
- content = escape_javascript(render(@category))
|
4
|
-
$('.
|
4
|
+
$('.category_list').append("#{content}");
|
5
5
|
$("#category_#{@category.id}").effect("highlight", {}, 3000);
|
@@ -17,7 +17,7 @@
|
|
17
17
|
= f.hidden_field :category_id
|
18
18
|
%div
|
19
19
|
= f.label :http_method
|
20
|
-
= f.select(:http_method, options_for_select(['GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS'],
|
20
|
+
= f.select(:http_method, options_for_select(['GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS'], @resource.http_method))
|
21
21
|
%div
|
22
22
|
= f.label :base_uri
|
23
23
|
= f.text_field :base_uri, :placeholder => 'eg. https://api.twitter.com/1, https://api.groupon.com/v1, etc.'
|
@@ -16,17 +16,22 @@ class String
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def to_html(content_type, options = {:line_numbers => :table})
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
19
|
+
begin
|
20
|
+
case content_type
|
21
|
+
when /xml/
|
22
|
+
::CodeRay.scan(self, :xml).div(options)
|
23
|
+
when /html/
|
24
|
+
::CodeRay.scan(self, :html).div(options)
|
25
|
+
when /json|javascript/
|
26
|
+
::CodeRay.scan(::JSON.pretty_generate(::JSON.parse(self)), :json).div(options)
|
27
|
+
when /image|jpg|jpeg|gif|png|bmp|binary/
|
28
|
+
"<img src=\"data:binary/octet;base64,#{Base64.encode64(response.body)}\" />"
|
29
|
+
else
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
rescue
|
34
|
+
self
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
data/lib/whurl_engine/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whurl_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-04 00:00:00.000000000 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: coderay
|
17
|
-
requirement: &
|
17
|
+
requirement: &2154669860 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0.9'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2154669860
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: coffee-script
|
28
|
-
requirement: &
|
28
|
+
requirement: &2154669320 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2154669320
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: httmultiparty
|
39
|
-
requirement: &
|
39
|
+
requirement: &2154668600 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0.2'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2154668600
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: haml
|
50
|
-
requirement: &
|
50
|
+
requirement: &2154667980 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '3.1'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2154667980
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: json
|
61
|
-
requirement: &
|
61
|
+
requirement: &2154667400 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '1.5'
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2154667400
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rails
|
72
|
-
requirement: &
|
72
|
+
requirement: &2154662520 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '3.1'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2154662520
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rinku
|
83
|
-
requirement: &
|
83
|
+
requirement: &2154661940 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ~>
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '1.5'
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *2154661940
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: sass
|
94
|
-
requirement: &
|
94
|
+
requirement: &2154661360 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ~>
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '3.1'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *2154661360
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: uglifier
|
105
|
-
requirement: &
|
105
|
+
requirement: &2154660860 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *2154660860
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: heroku
|
116
|
-
requirement: &
|
116
|
+
requirement: &2154660280 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *2154660280
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: mysql
|
127
|
-
requirement: &
|
127
|
+
requirement: &2154659600 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ~>
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: 2.8.1
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *2154659600
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: webmock
|
138
|
-
requirement: &
|
138
|
+
requirement: &2154658940 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ~>
|
@@ -143,7 +143,7 @@ dependencies:
|
|
143
143
|
version: 1.7.10
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *2154658940
|
147
147
|
description: ! "Whurl is a mountable engine for Rails 3.1+ apps allowing\n you
|
148
148
|
to show the functionality of your API. You can save API calls and share them with
|
149
149
|
your team or the public."
|