activerecord-turntable 2.3.2 → 2.3.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa472cf634328899013e975790cca934f62d5b34
|
4
|
+
data.tar.gz: 345bb3bc47f17141e12dfe9a0b2179d4e8db5f07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9996e3262e5887a1ec95e6355dac2f3d3aaaa5d10e580dbc1e7e6ffcdfedc8af75cd6cc7cbef9f0551961cc38d25123c883d42e4a6e10f0f0ee34a327d915b91
|
7
|
+
data.tar.gz: f47e0368705ac7b0073721544feef5838aca511c7c26464957e173700a8ef73ec9f3d0741706384bb792e271149a6e27355d4d1481ed8bf275c7d75f8fe383d1
|
data/CHANGELOG.md
CHANGED
@@ -9,7 +9,11 @@ module ActiveRecord::Turntable::ActiveRecordExt
|
|
9
9
|
|
10
10
|
module DatabaseStatements
|
11
11
|
def default_sequence_name(table_name, pk = nil)
|
12
|
-
ActiveRecord::Turntable::Sequencer.
|
12
|
+
if ActiveRecord::Turntable::Sequencer.has_sequencer?(table_name)
|
13
|
+
ActiveRecord::Turntable::Sequencer.sequence_name(table_name, pk)
|
14
|
+
else
|
15
|
+
super
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ActiveRecord::Turntable::ActiveRecordExt::Sequencer do
|
4
|
+
before(:all) do
|
5
|
+
reload_turntable!(File.join(File.dirname(__FILE__), "../../../config/turntable.yml"))
|
6
|
+
end
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
establish_connection_to(:test)
|
10
|
+
truncate_shard
|
11
|
+
end
|
12
|
+
|
13
|
+
context "With sequencer enabled model" do
|
14
|
+
subject { User }
|
15
|
+
its(:sequence_name) { is_expected.to_not be_nil }
|
16
|
+
end
|
17
|
+
|
18
|
+
context "With sequencer disabled model" do
|
19
|
+
subject { Card }
|
20
|
+
its(:sequence_name) { is_expected.to be_nil }
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-turntable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gussan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -412,6 +412,7 @@ files:
|
|
412
412
|
- spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb
|
413
413
|
- spec/active_record/turntable/active_record_ext/migration_spec.rb
|
414
414
|
- spec/active_record/turntable/active_record_ext/persistence_spec.rb
|
415
|
+
- spec/active_record/turntable/active_record_ext/sequencer_spec.rb
|
415
416
|
- spec/active_record/turntable/active_record_ext/test_fixtures_spec.rb
|
416
417
|
- spec/active_record/turntable/algorithm/modulo_algorithm_spec.rb
|
417
418
|
- spec/active_record/turntable/algorithm/range_algorithm_spec.rb
|
@@ -483,6 +484,7 @@ test_files:
|
|
483
484
|
- spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb
|
484
485
|
- spec/active_record/turntable/active_record_ext/migration_spec.rb
|
485
486
|
- spec/active_record/turntable/active_record_ext/persistence_spec.rb
|
487
|
+
- spec/active_record/turntable/active_record_ext/sequencer_spec.rb
|
486
488
|
- spec/active_record/turntable/active_record_ext/test_fixtures_spec.rb
|
487
489
|
- spec/active_record/turntable/algorithm/modulo_algorithm_spec.rb
|
488
490
|
- spec/active_record/turntable/algorithm/range_algorithm_spec.rb
|