appril 0.0.7 → 0.0.8

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: 5315dd72e101be355c15a193e063a4e80bd5d786
4
- data.tar.gz: 630f595079b3d68593f9fcc01f0ad2c1ac248cdf
3
+ metadata.gz: bbd7e7cfc93a83e1a2b21f54f9ca1f6ff982188b
4
+ data.tar.gz: 29c6281c4353748e7ae403445e780e143c2e0ab7
5
5
  SHA512:
6
- metadata.gz: ffd933576fcdac8f2d31dae3c879e176b41ba25e85700bc8d31d5fd88f7534af44bcd6d87eb9a80054182171d4586e05bf6ec8e52857ee3b8b05f8b056c57002
7
- data.tar.gz: 6a87b13d131f0f0c8a4d466af4c8cebe44cd57f322053f926a5444b9556cfbc206fb8e2c9cad92b4bc5bdd9f0cb9d3286313bcfe9444e5c739ca18667b8b36e0
6
+ metadata.gz: 47596d9940d92dcd4c29c75320239e867b1625b08108d8e70419abcef8813e013f03504c4311525f517ca38748e5dd2622cea762688d2ab100f6a97c0a2e9e25
7
+ data.tar.gz: c6f28e28ff524b7ecf0afe6563a35d6e83c37d5301d3b23750b0efaafb29b1bc0e1b154a55f7e89a5c2b58612ebb6172649c02c9aa0dd86d3667be82e7316371
@@ -27,12 +27,21 @@ module Appril
27
27
 
28
28
  msg = indifferent_params(JSON.parse(msg))
29
29
  if controller = resolve_controller(msg[:controller])
30
- status, _, body = call_controller(controller, msg[:method], msg[:arguments], msg[:serial])
31
- if body.is_a?(Proc)
32
- body.call
33
- return
34
- end
30
+
31
+ status, _, body = call_controller(
32
+ controller,
33
+ msg[:method],
34
+ msg[:arguments],
35
+ env.merge(rtcp_serial: msg[:serial]).update(rtcp_env)
36
+ )
37
+
35
38
  if status == 200
39
+
40
+ if body.is_a?(Proc)
41
+ body.call
42
+ return
43
+ end
44
+
36
45
  write(serial: msg[:serial], data: body) if msg[:reply]
37
46
  return
38
47
  end
@@ -68,8 +77,8 @@ module Appril
68
77
  @router.resolve_path(url)[0]
69
78
  end
70
79
 
71
- def call_controller controller, method, arguments, serial
72
- controller.new(method.to_sym, arguments).call(env.merge(rtcp_serial: serial).update(rtcp_env))
80
+ def call_controller controller, method, arguments, env
81
+ controller.new(method.to_sym, arguments).call(env)
73
82
  end
74
83
 
75
84
  def write data
@@ -1,3 +1,3 @@
1
1
  module Appril
2
- VERSION = '0.0.7'.freeze
2
+ VERSION = '0.0.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appril
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slee Woo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-30 00:00:00.000000000 Z
11
+ date: 2016-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rocketio
@@ -76,5 +76,5 @@ rubyforge_project:
76
76
  rubygems_version: 2.5.1
77
77
  signing_key:
78
78
  specification_version: 4
79
- summary: '["appril-0.0.7", "Opinionated framework for building opinionated web applications"]'
79
+ summary: '["appril-0.0.8", "Opinionated framework for building opinionated web applications"]'
80
80
  test_files: []