fresh_connection 3.0.2 → 3.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa544b180b171d17e7bc818951051646749019d4fffb606a0df814569d55c55c
4
- data.tar.gz: bcd2fbcf7a283f4aa5611da237d44f84f1c7e2066bdcf794889788464f4f6ad1
3
+ metadata.gz: 00d3ffb887b3a19b14e749e67818736e9b24b27c280255707a171e47e711a37e
4
+ data.tar.gz: fc888334d602b44127e2f3595e59c08a272b408a65382f8fd6b154205ae92b70
5
5
  SHA512:
6
- metadata.gz: e1c7103cd5d711297ebb43a39166761dd4b9d77039d449d0540ebbc4dcb91ed41d48565cc722ff035da7f39db5fdae31ff487e0af848ed63f18b490469d45ba4
7
- data.tar.gz: dd37d137c7d06aa888b0fb7e1ba53a80507690aaf4ab8a9ec6957b46b0d33852f63999b734009a84aa4806801173aa5f249b1e9d217cd52adf26809ff871f57f
6
+ metadata.gz: 230c30d9dd1c1ac5bf2ce4af2bb67666fc0b1b230a6f5d7f62bcbdf0441b2e078708509f7b7c710ceb02eefae42c59abfd48d93347e7dd6a4c75ef5442c37182
7
+ data.tar.gz: 31de27f3781fb95b6a2d47612073e042431398e4514dde9ac23c58bf9b5d242d2c7944c46be6c9904486eb3b0a091b5642e0ee0679295e9de6b85c3e64d12fa0
data/.gitignore CHANGED
@@ -5,3 +5,4 @@ Gemfile.lock
5
5
  gemfiles/*.lock
6
6
  log/*
7
7
  .*.sw[a-z]
8
+ /bin/test_local
data/.travis.yml CHANGED
@@ -1,25 +1,20 @@
1
1
  language: ruby
2
- before_install:
3
- - gem install bundler
4
2
  services:
5
3
  - mysql
6
4
  - postgresql
7
- before_script:
8
- - bundle update
9
- - cp test/config/database_postgresql.yml.travis test/config/database_postgresql.yml
10
- - psql -c 'create database fresh_connection_test_master;' -U postgres
11
- - psql -c 'create database fresh_connection_test_replica1;' -U postgres
12
- - psql -c 'create database fresh_connection_test_replica2;' -U postgres
13
- cache: bundler
5
+ before_install:
6
+ - gem update --system
7
+ - gem --version
14
8
  rvm:
15
- - 2.2.9
16
- - 2.3.6
17
- - 2.4.4
18
- - 2.5.1
9
+ - 2.6.8
10
+ - 2.7.4
11
+ - 3.0.2
19
12
  gemfile:
20
- - gemfiles/rails50.gemfile
21
- - gemfiles/rails51.gemfile
22
13
  - gemfiles/rails52.gemfile
14
+ - gemfiles/rails60.gemfile
15
+ - gemfiles/rails61.gemfile
16
+ script:
17
+ - "bin/test"
23
18
  matrix:
24
19
  fast_finish: true
25
20
  bundler_args: --jobs 3 --retry 3
data/Appraisals CHANGED
@@ -1,20 +1,12 @@
1
- appraise "rails50" do
2
- gem 'activerecord', '~> 5.0.0'
3
- gem 'activesupport', '~> 5.0.0'
4
- gem 'mysql2', '>= 0.3.18', '< 0.6.0'
5
- gem 'pg', '>= 0.18', '< 2.0'
1
+ appraise "rails52" do
2
+ gem 'activerecord', '~> 5.2.0'
3
+ gem 'mysql2', '>= 0.4.4', "< 0.6.0"
6
4
  end
7
5
 
8
- appraise "rails51" do
9
- gem 'activerecord', '~> 5.1.0'
10
- gem 'activesupport', '~> 5.1.0'
11
- gem 'mysql2', '>= 0.3.18', '< 0.6.0'
12
- gem 'pg', '>= 0.18', '< 2.0'
6
+ appraise "rails60" do
7
+ gem 'activerecord', '~> 6.0.0'
13
8
  end
14
9
 
15
- appraise "rails52" do
16
- gem 'activerecord', '~> 5.2.0'
17
- gem 'activesupport', '~> 5.2.0'
18
- gem 'mysql2', '>= 0.4.4', '< 0.6.0'
19
- gem 'pg', '>= 0.18', '< 2.0'
10
+ appraise "rails61" do
11
+ gem 'activerecord', '~> 6.1.0'
20
12
  end
data/README.md CHANGED
@@ -29,7 +29,15 @@ FreshConnction connects one or more configured DB replicas, or with multiple rep
29
29
  - Write queries go to the DB master.
30
30
  - Within a transaction, all queries go to the DB master.
31
31
 
32
- If you wish to use multiple DB replicas on any given connection but do not have a load balancer (such as [`pgbouncer`](https://pgbouncer.github.io) for Posgres databases), you can use [EbisuConnection](https://github.com/tsukasaoishi/ebisu_connection).
32
+ ### Failover
33
+ FreshConnection assumes that there is a load balancer in front of multi replica servers.
34
+ When what happens one of the replicas is unreachable for any reason, FreshConnection will try three retries to access to a replica via a load balancer.
35
+
36
+ Removing a trouble replica from a cluster is a work of the load balancer.
37
+ FreshConnection expects the load balancer to work during three retries.
38
+
39
+ If you would like access to multi replica servers without a load balancer, you should use [EbisuConnection](https://github.com/tsukasaoishi/ebisu_connection).
40
+ EbisuConnection has functions of load balancer.
33
41
 
34
42
  ## Usage
35
43
  ### Access to the DB Replica
@@ -70,8 +78,12 @@ old_article.destroy
70
78
 
71
79
  ## ActiveRecord Versions Supported
72
80
 
73
- - FreshConnection supports ActiveRecord version 5.0 or later.
74
- - If you are using Rails 4.2, you can use FreshConnection version 2.4.4 or before.
81
+ - FreshConnection supports ActiveRecord version 5.2 or later.
82
+ - If you are using Rails 5.1, you can use FreshConnection version 3.0.3 or before.
83
+
84
+ ### Not Support Multiple Database
85
+ I haven't tested it in an environment using MultipleDB in Rails 6.
86
+ I plan to enable use with MultipleDB in FreshConnection version 4.0 or later.
75
87
 
76
88
  ## Databases Supported
77
89
  FreshConnection currently supports MySQL and PostgreSQL.
@@ -127,6 +139,9 @@ production:
127
139
 
128
140
  `replica` is the configuration used for connecting read-only queries to the database replica. All other connections will use the database master settings.
129
141
 
142
+ **NOTE:**
143
+ The 'replica' stanza has a special meaning in Rails6.
144
+ In Rails6, use a name other than 'replica', and specify that name using establish_fresh_connection in ApplicationRecord etc.
130
145
 
131
146
  ### Multiple DB Replicas
132
147
  If you want to use multiple configured DB replicas, the configuration can contain multiple `replica` stanzas in the configuration file `config/database.yml`.
data/Rakefile CHANGED
@@ -1,20 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'rake/testtask'
3
3
 
4
- desc 'Run mysql2 and postgresql tests'
4
+ desc 'Run tests'
5
5
  task :test do
6
- Rake::Task["test:mysql2"].invoke
7
- Rake::Task["test:postgresql"].invoke
8
- end
9
-
10
- namespace :test do
11
- %w(mysql2 postgresql).each do |test_name|
12
- Rake::TestTask.new(test_name) do |t|
13
- t.libs << "test"
14
- t.libs << "lib"
15
- t.test_files = FileList["test/config/prepare_#{test_name}", 'test/**/*_test.rb']
16
- t.verbose = true
17
- end
6
+ Rake::TestTask.new do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList['test/**/*_test.rb']
10
+ t.verbose = true
18
11
  end
19
12
  end
20
13
 
data/bin/setup CHANGED
@@ -3,7 +3,8 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle install --path .bundle
6
+ bundle config set path '.bundle'
7
+ bundle install
7
8
  bundle exec appraisal install
8
9
 
9
10
  # Do any other automated setup that you need to do here
data/bin/test CHANGED
@@ -2,16 +2,23 @@
2
2
  set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
 
5
- for dbname in fresh_connection_test_master fresh_connection_test_replica1 fresh_connection_test_replica2 ; do
6
- if ! psql $dbname -c '\q' 2>/dev/null ; then
7
- if [[ -n "`psql -l | grep \"$dbname\"`" ]]; then
8
- echo "Dropping database $dbname .."
9
- dropdb $dbname
10
- fi
11
- echo "Creating database $dbname .."
12
- createdb $dbname
13
- fi
14
- done
15
-
16
5
  set -vx
17
- bundle exec appraisal rake test
6
+
7
+ if [ -v DATABASE_URL ]; then
8
+ echo "[specified config]"
9
+ bundle exec rake test
10
+ else
11
+ echo "[mysql]"
12
+ DATABASE_URL="mysql2://root@localhost/fresh_connection_test_master" \
13
+ DATABASE_REPLICA1_URL="mysql2://root@localhost/fresh_connection_test_replica1" \
14
+ DATABASE_REPLICA2_URL="mysql2://root@localhost/fresh_connection_test_replica2" \
15
+ DATABASE_FAKE_REPLICA_URL="mysql2://root@localhost/fresh_connection_test_master" \
16
+ bundle exec rake test
17
+
18
+ echo "[postgresql]"
19
+ DATABASE_URL="postgresql://localhost/fresh_connection_test_master" \
20
+ DATABASE_REPLICA1_URL="postgresql://localhost/fresh_connection_test_replica1" \
21
+ DATABASE_REPLICA2_URL="postgresql://localhost/fresh_connection_test_replica2" \
22
+ DATABASE_FAKE_REPLICA_URL="postgresql://localhost/fresh_connection_test_master" \
23
+ bundle exec rake test
24
+ fi
@@ -19,16 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.2'
22
+ spec.add_dependency 'activerecord', '>= 5.2.0', '< 7.0'
23
23
 
24
- spec.add_dependency 'activerecord', '>= 5.0.0', '< 5.3'
25
- spec.add_dependency 'activesupport', '>= 5.0.0', '< 5.3'
26
- spec.add_dependency 'concurrent-ruby', '~> 1.0.0'
27
-
28
- spec.add_development_dependency 'mysql2', '>= 0.3.18', '< 0.6.0'
24
+ spec.add_development_dependency 'mysql2', '>= 0.4.4'
29
25
  spec.add_development_dependency 'pg', '>= 0.18', '< 2.0'
30
- spec.add_development_dependency "bundler", ">= 1.3.0", "< 2.0"
31
- spec.add_development_dependency "rake", ">= 0.8.7"
26
+ spec.add_development_dependency "rake"
32
27
  spec.add_development_dependency 'appraisal'
33
28
  spec.add_development_dependency "minitest", "~> 5.10.0"
34
29
  spec.add_development_dependency "minitest-reporters"
@@ -3,8 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 5.2.0"
6
- gem "activesupport", "~> 5.2.0"
7
6
  gem "mysql2", ">= 0.4.4", "< 0.6.0"
8
- gem "pg", ">= 0.18", "< 2.0"
9
7
 
10
8
  gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.0.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FreshConnection
4
+ class ConnectionSpecification
5
+ module Rails60
6
+ def spec
7
+ ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(config_with_spec_name).spec(@spec_name.to_sym)
8
+ end
9
+
10
+ private
11
+
12
+ def config_with_spec_name
13
+ if defined?(ActiveRecord::DatabaseConfigurations)
14
+ ActiveRecord::DatabaseConfigurations.new(@spec_name => build_config)
15
+ else
16
+ { @spec_name => build_config }
17
+ end
18
+ end
19
+
20
+ def config_from_url
21
+ ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.new(database_group_url).to_hash
22
+ end
23
+
24
+ def base_config
25
+ ActiveRecord::Base.connection_pool.spec.config
26
+ end
27
+ end
28
+ end
29
+ end
30
+
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FreshConnection
4
+ class ConnectionSpecification
5
+ module Rails61
6
+ def spec
7
+ db_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(@spec_name.to_sym, ActiveRecord::Base.connection_pool.db_config.name, build_config)
8
+ ActiveRecord::ConnectionAdapters::PoolConfig.new(ActiveRecord::Base, db_config)
9
+ end
10
+
11
+ private
12
+
13
+ def config_from_url
14
+ ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver.new(database_group_url).to_hash
15
+ end
16
+
17
+ def base_config
18
+ ActiveRecord::Base.connection_pool.db_config.configuration_hash
19
+ end
20
+ end
21
+ end
22
+ end
@@ -9,16 +9,8 @@ module FreshConnection
9
9
  @modify_spec = modify_spec.with_indifferent_access if modify_spec
10
10
  end
11
11
 
12
- def spec
13
- resolver.spec(@spec_name.to_sym)
14
- end
15
-
16
12
  private
17
13
 
18
- def resolver
19
- ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(@spec_name => build_config)
20
- end
21
-
22
14
  def build_config
23
15
  config = base_config.with_indifferent_access
24
16
 
@@ -26,6 +18,7 @@ module FreshConnection
26
18
  config = config.merge(s_config) if s_config
27
19
 
28
20
  config = config.merge(@modify_spec) if defined?(@modify_spec)
21
+
29
22
  config
30
23
  end
31
24
 
@@ -37,14 +30,6 @@ module FreshConnection
37
30
  end
38
31
  end
39
32
 
40
- def config_from_url
41
- ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.new(database_group_url).to_hash
42
- end
43
-
44
- def base_config
45
- ActiveRecord::Base.connection_pool.spec.config
46
- end
47
-
48
33
  def database_group_url
49
34
  ENV["DATABASE_#{@spec_name.upcase}_URL"]
50
35
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FreshConnection
4
+ module Extend
5
+ module ArConnectionHandler
6
+ private def resolve_pool_config(*args)
7
+ pool_config = super
8
+
9
+ case pool_config.db_config.adapter.to_s
10
+ when "mysql", "mysql2"
11
+ require 'fresh_connection/extend/adapters/m2_adapter'
12
+ __extend_adapter_by_fc(::ActiveRecord::ConnectionAdapters::Mysql2Adapter, M2Adapter)
13
+ when "postgresql"
14
+ require 'fresh_connection/extend/adapters/pg_adapter'
15
+ __extend_adapter_by_fc(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, PgAdapter)
16
+ else
17
+ raise NotImplementedError, "This adapter('#{pool_config.db_config.adapter}') is not supported. If you specified the mysql or postgres adapter, it's probably a bug in FreshConnection. Please teach me (https://github.com/tsukasaoishi/fresh_connection/issues/new)"
18
+ end
19
+
20
+ pool_config
21
+ end
22
+
23
+ def __extend_adapter_by_fc(klass, extend_adapter)
24
+ return if klass.include?(extend_adapter)
25
+ klass.prepend BaseAdapter
26
+ klass.prepend extend_adapter
27
+ end
28
+ end
29
+ end
30
+ end
@@ -7,12 +7,14 @@ module FreshConnection
7
7
  specification = super
8
8
 
9
9
  case specification.config[:adapter].to_s
10
- when "mysql2"
10
+ when "mysql", "mysql2"
11
11
  require 'fresh_connection/extend/adapters/m2_adapter'
12
12
  __extend_adapter_by_fc(::ActiveRecord::ConnectionAdapters::Mysql2Adapter, M2Adapter)
13
13
  when "postgresql"
14
14
  require 'fresh_connection/extend/adapters/pg_adapter'
15
15
  __extend_adapter_by_fc(::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, PgAdapter)
16
+ else
17
+ raise NotImplementedError, "This adapter('#{specification.config[:adapter]}') is not supported. If you specified the mysql or postgres adapter, it's probably a bug in FreshConnection. Please teach me (https://github.com/tsukasaoishi/fresh_connection/issues/new)"
16
18
  end
17
19
 
18
20
  specification
@@ -3,14 +3,8 @@
3
3
  module FreshConnection
4
4
  module Extend
5
5
  module ArStatementCache
6
- if FreshConnection.rails_52?
7
- def execute(params, connection, &block)
8
- klass.all.manage_access { super }
9
- end
10
- else
11
- def execute(params, klass, connection, &block)
12
- klass.all.manage_access { super }
13
- end
6
+ def execute(params, connection, &block)
7
+ klass.all.manage_access { super }
14
8
  end
15
9
  end
16
10
  end
@@ -2,17 +2,39 @@
2
2
  require 'active_support'
3
3
 
4
4
  ActiveSupport.on_load(:active_record) do
5
+ if respond_to?(:connection_handlers) && connection_handlers.empty?
6
+ self.connection_handlers = { writing_role => ActiveRecord::Base.default_connection_handler }
7
+ end
8
+
5
9
  require 'fresh_connection/extend/ar_base'
6
10
  require 'fresh_connection/extend/ar_relation'
7
11
  require 'fresh_connection/extend/ar_relation_merger'
8
12
  require 'fresh_connection/extend/ar_statement_cache'
9
- require 'fresh_connection/extend/ar_resolver'
10
13
 
11
14
  ActiveRecord::Base.extend FreshConnection::Extend::ArBase
12
15
  ActiveRecord::Relation.prepend FreshConnection::Extend::ArRelation
13
16
  ActiveRecord::Relation::Merger.prepend FreshConnection::Extend::ArRelationMerger
14
17
  ActiveRecord::StatementCache.prepend FreshConnection::Extend::ArStatementCache
15
- ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.prepend(
16
- FreshConnection::Extend::ArResolver
17
- )
18
+
19
+ if ActiveRecord::VERSION::MAJOR == 6 && ActiveRecord::VERSION::MINOR == 1
20
+ require 'fresh_connection/extend/ar_connection_handler'
21
+ ActiveRecord::ConnectionAdapters::ConnectionHandler.prepend(
22
+ FreshConnection::Extend::ArConnectionHandler
23
+ )
24
+
25
+ require 'fresh_connection/connection_specification/rails_61'
26
+ FreshConnection::ConnectionSpecification.include(
27
+ FreshConnection::ConnectionSpecification::Rails61
28
+ )
29
+ else
30
+ require 'fresh_connection/extend/ar_resolver'
31
+ ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.prepend(
32
+ FreshConnection::Extend::ArResolver
33
+ )
34
+
35
+ require 'fresh_connection/connection_specification/rails_60'
36
+ FreshConnection::ConnectionSpecification.include(
37
+ FreshConnection::ConnectionSpecification::Rails60
38
+ )
39
+ end
18
40
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FreshConnection
4
- VERSION = "3.0.2"
4
+ VERSION = "3.1.1"
5
5
  end
6
6
 
@@ -15,10 +15,6 @@ module FreshConnection
15
15
  FreshConnection::ReplicaConnectionHandler.instance.refresh_all
16
16
  @connection_manager = mgr
17
17
  end
18
-
19
- def rails_52?
20
- [ActiveRecord::VERSION::MAJOR, ActiveRecord::VERSION::MINOR] == [5, 2]
21
- end
22
18
  end
23
19
  end
24
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fresh_connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsukasa OISHI
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-29 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,74 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 5.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.3'
22
+ version: '7.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.0
29
+ version: 5.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.3'
33
- - !ruby/object:Gem::Dependency
34
- name: activesupport
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 5.0.0
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '5.3'
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: 5.0.0
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '5.3'
53
- - !ruby/object:Gem::Dependency
54
- name: concurrent-ruby
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: 1.0.0
60
- type: :runtime
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: 1.0.0
32
+ version: '7.0'
67
33
  - !ruby/object:Gem::Dependency
68
34
  name: mysql2
69
35
  requirement: !ruby/object:Gem::Requirement
70
36
  requirements:
71
37
  - - ">="
72
38
  - !ruby/object:Gem::Version
73
- version: 0.3.18
74
- - - "<"
75
- - !ruby/object:Gem::Version
76
- version: 0.6.0
39
+ version: 0.4.4
77
40
  type: :development
78
41
  prerelease: false
79
42
  version_requirements: !ruby/object:Gem::Requirement
80
43
  requirements:
81
44
  - - ">="
82
45
  - !ruby/object:Gem::Version
83
- version: 0.3.18
84
- - - "<"
85
- - !ruby/object:Gem::Version
86
- version: 0.6.0
46
+ version: 0.4.4
87
47
  - !ruby/object:Gem::Dependency
88
48
  name: pg
89
49
  requirement: !ruby/object:Gem::Requirement
@@ -104,40 +64,20 @@ dependencies:
104
64
  - - "<"
105
65
  - !ruby/object:Gem::Version
106
66
  version: '2.0'
107
- - !ruby/object:Gem::Dependency
108
- name: bundler
109
- requirement: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: 1.3.0
114
- - - "<"
115
- - !ruby/object:Gem::Version
116
- version: '2.0'
117
- type: :development
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- version: 1.3.0
124
- - - "<"
125
- - !ruby/object:Gem::Version
126
- version: '2.0'
127
67
  - !ruby/object:Gem::Dependency
128
68
  name: rake
129
69
  requirement: !ruby/object:Gem::Requirement
130
70
  requirements:
131
71
  - - ">="
132
72
  - !ruby/object:Gem::Version
133
- version: 0.8.7
73
+ version: '0'
134
74
  type: :development
135
75
  prerelease: false
136
76
  version_requirements: !ruby/object:Gem::Requirement
137
77
  requirements:
138
78
  - - ">="
139
79
  - !ruby/object:Gem::Version
140
- version: 0.8.7
80
+ version: '0'
141
81
  - !ruby/object:Gem::Dependency
142
82
  name: appraisal
143
83
  requirement: !ruby/object:Gem::Requirement
@@ -214,20 +154,23 @@ files:
214
154
  - bin/setup
215
155
  - bin/test
216
156
  - fresh_connection.gemspec
217
- - gemfiles/rails50.gemfile
218
- - gemfiles/rails51.gemfile
219
157
  - gemfiles/rails52.gemfile
158
+ - gemfiles/rails60.gemfile
159
+ - gemfiles/rails61.gemfile
220
160
  - lib/fresh_connection.rb
221
161
  - lib/fresh_connection/abstract_connection_manager.rb
222
162
  - lib/fresh_connection/access_control.rb
223
163
  - lib/fresh_connection/connection_manager.rb
224
164
  - lib/fresh_connection/connection_specification.rb
165
+ - lib/fresh_connection/connection_specification/rails_60.rb
166
+ - lib/fresh_connection/connection_specification/rails_61.rb
225
167
  - lib/fresh_connection/executor_hook.rb
226
168
  - lib/fresh_connection/extend.rb
227
169
  - lib/fresh_connection/extend/adapters/base_adapter.rb
228
170
  - lib/fresh_connection/extend/adapters/m2_adapter.rb
229
171
  - lib/fresh_connection/extend/adapters/pg_adapter.rb
230
172
  - lib/fresh_connection/extend/ar_base.rb
173
+ - lib/fresh_connection/extend/ar_connection_handler.rb
231
174
  - lib/fresh_connection/extend/ar_relation.rb
232
175
  - lib/fresh_connection/extend/ar_relation_merger.rb
233
176
  - lib/fresh_connection/extend/ar_resolver.rb
@@ -248,15 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
191
  requirements:
249
192
  - - ">="
250
193
  - !ruby/object:Gem::Version
251
- version: '2.2'
194
+ version: '0'
252
195
  required_rubygems_version: !ruby/object:Gem::Requirement
253
196
  requirements:
254
197
  - - ">="
255
198
  - !ruby/object:Gem::Version
256
199
  version: '0'
257
200
  requirements: []
258
- rubyforge_project:
259
- rubygems_version: 2.7.6
201
+ rubygems_version: 3.0.3
260
202
  signing_key:
261
203
  specification_version: 4
262
204
  summary: FreshConnection supports connections with configured replica servers.
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.0.0"
6
- gem "activesupport", "~> 5.0.0"
7
- gem "mysql2", ">= 0.3.18", "< 0.6.0"
8
- gem "pg", ">= 0.18", "< 2.0"
9
-
10
- gemspec path: "../"
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.1.0"
6
- gem "activesupport", "~> 5.1.0"
7
- gem "mysql2", ">= 0.3.18", "< 0.6.0"
8
- gem "pg", ">= 0.18", "< 2.0"
9
-
10
- gemspec path: "../"