sinatra-jsonp 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +3 -3
  2. data/lib/sinatra/jsonp.rb +1 -0
  3. metadata +4 -9
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Sinatra::Jsonp [![Build Status](https://travis-ci.org/shtirlic/sinatra-jsonp.png)](https://travis-ci.org/shtirlic/sinatra-jsonp)
2
2
 
3
3
  JSONP output helper for [Sinatra](http://sinatrarb.com). Automatically detects callback params and returns proper JSONP output.
4
- If no callback params where detected it returns plain JSON.
5
- Works with [jQuery](http://jquery.com) [jQuery.getJSON](http://api.jquery.com/jQuery.getJSON/) method out of the box.
4
+ If callback params where not detected it returns plain JSON.
5
+ Works with [jQuery](http://jquery.com) [jQuery.getJSON](http://api.jquery.com/jQuery.getJSON/) out of the box.
6
6
 
7
7
 
8
8
  ## Installation
9
9
 
10
10
 
11
- System install
11
+ Gem install
12
12
 
13
13
  ```bash
14
14
  gem install sinatra-jsonp
data/lib/sinatra/jsonp.rb CHANGED
@@ -18,6 +18,7 @@ module Sinatra
18
18
  content_type :js
19
19
  response = "#{callback}(#{data})"
20
20
  else
21
+ content_type :json
21
22
  response = data
22
23
  end
23
24
  response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-jsonp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
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-12-10 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -115,22 +115,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
- segments:
119
- - 0
120
- hash: -3994309697278529484
121
118
  required_rubygems_version: !ruby/object:Gem::Requirement
122
119
  none: false
123
120
  requirements:
124
121
  - - ! '>='
125
122
  - !ruby/object:Gem::Version
126
123
  version: '0'
127
- segments:
128
- - 0
129
- hash: -3994309697278529484
130
124
  requirements: []
131
125
  rubyforge_project:
132
- rubygems_version: 1.8.24
126
+ rubygems_version: 1.8.25
133
127
  signing_key:
134
128
  specification_version: 3
135
129
  summary: JSONP output helper for Sinatra
136
130
  test_files: []
131
+ has_rdoc: