rack-jsonr 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzE0YzNlYmY1ZjJjZmYzYWU2YjVlMjA3ZGRjNWE1NjI2YzFhYzIyZg==
4
+ ZGUyYWViYzE3MTQyODgwMTBhYWEzMDZkYTdmZGIxNmUzOTRkYmI3ZQ==
5
5
  data.tar.gz: !binary |-
6
- Yzc2MGQ4NmJkNmU2ZjY3NjJmMjkzMmZmNTEyOTlhMjlhNjMyYWExMQ==
6
+ MTMxYTMwZmEyYTU2ZjcxMjYzNjVhMDNhODU4ZGQ5MzI0MGI5ODZiNQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2ZiMzA3Mzc2NzU3ODliOGRkZTdiNjg3MTViZTAzM2U1MTdmMmFiMmMzMGQx
10
- NWY4ZWUyZDM3YTQ4NTQ5Y2NiYzkwMDhhNDhiZTBmYWVjOGViOGQ2MjQ3MDNm
11
- OTYzM2JlOGM5NTU4YzFlMDk3ZjdlYTMwZjY0MzgyOTk1ZmNlMTg=
9
+ NzQ1Mjc0M2ViZDI4ZWRjNmFhYzBmZTgyY2VhNWZkZjc5MDVlMTU4NjM1Mjcx
10
+ YmMyNTQxNTc0MTk4ZjMyMDkyNTRmODRkYjNiZDZjMmMzNmYwOTE5YjUyYmE3
11
+ MzcyY2Q0YzQ1MGM2ZThmNmZlMDc3OWE5OGYxOTYyNTIzZDY1ZGM=
12
12
  data.tar.gz: !binary |-
13
- NjlkMWRmMDliMzM4ZmVjNWMyZTBiNTI2YjkxMWYzZjY1MTk2Y2Q4NTcxNzhh
14
- N2Q2Y2FmZTQ3Nzc1N2IwOWViOTEzOTRlODU4MGY5NDg0ZjMyNGIzZTczYTRm
15
- MWQzYzg4YzlkMjVhMzAxOGIwNWJiNjI3ZTcwMGM2YzU1MDBkODU=
13
+ OWUxNzQxOGI3NGI1MmMzN2M2MDRiMGM5OTg0YzAyNWU5NjJlYTIzMzg2ZGRi
14
+ OWUxYzNiNDMzOTNjNzk2MTU2ZjBmYWYzNTFlZDA4ZjhjMjQ0YjlmMzc3ZWM1
15
+ ZWNkZmExYjYyMTBhYjgyOGFlMmVmODMxNTgyMDkxY2QwMTc1ZjU=
@@ -74,7 +74,8 @@ module Rack
74
74
  def format_jsonp(callback, status, headers, response, x_headers={}, body='')
75
75
  headers.each {|k,v| x_headers[k] = v if (k =~ /^X-.+/i) }
76
76
  response.each {|v| body << v.to_s }
77
- ["#{callback}(#{body || 'null'}, #{status}, #{x_headers.to_json})"]
77
+ body = 'null' if body.nil? or body == ''
78
+ ["#{callback}(#{body}, #{status}, #{x_headers.to_json})"]
78
79
  end
79
80
 
80
81
  end
@@ -1,3 +1,3 @@
1
1
  class Rack::JSONR
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-jsonr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark