Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
80e00ac8
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
80e00ac8
编写于
12月 17, 2015
作者:
G
Guillermo Iguaran
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #22639 from arunagw/aa-remove-few-warnings-actioncable
Remove warnings from actioncable test
上级
1fca600b
e1459c7c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
13 addition
and
6 deletion
+13
-6
actioncable/lib/action_cable/channel/base.rb
actioncable/lib/action_cable/channel/base.rb
+3
-0
actioncable/lib/action_cable/connection/base.rb
actioncable/lib/action_cable/connection/base.rb
+3
-1
actioncable/lib/action_cable/connection/message_buffer.rb
actioncable/lib/action_cable/connection/message_buffer.rb
+2
-1
actioncable/lib/action_cable/connection/subscriptions.rb
actioncable/lib/action_cable/connection/subscriptions.rb
+2
-1
actioncable/lib/action_cable/connection/web_socket.rb
actioncable/lib/action_cable/connection/web_socket.rb
+1
-1
actioncable/test/channel/stream_test.rb
actioncable/test/channel/stream_test.rb
+1
-1
actioncable/test/connection/cross_site_forgery_test.rb
actioncable/test/connection/cross_site_forgery_test.rb
+1
-1
未找到文件。
actioncable/lib/action_cable/channel/base.rb
浏览文件 @
80e00ac8
...
...
@@ -137,6 +137,9 @@ def initialize(connection, identifier, params = {})
# transmission until redis pubsub subscription is confirmed.
@defer_subscription_confirmation
=
false
@reject_subscription
=
nil
@subscription_confirmation_sent
=
nil
delegate_connection_identifiers
subscribe_to_channel
end
...
...
actioncable/lib/action_cable/connection/base.rb
浏览文件 @
80e00ac8
...
...
@@ -62,6 +62,7 @@ def initialize(server, env)
@subscriptions
=
ActionCable
::
Connection
::
Subscriptions
.
new
(
self
)
@message_buffer
=
ActionCable
::
Connection
::
MessageBuffer
.
new
(
self
)
@_internal_redis_subscriptions
=
nil
@started_at
=
Time
.
now
end
...
...
@@ -138,10 +139,11 @@ def cookies
end
private
protected
attr_reader
:websocket
attr_reader
:message_buffer
private
def
on_open
connect
if
respond_to?
(
:connect
)
subscribe_to_internal_channel
...
...
actioncable/lib/action_cable/connection/message_buffer.rb
浏览文件 @
80e00ac8
...
...
@@ -29,10 +29,11 @@ def process!
receive_buffered_messages
end
pr
ivate
pr
otected
attr_reader
:connection
attr_accessor
:buffered_messages
private
def
valid?
(
message
)
message
.
is_a?
(
String
)
end
...
...
actioncable/lib/action_cable/connection/subscriptions.rb
浏览文件 @
80e00ac8
...
...
@@ -58,9 +58,10 @@ def unsubscribe_from_all
subscriptions
.
each
{
|
id
,
channel
|
channel
.
unsubscribe_from_channel
}
end
protected
attr_reader
:connection
,
:subscriptions
private
attr_reader
:connection
,
:subscriptions
delegate
:logger
,
to: :connection
def
find
(
data
)
...
...
actioncable/lib/action_cable/connection/web_socket.rb
浏览文件 @
80e00ac8
...
...
@@ -22,7 +22,7 @@ def transmit(data)
websocket
.
send
data
end
pr
ivate
pr
otected
attr_reader
:websocket
end
end
...
...
actioncable/test/channel/stream_test.rb
浏览文件 @
80e00ac8
...
...
@@ -45,7 +45,7 @@ def send_confirmation
connection
=
TestConnection
.
new
connection
.
expects
(
:pubsub
).
returns
EM
::
Hiredis
.
connect
.
pubsub
channel
=
ChatChannel
.
new
connection
,
"{id: 1}"
,
{
id:
1
}
ChatChannel
.
new
connection
,
"{id: 1}"
,
{
id:
1
}
assert_nil
connection
.
last_transmission
EM
::
Timer
.
new
(
0.1
)
do
...
...
actioncable/test/connection/cross_site_forgery_test.rb
浏览文件 @
80e00ac8
...
...
@@ -57,7 +57,7 @@ def send_async(method, *args)
private
def
assert_origin_allowed
(
origin
)
response
=
connect_with_origin
origin
assert_equal
-
1
,
response
[
0
]
assert_equal
(
-
1
,
response
[
0
])
end
def
assert_origin_not_allowed
(
origin
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录