sequel-schema-sharding 0.13.0 → 0.13.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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79817106f53c0313457b3c96c2649464ceaacf1c
|
|
4
|
+
data.tar.gz: 8204398f805ebb0830c8b464e41bd8f4b4e8cbd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6bd3459507fd8aac45fc48e33578447c9d2e3c28de921085b92d2566fbdbbf1bfbe15e800ed77d5098e7278cc09292f65e48b2b50b7cbec83a05504ad4983f8
|
|
7
|
+
data.tar.gz: 86aaa77bd21f851c996a38f1f254910f407457b62b113a4c804d87387b28a39fda55f54e80ccb53c07e7b6a9dc1950b922b6f2b1193fd3cd1f6204ebfa133bbf
|
|
@@ -51,7 +51,7 @@ module Sequel
|
|
|
51
51
|
# In most cases it should not be used directly in application code.
|
|
52
52
|
|
|
53
53
|
def default_dataset_for(table_name)
|
|
54
|
-
shard_number = config.logical_shard_configs(table_name).keys.
|
|
54
|
+
shard_number = config.logical_shard_configs(table_name).keys.sample
|
|
55
55
|
shard_name = config.logical_shard_configs(table_name)[shard_number]
|
|
56
56
|
self[shard_name][:"#{schema_for(table_name, shard_number)}__#{table_name}"]
|
|
57
57
|
end
|
|
@@ -45,7 +45,7 @@ describe Sequel::SchemaSharding::ConnectionManager do
|
|
|
45
45
|
# This should be deconstructed to allow for injection of a mock config for testing.
|
|
46
46
|
dataset = subject.default_dataset_for("artists")
|
|
47
47
|
expect(dataset).to be_a(Sequel::Dataset)
|
|
48
|
-
expect(dataset.first_source_table).to
|
|
48
|
+
expect(dataset.first_source_table).to match(/sequel_logical_artists_[0-9]{2}__artists/)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sequel-schema-sharding
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Henry
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2014-
|
|
13
|
+
date: 2014-07-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: sequel
|
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
174
174
|
version: '0'
|
|
175
175
|
requirements: []
|
|
176
176
|
rubyforge_project:
|
|
177
|
-
rubygems_version: 2.2.
|
|
177
|
+
rubygems_version: 2.2.0
|
|
178
178
|
signing_key:
|
|
179
179
|
specification_version: 4
|
|
180
180
|
summary: Create horizontally sharded Sequel models with Postgres
|