actioncable 5.1.0.rc1 → 5.1.0.rc2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddd3032fd66feb385f3c135ce9677fa26b7d5e60
4
- data.tar.gz: 8269dca8cc74d32cc8a7082679bd280520f30c9d
3
+ metadata.gz: c59f2d253dfbe338426dd07b120a101ca9cc16c5
4
+ data.tar.gz: 322b955c668f9e187fba5d514fac8ed5ab15cbc0
5
5
  SHA512:
6
- metadata.gz: afecb562901648e694975993307395f898fa10f52ec97a3158e0545b488095c58b0b4833e5b42cea311724da4dccd8f5a5c783ee2e11abef990ba308285c87f6
7
- data.tar.gz: 683a014d35abd0a8e027ae7a97f8130df0e1a021a3c8b2c88a2fbf2256661381c096b0c6406335c2128dace4c3ee6cf83fb054574f06f021d13ba95874a0d307
6
+ metadata.gz: 3d9688391ce75b1a17b285345cd146bd492cd4a4ac71590f528c3111c84e8ae217a6d366addf870c079d60e07936c3803d341ea8374ff6dd8e574e650ba85b24
7
+ data.tar.gz: fcc766ab9e9ad91b8d7f38b6cd2037a07d48737b0a3b6846d3d1a0e4895dc738a9a5120ed32ad3e2c0626f23d70b6a4ab197f05c9196c367e4cef125ab6d22f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## Rails 5.1.0.rc2 (April 20, 2017) ##
2
+
3
+ * ActionCable socket errors are now logged to the console
4
+
5
+ Previously any socket errors were ignored and this made it hard to diagnose socket issues (e.g. as discussed in #28362).
6
+
7
+ *Edward Poot*
8
+
9
+
1
10
  ## Rails 5.1.0.rc1 (March 20, 2017) ##
2
11
 
3
12
  * No changes.
data/README.md CHANGED
@@ -53,8 +53,8 @@ module ApplicationCable
53
53
 
54
54
  private
55
55
  def find_verified_user
56
- if current_user = User.find_by(id: cookies.signed[:user_id])
57
- current_user
56
+ if verified_user = User.find_by(id: cookies.signed[:user_id])
57
+ verified_user
58
58
  else
59
59
  reject_unauthorized_connection
60
60
  end
@@ -3,11 +3,11 @@ module ActionCable
3
3
  module Authorization
4
4
  class UnauthorizedError < StandardError; end
5
5
 
6
- private
7
- def reject_unauthorized_connection
8
- logger.error "An unauthorized connection attempt was rejected"
9
- raise UnauthorizedError
10
- end
6
+ # Closes the \WebSocket connection if it is open and returns a 404 "File not Found" response.
7
+ def reject_unauthorized_connection
8
+ logger.error "An unauthorized connection attempt was rejected"
9
+ raise UnauthorizedError
10
+ end
11
11
  end
12
12
  end
13
13
  end
@@ -126,7 +126,8 @@ module ActionCable
126
126
  end
127
127
 
128
128
  def on_error(message) # :nodoc:
129
- # ignore
129
+ # log errors to make diagnosing socket errors easier
130
+ logger.error "WebSocket error occurred: #{message}"
130
131
  end
131
132
 
132
133
  def on_close(reason, code) # :nodoc:
@@ -8,7 +8,7 @@ module ActionCable
8
8
  MAJOR = 5
9
9
  MINOR = 1
10
10
  TINY = 0
11
- PRE = "rc1"
11
+ PRE = "rc2"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actioncable
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0.rc1
4
+ version: 5.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pratik Naik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-20 00:00:00.000000000 Z
12
+ date: 2017-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 5.1.0.rc1
20
+ version: 5.1.0.rc2
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 5.1.0.rc1
27
+ version: 5.1.0.rc2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nio4r
30
30
  requirement: !ruby/object:Gem::Requirement