action_channels 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.gitignore +7 -0
- data/.travis.yml +10 -0
- data/action_channels.gemspec +6 -2
- data/lib/action_channels/channel.rb +3 -3
- data/lib/action_channels/message.rb +5 -5
- data/lib/action_channels/server.rb +2 -2
- data/lib/action_channels/version.rb +1 -1
- metadata +33 -20
- data/.ruby-version +0 -1
- data/Gemfile.lock +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NDczOTM0NGIzOGZiYzJhNDkzNzQ3ZTc4ZDQ1NjU2NDhkZGEzYzFkNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Yzk0ODhhNzVkMjNlOTkxMWE2ZWFmMDJhNzRmOWVkNDY0MDQyYmIxNw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZDIzODE4ZWVmOTEyOGRhZjJlMzkxMGEzMjQ2YWIxMTZkZjdiNmYxNzMwNjJi
|
10
|
+
ZDA3NDk1OTgyMTdkZDI5NmE0YWZmMGM0NWRmZmM1MzkzNTBjOThlMmQyNDU0
|
11
|
+
YzgyNjI3ZmQ1MGVmN2MxZTU4OThiMTQ5ZjA3ZGU0NWVjYWM5ZmE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZDMyMDFkZTY3YWNjZGNiNTY4OTIzOWE4NmJiZjZjNjk1NzFiY2M0YTdlMDI1
|
14
|
+
OGJhYjUwNzFkMWFiNGY1YzMxMDIyYWViOGRmZjljZjRkYjA5NmQwYTcyMzg4
|
15
|
+
MmI3YjdmZTc3NjJmYmMyMjZkM2Q3NGM4YmY0ZDVhZGEyOTYwZDc=
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/action_channels.gemspec
CHANGED
@@ -21,9 +21,13 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
|
24
|
+
if RUBY_VERSION =~ /^1.9/
|
25
|
+
spec.add_dependency 'nio4r', '1.2.1'
|
26
|
+
end
|
27
|
+
|
28
|
+
spec.add_dependency 'nio4r-websocket'
|
25
29
|
|
26
|
-
spec.add_development_dependency "bundler", "
|
30
|
+
spec.add_development_dependency "bundler", ">= 1.0.0"
|
27
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
28
32
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
33
|
end
|
@@ -11,10 +11,10 @@ module ActionChannels
|
|
11
11
|
attr_reader :name, :clients
|
12
12
|
attr_accessor :message_sender
|
13
13
|
|
14
|
-
def initialize(
|
15
|
-
@name = name
|
14
|
+
def initialize(attrs)
|
15
|
+
@name = attrs.fetch(:name)
|
16
16
|
@clients = Set.new
|
17
|
-
@message_sender = message_sender
|
17
|
+
@message_sender = attrs.fetch :message_sender, MessageSenders::WebSocket.new
|
18
18
|
end
|
19
19
|
|
20
20
|
def send_message(receiver, message)
|
@@ -29,11 +29,11 @@ module ActionChannels
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def initialize(
|
33
|
-
@channel = channel
|
34
|
-
@type = type
|
35
|
-
@author = author
|
36
|
-
@details = details
|
32
|
+
def initialize(attrs)
|
33
|
+
@channel = attrs.fetch(:channel)
|
34
|
+
@type = attrs.fetch(:type)
|
35
|
+
@author = attrs[:author]
|
36
|
+
@details = attrs.fetch :details, {}
|
37
37
|
end
|
38
38
|
|
39
39
|
def to_raw
|
metadata
CHANGED
@@ -1,69 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_channels
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- German Antsiferov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nio4r
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: nio4r-websocket
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - ! '>='
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ! '>='
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ! '>='
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
47
|
+
version: 1.0.0
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ! '>='
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
54
|
+
version: 1.0.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ~>
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '10.0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ~>
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '10.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - ~>
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '3.0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - ~>
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '3.0'
|
69
83
|
description: Easy server on websockets.
|
@@ -73,12 +87,11 @@ executables: []
|
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
-
|
90
|
+
- .editorconfig
|
91
|
+
- .gitignore
|
92
|
+
- .rspec
|
93
|
+
- .travis.yml
|
80
94
|
- Gemfile
|
81
|
-
- Gemfile.lock
|
82
95
|
- LICENSE.txt
|
83
96
|
- README.md
|
84
97
|
- Rakefile
|
@@ -104,17 +117,17 @@ require_paths:
|
|
104
117
|
- lib
|
105
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
119
|
requirements:
|
107
|
-
- -
|
120
|
+
- - ! '>='
|
108
121
|
- !ruby/object:Gem::Version
|
109
122
|
version: '0'
|
110
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
124
|
requirements:
|
112
|
-
- -
|
125
|
+
- - ! '>='
|
113
126
|
- !ruby/object:Gem::Version
|
114
127
|
version: '0'
|
115
128
|
requirements: []
|
116
129
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.6.
|
130
|
+
rubygems_version: 2.6.10
|
118
131
|
signing_key:
|
119
132
|
specification_version: 4
|
120
133
|
summary: Easy server on websockets.
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.4.2
|
data/Gemfile.lock
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
action_channels (0.1.1)
|
5
|
-
nio4r-websocket
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
diff-lcs (1.3)
|
11
|
-
nio4r (2.2.0)
|
12
|
-
nio4r-websocket (0.6.2)
|
13
|
-
nio4r (>= 1.2.1, < 3.0)
|
14
|
-
websocket-driver (~> 0.7)
|
15
|
-
rake (10.5.0)
|
16
|
-
rspec (3.7.0)
|
17
|
-
rspec-core (~> 3.7.0)
|
18
|
-
rspec-expectations (~> 3.7.0)
|
19
|
-
rspec-mocks (~> 3.7.0)
|
20
|
-
rspec-core (3.7.1)
|
21
|
-
rspec-support (~> 3.7.0)
|
22
|
-
rspec-expectations (3.7.0)
|
23
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.7.0)
|
25
|
-
rspec-mocks (3.7.0)
|
26
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.7.0)
|
28
|
-
rspec-support (3.7.1)
|
29
|
-
websocket-driver (0.7.0)
|
30
|
-
websocket-extensions (>= 0.1.0)
|
31
|
-
websocket-extensions (0.1.3)
|
32
|
-
|
33
|
-
PLATFORMS
|
34
|
-
ruby
|
35
|
-
|
36
|
-
DEPENDENCIES
|
37
|
-
action_channels!
|
38
|
-
bundler (~> 1.16)
|
39
|
-
rake (~> 10.0)
|
40
|
-
rspec (~> 3.0)
|
41
|
-
|
42
|
-
BUNDLED WITH
|
43
|
-
1.16.0
|