websocket-driver 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ### 0.3.0 / 2013-09-09
2
+
3
+ * Support client URLs with Basic Auth credentials
4
+
1
5
  ### 0.2.3 / 2013-08-04
2
6
 
3
7
  * Fix bug in EventEmitter#emit when listeners are removed
@@ -56,6 +56,11 @@ module WebSocket
56
56
  headers << "Sec-WebSocket-Protocol: #{@protocols * ', '}"
57
57
  end
58
58
 
59
+ if uri.user
60
+ auth = Base64.encode64([uri.user, uri.password] * ':').gsub(/\n/, '')
61
+ headers << "Authorization: Basic #{auth}"
62
+ end
63
+
59
64
  (headers + [@headers.to_s, '']).join("\r\n")
60
65
  end
61
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-04 00:00:00.000000000 Z
12
+ date: 2013-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -32,17 +32,17 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 0.8.0
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: 0.8.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rspec
48
48
  requirement: !ruby/object:Gem::Requirement