websocket 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 867a294ded953698c44e679d6de8764c5da9c98a
4
+ data.tar.gz: a2eb7f03a1bf0881e5a13968eaec06a7b8ab81c7
5
+ SHA512:
6
+ metadata.gz: fa5d680161502ea411f19ec76af3629db2d20dbd3929348c02ad8c96b62aef78bf7b4f5080a9512da104f237c7efeff55e551a48b626d4443ae58d28a5579143
7
+ data.tar.gz: 8e3c61c2b533bea813f5320f09daf394824412808d7c4052ab0f68c228a43bd2e7dfa0187a0fe07632f96098f9eb15906c7028ac2fcc06217d0764922978215e
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.2
4
+
5
+ - fix support for rack input that is blocking (i.e. Passenger)
6
+
3
7
  ## 1.1.1
4
8
 
5
9
  - fix handling close code for frames version 5+
@@ -83,7 +83,19 @@ module WebSocket
83
83
 
84
84
  @path = env["REQUEST_PATH"]
85
85
  @query = env["QUERY_STRING"]
86
- @leftovers = env['rack.input'].read
86
+
87
+ # Passenger is blocking on read
88
+ # Unicorn doesn't support readpartial
89
+ # Maybe someone is providing even plain string?
90
+ # Better safe than sorry...
91
+ input = env['rack.input']
92
+ @leftovers = if input.respond_to?(:readpartial)
93
+ input.readpartial
94
+ elsif input.respond_to?(:read)
95
+ input.read
96
+ else
97
+ input.to_s
98
+ end
87
99
 
88
100
  set_version
89
101
  @state = :finished
@@ -1,3 +1,3 @@
1
1
  module WebSocket
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
5
- prerelease:
4
+ version: 1.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Bernard Potocki
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
11
+ date: 2013-11-13 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Universal Ruby library to handle WebSocket protocol
15
14
  email:
@@ -89,33 +88,26 @@ files:
89
88
  - websocket.gemspec
90
89
  homepage: http://github.com/imanel/websocket-ruby
91
90
  licenses: []
91
+ metadata: {}
92
92
  post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
96
96
  required_ruby_version: !ruby/object:Gem::Requirement
97
- none: false
98
97
  requirements:
99
- - - ! '>='
98
+ - - '>='
100
99
  - !ruby/object:Gem::Version
101
100
  version: '0'
102
- segments:
103
- - 0
104
- hash: 1890539524106182943
105
101
  required_rubygems_version: !ruby/object:Gem::Requirement
106
- none: false
107
102
  requirements:
108
- - - ! '>='
103
+ - - '>='
109
104
  - !ruby/object:Gem::Version
110
105
  version: '0'
111
- segments:
112
- - 0
113
- hash: 1890539524106182943
114
106
  requirements: []
115
107
  rubyforge_project:
116
- rubygems_version: 1.8.25
108
+ rubygems_version: 2.1.9
117
109
  signing_key:
118
- specification_version: 3
110
+ specification_version: 4
119
111
  summary: Universal Ruby library to handle WebSocket protocol
120
112
  test_files:
121
113
  - spec/frame/incoming_03_spec.rb