net-ws 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/net/ws/version.rb +1 -1
  2. data/lib/net/ws.rb +6 -1
  3. metadata +3 -3
@@ -1,5 +1,5 @@
1
1
  module Net
2
2
  module Ws
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/lib/net/ws.rb CHANGED
@@ -349,7 +349,12 @@ module Net
349
349
  end
350
350
 
351
351
  def valid_sec_websocket_subprotocol_header?(header_value="")
352
- nil_or_empty?(header_value)
352
+ if @subprotocols.empty?
353
+ nil_or_empty?(header_value)
354
+ else
355
+ @subprotocols.include?(header_value)
356
+ end
353
357
  end
358
+
354
359
  end
355
360
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -123,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  segments:
125
125
  - 0
126
- hash: -3324455753849074669
126
+ hash: 786680391120177558
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -3324455753849074669
135
+ hash: 786680391120177558
136
136
  requirements: []
137
137
  rubyforge_project:
138
138
  rubygems_version: 1.8.23