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: 925ef9b402dcf173f9cd3a79524b1abe88ff9d46
4
- data.tar.gz: 66794b90a0898e0ea70808311acd757eb6fcb252
3
+ metadata.gz: 79817106f53c0313457b3c96c2649464ceaacf1c
4
+ data.tar.gz: 8204398f805ebb0830c8b464e41bd8f4b4e8cbd6
5
5
  SHA512:
6
- metadata.gz: a94b17459afdb2d26193fe6910c6174208aa1a3e786fc53e12783e9f5714051b167d8e714b0e6b7468d7ef1dd8c8d833d975d6f0eabaa46700c2bab809747e3d
7
- data.tar.gz: de3348153fb3c7bb6e0f7e4752662a410e38c516970b5b56d1772c87bf29476d0aa42a6815888092347d888bf4fee59482d445c90d36a485cd75dd523b8c79f7
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.first
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
@@ -1,5 +1,5 @@
1
1
  module Sequel
2
2
  module SchemaSharding
3
- VERSION = "0.13.0"
3
+ VERSION = "0.13.1"
4
4
  end
5
5
  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 eql(:'sequel_logical_artists_01__artists')
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.0
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-06-20 00:00:00.000000000 Z
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.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