anycable 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/MIT-LICENSE +1 -1
- data/lib/anycable.rb +1 -1
- data/lib/anycable/broadcast_adapters/http.rb +1 -1
- data/lib/anycable/cli.rb +1 -1
- data/lib/anycable/config.rb +7 -3
- data/lib/anycable/exceptions_handling.rb +1 -1
- data/lib/anycable/socket.rb +2 -2
- data/lib/anycable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd11b4e0403da1e162132375055bc2815c48ee57c3554a04ed72683d91fb0fde
|
4
|
+
data.tar.gz: '0568d54349b5e0a452f00119678b37964bb8c0102f512010e015c0b836a2ef6f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ded17aa347fe2c26d0d0aa6ceeb4958244a0d82a9d50f358f0c6c0b8433004ea71f62810bd757e9cf11c896596896c31859e6af62716b218f61f72b6d4d3fe
|
7
|
+
data.tar.gz: 3f52eade080b1de1ecdc39624a87b6840239392ebcf30bada85e44706cbd7c819cecc566a1eb5b7e8fa9cff5c567ab5929c3ec2189c4fb300e94357cbbb4ca42
|
data/CHANGELOG.md
CHANGED
data/MIT-LICENSE
CHANGED
data/lib/anycable.rb
CHANGED
@@ -31,7 +31,7 @@ module AnyCable
|
|
31
31
|
def logger
|
32
32
|
return @logger if instance_variable_defined?(:@logger)
|
33
33
|
|
34
|
-
log_output = AnyCable.config.log_file ||
|
34
|
+
log_output = AnyCable.config.log_file || $stdout
|
35
35
|
@logger = Logger.new(log_output).tap do |logger|
|
36
36
|
logger.level = AnyCable.config.log_level
|
37
37
|
end
|
@@ -41,7 +41,7 @@ module AnyCable
|
|
41
41
|
DELAY = 2
|
42
42
|
|
43
43
|
attr_reader :url, :headers, :authorized
|
44
|
-
|
44
|
+
alias_method :authorized?, :authorized
|
45
45
|
|
46
46
|
def initialize(url: AnyCable.config.http_broadcast_url, secret: AnyCable.config.http_broadcast_secret)
|
47
47
|
@url = url
|
data/lib/anycable/cli.rb
CHANGED
data/lib/anycable/config.rb
CHANGED
@@ -47,7 +47,7 @@ module AnyCable
|
|
47
47
|
version_check_enabled: true
|
48
48
|
)
|
49
49
|
|
50
|
-
|
50
|
+
alias_method :version_check_enabled?, :version_check_enabled
|
51
51
|
|
52
52
|
ignore_options :rpc_server_args
|
53
53
|
flag_options :log_grpc, :debug
|
@@ -77,7 +77,7 @@ module AnyCable
|
|
77
77
|
@debug != false
|
78
78
|
end
|
79
79
|
|
80
|
-
|
80
|
+
alias_method :debug?, :debug
|
81
81
|
end
|
82
82
|
|
83
83
|
def http_health_port_provided?
|
@@ -98,13 +98,17 @@ module AnyCable
|
|
98
98
|
# Build Redis parameters
|
99
99
|
def to_redis_params
|
100
100
|
{url: redis_url}.tap do |params|
|
101
|
-
next if redis_sentinels.nil?
|
101
|
+
next if redis_sentinels.nil? || redis_sentinels.empty?
|
102
102
|
|
103
103
|
sentinels = Array(redis_sentinels)
|
104
104
|
|
105
105
|
next if sentinels.empty?
|
106
106
|
|
107
107
|
params[:sentinels] = sentinels.map(&method(:parse_sentinel))
|
108
|
+
end.tap do |params|
|
109
|
+
next unless redis_url.match?(/rediss:\/\//)
|
110
|
+
|
111
|
+
params[:ssl_params] = {verify_mode: OpenSSL::SSL::VERIFY_NONE}
|
108
112
|
end
|
109
113
|
end
|
110
114
|
|
data/lib/anycable/socket.rb
CHANGED
@@ -17,7 +17,7 @@ module AnyCable
|
|
17
17
|
source&.[](key)
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
alias_method :[], :read
|
21
21
|
|
22
22
|
def write(key, val)
|
23
23
|
return if source&.[](key) == val
|
@@ -28,7 +28,7 @@ module AnyCable
|
|
28
28
|
source[key] = val
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
alias_method :[]=, :write
|
32
32
|
|
33
33
|
def changed_fields
|
34
34
|
return unless source && dirty_keys
|
data/lib/anycable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|