roda-component 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5dc17d663e86a3bdad3b5e764c7f12c954d76d7
4
- data.tar.gz: 61ae7a1789403fd3921446a95f4578dc0ddb5a23
3
+ metadata.gz: ebd6f0139e53a87721af0a4243f0bf8f7204c006
4
+ data.tar.gz: 8687918303e9219d7e27b63ec095137ab9955919
5
5
  SHA512:
6
- metadata.gz: 80ff779b9b98eefee690bfde2d748db6f8f447c5a4bc9244c3c86e2e06f90bac8b7705f87456ea19f7de6cc0ea8517adc0a684a07372f87378bc83f4d740363b
7
- data.tar.gz: 0e8b2f991133cb85091da56996c93ca7b8d3e8a09988fbddd0e8fd867bc27db443f0577604247f216e048a437eafa7bc3182ea786c808db0b05b5a61f7abaa84
6
+ metadata.gz: 9a4c6fc2ebf51ca861d11d4d8313ff7d5c16e9f4a7f56712c9f66b4e2240608faff849399fd75598af9e753a87f24e73ff6754463ef5d255e346cb4591928d0a
7
+ data.tar.gz: b9e1b5ef676984dd8fca2a218bffd45138f95cb50023beaa58955c970cb2b205c7cf474d0e5f0c4dc52ef742d19e47a1f0d0bd92a68005359affb5de7f32c864
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.31"
3
+ VERSION = "0.1.32"
4
4
  end
5
5
  end
@@ -235,11 +235,8 @@ class Roda
235
235
  end
236
236
 
237
237
  on self.class.component_route_regex do |comp, type, action|
238
- if scope.request.env.include? 'HTTP_X_RODA_COMPONENT_ON_SERVER'
239
- data = JSON.parse scope.request.body.read
240
- else
241
- data = {}
242
- end
238
+ body = scope.request.body.read
239
+ data = body ? JSON.parse(body) : {}
243
240
 
244
241
  if data.is_a? Array
245
242
  data = {args: data}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-04 00:00:00.000000000 Z
11
+ date: 2015-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal