rocketio 0.4.1 → 0.4.2

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: 39cbcb10e360e5cba9a86831084011c5e070c48b
4
- data.tar.gz: 099c5bd995fb5e040ba8c027a58a8c6abd604d39
3
+ metadata.gz: 21d8aeeac222350dcd8a8c4c39a667ac3402d00a
4
+ data.tar.gz: 75f98d5595f20af7b3d6eccc34bd7c05c462e026
5
5
  SHA512:
6
- metadata.gz: d6076d46b0c21a7df963e17ae6089189b911f1472594ebcb7765100bb221433bb90654c277582c49bee0a59f8775c0d0d84e3597f3ff864786deacaa0779a7c5
7
- data.tar.gz: fc5643cfc2c87e0ae2f36b2ce8fbf7750d6b0a84739879918db895eba4e4586cb73154c32d85fc5cd886a613e48d0e34a257779ef9532e057f52fa05d6e05c60
6
+ metadata.gz: 5988ddd654f0942e63350217d79247867016448da51a6706d84c436c791a7858f2e279c104cb2b9436531b964fc642cbf04db84b4b65123fa6466b0a5111d20f
7
+ data.tar.gz: ec46fb97843459e9199305c526dde867153f63fcd42c3cc55b4a55666c938976392296c4f5b3f1b9391ef7a42844c16f9c03387ef7e6e7b1da97767c2b9a1b30
@@ -33,13 +33,15 @@ module RocketIO
33
33
  when Proc
34
34
  def value.each; yield(call) end
35
35
  value
36
- when String
37
- [value]
38
36
  else
39
37
  value
40
38
  end
41
39
  end
42
40
 
41
+ def body
42
+ @body.is_a?(String) ? [@body] : @body
43
+ end
44
+
43
45
  def empty_body?
44
46
  @body == EMPTY_ARRAY || @body.nil?
45
47
  end
@@ -58,10 +60,10 @@ module RocketIO
58
60
 
59
61
  if drop_body?
60
62
  close
61
- self.body = EMPTY_ARRAY
63
+ @body = EMPTY_ARRAY
62
64
  else
63
65
  if headers[CONTENT_TYPE] == APPLICATION_JSON
64
- self.body = [self.body.to_json]
66
+ @body = @body.to_json
65
67
  end
66
68
  end
67
69
 
@@ -1,3 +1,3 @@
1
1
  module RocketIO
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocketio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
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-08-05 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -203,5 +203,5 @@ rubyforge_project:
203
203
  rubygems_version: 2.5.1
204
204
  signing_key:
205
205
  specification_version: 4
206
- summary: '["rocketio-0.4.1", "Simple routing lib"]'
206
+ summary: '["rocketio-0.4.2", "Simple routing lib"]'
207
207
  test_files: []