restrack 1.6.9 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/restrack/generator/config.ru.erb +6 -0
- data/lib/restrack/response.rb +2 -2
- data/lib/restrack/version.rb +1 -1
- metadata +2 -2
data/lib/restrack/response.rb
CHANGED
@@ -103,8 +103,8 @@ module RESTRack
|
|
103
103
|
def package(data)
|
104
104
|
if mime_type.like?( RESTRack.mime_type_for( :JSON ) )
|
105
105
|
output = data.to_json
|
106
|
-
elsif mime_type.like?( RESTRack.mime_type_for( :JS ) ) and !@request.get_params[
|
107
|
-
output = @request.get_params[
|
106
|
+
elsif mime_type.like?( RESTRack.mime_type_for( :JS ) ) and !@request.get_params[:callback].nil?
|
107
|
+
output = @request.get_params[:callback] + "(#{data.to_json});"
|
108
108
|
elsif mime_type.like?( RESTRack.mime_type_for( :XML ) )
|
109
109
|
if File.exists? builder_file
|
110
110
|
output = builder_up(data)
|
data/lib/restrack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
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:
|
12
|
+
date: 2013-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|