activerecord-id_regions 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -4
- data/activerecord-id_regions.gemspec +2 -2
- data/lib/active_record/id_regions/migration.rb +4 -2
- data/lib/active_record/id_regions/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 745bef97d3afac4d959c29a66b75817ca8f61dfbb32ef384104847f59f486bbb
|
4
|
+
data.tar.gz: ccd7dcf9757ed06a35151b428c57c34bf24a86d33f63ed608fd593ee23c44fd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56e519084490ba8f3fd2a6b9c6e6cbee85b77d8ec407ba3abc7a64a19ba58696fec520ca95e8fa522db2c3184c64900214eec59eae288ec075031b2c78245b09
|
7
|
+
data.tar.gz: 3de37c2d892b77a77c753da0af67c872b50710312dfed92d617de4916b26782556ede0178e50045bc87a6d74cf4fea32a90c959650150901bb5bd2f929407fb6
|
data/.travis.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
dist: xenial
|
1
2
|
language: ruby
|
2
3
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
sudo: false
|
4
|
+
- '2.4.6'
|
5
|
+
- '2.5.5'
|
6
6
|
cache: bundler
|
7
|
-
|
7
|
+
addons:
|
8
|
+
postgresql: '10'
|
8
9
|
after_script: bundle exec codeclimate-test-reporter
|
9
10
|
notifications:
|
10
11
|
webhooks:
|
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_dependency "activerecord", ">= 5.0", "< 5.
|
24
|
-
spec.add_dependency "activesupport", ">= 5.0", "< 5.
|
23
|
+
spec.add_dependency "activerecord", ">= 5.0", "< 5.3"
|
24
|
+
spec.add_dependency "activesupport", ">= 5.0", "< 5.3"
|
25
25
|
spec.add_dependency "pg"
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler"
|
@@ -1,10 +1,12 @@
|
|
1
1
|
module ActiveRecord::IdRegions
|
2
2
|
module Migration
|
3
|
+
ALLOWED_ID_VALUES = [false, :uuid, "uuid"].freeze
|
4
|
+
|
3
5
|
def create_table(table_name, options = {})
|
4
|
-
options[:id] = :bigserial
|
6
|
+
options[:id] = :bigserial unless ALLOWED_ID_VALUES.include?(options[:id])
|
5
7
|
value = anonymous_class_with_id_regions.rails_sequence_start
|
6
8
|
super
|
7
|
-
return if options[:id]
|
9
|
+
return if ALLOWED_ID_VALUES.include?(options[:id])
|
8
10
|
|
9
11
|
set_pk_sequence!(table_name, value) unless value == 0
|
10
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-id_regions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.3'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '5.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '5.
|
42
|
+
version: '5.3'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '5.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '5.
|
52
|
+
version: '5.3'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: pg
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.6.
|
184
|
+
rubygems_version: 2.7.6.2
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: ActiveRecord extension to allow partitioning ids into regions, for merge
|