janus-ar 0.15.3 → 7.2.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/.rubocop.yml +26 -22
- data/Gemfile.lock +22 -21
- data/README.md +19 -0
- data/Rakefile +3 -3
- data/janus-ar.gemspec +4 -4
- data/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_mysql2_adapter.rb +5 -1
- data/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_trilogy_adapter.rb +5 -1
- data/lib/{janus → janus-ar}/version.rb +3 -3
- data/lib/janus-ar.rb +22 -0
- data/spec/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_trilogy_adapter_spec.rb +2 -0
- data/spec/lib/{janus → janus-ar}/client_spec.rb +1 -1
- data/spec/lib/{janus → janus-ar}/context_spec.rb +1 -1
- data/spec/spec_helper.rb +6 -3
- metadata +23 -35
- data/lib/janus.rb +0 -22
- /data/lib/{janus → janus-ar}/client.rb +0 -0
- /data/lib/{janus → janus-ar}/context.rb +0 -0
- /data/lib/{janus → janus-ar}/db_console_config.rb +0 -0
- /data/lib/{janus → janus-ar}/logging/logger.rb +0 -0
- /data/lib/{janus → janus-ar}/logging/subscriber.rb +0 -0
- /data/lib/{janus → janus-ar}/query_director.rb +0 -0
- /data/spec/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_mysql_adapter_spec.rb +0 -0
- /data/spec/lib/{janus → janus-ar}/logging/logger_spec.rb +0 -0
- /data/spec/lib/{janus → janus-ar}/query_director_spec.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9a0e04cbb2ece10c1a3fec2d0c1036788eaa290e36f5af3ea78812e8de6ac6c
|
|
4
|
+
data.tar.gz: 4cdf47f493d980f0c90b2bdb1d45468163cc58bf7d88c60956dc12e62dd2983d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cc3b11d2a1f77ffd74c13fb61d9a6b012fa95375c030f93317be8a02052cc899c3750dbda3273efc4344e9bfc259c22d385842d9ad829ebde770ec3c911d969
|
|
7
|
+
data.tar.gz: 2abaface3c1b02a535a3b467b047ed03ab67ee5b57396363253fa975ab89b39cffaf0386b08968b9001f86623779b92ef31189cd91598242a31934ae1b71e8d9
|
data/.rubocop.yml
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
inherit_from:
|
|
2
|
-
- https://tech.olioex.com/.support/rubocop-styling-v1.0
|
|
3
|
-
|
|
4
|
-
require:
|
|
5
|
-
- rubocop-rails
|
|
6
|
-
|
|
7
|
-
Style/Documentation:
|
|
8
|
-
Enabled: false
|
|
9
|
-
|
|
10
|
-
Rails/Delegate:
|
|
11
|
-
Enabled: false
|
|
12
|
-
|
|
13
|
-
Metrics/BlockLength:
|
|
14
|
-
Exclude:
|
|
15
|
-
- spec/**/*
|
|
16
|
-
|
|
17
|
-
Style/GlobalVars:
|
|
18
|
-
Exclude:
|
|
19
|
-
- 'spec/**/*'
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
inherit_from:
|
|
2
|
+
- https://tech.olioex.com/.support/rubocop-styling-v1.0
|
|
3
|
+
|
|
4
|
+
require:
|
|
5
|
+
- rubocop-rails
|
|
6
|
+
|
|
7
|
+
Style/Documentation:
|
|
8
|
+
Enabled: false
|
|
9
|
+
|
|
10
|
+
Rails/Delegate:
|
|
11
|
+
Enabled: false
|
|
12
|
+
|
|
13
|
+
Metrics/BlockLength:
|
|
14
|
+
Exclude:
|
|
15
|
+
- spec/**/*
|
|
16
|
+
|
|
17
|
+
Style/GlobalVars:
|
|
18
|
+
Exclude:
|
|
19
|
+
- 'spec/**/*'
|
|
20
|
+
|
|
21
|
+
Naming/FileName:
|
|
22
|
+
Exclude:
|
|
23
|
+
- lib/janus-ar.rb
|
|
24
|
+
|
|
25
|
+
Metrics/AbcSize:
|
|
26
|
+
Max: 25
|
data/Gemfile.lock
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
janus-ar (
|
|
5
|
-
activerecord (
|
|
4
|
+
janus-ar (7.2.0)
|
|
5
|
+
activerecord (~> 7.2)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: http://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (7.1
|
|
11
|
-
activesupport (= 7.1
|
|
12
|
-
activerecord (7.1
|
|
13
|
-
activemodel (= 7.1
|
|
14
|
-
activesupport (= 7.1
|
|
10
|
+
activemodel (7.2.1)
|
|
11
|
+
activesupport (= 7.2.1)
|
|
12
|
+
activerecord (7.2.1)
|
|
13
|
+
activemodel (= 7.2.1)
|
|
14
|
+
activesupport (= 7.2.1)
|
|
15
15
|
timeout (>= 0.4.0)
|
|
16
|
-
activesupport (7.1
|
|
16
|
+
activesupport (7.2.1)
|
|
17
17
|
base64
|
|
18
18
|
bigdecimal
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
20
|
connection_pool (>= 2.2.5)
|
|
21
21
|
drb
|
|
22
22
|
i18n (>= 1.6, < 2)
|
|
23
|
+
logger (>= 1.4.2)
|
|
23
24
|
minitest (>= 5.1)
|
|
24
|
-
|
|
25
|
-
tzinfo (~> 2.0)
|
|
25
|
+
securerandom (>= 0.3)
|
|
26
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
26
27
|
ast (2.4.2)
|
|
27
28
|
base64 (0.2.0)
|
|
28
29
|
bigdecimal (3.1.8)
|
|
29
30
|
coderay (1.1.3)
|
|
30
|
-
concurrent-ruby (1.3.
|
|
31
|
+
concurrent-ruby (1.3.4)
|
|
31
32
|
connection_pool (2.4.1)
|
|
32
33
|
diff-lcs (1.5.1)
|
|
33
34
|
drb (2.2.1)
|
|
@@ -35,9 +36,9 @@ GEM
|
|
|
35
36
|
concurrent-ruby (~> 1.0)
|
|
36
37
|
json (2.7.2)
|
|
37
38
|
language_server-protocol (3.17.0.3)
|
|
39
|
+
logger (1.6.0)
|
|
38
40
|
method_source (1.0.0)
|
|
39
|
-
minitest (5.
|
|
40
|
-
mutex_m (0.2.0)
|
|
41
|
+
minitest (5.25.1)
|
|
41
42
|
mysql2 (0.5.6)
|
|
42
43
|
parallel (1.26.3)
|
|
43
44
|
parser (3.3.4.2)
|
|
@@ -47,12 +48,11 @@ GEM
|
|
|
47
48
|
coderay (~> 1.1)
|
|
48
49
|
method_source (~> 1.0)
|
|
49
50
|
racc (1.8.1)
|
|
50
|
-
rack (3.1.
|
|
51
|
-
strscan
|
|
51
|
+
rack (3.1.7)
|
|
52
52
|
rainbow (3.1.1)
|
|
53
53
|
rake (13.2.1)
|
|
54
54
|
regexp_parser (2.9.2)
|
|
55
|
-
rexml (3.3.
|
|
55
|
+
rexml (3.3.6)
|
|
56
56
|
strscan
|
|
57
57
|
rspec (3.13.0)
|
|
58
58
|
rspec-core (~> 3.13.0)
|
|
@@ -83,16 +83,17 @@ GEM
|
|
|
83
83
|
rubocop-performance (1.21.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.26.0)
|
|
87
87
|
activesupport (>= 4.2.0)
|
|
88
88
|
rack (>= 1.1)
|
|
89
|
-
rubocop (>= 1.
|
|
89
|
+
rubocop (>= 1.52.0, < 2.0)
|
|
90
90
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
91
91
|
rubocop-rspec (3.0.4)
|
|
92
92
|
rubocop (~> 1.61)
|
|
93
93
|
rubocop-thread_safety (0.5.1)
|
|
94
94
|
rubocop (>= 0.90.0)
|
|
95
95
|
ruby-progressbar (1.13.0)
|
|
96
|
+
securerandom (0.3.1)
|
|
96
97
|
strscan (3.1.0)
|
|
97
98
|
timeout (0.4.1)
|
|
98
99
|
trilogy (2.8.1)
|
|
@@ -105,7 +106,7 @@ PLATFORMS
|
|
|
105
106
|
x86_64-linux
|
|
106
107
|
|
|
107
108
|
DEPENDENCIES
|
|
108
|
-
activesupport (>= 7.
|
|
109
|
+
activesupport (>= 7.2.0)
|
|
109
110
|
janus-ar!
|
|
110
111
|
mysql2
|
|
111
112
|
pry
|
|
@@ -113,7 +114,7 @@ DEPENDENCIES
|
|
|
113
114
|
rspec (~> 3)
|
|
114
115
|
rubocop (~> 1.65.0)
|
|
115
116
|
rubocop-performance
|
|
116
|
-
rubocop-rails (~> 2.
|
|
117
|
+
rubocop-rails (~> 2.26.0)
|
|
117
118
|
rubocop-rspec
|
|
118
119
|
rubocop-thread_safety
|
|
119
120
|
trilogy
|
data/README.md
CHANGED
|
@@ -35,6 +35,22 @@ 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
|
+
## Rails 7.2+
|
|
39
|
+
|
|
40
|
+
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
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
require 'rails/all'
|
|
44
|
+
|
|
45
|
+
ActiveRecord::ConnectionAdapters.register("janus_trilogy", "ActiveRecord::ConnectionAdapters::JanusTrilogyAdapter", 'janus-ar/active_record/connection_adapters/janus_trilogy_adapter')
|
|
46
|
+
# ...or...
|
|
47
|
+
ActiveRecord::ConnectionAdapters.register("janus_mysql2", "ActiveRecord::ConnectionAdapters::JanusMysql2Adapter", 'janus-ar/active_record/connection_adapters/janus_mysql2_adapter')
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Rails <= 7.1
|
|
51
|
+
|
|
52
|
+
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
|
+
|
|
38
54
|
### Configuration
|
|
39
55
|
|
|
40
56
|
Update your **database.yml** as follows:
|
|
@@ -104,6 +120,9 @@ There are some edge cases:
|
|
|
104
120
|
* Calls inside a transaction will always be sent to the primary (otherwise changes from within the transaction could not be read back on most transaction isolation levels)
|
|
105
121
|
* Locking reads (e.g. `SELECT ... FOR UPDATE`) will always be sent to the primary
|
|
106
122
|
|
|
123
|
+
# Notes
|
|
124
|
+
|
|
125
|
+
Janus does not support Rails' read/write split or sharding using `with_connection`.
|
|
107
126
|
|
|
108
127
|
# Acknowlegements
|
|
109
128
|
|
data/Rakefile
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'bundler/gem_tasks'
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/gem_tasks'
|
data/janus-ar.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require File.expand_path('lib/janus/version.rb', __dir__)
|
|
3
|
+
require File.expand_path('lib/janus-ar/version.rb', __dir__)
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |gem|
|
|
6
6
|
gem.authors = ['Lloyd Watkin']
|
|
@@ -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', '>= 7.
|
|
24
|
+
gem.add_dependency 'activerecord', '~> 7.2'
|
|
25
|
+
gem.add_development_dependency 'activesupport', '>= 7.2.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
31
|
gem.add_development_dependency 'rubocop', '~> 1.65.0'
|
|
32
|
-
gem.add_development_dependency 'rubocop-rails', '~> 2.
|
|
32
|
+
gem.add_development_dependency 'rubocop-rails', '~> 2.26.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'
|
data/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_mysql2_adapter.rb
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'active_record/connection_adapters/abstract_adapter'
|
|
4
4
|
require 'active_record/connection_adapters/mysql2_adapter'
|
|
5
|
-
require_relative '
|
|
5
|
+
require_relative '../../../janus-ar'
|
|
6
6
|
|
|
7
7
|
module ActiveRecord
|
|
8
8
|
module ConnectionHandling
|
|
@@ -47,6 +47,10 @@ module ActiveRecord
|
|
|
47
47
|
update_config
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
def with_connection(_args = {})
|
|
51
|
+
self
|
|
52
|
+
end
|
|
53
|
+
|
|
50
54
|
def raw_execute(sql, name, async: false, allow_retry: false, materialize_transactions: true)
|
|
51
55
|
case where_to_send?(sql)
|
|
52
56
|
when :all
|
data/lib/{active_record → janus-ar/active_record}/connection_adapters/janus_trilogy_adapter.rb
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'active_record/connection_adapters/abstract_adapter'
|
|
4
4
|
require 'active_record/connection_adapters/trilogy_adapter'
|
|
5
|
-
require_relative '
|
|
5
|
+
require_relative '../../../janus-ar'
|
|
6
6
|
|
|
7
7
|
module ActiveRecord
|
|
8
8
|
module ConnectionHandling
|
|
@@ -89,6 +89,10 @@ module ActiveRecord
|
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
def with_connection(_args = {})
|
|
93
|
+
self
|
|
94
|
+
end
|
|
95
|
+
|
|
92
96
|
def connect!(...)
|
|
93
97
|
replica_connection.connect!(...)
|
|
94
98
|
super
|
data/lib/janus-ar.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support'
|
|
4
|
+
|
|
5
|
+
module Janus
|
|
6
|
+
autoload :Context, 'janus-ar/context'
|
|
7
|
+
autoload :Client, 'janus-ar/client'
|
|
8
|
+
autoload :QueryDirector, 'janus-ar/query_director'
|
|
9
|
+
autoload :VERSION, 'janus-ar/version'
|
|
10
|
+
autoload :DbConsoleConfig, 'janus-ar/db_console_config'
|
|
11
|
+
|
|
12
|
+
module Logging
|
|
13
|
+
autoload :Subscriber, 'janus-ar/logging/subscriber'
|
|
14
|
+
autoload :Logger, 'janus-ar/logging/logger'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
ActiveSupport.on_load(:active_record) do
|
|
19
|
+
ActiveRecord::LogSubscriber.log_subscribers.each do |subscriber|
|
|
20
|
+
subscriber.extend Janus::Logging::Subscriber
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -14,6 +14,7 @@ RSpec.describe ActiveRecord::ConnectionAdapters::JanusTrilogyAdapter do
|
|
|
14
14
|
'ssl' => true,
|
|
15
15
|
'ssl_mode' => 'REQUIRED',
|
|
16
16
|
'tls_min_version' => Trilogy::TLS_VERSION_12,
|
|
17
|
+
'found_rows' => true,
|
|
17
18
|
}
|
|
18
19
|
end
|
|
19
20
|
let(:replica_config) do
|
|
@@ -25,6 +26,7 @@ RSpec.describe ActiveRecord::ConnectionAdapters::JanusTrilogyAdapter do
|
|
|
25
26
|
'ssl' => true,
|
|
26
27
|
'ssl_mode' => 'REQUIRED',
|
|
27
28
|
'tls_min_version' => Trilogy::TLS_VERSION_12,
|
|
29
|
+
'found_rows' => true,
|
|
28
30
|
}
|
|
29
31
|
end
|
|
30
32
|
let(:config) do
|
data/spec/spec_helper.rb
CHANGED
|
@@ -4,9 +4,12 @@ require 'pry'
|
|
|
4
4
|
|
|
5
5
|
require 'active_record'
|
|
6
6
|
|
|
7
|
-
require './lib/janus'
|
|
8
|
-
require './lib/active_record/connection_adapters/janus_mysql2_adapter'
|
|
9
|
-
require './lib/active_record/connection_adapters/janus_trilogy_adapter'
|
|
7
|
+
require './lib/janus-ar'
|
|
8
|
+
require './lib/janus-ar/active_record/connection_adapters/janus_mysql2_adapter'
|
|
9
|
+
require './lib/janus-ar/active_record/connection_adapters/janus_trilogy_adapter'
|
|
10
|
+
|
|
11
|
+
ActiveRecord::ConnectionAdapters.register("janus_trilogy", "ActiveRecord::ConnectionAdapters::JanusTrilogyAdapter")
|
|
12
|
+
ActiveRecord::ConnectionAdapters.register("janus_mysql2", "ActiveRecord::ConnectionAdapters::JanusMysql2Adapter")
|
|
10
13
|
|
|
11
14
|
require './spec/shared_examples/a_mysql_like_server.rb'
|
|
12
15
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: janus-ar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 7.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lloyd Watkin
|
|
@@ -14,20 +14,14 @@ dependencies:
|
|
|
14
14
|
name: activerecord
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: 7.1.0
|
|
20
|
-
- - "<"
|
|
17
|
+
- - "~>"
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
19
|
version: '7.2'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - "
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: 7.1.0
|
|
30
|
-
- - "<"
|
|
24
|
+
- - "~>"
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
26
|
version: '7.2'
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
@@ -36,20 +30,14 @@ dependencies:
|
|
|
36
30
|
requirements:
|
|
37
31
|
- - ">="
|
|
38
32
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 7.
|
|
40
|
-
- - "<"
|
|
41
|
-
- !ruby/object:Gem::Version
|
|
42
|
-
version: '7.2'
|
|
33
|
+
version: 7.2.0
|
|
43
34
|
type: :development
|
|
44
35
|
prerelease: false
|
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
37
|
requirements:
|
|
47
38
|
- - ">="
|
|
48
39
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 7.
|
|
50
|
-
- - "<"
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: '7.2'
|
|
40
|
+
version: 7.2.0
|
|
53
41
|
- !ruby/object:Gem::Dependency
|
|
54
42
|
name: mysql2
|
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -140,14 +128,14 @@ dependencies:
|
|
|
140
128
|
requirements:
|
|
141
129
|
- - "~>"
|
|
142
130
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: 2.
|
|
131
|
+
version: 2.26.0
|
|
144
132
|
type: :development
|
|
145
133
|
prerelease: false
|
|
146
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
147
135
|
requirements:
|
|
148
136
|
- - "~>"
|
|
149
137
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: 2.
|
|
138
|
+
version: 2.26.0
|
|
151
139
|
- !ruby/object:Gem::Dependency
|
|
152
140
|
name: rubocop-rspec
|
|
153
141
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -215,22 +203,22 @@ files:
|
|
|
215
203
|
- assets/janus-logo.png
|
|
216
204
|
- bin/release.sh
|
|
217
205
|
- janus-ar.gemspec
|
|
218
|
-
- lib/
|
|
219
|
-
- lib/active_record/connection_adapters/
|
|
220
|
-
- lib/janus.rb
|
|
221
|
-
- lib/janus/client.rb
|
|
222
|
-
- lib/janus/context.rb
|
|
223
|
-
- lib/janus/db_console_config.rb
|
|
224
|
-
- lib/janus/logging/logger.rb
|
|
225
|
-
- lib/janus/logging/subscriber.rb
|
|
226
|
-
- lib/janus/query_director.rb
|
|
227
|
-
- lib/janus/version.rb
|
|
228
|
-
- spec/lib/active_record/connection_adapters/janus_mysql_adapter_spec.rb
|
|
229
|
-
- spec/lib/active_record/connection_adapters/janus_trilogy_adapter_spec.rb
|
|
230
|
-
- spec/lib/janus/client_spec.rb
|
|
231
|
-
- spec/lib/janus/context_spec.rb
|
|
232
|
-
- spec/lib/janus/logging/logger_spec.rb
|
|
233
|
-
- spec/lib/janus/query_director_spec.rb
|
|
206
|
+
- lib/janus-ar.rb
|
|
207
|
+
- lib/janus-ar/active_record/connection_adapters/janus_mysql2_adapter.rb
|
|
208
|
+
- lib/janus-ar/active_record/connection_adapters/janus_trilogy_adapter.rb
|
|
209
|
+
- lib/janus-ar/client.rb
|
|
210
|
+
- lib/janus-ar/context.rb
|
|
211
|
+
- lib/janus-ar/db_console_config.rb
|
|
212
|
+
- lib/janus-ar/logging/logger.rb
|
|
213
|
+
- lib/janus-ar/logging/subscriber.rb
|
|
214
|
+
- lib/janus-ar/query_director.rb
|
|
215
|
+
- lib/janus-ar/version.rb
|
|
216
|
+
- spec/lib/janus-ar/active_record/connection_adapters/janus_mysql_adapter_spec.rb
|
|
217
|
+
- spec/lib/janus-ar/active_record/connection_adapters/janus_trilogy_adapter_spec.rb
|
|
218
|
+
- spec/lib/janus-ar/client_spec.rb
|
|
219
|
+
- spec/lib/janus-ar/context_spec.rb
|
|
220
|
+
- spec/lib/janus-ar/logging/logger_spec.rb
|
|
221
|
+
- spec/lib/janus-ar/query_director_spec.rb
|
|
234
222
|
- spec/shared_examples/a_mysql_like_server.rb
|
|
235
223
|
- spec/spec_helper.rb
|
|
236
224
|
homepage: https://github.com/olioex/janus-ar
|
data/lib/janus.rb
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'active_support'
|
|
4
|
-
|
|
5
|
-
module Janus
|
|
6
|
-
autoload :Context, 'janus/context'
|
|
7
|
-
autoload :Client, 'janus/client'
|
|
8
|
-
autoload :QueryDirector, 'janus/query_director'
|
|
9
|
-
autoload :VERSION, 'janus/version'
|
|
10
|
-
autoload :DbConsoleConfig, 'janus/db_console_config'
|
|
11
|
-
|
|
12
|
-
module Logging
|
|
13
|
-
autoload :Subscriber, 'janus/logging/subscriber'
|
|
14
|
-
autoload :Logger, 'janus/logging/logger'
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
ActiveSupport.on_load(:active_record) do
|
|
19
|
-
ActiveRecord::LogSubscriber.log_subscribers.each do |subscriber|
|
|
20
|
-
subscriber.extend Janus::Logging::Subscriber
|
|
21
|
-
end
|
|
22
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|