makara 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/CI.yml +88 -0
- data/.rspec +1 -1
- data/.rubocop.yml +15 -0
- data/.rubocop_todo.yml +670 -0
- data/CHANGELOG.md +14 -6
- data/Gemfile +1 -16
- data/README.md +2 -1
- data/Rakefile +1 -1
- data/gemfiles/activerecord_5.2.gemfile +8 -0
- data/gemfiles/activerecord_6.0.gemfile +8 -0
- data/gemfiles/activerecord_6.1.gemfile +8 -0
- data/gemfiles/activerecord_head.gemfile +6 -0
- data/lib/active_record/connection_adapters/jdbcmysql_makara_adapter.rb +4 -18
- data/lib/active_record/connection_adapters/jdbcpostgresql_makara_adapter.rb +4 -18
- data/lib/active_record/connection_adapters/makara_abstract_adapter.rb +3 -31
- data/lib/active_record/connection_adapters/makara_jdbcmysql_adapter.rb +4 -18
- data/lib/active_record/connection_adapters/makara_jdbcpostgresql_adapter.rb +4 -18
- data/lib/active_record/connection_adapters/makara_mysql2_adapter.rb +4 -20
- data/lib/active_record/connection_adapters/makara_postgis_adapter.rb +4 -19
- data/lib/active_record/connection_adapters/makara_postgresql_adapter.rb +4 -20
- data/lib/active_record/connection_adapters/mysql2_makara_adapter.rb +4 -20
- data/lib/active_record/connection_adapters/postgresql_makara_adapter.rb +4 -20
- data/lib/makara.rb +0 -2
- data/lib/makara/cache.rb +0 -2
- data/lib/makara/config_parser.rb +5 -14
- data/lib/makara/connection_wrapper.rb +24 -27
- data/lib/makara/context.rb +1 -0
- data/lib/makara/cookie.rb +1 -0
- data/lib/makara/error_handler.rb +0 -9
- data/lib/makara/errors/all_connections_blacklisted.rb +0 -2
- data/lib/makara/errors/blacklist_connection.rb +0 -2
- data/lib/makara/errors/blacklisted_while_in_transaction.rb +0 -2
- data/lib/makara/errors/invalid_shard.rb +1 -3
- data/lib/makara/errors/makara_error.rb +0 -1
- data/lib/makara/errors/no_connections_available.rb +0 -2
- data/lib/makara/logging/logger.rb +0 -4
- data/lib/makara/logging/subscriber.rb +0 -2
- data/lib/makara/middleware.rb +1 -2
- data/lib/makara/pool.rb +2 -7
- data/lib/makara/proxy.rb +25 -27
- data/lib/makara/railtie.rb +0 -2
- data/lib/makara/strategies/abstract.rb +1 -0
- data/lib/makara/strategies/priority_failover.rb +2 -0
- data/lib/makara/strategies/round_robin.rb +1 -3
- data/lib/makara/strategies/shard_aware.rb +0 -2
- data/lib/makara/version.rb +1 -3
- data/makara.gemspec +24 -5
- data/spec/active_record/connection_adapters/makara_abstract_adapter_error_handling_spec.rb +1 -6
- data/spec/active_record/connection_adapters/makara_abstract_adapter_spec.rb +0 -9
- data/spec/active_record/connection_adapters/makara_mysql2_adapter_spec.rb +9 -22
- data/spec/active_record/connection_adapters/makara_postgis_adapter_spec.rb +2 -10
- data/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb +7 -20
- data/spec/cache_spec.rb +0 -1
- data/spec/config_parser_spec.rb +54 -56
- data/spec/connection_wrapper_spec.rb +1 -2
- data/spec/cookie_spec.rb +1 -1
- data/spec/middleware_spec.rb +1 -1
- data/spec/pool_spec.rb +3 -16
- data/spec/proxy_spec.rb +0 -4
- data/spec/spec_helper.rb +5 -1
- data/spec/strategies/priority_failover_spec.rb +3 -4
- data/spec/strategies/round_robin_spec.rb +4 -8
- data/spec/strategies/shard_aware_spec.rb +4 -5
- data/spec/support/deep_dup.rb +1 -1
- data/spec/support/helpers.rb +5 -5
- data/spec/support/mock_objects.rb +1 -4
- data/spec/support/mysql2_database.yml +2 -2
- data/spec/support/mysql2_database_with_custom_errors.yml +2 -2
- data/spec/support/pool_extensions.rb +0 -3
- data/spec/support/postgis_schema.rb +1 -1
- data/spec/support/postgresql_database.yml +0 -2
- data/spec/support/proxy_extensions.rb +1 -3
- data/spec/support/schema.rb +1 -1
- data/spec/support/user.rb +1 -2
- metadata +156 -20
- data/.travis.yml +0 -131
- data/gemfiles/ar-head.gemfile +0 -24
- data/gemfiles/ar30.gemfile +0 -36
- data/gemfiles/ar31.gemfile +0 -36
- data/gemfiles/ar32.gemfile +0 -36
- data/gemfiles/ar40.gemfile +0 -24
- data/gemfiles/ar41.gemfile +0 -24
- data/gemfiles/ar42.gemfile +0 -24
- data/gemfiles/ar50.gemfile +0 -24
- data/gemfiles/ar51.gemfile +0 -24
- data/gemfiles/ar52.gemfile +0 -24
- data/gemfiles/ar60.gemfile +0 -24
data/gemfiles/ar32.gemfile
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '3.2.6'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack', '1.6.0'
|
11
|
-
gem 'i18n', '~> 0.6.0'
|
12
|
-
gem 'mysql2', '~> 0.3.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
15
|
-
|
16
|
-
|
17
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
18
|
-
|
19
|
-
if rmajor == 1 && rminor == 8
|
20
|
-
gem 'timecop', '0.5.9'
|
21
|
-
else
|
22
|
-
gem 'timecop'
|
23
|
-
end
|
24
|
-
|
25
|
-
# 1.8 - 1.9.2
|
26
|
-
if rmajor == 1 && (rminor == 8 || (rminor == 9 && rpatch < 3))
|
27
|
-
gem 'pg', '0.17.1', :platform => :ruby
|
28
|
-
else
|
29
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
30
|
-
end
|
31
|
-
|
32
|
-
# 2.1 +
|
33
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
34
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
35
|
-
gem 'rgeo', :platform => :ruby
|
36
|
-
end
|
data/gemfiles/ar40.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '4.0.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack', '1.6.0'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.3.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar41.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '4.1.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack', '1.6.0'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.3.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar42.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '~> 4.2.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack', '1.6.0'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.3.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar50.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '~> 5.0.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.4.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar51.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '~> 5.1.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.4.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar52.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '~> 5.2.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.4.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|
data/gemfiles/ar60.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in makara.gemspec
|
4
|
-
gemspec :path => '../'
|
5
|
-
|
6
|
-
|
7
|
-
gem 'rake'
|
8
|
-
gem 'activerecord', '~> 6.0.0'
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'rack'
|
11
|
-
gem 'timecop'
|
12
|
-
gem 'mysql2', '~> 0.4.10', :platform => :ruby
|
13
|
-
gem 'activerecord-jdbcmysql-adapter', :platform => :jruby
|
14
|
-
gem 'pg', '0.21.0', :platform => :ruby
|
15
|
-
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
16
|
-
|
17
|
-
|
18
|
-
rmajor, rminor, rpatch = RUBY_VERSION.split(/[^\d]/)[0..2].map(&:to_i)
|
19
|
-
|
20
|
-
# 2.1 +
|
21
|
-
if rmajor > 2 || (rmajor == 2 && rminor >= 1)
|
22
|
-
gem 'activerecord-postgis-adapter', :platform => :ruby
|
23
|
-
gem 'rgeo', :platform => :ruby
|
24
|
-
end
|