bigrails-redis 0.6.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/big_rails/redis/builder.rb +2 -1
- data/lib/big_rails/redis/registry.rb +3 -3
- data/lib/big_rails/redis/version.rb +1 -1
- metadata +26 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a134f22706b7b05a8560f3dd5d0533dda83fe28bbf4494311bd554da0194b4d
|
4
|
+
data.tar.gz: 25cd0ceccafb2c17c64c2242d18d7bb699ba681eee49e1a1a2bd4317facbee00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54979c2d69046a56a0b7de453e6d9f340acd010e1750ea9604692447e6ccf586b5c4af901eb71b890d6116b1796fd570bdc90142150006e17d6a3e10e5a06191
|
7
|
+
data.tar.gz: 00257ba1f9b856464a6b237c636d5090eacaae5eceaedf0e46268530c81c3fcc2d2758c6e3bd34e8a68705d373d86513b66553f8e3f4dcbf583772c4c4144fcd
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# BigRails::Redis [![Ruby](https://github.com/
|
1
|
+
# BigRails::Redis [![Ruby](https://github.com/rubyatscale/bigrails-redis/actions/workflows/main.yml/badge.svg)](https://github.com/rubyatscale/bigrails-redis/actions/workflows/main.yml)
|
2
2
|
|
3
3
|
A simple Redis connection manager for Rails applications with the need to manage multiple redis connections. It supports distributed and [ConnectionPool](https://github.com/mperham/connection_pool) out of the box.
|
4
4
|
|
@@ -54,7 +54,7 @@ end
|
|
54
54
|
# Connection pool support.
|
55
55
|
connection(:sidekiq) do
|
56
56
|
{
|
57
|
-
url: "redis://localhost/2"
|
57
|
+
url: "redis://localhost/2",
|
58
58
|
pool_timeout: 5,
|
59
59
|
pool_size: 5
|
60
60
|
}
|
@@ -121,7 +121,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
121
121
|
|
122
122
|
## Contributing
|
123
123
|
|
124
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
124
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rubyatscale/bigrails-redis. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rubyatscale/bigrails-redis/blob/master/CODE_OF_CONDUCT.md).
|
125
125
|
|
126
126
|
## License
|
127
127
|
|
@@ -129,4 +129,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
129
129
|
|
130
130
|
## Code of Conduct
|
131
131
|
|
132
|
-
Everyone interacting in the BigRails::Redis project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
132
|
+
Everyone interacting in the BigRails::Redis project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubyatscale/bigrails-redis/blob/master/CODE_OF_CONDUCT.md).
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "redis"
|
4
|
+
require "redis/distributed"
|
4
5
|
|
5
6
|
module BigRails
|
6
7
|
module Redis
|
@@ -40,7 +41,7 @@ module BigRails
|
|
40
41
|
|
41
42
|
def ensure_connection_pool_added!
|
42
43
|
require "connection_pool"
|
43
|
-
rescue LoadError
|
44
|
+
rescue LoadError
|
44
45
|
warn "You don't have connection_pool installed in your application. Please add it to your Gemfile and run bundle install"
|
45
46
|
raise
|
46
47
|
end
|
@@ -5,6 +5,7 @@ module BigRails
|
|
5
5
|
class Registry
|
6
6
|
class UnknownConnection < StandardError
|
7
7
|
end
|
8
|
+
|
8
9
|
class VerificationError < StandardError
|
9
10
|
end
|
10
11
|
|
@@ -27,7 +28,7 @@ module BigRails
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def config_for(name)
|
30
|
-
configurations[validate_name(name)]
|
31
|
+
configurations[validate_name(name)].deep_dup
|
31
32
|
end
|
32
33
|
|
33
34
|
def each(&block)
|
@@ -65,8 +66,7 @@ module BigRails
|
|
65
66
|
private
|
66
67
|
|
67
68
|
def build_connection(name)
|
68
|
-
|
69
|
-
builder.call(config)
|
69
|
+
builder.call(config_for(name))
|
70
70
|
end
|
71
71
|
|
72
72
|
def build_wrapped_connection(connection)
|
metadata
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigrails-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ngan Pham
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
@@ -38,7 +52,7 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '4'
|
41
|
-
description:
|
55
|
+
description:
|
42
56
|
email:
|
43
57
|
- ngan@users.noreply.github.com
|
44
58
|
executables: []
|
@@ -55,14 +69,14 @@ files:
|
|
55
69
|
- lib/big_rails/redis/registry.rb
|
56
70
|
- lib/big_rails/redis/version.rb
|
57
71
|
- lib/bigrails-redis.rb
|
58
|
-
homepage: https://github.com/
|
72
|
+
homepage: https://github.com/rubyatscale/bigrails-redis
|
59
73
|
licenses:
|
60
74
|
- MIT
|
61
75
|
metadata:
|
62
|
-
homepage_uri: https://github.com/
|
63
|
-
source_code_uri: https://github.com/
|
64
|
-
changelog_uri: https://github.com/
|
65
|
-
post_install_message:
|
76
|
+
homepage_uri: https://github.com/rubyatscale/bigrails-redis
|
77
|
+
source_code_uri: https://github.com/rubyatscale/bigrails-redis
|
78
|
+
changelog_uri: https://github.com/rubyatscale/bigrails-redis/releases
|
79
|
+
post_install_message:
|
66
80
|
rdoc_options: []
|
67
81
|
require_paths:
|
68
82
|
- lib
|
@@ -77,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
91
|
- !ruby/object:Gem::Version
|
78
92
|
version: '0'
|
79
93
|
requirements: []
|
80
|
-
rubygems_version: 3.
|
81
|
-
signing_key:
|
94
|
+
rubygems_version: 3.1.6
|
95
|
+
signing_key:
|
82
96
|
specification_version: 4
|
83
97
|
summary: Redis connection manager for Rails applications.
|
84
98
|
test_files: []
|