websocket 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1abaa63e74cec12f6ac238b27501082a869a80e9
4
+ data.tar.gz: ff59280d0bb38c24bed57aca2b32b312770ec52d
5
+ SHA512:
6
+ metadata.gz: 4e55e294a520f621923af31e70c6f919fc8da3b84d86a312cfc3aa581415a8123a587891732429140fe7b3e7718ad997baa9bd33b4448b268e4a2af3b44c88a2
7
+ data.tar.gz: f083f50a27c58a4065cd685d5906186cd07d35da5f6577a1d14dd0b36cd21f287a012b5faef818bd9345331d4d91ed1367bdcdb97c58a0029d27f7c5d435bb54
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1
4
+
5
+ - fix error for draft 76 when leftovers are empty
6
+
3
7
  ## 1.2.0
4
8
 
5
9
  - Remove support for Ruby 1.8
@@ -56,7 +56,7 @@ module WebSocket
56
56
  # Data left from parsing. Sometimes data that doesn't belong to handshake are added - use this method to retrieve them.
57
57
  # @return [String] String if some data are available. Nil otherwise
58
58
  def leftovers
59
- @leftovers.to_s.split("\n", reserved_leftover_lines + 1)[reserved_leftover_lines]
59
+ (@leftovers.to_s.split("\n", reserved_leftover_lines + 1)[reserved_leftover_lines] || "").strip
60
60
  end
61
61
 
62
62
  # URI of request.
@@ -45,7 +45,7 @@ module WebSocket
45
45
  # Refer to 5.2 4-9 of the draft 76
46
46
  first = numbers_over_spaces(@handshake.headers['sec-websocket-key1'].to_s)
47
47
  second = numbers_over_spaces(@handshake.headers['sec-websocket-key2'].to_s)
48
- third = @handshake.leftovers.strip
48
+ third = @handshake.leftovers
49
49
 
50
50
  sum = [first].pack('N*') +
51
51
  [second].pack('N*') +
@@ -1,3 +1,3 @@
1
1
  module WebSocket
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,35 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: websocket
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 2
8
- - 0
9
- version: 1.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Bernard Potocki
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2014-07-24 00:00:00 +02:00
18
- default_executable:
11
+ date: 2014-09-02 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: Universal Ruby library to handle WebSocket protocol
22
- email:
14
+ email:
23
15
  - bernard.potocki@imanel.org
24
16
  executables: []
25
-
26
17
  extensions: []
27
-
28
18
  extra_rdoc_files: []
29
-
30
- files:
31
- - .gitignore
32
- - .travis.yml
19
+ files:
20
+ - ".gitignore"
21
+ - ".travis.yml"
33
22
  - CHANGELOG.md
34
23
  - Gemfile
35
24
  - README.md
@@ -97,39 +86,30 @@ files:
97
86
  - spec/support/outgoing_frames.rb
98
87
  - spec/support/overwrites.rb
99
88
  - websocket.gemspec
100
- has_rdoc: true
101
89
  homepage: http://github.com/imanel/websocket-ruby
102
90
  licenses: []
103
-
91
+ metadata: {}
104
92
  post_install_message:
105
93
  rdoc_options: []
106
-
107
- require_paths:
94
+ require_paths:
108
95
  - lib
109
- required_ruby_version: !ruby/object:Gem::Requirement
110
- none: false
111
- requirements:
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
112
98
  - - ">="
113
- - !ruby/object:Gem::Version
114
- segments:
115
- - 0
116
- version: "0"
117
- required_rubygems_version: !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
120
103
  - - ">="
121
- - !ruby/object:Gem::Version
122
- segments:
123
- - 0
124
- version: "0"
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
125
106
  requirements: []
126
-
127
107
  rubyforge_project:
128
- rubygems_version: 1.3.7.1
108
+ rubygems_version: 2.2.2
129
109
  signing_key:
130
- specification_version: 3
110
+ specification_version: 4
131
111
  summary: Universal Ruby library to handle WebSocket protocol
132
- test_files:
112
+ test_files:
133
113
  - spec/frame/incoming_03_spec.rb
134
114
  - spec/frame/incoming_04_spec.rb
135
115
  - spec/frame/incoming_05_spec.rb