rack-jsonr 0.1.1 → 0.1.2

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
- MDA2OThmZDYxODcxMjA3ZjQzMjc0YzJjMzhjMDdkYmNmM2NhZjk1OQ==
4
+ MWIzYzNkMGRhZmY5MDQxYzg2OTY3MWQyOGNmOTc2NGEzZmUyNTU0Zg==
5
5
  data.tar.gz: !binary |-
6
- ODE2M2M2ZTgzM2I0MjNjMjRlOTgxZGI0Mjk4MTc0MDUzNTUxOWRkZg==
6
+ Zjg5MzBjOGVjMzI4MDhkOTRhODE0NGE1MDlmMGYzYTBhNDZhYzYyNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODk0ZmU3YWFiZmViMDI2YTVhYTM4NjNkMDNlNjk5MjhiOGRhY2NiNWMzNDdj
10
- OTg4MmNiOTc0NDliYWEyOWM0YjE2ZDJjNDMxMDVmNzg2Y2JkZDMzMmI5ZmNl
11
- NGM5MWFlYjdmNGMyNGM2MDUxYjYwYmViNmU1MDZmOGVhODY5NGE=
9
+ YmYzZWVlOGNjNGE3M2E2MDc2ZGNhM2JkOTMwMzgzZGNjZGQ2ZDdiMjczZDIz
10
+ YzA1ZjFiY2E3NjM3NDNiYTY0MjAyMGRhYTI0NjdjYTNlY2JhYjExZWU0YTFj
11
+ YzVlNWYyOTU2MjNjMDUzYzMxYjljMzc3OTc0MTdhOTk2ZDM3OTU=
12
12
  data.tar.gz: !binary |-
13
- ZTJjYTFkNjNkMzFiNjYwZGQ4YWUxMTc3NDZlYjBjZDRjOTlmMjIyMjA3YTBj
14
- ZjZkN2U1MTJkYmM5NDBkYjljNDJiYzFlNzU4NzZkYmE2MTA1Y2JiYmZkMDcy
15
- MGJkYjMxZDNmODZhM2FhNGZiMzg5NWM4NzVlMDdkZjk5MDJkNDM=
13
+ N2IzNjA0NzNlMzEzOTM3NDQxMjJjZWFiNDZmY2I2ZmYxYTU3NDE4YzM3MTE5
14
+ ZGRjY2JjOTA5NTJiNDI1NThmMjFlNGRiNWIxMmE5MTI5ZWEzOGMwM2YwNDZl
15
+ MmE3YzExNGE1MDRiYzk5NzRiYzYxYjZjN2UwZmU0NmRiY2VkOTY=
@@ -26,8 +26,11 @@ module Rack
26
26
  request = Rack::Request.new(env)
27
27
  params = request.params
28
28
 
29
- if is_jsonp_request?(request) and params['request_method'].present?
30
- env['REQUEST_METHOD'] = params['request_method'].upcase if ['POST','PUT','DELETE'].include?(params['request_method'].upcase)
29
+ if is_jsonp_request?(request)
30
+ env['IS_REQUESTING_JSONP'] = true
31
+ env['REQUEST_METHOD'] = params['request_method'].upcase if params['request_method'] and ['POST','PUT','DELETE'].include?(params['request_method'].upcase)
32
+ else
33
+ env['IS_REQUESTING_JSONP'] = false
31
34
  end
32
35
 
33
36
  if is_jsonp_request?(request) and is_json_response?(headers)
@@ -1,3 +1,3 @@
1
1
  class Rack::JSONR
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark