bleib 0.0.14 → 0.0.16

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: b8dd30747f77195d48b5d390b46264289b8e1c49fa20c59e3282ac6713a79494
4
- data.tar.gz: bcbe6b32bd69c06463525f6c3b08567fdfc532e8763b4c715a9932e81ee1bad5
3
+ metadata.gz: ab7569650286fc392c4f645ae36b7bdcd55668a5f810e27bdf2b55e2db6bf171
4
+ data.tar.gz: 88e9940fab575b50b13ad45160b8e5264cb15cceb5e7d49f2474e65eb7d128ce
5
5
  SHA512:
6
- metadata.gz: add4d3ffa793ad2f0799fd54858fc282c59534ebb4d91ea0206053e1bbc939b84422ebb6c1eba12ccaa68d5f6b5ddf8123791e98b07d375a62c56e5430cd7af8
7
- data.tar.gz: e78186dc2516bd072864ada0ce45d5c545882aaa34050a5cf15c0f610dfa712d590e1ddcf1c096123790b95123a669619e990859aabc8e1413a450fe54e0265f
6
+ metadata.gz: 76a8668b05c073e38bb27b6a7ebdc3db5ccab53d2b392a1b51c338db6d39675b4aca71e2fe497de6372af84cbc35b95533e8acd39d782a5beea9a480defe8849
7
+ data.tar.gz: d7e636f7a072684c0e26840bca4b57f2edd7b4eae8915fef3676c18e9b4e21262cba9a003e9df48bcdf37db82fb561f2d7fec97ea31537f49e5223531542c700
@@ -56,13 +56,22 @@ module Bleib
56
56
 
57
57
  def check_migrations!
58
58
  check_wagon_migrations! if wagons_gem?
59
- ActiveRecord::Migration.check_pending!
59
+
60
+ # https://apidock.com/rails/v7.1.3.4/ActiveRecord/Migration/check_pending
61
+ if Rails::VERSION::MAJOR < 7 || (Rails::VERSION::MAJOR == 7 && Rails::VERSION::MINOR.zero?)
62
+ ActiveRecord::Migration.check_pending!
63
+ else
64
+ ActiveRecord::Migration.check_all_pending!
65
+ end
60
66
  end
61
67
 
62
68
  def check_wagon_migrations!
63
69
  paths = Wagons.all.flat_map(&:migrations_paths)
64
- context = ActiveRecord::MigrationContext.new(paths, ActiveRecord::SchemaMigration)
65
-
70
+ context = if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('7.1.0')
71
+ ActiveRecord::MigrationContext.new(paths, ActiveRecord::SchemaMigration)
72
+ else
73
+ ActiveRecord::MigrationContext.new(paths)
74
+ end
66
75
  # we do not need the correct output, just the right exception
67
76
  # in this case, the output only considers the main-app migration, not the ones in wagons
68
77
  raise ActiveRecord::PendingMigrationError if context.needs_migration?
data/lib/bleib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bleib
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.16'
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bleib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puzzle ITC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-18 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2025-10-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Intended for use in containerized setups where another component takes
14
28
  care of migrating the database.
15
29
  email: viehweger@puzzle.ch
@@ -44,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
44
58
  - !ruby/object:Gem::Version
45
59
  version: '0'
46
60
  requirements: []
47
- rubygems_version: 3.5.10
61
+ rubygems_version: 3.4.19
48
62
  signing_key:
49
63
  specification_version: 4
50
64
  summary: Use a rake task to wait on database and migrations.