activerecord-id_regions 0.3.1 → 0.4.0

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: 81c3179ff67aa3add2c5761916ee30e5dad895a764722b722d866a5face7d757
4
- data.tar.gz: 7c623bd161493c6be1f75d38898fd380f1325be1cf0394a9046d0810a75dcffe
3
+ metadata.gz: 185443ed3b4db677eb3d2356fe95cd93fc9f3551f8e47cfb354cbbba789cf2b0
4
+ data.tar.gz: 47af10f63f4bd2041d8a259bb80dbffbfbf7eee770a0f351c4ae3fb5fd4da48a
5
5
  SHA512:
6
- metadata.gz: af5be8140cee0664106d035ac29210aba223bbb2addba17569d289803b2de275f7844bd647a863f68e453112ae995f9da3b1e1844e20249d44d0905fcb515b2f
7
- data.tar.gz: a765ac141f6bce00aa6a6810ee2be0eebe3938e6d8c52222dd691c1908ed95edc104ef25d47e4b904e714b16c7f2dc9cb6fa78bfeefc09dc841ef05a2dfc9558
6
+ metadata.gz: 3d3e749be3138b9b43b9e824b17fcf4a7844cd2b7ca9d0b317095ffdd424a8968c5af269ec45ff76917e87c4deabf789fc2f38c39e28a0005bdfd6036499e26a
7
+ data.tar.gz: 1588819f29015cad6c0c29209f3ed1f128e63b70490b85d7c1ade1142070652f0ba19bc1d9ca05a426e924131192b5c2176403c11cfe8ca27d355fe25530deb7
data/.codeclimate.yml CHANGED
@@ -1,12 +1,18 @@
1
- exclude_paths:
2
- - ".git/"
3
- - "**.xml"
4
- - "**.yaml"
5
- - "**.yml"
6
- - locale/
7
- - spec/
8
- - tools/
9
- 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-1-56-3
10
16
  brakeman:
11
17
  enabled: false
12
18
  bundler-audit:
@@ -26,19 +32,12 @@ engines:
26
32
  enabled: false
27
33
  markdownlint:
28
34
  enabled: false
29
- prepare:
30
- fetch:
31
- - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_base.yml
32
- path: ".rubocop_base.yml"
33
- - url: https://raw.githubusercontent.com/ManageIQ/manageiq-style/master/.rubocop_cc_base.yml
34
- path: ".rubocop_cc_base.yml"
35
- ratings:
36
- paths:
37
- - Gemfile.lock
38
- - "**.rake"
39
- - "**.rb"
40
- plugins:
41
- rubocop:
42
- enabled: true
43
- config: ".rubocop_cc.yml"
44
- channel: rubocop-0-82
35
+ exclude_patterns:
36
+ - ".git/"
37
+ - "**.xml"
38
+ - "**.yaml"
39
+ - "**.yml"
40
+ - locale/
41
+ - spec/
42
+ - tools/
43
+ version: '2'
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ schedule:
7
+ - cron: '0 0 * * 0'
8
+
9
+ jobs:
10
+ ci:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version:
15
+ - '2.7'
16
+ - '3.0'
17
+ - '3.1'
18
+ rails-version:
19
+ - '6.0'
20
+ - '6.1'
21
+ - '7.0'
22
+ services:
23
+ postgres:
24
+ image: manageiq/postgresql:13
25
+ env:
26
+ POSTGRESQL_USER: root
27
+ POSTGRESQL_PASSWORD: smartvm
28
+ POSTGRESQL_DATABASE: activerecord_id_regions_test
29
+ options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5
30
+ ports:
31
+ - 5432:5432
32
+ env:
33
+ TEST_RAILS_VERSION: ${{ matrix.rails-version }}
34
+ PGHOST: localhost
35
+ PGUSER: root
36
+ PGPASSWORD: smartvm
37
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - name: Set up Ruby
41
+ uses: ruby/setup-ruby@v1
42
+ with:
43
+ ruby-version: ${{ matrix.ruby-version }}
44
+ bundler-cache: true
45
+ timeout-minutes: 30
46
+ - name: Run tests
47
+ run: bundle exec rake
48
+ - name: Report code coverage
49
+ if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.0' && matrix.rails-version == '6.1' }}
50
+ continue-on-error: true
51
+ uses: paambaati/codeclimate-action@v6
data/.rspec CHANGED
@@ -1,4 +1,3 @@
1
1
  --require spec_helper
2
2
  --color
3
3
  --order random
4
- --format documentation
data/.whitesource ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "settingsInheritedFrom": "ManageIQ/whitesource-config@master"
3
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
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.4.0] - 2024-05-14
9
+ ### Changed
10
+
11
+ - Add support for rails 7
12
+
13
+ ## [0.3.2] - 2022-02-02
14
+ ### Fixed
15
+
16
+ - Loosened active record support to include active record 6.1
17
+ - Fixed keyword arguments for ruby 3.0 support
18
+
19
+ [Unreleased]: https://github.com/ManageIQ/activerecord-id_regions/compare/v0.4.0...HEAD
20
+ [0.4.0]: https://github.com/ManageIQ/activerecord-id_regions/compare/v0.3.2...v0.4.0
21
+ [0.3.2]: https://github.com/ManageIQ/activerecord-id_regions/compare/v0.3.1...v0.3.2
data/Gemfile CHANGED
@@ -2,3 +2,16 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in activerecord-id_regions.gemspec
4
4
  gemspec
5
+
6
+ minimum_version =
7
+ case ENV['TEST_RAILS_VERSION']
8
+ when "6.0"
9
+ "~>6.0.4"
10
+ when "7.0"
11
+ "~>7.0.8"
12
+ else
13
+ "~>6.1.4"
14
+ end
15
+
16
+ gem "activerecord", minimum_version
17
+ gem "activesupport", minimum_version
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # ActiveRecord::IdRegions
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/activerecord-id_regions.svg)](http://badge.fury.io/rb/activerecord-id_regions)
4
- [![Build Status](https://travis-ci.org/ManageIQ/activerecord-id_regions.svg)](https://travis-ci.org/ManageIQ/activerecord-id_regions)
4
+ [![CI](https://github.com/ManageIQ/activerecord-id_regions/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/activerecord-id_regions/actions/workflows/ci.yaml)
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
- [![Security](https://hakiri.io/github/ManageIQ/activerecord-id_regions/master.svg)](https://hakiri.io/github/ManageIQ/activerecord-id_regions/master)
8
7
 
9
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)
10
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", "< 6.1"
24
- spec.add_dependency "activesupport", ">= 5.0", "< 6.1"
23
+ spec.add_dependency "activerecord", ">= 5.0", "<7.1"
24
+ spec.add_dependency "activesupport", ">= 5.0", "<7.1"
25
25
  spec.add_dependency "pg"
26
26
 
27
27
  spec.add_development_dependency "bundler"
28
- spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
29
28
  spec.add_development_dependency "manageiq-style"
30
29
  spec.add_development_dependency "rake"
31
30
  spec.add_development_dependency "rspec", "~> 3.0"
32
- spec.add_development_dependency "simplecov"
31
+ spec.add_development_dependency "simplecov", ">= 0.21.2"
33
32
  end
@@ -2,7 +2,7 @@ module ActiveRecord::IdRegions
2
2
  module Migration
3
3
  ALLOWED_ID_VALUES = [false, :uuid, "uuid"].freeze
4
4
 
5
- def create_table(table_name, options = {})
5
+ def create_table(table_name, **options)
6
6
  options[:id] = :bigserial unless ALLOWED_ID_VALUES.include?(options[:id])
7
7
  value = anonymous_class_with_id_regions.rails_sequence_start
8
8
  super
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module IdRegions
3
- VERSION = "0.3.1".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
data/renovate.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ]
6
+ }
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.3.1
4
+ version: 0.4.0
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: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2024-05-14 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: '6.1'
22
+ version: '7.1'
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: '6.1'
32
+ version: '7.1'
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: '6.1'
42
+ version: '7.1'
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: '6.1'
52
+ version: '7.1'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: pg
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -78,20 +78,6 @@ dependencies:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
- - !ruby/object:Gem::Dependency
82
- name: codeclimate-test-reporter
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "~>"
86
- - !ruby/object:Gem::Version
87
- version: 1.0.0
88
- type: :development
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - "~>"
93
- - !ruby/object:Gem::Version
94
- version: 1.0.0
95
81
  - !ruby/object:Gem::Dependency
96
82
  name: manageiq-style
97
83
  requirement: !ruby/object:Gem::Requirement
@@ -140,29 +126,31 @@ dependencies:
140
126
  requirements:
141
127
  - - ">="
142
128
  - !ruby/object:Gem::Version
143
- version: '0'
129
+ version: 0.21.2
144
130
  type: :development
145
131
  prerelease: false
146
132
  version_requirements: !ruby/object:Gem::Requirement
147
133
  requirements:
148
134
  - - ">="
149
135
  - !ruby/object:Gem::Version
150
- version: '0'
136
+ version: 0.21.2
151
137
  description: ActiveRecord extension to allow partitioning ids into regions, for merge
152
138
  replication purposes
153
- email:
139
+ email:
154
140
  executables: []
155
141
  extensions: []
156
142
  extra_rdoc_files: []
157
143
  files:
158
144
  - ".codeclimate.yml"
145
+ - ".github/workflows/ci.yaml"
159
146
  - ".gitignore"
160
147
  - ".rspec"
161
148
  - ".rspec_ci"
162
149
  - ".rubocop.yml"
163
150
  - ".rubocop_cc.yml"
164
151
  - ".rubocop_local.yml"
165
- - ".travis.yml"
152
+ - ".whitesource"
153
+ - CHANGELOG.md
166
154
  - Gemfile
167
155
  - LICENSE.txt
168
156
  - README.md
@@ -175,11 +163,12 @@ files:
175
163
  - lib/active_record/id_regions/migration.rb
176
164
  - lib/active_record/id_regions/version.rb
177
165
  - lib/activerecord-id_regions.rb
166
+ - renovate.json
178
167
  homepage: https://github.com/ManageIQ/activerecord-id_regions
179
168
  licenses:
180
169
  - Apache-2.0
181
170
  metadata: {}
182
- post_install_message:
171
+ post_install_message:
183
172
  rdoc_options: []
184
173
  require_paths:
185
174
  - lib
@@ -194,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
183
  - !ruby/object:Gem::Version
195
184
  version: '0'
196
185
  requirements: []
197
- rubygems_version: 3.0.6
198
- signing_key:
186
+ rubygems_version: 3.3.27
187
+ signing_key:
199
188
  specification_version: 4
200
189
  summary: ActiveRecord extension to allow partitioning ids into regions, for merge
201
190
  replication purposes
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.5.8
4
- - 2.6.6
5
- cache: bundler
6
- addons:
7
- postgresql: '10'
8
- after_script: bundle exec codeclimate-test-reporter
9
- notifications:
10
- webhooks:
11
- urls:
12
- - https://webhooks.gitter.im/e/d69f1b2b4c21a45fd023
13
- on_success: change
14
- on_failure: always
15
- on_start: never