janus-ar 7.2.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +40 -38
- data/README.md +4 -2
- data/janus-ar.gemspec +4 -4
- data/lib/janus-ar/active_record/connection_adapters/janus_mysql2_adapter.rb +2 -1
- data/lib/janus-ar/active_record/connection_adapters/janus_trilogy_adapter.rb +2 -1
- data/lib/janus-ar/version.rb +2 -2
- metadata +19 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 612d3c32af790b83f526dfe55c6a657e527c0d08c9dc7959c7203e5fe794fec0
|
4
|
+
data.tar.gz: f98329224347cbe2e08a2fadef8d3e9e705afb281066a18aa29a7757fd0adf26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8565f506ef40bb85d1a453f3978961af94d3fcc0d4e743d691c443c656c4e2eaeb078c07e453abc7580fc7ff6e31184ca774fd90f6ffa33753d3de3c2646f4fe
|
7
|
+
data.tar.gz: 653188ccf586dfd9d1d30bb666b62f09f053749a8b5b04c6403f05a5d6f02f8ae188c1d5eb1a00ee7944c9023cbd7796c482d2ac1c45e291af516d15abfe4b6c
|
data/Gemfile.lock
CHANGED
@@ -2,19 +2,20 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
janus-ar (7.2.0)
|
5
|
-
activerecord (
|
5
|
+
activerecord (>= 8.0, < 9.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (
|
11
|
-
activesupport (=
|
12
|
-
activerecord (
|
13
|
-
activemodel (=
|
14
|
-
activesupport (=
|
10
|
+
activemodel (8.0.1)
|
11
|
+
activesupport (= 8.0.1)
|
12
|
+
activerecord (8.0.1)
|
13
|
+
activemodel (= 8.0.1)
|
14
|
+
activesupport (= 8.0.1)
|
15
15
|
timeout (>= 0.4.0)
|
16
|
-
activesupport (
|
16
|
+
activesupport (8.0.1)
|
17
17
|
base64
|
18
|
+
benchmark (>= 0.3)
|
18
19
|
bigdecimal
|
19
20
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
20
21
|
connection_pool (>= 2.2.5)
|
@@ -24,36 +25,36 @@ GEM
|
|
24
25
|
minitest (>= 5.1)
|
25
26
|
securerandom (>= 0.3)
|
26
27
|
tzinfo (~> 2.0, >= 2.0.5)
|
28
|
+
uri (>= 0.13.1)
|
27
29
|
ast (2.4.2)
|
28
30
|
base64 (0.2.0)
|
29
|
-
|
31
|
+
benchmark (0.4.0)
|
32
|
+
bigdecimal (3.1.9)
|
30
33
|
coderay (1.1.3)
|
31
34
|
concurrent-ruby (1.3.4)
|
32
35
|
connection_pool (2.4.1)
|
33
36
|
diff-lcs (1.5.1)
|
34
37
|
drb (2.2.1)
|
35
|
-
i18n (1.14.
|
38
|
+
i18n (1.14.6)
|
36
39
|
concurrent-ruby (~> 1.0)
|
37
|
-
json (2.
|
40
|
+
json (2.9.1)
|
38
41
|
language_server-protocol (3.17.0.3)
|
39
|
-
logger (1.6.
|
40
|
-
method_source (1.
|
41
|
-
minitest (5.25.
|
42
|
+
logger (1.6.4)
|
43
|
+
method_source (1.1.0)
|
44
|
+
minitest (5.25.4)
|
42
45
|
mysql2 (0.5.6)
|
43
46
|
parallel (1.26.3)
|
44
|
-
parser (3.3.
|
47
|
+
parser (3.3.6.0)
|
45
48
|
ast (~> 2.4.1)
|
46
49
|
racc
|
47
|
-
pry (0.
|
50
|
+
pry (0.15.2)
|
48
51
|
coderay (~> 1.1)
|
49
52
|
method_source (~> 1.0)
|
50
53
|
racc (1.8.1)
|
51
|
-
rack (3.1.
|
54
|
+
rack (3.1.8)
|
52
55
|
rainbow (3.1.1)
|
53
56
|
rake (13.2.1)
|
54
|
-
regexp_parser (2.
|
55
|
-
rexml (3.3.6)
|
56
|
-
strscan
|
57
|
+
regexp_parser (2.10.0)
|
57
58
|
rspec (3.13.0)
|
58
59
|
rspec-core (~> 3.13.0)
|
59
60
|
rspec-expectations (~> 3.13.0)
|
@@ -67,54 +68,55 @@ GEM
|
|
67
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
69
|
rspec-support (~> 3.13.0)
|
69
70
|
rspec-support (3.13.1)
|
70
|
-
rubocop (1.
|
71
|
+
rubocop (1.69.2)
|
71
72
|
json (~> 2.3)
|
72
73
|
language_server-protocol (>= 3.17.0)
|
73
74
|
parallel (~> 1.10)
|
74
75
|
parser (>= 3.3.0.2)
|
75
76
|
rainbow (>= 2.2.2, < 4.0)
|
76
|
-
regexp_parser (>= 2.
|
77
|
-
|
78
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
77
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
78
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
79
79
|
ruby-progressbar (~> 1.7)
|
80
|
-
unicode-display_width (>= 2.4.0, <
|
81
|
-
rubocop-ast (1.
|
80
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
81
|
+
rubocop-ast (1.37.0)
|
82
82
|
parser (>= 3.3.1.0)
|
83
|
-
rubocop-performance (1.
|
83
|
+
rubocop-performance (1.23.1)
|
84
84
|
rubocop (>= 1.48.1, < 2.0)
|
85
85
|
rubocop-ast (>= 1.31.1, < 2.0)
|
86
|
-
rubocop-rails (2.
|
86
|
+
rubocop-rails (2.28.0)
|
87
87
|
activesupport (>= 4.2.0)
|
88
88
|
rack (>= 1.1)
|
89
89
|
rubocop (>= 1.52.0, < 2.0)
|
90
90
|
rubocop-ast (>= 1.31.1, < 2.0)
|
91
|
-
rubocop-rspec (3.0
|
91
|
+
rubocop-rspec (3.2.0)
|
92
92
|
rubocop (~> 1.61)
|
93
|
-
rubocop-thread_safety (0.
|
94
|
-
rubocop (>=
|
93
|
+
rubocop-thread_safety (0.6.0)
|
94
|
+
rubocop (>= 1.48.1)
|
95
95
|
ruby-progressbar (1.13.0)
|
96
|
-
securerandom (0.
|
97
|
-
|
98
|
-
|
99
|
-
trilogy (2.8.1)
|
96
|
+
securerandom (0.4.1)
|
97
|
+
timeout (0.4.3)
|
98
|
+
trilogy (2.9.0)
|
100
99
|
tzinfo (2.0.6)
|
101
100
|
concurrent-ruby (~> 1.0)
|
102
|
-
unicode-display_width (
|
101
|
+
unicode-display_width (3.1.3)
|
102
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
103
|
+
unicode-emoji (4.0.4)
|
104
|
+
uri (1.0.2)
|
103
105
|
|
104
106
|
PLATFORMS
|
105
107
|
arm64-darwin-23
|
106
108
|
x86_64-linux
|
107
109
|
|
108
110
|
DEPENDENCIES
|
109
|
-
activesupport (>=
|
111
|
+
activesupport (>= 8.0)
|
110
112
|
janus-ar!
|
111
113
|
mysql2
|
112
114
|
pry
|
113
115
|
rake
|
114
116
|
rspec (~> 3)
|
115
|
-
rubocop (~> 1.
|
117
|
+
rubocop (~> 1.69.2)
|
116
118
|
rubocop-performance
|
117
|
-
rubocop-rails (~> 2.
|
119
|
+
rubocop-rails (~> 2.28.0)
|
118
120
|
rubocop-rspec
|
119
121
|
rubocop-thread_safety
|
120
122
|
trilogy
|
data/README.md
CHANGED
@@ -35,7 +35,9 @@ This project assumes that your read/write endpoints are handled by a separate sy
|
|
35
35
|
|
36
36
|
After a write request during a thread the adapter will continue using the `primary` server, unless the context is specifically released.
|
37
37
|
|
38
|
-
|
38
|
+
### Setup
|
39
|
+
|
40
|
+
#### Rails 7.2+
|
39
41
|
|
40
42
|
For Rails 7.2 you'll need to manually register the database adaptor in `config/application.rb` after requiring rails but before entering the application configuration, e.g.
|
41
43
|
|
@@ -47,7 +49,7 @@ ActiveRecord::ConnectionAdapters.register("janus_trilogy", "ActiveRecord::Connec
|
|
47
49
|
ActiveRecord::ConnectionAdapters.register("janus_mysql2", "ActiveRecord::ConnectionAdapters::JanusMysql2Adapter", 'janus-ar/active_record/connection_adapters/janus_mysql2_adapter')
|
48
50
|
```
|
49
51
|
|
50
|
-
|
52
|
+
#### Rails <= 7.1
|
51
53
|
|
52
54
|
ActiveRecord 7.1 was tested up to releases v0.15.*. After this release we only tested Rails 7.2+. This does not mean it is not compatible, just not tested.
|
53
55
|
|
data/janus-ar.gemspec
CHANGED
@@ -21,15 +21,15 @@ Gem::Specification.new do |gem|
|
|
21
21
|
|
22
22
|
gem.required_ruby_version = '>= 3.2.0'
|
23
23
|
|
24
|
-
gem.add_dependency 'activerecord', '
|
25
|
-
gem.add_development_dependency 'activesupport', '>=
|
24
|
+
gem.add_dependency 'activerecord', '>= 8.0', '< 9.0'
|
25
|
+
gem.add_development_dependency 'activesupport', '>= 8.0'
|
26
26
|
gem.add_development_dependency 'mysql2'
|
27
27
|
gem.add_development_dependency 'trilogy'
|
28
28
|
gem.add_development_dependency 'pry'
|
29
29
|
gem.add_development_dependency 'rake'
|
30
30
|
gem.add_development_dependency 'rspec', '~> 3'
|
31
|
-
gem.add_development_dependency 'rubocop', '~> 1.
|
32
|
-
gem.add_development_dependency 'rubocop-rails', '~> 2.
|
31
|
+
gem.add_development_dependency 'rubocop', '~> 1.69.2'
|
32
|
+
gem.add_development_dependency 'rubocop-rails', '~> 2.28.0'
|
33
33
|
gem.add_development_dependency 'rubocop-rspec'
|
34
34
|
gem.add_development_dependency 'rubocop-thread_safety'
|
35
35
|
gem.add_development_dependency 'rubocop-performance'
|
@@ -51,7 +51,8 @@ module ActiveRecord
|
|
51
51
|
self
|
52
52
|
end
|
53
53
|
|
54
|
-
def raw_execute(sql, name,
|
54
|
+
def raw_execute(sql, name = nil, binds = [], prepare: false, async: false, allow_retry: false,
|
55
|
+
materialize_transactions: true, batch: false)
|
55
56
|
case where_to_send?(sql)
|
56
57
|
when :all
|
57
58
|
send_to_replica(sql, connection: :all, method: :raw_execute)
|
@@ -47,7 +47,8 @@ module ActiveRecord
|
|
47
47
|
update_config
|
48
48
|
end
|
49
49
|
|
50
|
-
def raw_execute(sql, name,
|
50
|
+
def raw_execute(sql, name = nil, binds = [], prepare: false, async: false, allow_retry: false,
|
51
|
+
materialize_transactions: true, batch: false)
|
51
52
|
case where_to_send?(sql)
|
52
53
|
when :all
|
53
54
|
send_to_replica(sql, connection: :all, method: :execute)
|
data/lib/janus-ar/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: janus-ar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lloyd Watkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '8.0'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '9.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '8.0'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '9.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activesupport
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
39
|
+
version: '8.0'
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: '8.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: mysql2
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,28 +120,28 @@ dependencies:
|
|
114
120
|
requirements:
|
115
121
|
- - "~>"
|
116
122
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
123
|
+
version: 1.69.2
|
118
124
|
type: :development
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
128
|
- - "~>"
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
130
|
+
version: 1.69.2
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
132
|
name: rubocop-rails
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
135
|
- - "~>"
|
130
136
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.
|
137
|
+
version: 2.28.0
|
132
138
|
type: :development
|
133
139
|
prerelease: false
|
134
140
|
version_requirements: !ruby/object:Gem::Requirement
|
135
141
|
requirements:
|
136
142
|
- - "~>"
|
137
143
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.
|
144
|
+
version: 2.28.0
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
146
|
name: rubocop-rspec
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
247
|
- !ruby/object:Gem::Version
|
242
248
|
version: '0'
|
243
249
|
requirements: []
|
244
|
-
rubygems_version: 3.5.
|
250
|
+
rubygems_version: 3.5.23
|
245
251
|
signing_key:
|
246
252
|
specification_version: 4
|
247
253
|
summary: Read/Write proxy for ActiveRecord using primary/replica databases
|