anycable 1.0.0 → 1.0.1

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: 56b2cba3d3cfba9af5c99d54351b9228a3a61e525ae7c7708e4d5859e2a85ddf
4
- data.tar.gz: db911543cf64b3a56cebf097af09e5b64d248bc7da3ee170a06654ababe3734b
3
+ metadata.gz: 90f8b0fc45d4659234b7defd755b818c19dde55779a64cbdec794fc68441bf45
4
+ data.tar.gz: 2184541660e683c2206593636434b4a24578376936eb0bb63d4600602829c736
5
5
  SHA512:
6
- metadata.gz: 4e7d41fd2a41d03b3cd3137b64e86dd04df39cc95fa2639590e6f2fef95e1b87791d0ce6b06fa2922f72f5da06e8b9ad8c64e0b42511d8405cb6104fa622c326
7
- data.tar.gz: 538f118f77c1cf56235a4b05cc4f77231736f21f78db63684cf42abd253094fbfde2da34b44f82fd9dfcc4537366efe4c98d287447e904e0197599073d66d6ae
6
+ metadata.gz: bddcd49f2e31f8a1c0fcf202e44779abe0fcf4092bc3358f3b4efe7b86e4db1454e083e2c352e651ff38fafcf0d4f3b1907a019fba5e262aaeba0b7fd6a09abb
7
+ data.tar.gz: fa7586b9a059dfb9584894d1f5540fd33dff26411f8199a0f837cf26d0d0c9c2af150602ebbadc775af3f2b9393ed5c2de0f7435a2d403f11081166ddcae88df
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.0.1 (2020-07-07)
6
+
7
+ - Support providing passwords for Redis Sentinels. ([@palkan][])
8
+
9
+ Use the following format: `ANYCABLE_REDIS_SENTINELS=:password1@my.redis.sentinel.first:26380,:password2@my.redis.sentinel.second:26380`.
10
+
5
11
  ## 1.0.0 (2020-07-01)
6
12
 
7
13
  - Add `embedded` option to CLI runner. ([@palkan][])
data/README.md CHANGED
@@ -29,6 +29,8 @@ Check out our 📑 [Documentation](https://docs.anycable.io/v1).
29
29
 
30
30
  ## Links
31
31
 
32
+ - [AnyCable 1.0: Four years of real-time web with Ruby and Go](https://evilmartians.com/chronicles/anycable-1-0-four-years-of-real-time-web-with-ruby-and-go)
33
+
32
34
  - [AnyCable: Action Cable on steroids!](https://evilmartians.com/chronicles/anycable-actioncable-on-steroids)
33
35
 
34
36
  - [Connecting LiteCable to Hanami](http://gabrielmalakias.com.br/ruby/hanami/iot/2017/05/26/websockets-connecting-litecable-to-hanami.html) by [@GabrielMalakias](https://github.com/GabrielMalakias)
@@ -3,6 +3,8 @@
3
3
  require "anyway_config"
4
4
  require "grpc"
5
5
 
6
+ require "uri"
7
+
6
8
  module AnyCable
7
9
  # AnyCable configuration.
8
10
  class Config < Anyway::Config
@@ -116,16 +118,14 @@ module AnyCable
116
118
 
117
119
  private
118
120
 
119
- SENTINEL_RXP = /^([\w\-_]*)\:(\d+)$/.freeze
120
-
121
121
  def parse_sentinel(sentinel)
122
122
  return sentinel.transform_keys!(&:to_sym) if sentinel.is_a?(Hash)
123
123
 
124
- matches = sentinel.match(SENTINEL_RXP)
124
+ uri = URI.parse("redis://#{sentinel}")
125
125
 
126
- raise ArgumentError, "Invalid Sentinel value: #{sentinel}" if matches.nil?
127
-
128
- {host: matches[1], port: matches[2].to_i}
126
+ {host: uri.host, port: uri.port}.tap do |opts|
127
+ opts[:password] = uri.password if uri.password
128
+ end
129
129
  end
130
130
  end
131
131
  end
@@ -9,6 +9,7 @@ RSpec.shared_context "anycable:rpc:server" do
9
9
  )
10
10
 
11
11
  @server.start
12
+ sleep 0.1
12
13
  end
13
14
 
14
15
  after(:all) { @server.stop }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AnyCable
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-30 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config