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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90f8b0fc45d4659234b7defd755b818c19dde55779a64cbdec794fc68441bf45
4
- data.tar.gz: 2184541660e683c2206593636434b4a24578376936eb0bb63d4600602829c736
3
+ metadata.gz: dd11b4e0403da1e162132375055bc2815c48ee57c3554a04ed72683d91fb0fde
4
+ data.tar.gz: '0568d54349b5e0a452f00119678b37964bb8c0102f512010e015c0b836a2ef6f'
5
5
  SHA512:
6
- metadata.gz: bddcd49f2e31f8a1c0fcf202e44779abe0fcf4092bc3358f3b4efe7b86e4db1454e083e2c352e651ff38fafcf0d4f3b1907a019fba5e262aaeba0b7fd6a09abb
7
- data.tar.gz: fa7586b9a059dfb9584894d1f5540fd33dff26411f8199a0f837cf26d0d0c9c2af150602ebbadc775af3f2b9393ed5c2de0f7435a2d403f11081166ddcae88df
6
+ metadata.gz: 22ded17aa347fe2c26d0d0aa6ceeb4958244a0d82a9d50f358f0c6c0b8433004ea71f62810bd757e9cf11c896596896c31859e6af62716b218f61f72b6d4d3fe
7
+ data.tar.gz: 3f52eade080b1de1ecdc39624a87b6840239392ebcf30bada85e44706cbd7c819cecc566a1eb5b7e8fa9cff5c567ab5929c3ec2189c4fb300e94357cbbb4ca42
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.0.2
6
+
7
+ - Handle TLS Redis connections by using VERIFY_NONE mode. ([@palkan][])
8
+
5
9
  ## 1.0.1 (2020-07-07)
6
10
 
7
11
  - Support providing passwords for Redis Sentinels. ([@palkan][])
@@ -1,4 +1,4 @@
1
- Copyright 2017-2020 Vladimir Dementyev
1
+ Copyright 2017-2021 Vladimir Dementyev
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -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 || STDOUT
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
- alias authorized? authorized
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
@@ -21,7 +21,7 @@ module AnyCable
21
21
  WAIT_PROCESS = 2
22
22
 
23
23
  attr_reader :server, :health_server, :embedded
24
- alias embedded? embedded
24
+ alias_method :embedded?, :embedded
25
25
 
26
26
  def initialize(embedded: false)
27
27
  @embedded = embedded
@@ -47,7 +47,7 @@ module AnyCable
47
47
  version_check_enabled: true
48
48
  )
49
49
 
50
- alias version_check_enabled? version_check_enabled
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
- alias debug? debug
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
 
@@ -7,7 +7,7 @@ module AnyCable
7
7
  handlers << procify(block)
8
8
  end
9
9
 
10
- alias << add_handler
10
+ alias_method :<<, :add_handler
11
11
 
12
12
  def notify(exp, method_name, message)
13
13
  handlers.each do |handler|
@@ -17,7 +17,7 @@ module AnyCable
17
17
  source&.[](key)
18
18
  end
19
19
 
20
- alias [] read
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
- alias []= write
31
+ alias_method :[]=, :write
32
32
 
33
33
  def changed_fields
34
34
  return unless source && dirty_keys
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AnyCable
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
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.1
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: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config