makara 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/gem-publish-public.yml +36 -0
- data/.travis.yml +36 -10
- data/CHANGELOG.md +64 -45
- data/Gemfile +1 -1
- data/README.md +6 -8
- data/gemfiles/ar-head.gemfile +1 -1
- data/gemfiles/ar52.gemfile +24 -0
- data/gemfiles/ar60.gemfile +24 -0
- data/lib/active_record/connection_adapters/makara_abstract_adapter.rb +106 -0
- data/lib/makara/config_parser.rb +2 -1
- data/lib/makara/connection_wrapper.rb +24 -0
- data/lib/makara/errors/blacklisted_while_in_transaction.rb +14 -0
- data/lib/makara/errors/invalid_shard.rb +16 -0
- data/lib/makara/pool.rb +47 -24
- data/lib/makara/proxy.rb +32 -4
- data/lib/makara/railtie.rb +0 -6
- data/lib/makara/strategies/shard_aware.rb +47 -0
- data/lib/makara/version.rb +1 -1
- data/lib/makara.rb +14 -4
- data/makara.gemspec +5 -1
- data/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb +57 -0
- data/spec/cookie_spec.rb +3 -3
- data/spec/middleware_spec.rb +1 -1
- data/spec/pool_spec.rb +24 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/strategies/shard_aware_spec.rb +219 -0
- data/spec/support/mock_objects.rb +4 -0
- metadata +16 -7
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -31,6 +31,7 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
+
- ".github/workflows/gem-publish-public.yml"
|
34
35
|
- ".gitignore"
|
35
36
|
- ".rspec"
|
36
37
|
- ".ruby-gemset"
|
@@ -49,6 +50,8 @@ files:
|
|
49
50
|
- gemfiles/ar42.gemfile
|
50
51
|
- gemfiles/ar50.gemfile
|
51
52
|
- gemfiles/ar51.gemfile
|
53
|
+
- gemfiles/ar52.gemfile
|
54
|
+
- gemfiles/ar60.gemfile
|
52
55
|
- lib/active_record/connection_adapters/jdbcmysql_makara_adapter.rb
|
53
56
|
- lib/active_record/connection_adapters/jdbcpostgresql_makara_adapter.rb
|
54
57
|
- lib/active_record/connection_adapters/makara_abstract_adapter.rb
|
@@ -68,6 +71,8 @@ files:
|
|
68
71
|
- lib/makara/error_handler.rb
|
69
72
|
- lib/makara/errors/all_connections_blacklisted.rb
|
70
73
|
- lib/makara/errors/blacklist_connection.rb
|
74
|
+
- lib/makara/errors/blacklisted_while_in_transaction.rb
|
75
|
+
- lib/makara/errors/invalid_shard.rb
|
71
76
|
- lib/makara/errors/makara_error.rb
|
72
77
|
- lib/makara/errors/no_connections_available.rb
|
73
78
|
- lib/makara/logging/logger.rb
|
@@ -79,6 +84,7 @@ files:
|
|
79
84
|
- lib/makara/strategies/abstract.rb
|
80
85
|
- lib/makara/strategies/priority_failover.rb
|
81
86
|
- lib/makara/strategies/round_robin.rb
|
87
|
+
- lib/makara/strategies/shard_aware.rb
|
82
88
|
- lib/makara/version.rb
|
83
89
|
- makara.gemspec
|
84
90
|
- spec/active_record/connection_adapters/makara_abstract_adapter_error_handling_spec.rb
|
@@ -97,6 +103,7 @@ files:
|
|
97
103
|
- spec/spec_helper.rb
|
98
104
|
- spec/strategies/priority_failover_spec.rb
|
99
105
|
- spec/strategies/round_robin_spec.rb
|
106
|
+
- spec/strategies/shard_aware_spec.rb
|
100
107
|
- spec/support/deep_dup.rb
|
101
108
|
- spec/support/helpers.rb
|
102
109
|
- spec/support/mock_objects.rb
|
@@ -109,9 +116,11 @@ files:
|
|
109
116
|
- spec/support/proxy_extensions.rb
|
110
117
|
- spec/support/schema.rb
|
111
118
|
- spec/support/user.rb
|
112
|
-
homepage:
|
113
|
-
licenses:
|
114
|
-
|
119
|
+
homepage: https://github.com/taskrabbit/makara
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata:
|
123
|
+
source_code_uri: https://github.com/taskrabbit/makara
|
115
124
|
post_install_message:
|
116
125
|
rdoc_options: []
|
117
126
|
require_paths:
|
@@ -127,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
136
|
- !ruby/object:Gem::Version
|
128
137
|
version: '0'
|
129
138
|
requirements: []
|
130
|
-
|
131
|
-
rubygems_version: 2.5.2
|
139
|
+
rubygems_version: 3.1.4
|
132
140
|
signing_key:
|
133
141
|
specification_version: 4
|
134
142
|
summary: Read-write split your DB yo
|
@@ -149,6 +157,7 @@ test_files:
|
|
149
157
|
- spec/spec_helper.rb
|
150
158
|
- spec/strategies/priority_failover_spec.rb
|
151
159
|
- spec/strategies/round_robin_spec.rb
|
160
|
+
- spec/strategies/shard_aware_spec.rb
|
152
161
|
- spec/support/deep_dup.rb
|
153
162
|
- spec/support/helpers.rb
|
154
163
|
- spec/support/mock_objects.rb
|