activerecord-id_regions 0.2.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 553b889d3083abb78d6690cbe9ed793ecb1017951f572e3c2e3c1640a2eae4d2
4
- data.tar.gz: bab5f8622dba6793ac03b20b3285d0ea2ff0a44c4a68b129896678d9e970caeb
3
+ metadata.gz: 925295a4420b873017837a1d4def190c2fc6af0590d2d4c4feb8bd6dd293076d
4
+ data.tar.gz: bec97edc1aba41fc89526b7976f7dcdf4c3527c4dc8ee59bccd4a6a05546f872
5
5
  SHA512:
6
- metadata.gz: 2972bea13ff5bc389afa0825028437a3708f88ffa7d76582fdbce170bdab20beab5a110df7fd4aa6bc9f57bfc24cf4c4aeafb78040c991b345f310a22502527d
7
- data.tar.gz: 3b5f5be8fdb23238b96b623e67b24dd028a8a55f98abb90d48c1e7c86aeb9bc543aee0d6c941a906a1139878f97c5c4bf5c89e67c3a379a33cd1dd24351de1e9
6
+ metadata.gz: aed5222004162cb3bb7c0b0eba80da3eb9bf36911a6b793c8c9d171d3456849e0b802c08e0c1ef3236e0bb86a5e0784ea8e29eb808d868686f15bad3f3cc443d
7
+ data.tar.gz: c2172a8b3918f56996d5b79a1c3ae75d5dc496264538c2b7bd761894ebe2b5529860adc44402742793ac1ce20e11dbfb9a0a5fae92259259f717ac4fa56bd26d
data/.codeclimate.yml CHANGED
@@ -1,18 +1,21 @@
1
- ---
2
- exclude_paths:
3
- - ".git/"
4
- - "**.xml"
5
- - "**.yaml"
6
- - "**.yml"
7
- - "locale/"
8
- - "spec/"
9
- - "tools/"
10
- engines:
1
+ prepare:
2
+ fetch:
3
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
4
+ path: ".rubocop_base.yml"
5
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
6
+ path: ".rubocop_cc_base.yml"
7
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/base.yml
8
+ path: styles/base.yml
9
+ - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/styles/cc_base.yml
10
+ path: styles/cc_base.yml
11
+ plugins:
12
+ rubocop:
13
+ enabled: true
14
+ config: ".rubocop_cc.yml"
15
+ channel: rubocop-0-82
11
16
  brakeman:
12
- # very slow :sad_panda:
13
17
  enabled: false
14
18
  bundler-audit:
15
- # requires Gemfile.lock
16
19
  enabled: false
17
20
  csslint:
18
21
  enabled: false
@@ -24,24 +27,17 @@ engines:
24
27
  - javascript
25
28
  eslint:
26
29
  enabled: false
27
- channel: "eslint-3"
30
+ channel: eslint-3
28
31
  fixme:
29
- # let's enable later
30
32
  enabled: false
31
33
  markdownlint:
32
- # let's enable later
33
34
  enabled: false
34
- rubocop:
35
- enabled: true
36
- config: '.rubocop_cc.yml'
37
- prepare:
38
- fetch:
39
- - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml"
40
- path: ".rubocop_base.yml"
41
- - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_cc_base.yml"
42
- path: ".rubocop_cc_base.yml"
43
- ratings:
44
- paths:
45
- - Gemfile.lock
46
- - "**.rake"
47
- - "**.rb"
35
+ exclude_patterns:
36
+ - ".git/"
37
+ - "**.xml"
38
+ - "**.yaml"
39
+ - "**.yml"
40
+ - locale/
41
+ - spec/
42
+ - tools/
43
+ version: '2'
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
+ inherit_gem:
2
+ manageiq-style: ".rubocop_base.yml"
1
3
  inherit_from:
2
- - https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
3
- # put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
4
- - .rubocop_local.yml
4
+ - ".rubocop_local.yml"
data/.rubocop_cc.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  inherit_from:
2
- # this is downloaded by .codeclimate.yml
3
- - .rubocop_base.yml
4
- - .rubocop_cc_base.yml
5
- - .rubocop_local.yml
2
+ - ".rubocop_base.yml"
3
+ - ".rubocop_cc_base.yml"
4
+ - ".rubocop_local.yml"
data/.travis.yml CHANGED
@@ -1,11 +1,22 @@
1
+ dist: bionic
1
2
  language: ruby
2
3
  rvm:
3
- - '2.3.1'
4
- - '2.4.2'
5
- sudo: false
4
+ - 2.6.9
5
+ - 2.7.5
6
+ - 3.0.3
6
7
  cache: bundler
7
- before_install: gem install bundler -v 1.14.6
8
- after_script: bundle exec codeclimate-test-reporter
8
+ env:
9
+ matrix:
10
+ - TEST_RAILS_VERSION=6.1
11
+ - TEST_RAILS_VERSION=6.0
12
+ addons:
13
+ postgresql: '10'
14
+ before_script:
15
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16
+ - chmod +x ./cc-test-reporter
17
+ - ./cc-test-reporter before-build
18
+ after_script:
19
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
9
20
  notifications:
10
21
  webhooks:
11
22
  urls:
data/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "ManageIQ/whitesource-config@master"
3
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project adheres to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.3.2] - 2022-02-02
9
+ ### Fixed
10
+
11
+ - Loosened active record support to include active record 6.1
12
+ - Fixed keyword arguments for ruby 3.0 support
13
+
14
+ [Unreleased]: https://github.com/ManageIQ/activerecord-id_regions/compare/v0.3.2...HEAD
15
+ [0.3.2]: https://github.com/ManageIQ/activerecord-id_regions/compare/v0.3.1...v0.3.2
data/Gemfile CHANGED
@@ -2,3 +2,12 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in activerecord-id_regions.gemspec
4
4
  gemspec
5
+
6
+ case ENV['TEST_RAILS_VERSION']
7
+ when "6.0"
8
+ gem "activerecord", "~>6.0.4"
9
+ gem "activesupport", "~>6.0.4"
10
+ when "6.1"
11
+ gem "activerecord", "~>6.1.4"
12
+ gem "activesupport", "~>6.1.4"
13
+ end
data/README.md CHANGED
@@ -4,8 +4,6 @@
4
4
  [![Build Status](https://travis-ci.org/ManageIQ/activerecord-id_regions.svg)](https://travis-ci.org/ManageIQ/activerecord-id_regions)
5
5
  [![Code Climate](https://codeclimate.com/github/ManageIQ/activerecord-id_regions.svg)](https://codeclimate.com/github/ManageIQ/activerecord-id_regions)
6
6
  [![Test Coverage](https://codeclimate.com/github/ManageIQ/activerecord-id_regions/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/activerecord-id_regions/coverage)
7
- [![Dependency Status](https://gemnasium.com/ManageIQ/activerecord-id_regions.svg)](https://gemnasium.com/ManageIQ/activerecord-id_regions)
8
- [![Security](https://hakiri.io/github/ManageIQ/activerecord-id_regions/master.svg)](https://hakiri.io/github/ManageIQ/activerecord-id_regions/master)
9
7
 
10
8
  [![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ManageIQ/activerecord-id_regions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
11
9
 
@@ -20,14 +20,13 @@ 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.2"
24
- spec.add_dependency "activesupport", ">= 5.0", "< 5.2"
23
+ spec.add_dependency "activerecord", ">= 5.0", "< 7.0"
24
+ spec.add_dependency "activesupport", ">= 5.0", "< 7.0"
25
25
  spec.add_dependency "pg"
26
26
 
27
27
  spec.add_development_dependency "bundler"
28
+ spec.add_development_dependency "manageiq-style"
28
29
  spec.add_development_dependency "rake"
29
30
  spec.add_development_dependency "rspec", "~> 3.0"
30
-
31
- spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
32
31
  spec.add_development_dependency "simplecov"
33
32
  end
@@ -1,11 +1,13 @@
1
1
  module ActiveRecord::IdRegions
2
2
  module Migration
3
- def create_table(table_name, options = {})
4
- options[:id] = :bigserial if options[:id].nil?
5
- super
6
- return if options[:id] == false
3
+ ALLOWED_ID_VALUES = [false, :uuid, "uuid"].freeze
7
4
 
5
+ def create_table(table_name, **options)
6
+ options[:id] = :bigserial unless ALLOWED_ID_VALUES.include?(options[:id])
8
7
  value = anonymous_class_with_id_regions.rails_sequence_start
8
+ super
9
+ return if ALLOWED_ID_VALUES.include?(options[:id])
10
+
9
11
  set_pk_sequence!(table_name, value) unless value == 0
10
12
  end
11
13
 
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module IdRegions
3
- VERSION = "0.2.1".freeze
3
+ VERSION = "0.3.2".freeze
4
4
  end
5
5
  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.2.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-14 00:00:00.000000000 Z
11
+ date: 2022-02-02 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.2'
22
+ version: '7.0'
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.2'
32
+ version: '7.0'
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.2'
42
+ version: '7.0'
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.2'
52
+ version: '7.0'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: pg
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +79,7 @@ dependencies:
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  - !ruby/object:Gem::Dependency
82
- name: rake
82
+ name: manageiq-style
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
@@ -93,33 +93,33 @@ dependencies:
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  - !ruby/object:Gem::Dependency
96
- name: rspec
96
+ name: rake
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
- version: '3.0'
101
+ version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - "~>"
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
- version: '3.0'
108
+ version: '0'
109
109
  - !ruby/object:Gem::Dependency
110
- name: codeclimate-test-reporter
110
+ name: rspec
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: 1.0.0
115
+ version: '3.0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: 1.0.0
122
+ version: '3.0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: simplecov
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ dependencies:
136
136
  version: '0'
137
137
  description: ActiveRecord extension to allow partitioning ids into regions, for merge
138
138
  replication purposes
139
- email:
139
+ email:
140
140
  executables: []
141
141
  extensions: []
142
142
  extra_rdoc_files: []
@@ -149,6 +149,8 @@ files:
149
149
  - ".rubocop_cc.yml"
150
150
  - ".rubocop_local.yml"
151
151
  - ".travis.yml"
152
+ - ".whitesource"
153
+ - CHANGELOG.md
152
154
  - Gemfile
153
155
  - LICENSE.txt
154
156
  - README.md
@@ -165,7 +167,7 @@ homepage: https://github.com/ManageIQ/activerecord-id_regions
165
167
  licenses:
166
168
  - Apache-2.0
167
169
  metadata: {}
168
- post_install_message:
170
+ post_install_message:
169
171
  rdoc_options: []
170
172
  require_paths:
171
173
  - lib
@@ -180,9 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
182
  - !ruby/object:Gem::Version
181
183
  version: '0'
182
184
  requirements: []
183
- rubyforge_project:
184
- rubygems_version: 2.7.6
185
- signing_key:
185
+ rubygems_version: 3.3.5
186
+ signing_key:
186
187
  specification_version: 4
187
188
  summary: ActiveRecord extension to allow partitioning ids into regions, for merge
188
189
  replication purposes