activerecord-safer_migrations 3.0.0 → 4.0.0

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
  SHA256:
3
- metadata.gz: d13f83c80f1349c377b473f62e9bd4c3be66b3951d5aa21cf9deb02a455338b3
4
- data.tar.gz: ecae2f7ef31aeb43a8631dcc8aeab9387bb05a9117067af022e3f65f146b221b
3
+ metadata.gz: eea049e010a0e70538da15050fc12dc357e3a2a4bd7a282cabd50d0662b73abc
4
+ data.tar.gz: b10bff633844c10c31604a9acb6019942e767da89a389c0a03e01df48bc80001
5
5
  SHA512:
6
- metadata.gz: 1e8c83b7626aea99e64e2b496cb57a5af1979f8697a7b760bed228e07a9837356b3a30671d9c66094fd858086bfe2ca773142b24a33f6ae4c15b65ebccfd0fd0
7
- data.tar.gz: a62709f4e0e134b3d38550cdb5b0d4b6b752a7c2e669f89b1ad550c2b1b267bff1e2335b50b6ccbc1678ae8c9b960c18c05ae988434a5b1be1724e309cbf7ba9
6
+ metadata.gz: 86e5460e1a23eae1b87c34b0df46802315ac0dd0d092de4e2e9b5802af8c656b266e983f1b8ef9d5fe72957467b6ab0742ab95a168c97d7f7b5c1dfd213bde31
7
+ data.tar.gz: 0d79dcfd2741bd38e2e4048c4da1839ae7f0f991bc5f089695eb886eb8dbe8010ba520accfea9499b18af0dcdb5cd61671fdd79b91f3b11601fb85393e1a9cc5
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
@@ -0,0 +1,60 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "master"
7
+ pull_request:
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ rubocop:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: ruby/setup-ruby@v1
19
+ with:
20
+ bundler-cache: true
21
+ - run: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion
22
+
23
+ tests:
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ ruby-version: ["3.1", "3.2", "3.3"]
28
+ activerecord-version:
29
+ - "7.0.8"
30
+ - "7.1.3.4"
31
+ - "7.2.0"
32
+ runs-on: ubuntu-latest
33
+ services:
34
+ postgres:
35
+ image: postgres:14
36
+ env:
37
+ POSTGRES_USER: postgres
38
+ POSTGRES_DB: safer_migrations_test
39
+ POSTGRES_PASSWORD: safer_migrations
40
+ ports:
41
+ - 5432:5432
42
+ options: >-
43
+ --health-cmd pg_isready
44
+ --health-interval 10s
45
+ --health-timeout 5s
46
+ --health-retries 10
47
+ env:
48
+ DATABASE_URL: postgres://postgres:safer_migrations@localhost/safer_migrations_test
49
+ DATABASE_DEPENDENCY_PORT: "5432"
50
+ ACTIVERECORD_VERSION: "${{ matrix.activerecord-version }}"
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - name: Set up Ruby
54
+ uses: ruby/setup-ruby@v1
55
+ with:
56
+ bundler-cache: true
57
+ ruby-version: "${{ matrix.ruby-version }}"
58
+ - name: Run specs
59
+ run: |
60
+ bundle exec rspec --profile --format progress
data/.rubocop.yml CHANGED
@@ -1,10 +1,17 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
1
  inherit_gem:
4
2
  gc_ruboconfig: rubocop.yml
5
3
 
6
4
  AllCops:
7
- TargetRubyVersion: 2.7
5
+ TargetRubyVersion: 3.2
6
+ NewCops: enable
8
7
 
9
8
  Gemspec/RequiredRubyVersion:
10
9
  Enabled: false
10
+
11
+ Naming/FileName:
12
+ Exclude:
13
+ - lib/activerecord-safer_migrations.rb
14
+
15
+ Style/GlobalVars:
16
+ Exclude:
17
+ - "spec/active_record/safer_migrations/migration_spec.rb"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 3.3.4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 4.0.0 / 2024-08-21
2
+
3
+ - Remove support for Ruby =< 3.0 and Rails < 7.0
4
+ - Add support for ActiveRecord 7.2 (#98)
5
+
1
6
  # 3.0.0 / 2020-09-28
2
7
 
3
8
  - [#55](https://github.com/gocardless/activerecord-safer_migrations/pull/55) Drop support for Ruby =< 2.4 and Rails =< 5.1
data/Gemfile CHANGED
@@ -5,4 +5,9 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  gem "activerecord", "~> #{ENV['ACTIVERECORD_VERSION']}" if ENV["ACTIVERECORD_VERSION"]
8
- gem "gc_ruboconfig", "~> 2.19.0"
8
+
9
+ group :test, :development do
10
+ gem "gc_ruboconfig", "~> 5.0"
11
+ gem "pg", "~> 1.4"
12
+ gem "rspec", "~> 3.13.0"
13
+ end
@@ -14,11 +14,8 @@ Gem::Specification.new do |gem|
14
14
  gem.homepage = "https://github.com/gocardless/activerecord-safer_migrations"
15
15
  gem.license = "MIT"
16
16
 
17
- gem.required_ruby_version = ">= 2.5"
17
+ gem.required_ruby_version = ">= 3.1"
18
18
 
19
- gem.add_runtime_dependency "activerecord", ">= 5.2"
20
-
21
- gem.add_development_dependency "pg", "~> 1.2.3"
22
- gem.add_development_dependency "rspec", "~> 3.9.0"
23
- gem.add_development_dependency "rubocop", "~> 0.92.0"
19
+ gem.add_dependency "activerecord", ">= 7.0"
20
+ gem.metadata["rubygems_mfa_required"] = "true"
24
21
  end
@@ -33,7 +33,11 @@ module ActiveRecord
33
33
  end
34
34
 
35
35
  def fill_sql_values(sql, values)
36
- ActiveRecord::Base.send(:replace_named_bind_variables, sql, values)
36
+ if ActiveRecord.version >= "7.2.0"
37
+ ActiveRecord::Base.send(:replace_named_bind_variables, self, sql, values)
38
+ else
39
+ ActiveRecord::Base.send(:replace_named_bind_variables, sql, values)
40
+ end
37
41
  end
38
42
  end
39
43
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module SaferMigrations
5
- VERSION = "3.0.0"
5
+ VERSION = "4.0.0"
6
6
  end
7
7
  end
@@ -37,4 +37,4 @@ module ActiveRecord
37
37
  end
38
38
  end
39
39
 
40
- require "active_record/safer_migrations/railtie" if defined?(::Rails)
40
+ require "active_record/safer_migrations/railtie" if defined?(Rails)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-safer_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2024-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,66 +16,24 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '7.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
27
- - !ruby/object:Gem::Dependency
28
- name: pg
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 1.2.3
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 1.2.3
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 3.9.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 3.9.0
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.92.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.92.0
26
+ version: '7.0'
69
27
  description: ''
70
28
  email: developers@gocardless.com
71
29
  executables: []
72
30
  extensions: []
73
31
  extra_rdoc_files: []
74
32
  files:
75
- - ".circleci/config.yml"
33
+ - ".github/dependabot.yml"
34
+ - ".github/workflows/tests.yml"
76
35
  - ".gitignore"
77
36
  - ".rubocop.yml"
78
- - ".rubocop_todo.yml"
79
37
  - ".ruby-version"
80
38
  - CHANGELOG.md
81
39
  - Gemfile
@@ -93,7 +51,8 @@ files:
93
51
  homepage: https://github.com/gocardless/activerecord-safer_migrations
94
52
  licenses:
95
53
  - MIT
96
- metadata: {}
54
+ metadata:
55
+ rubygems_mfa_required: 'true'
97
56
  post_install_message:
98
57
  rdoc_options: []
99
58
  require_paths:
@@ -102,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
61
  requirements:
103
62
  - - ">="
104
63
  - !ruby/object:Gem::Version
105
- version: '2.5'
64
+ version: '3.1'
106
65
  required_rubygems_version: !ruby/object:Gem::Requirement
107
66
  requirements:
108
67
  - - ">="
109
68
  - !ruby/object:Gem::Version
110
69
  version: '0'
111
70
  requirements: []
112
- rubygems_version: 3.1.4
71
+ rubygems_version: 3.5.11
113
72
  signing_key:
114
73
  specification_version: 4
115
74
  summary: ActiveRecord migration helpers to avoid downtime
data/.circleci/config.yml DELETED
@@ -1,55 +0,0 @@
1
- version: 2.1
2
-
3
- jobs:
4
- test:
5
- docker:
6
- - image: circleci/ruby:<< parameters.ruby-version >>
7
- - image: postgres:11.3
8
- environment:
9
- POSTGRES_USER: postgres
10
- POSTGRES_DB: safer_migrations_test
11
- POSTGRES_PASSWORD: ""
12
- POSTGRES_HOST_AUTH_METHOD: trust
13
- environment:
14
- DATABASE_URL: postgres://postgres@localhost/safer_migrations_test
15
- ACTIVERECORD_VERSION: << parameters.activerecord-version >>
16
- parameters:
17
- ruby-version:
18
- type: string
19
- activerecord-version:
20
- type: string
21
- steps:
22
- - checkout
23
- - restore_cache:
24
- keys:
25
- - bundle-v1-<< parameters.ruby-version >>-{{ checksum "activerecord-safer_migrations.gemspec" }}
26
- - bundle-v1-<< parameters.ruby-version >>-
27
- - run:
28
- name: Install dependencies
29
- command: bundle install --clean --no-cache --path vendor/bundle --jobs=4 --retry=3
30
- - save_cache:
31
- key: bundle-v1-<< parameters.ruby-version >>-{{ checksum "activerecord-safer_migrations.gemspec" }}
32
- paths:
33
- - vendor/bundle
34
- - run:
35
- name: Run tests
36
- command: bundle exec rspec
37
- - run:
38
- name: Run rubocop
39
- command: bundle exec rubocop --parallel --extra-details --display-style-guide
40
-
41
- workflows:
42
- default:
43
- jobs:
44
- - test:
45
- name: "Ruby << matrix.ruby-version >> : ActiveRecord << matrix.activerecord-version >>"
46
- matrix:
47
- parameters:
48
- activerecord-version:
49
- - 5.2.4.4
50
- - 6.0.3.3
51
- ruby-version:
52
- - 2.5.8
53
- - 2.6.6
54
- - 2.7.1
55
- # - 3.0.0-preview1
data/.rubocop_todo.yml DELETED
@@ -1,20 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-03-27 12:04:06 +0100 using RuboCop version 0.54.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
11
- # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
12
- Naming/FileName:
13
- Exclude:
14
- - 'lib/activerecord-safer_migrations.rb'
15
-
16
- # Offense count: 20
17
- # Configuration parameters: AllowedVariables.
18
- Style/GlobalVars:
19
- Exclude:
20
- - 'spec/active_record/safer_migrations/migration_spec.rb'