activerecord-shard_for 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63902d23b9848938b672498a54cbd5585c1606b5
4
- data.tar.gz: f02378bc48f50bf8aff0c6de70d8d36e6d952770
3
+ metadata.gz: 22921dabf9395f774844eaf741cb9c816956b963
4
+ data.tar.gz: a114b4ea4d194b3a987ef690c0b95e0ab9b04bd8
5
5
  SHA512:
6
- metadata.gz: 1dfd3d667c3a89ef8d2b375bbdec286c3135d5384fe4f8179773e4828ba8bc75f136d536f4d9084d6b2c19f1342f5ff1e3e02a3984473ccc18c198b0bb9da9f1
7
- data.tar.gz: 0651cf764cb9c49db9ca299487090b12a5437be918b888e662e7eae2626c397bbe015aa99103a45030040e327e634bc2166f39c64877669ff67bfc0bb272ac98
6
+ metadata.gz: e2c86ba9ac6f28653530dfcba1d2d0130f143db28593b1f06d5554e53b88bc435dbea9b136d0bdc04144ae3e01adb4992426a35e33db343515549d3351118a17
7
+ data.tar.gz: 9f612bdfd711cc935c12be868e38a29f2c9ff5b13dfeda6b85d7e94bddc053edad093c38f498942a79712b2cbe6bd9859fca66add24554685a3ede1659993fbc
@@ -29,4 +29,4 @@ module ActiveRecord
29
29
  end
30
30
  end
31
31
 
32
- ActiveRecord::ShardFor.config.register_cluster_router(:hash_modulo, ActiveRecord::ShardFor::HashModuloRouter)
32
+ ActiveRecord::ShardFor.config.register_connection_router(:hash_modulo, ActiveRecord::ShardFor::HashModuloRouter)
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module ShardFor
3
3
  class Config
4
- attr_reader :cluster_configs, :routers
4
+ attr_reader :cluster_configs, :connection_routers
5
5
 
6
6
  def initialize
7
7
  @cluster_configs = {}
@@ -27,18 +27,18 @@ module ActiveRecord
27
27
  cluster_configs.fetch(cluster_name)
28
28
  end
29
29
 
30
- # Register router for ActiveRecord::ShardFor
30
+ # Register connection router for ActiveRecord::ShardFor
31
31
  # See README.md for example.
32
32
  # @param [Symbol] router_name
33
33
  # @router_class [Class] router_class
34
- def register_cluster_router(router_name, router_class)
35
- routers[router_name] = router_class
34
+ def register_connection_router(router_name, router_class)
35
+ connection_routers[router_name] = router_class
36
36
  end
37
37
 
38
38
  # @param [Symbol] router_name
39
39
  # @return [Class] registered class by [#register_router]
40
- def fetch_cluster_router(router_name)
41
- routers[router_name]
40
+ def fetch_connection__router(router_name)
41
+ connection_routers[router_name]
42
42
  end
43
43
  end
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module ShardFor
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.1.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-shard_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - yuemori