outrigger 3.0.1 → 3.0.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: 392d8062869e177e23c6860452029c08aad9ecdcf50cdf066c2adf2acbfa986f
4
- data.tar.gz: 6e88773c9dc2c53f6d248018c54498ff4d824d79ae0fdc02c6577a0b4e154d2b
3
+ metadata.gz: 989e78a7c21817b799bdeff0f01501e699bba2ee3e1936dc48dc152a1a3eea4a
4
+ data.tar.gz: 3130d720e01ce368f4906367a5405af50109e94fb184297fdbcc1703ad9da4d3
5
5
  SHA512:
6
- metadata.gz: 19200055e92e31aa92dd87003a17df97752544847754957db78420a6470c08d2e63d812095a088e05a326593ba2b7ade2c1fbf764e78cad7f92a1a236a6ac546
7
- data.tar.gz: 23710d99de6a88968cc2f812a600ad62364a4bd39d9124206ac0fe541f7d5153ddc463d54e89d41c6a210eeda386bccd91d00866fe6133fe09747fb4e86da315
6
+ metadata.gz: a35da6e8ab04601eebac9a76a0fdbe7a948e7d2a9781125769241c5940962929d358d316184c1e3ece13c0abf6abd982d3a244cce5465074f9996f9f6648646f
7
+ data.tar.gz: 721a259d65008c0ab41b7777874546aac2e9ed9c6fbfe6ca197e161841fbf10893009878e7291cdc6644e8c68defe0cbafcc75e29ab29f091141e1c6dc091428
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Outrigger
4
- VERSION = '3.0.1'
4
+ VERSION = '3.0.2'
5
5
  end
@@ -14,26 +14,48 @@ module Outrigger
14
14
  MultiMigration.new(nil, 4)]
15
15
  end
16
16
 
17
+ let(:versions) { [] }
18
+ let(:direction) { :up }
19
+ let(:schema_migration) do
20
+ if ActiveRecord.version < Gem::Version.new('7.1')
21
+ object_double(ActiveRecord::SchemaMigration, create_table: nil, all_versions: versions)
22
+ else
23
+ instance_double(ActiveRecord::SchemaMigration, create_table: nil, integer_versions: versions)
24
+ end
25
+ end
26
+
27
+ let(:migrator) do
28
+ if ActiveRecord.version < Gem::Version.new('7.1')
29
+ ActiveRecord::Migrator.new(direction, migrations, schema_migration)
30
+ else
31
+ internal_metadata = instance_double(ActiveRecord::InternalMetadata, create_table: nil)
32
+ ActiveRecord::Migrator.new(direction, migrations, schema_migration, internal_metadata)
33
+ end
34
+ end
35
+
17
36
  before do
18
37
  allow(ActiveRecord::InternalMetadata).to receive(:create_table)
19
38
  end
20
39
 
21
40
  it 'sorts' do
22
- schema_migration = object_double(ActiveRecord::SchemaMigration, create_table: nil, all_versions: [])
23
- expect(ActiveRecord::Migrator.new(:up, migrations, schema_migration).runnable.map(&:class)).to eq(
41
+ expect(migrator.runnable.map(&:class)).to eq(
24
42
  [
25
43
  PreDeployMigration, MultiMigration, UntaggedMigration, PostDeployMigration
26
44
  ]
27
45
  )
28
46
  end
29
47
 
30
- it 'reverse sorts when going down' do
31
- schema_migration = object_double(ActiveRecord::SchemaMigration, create_table: nil, all_versions: [1, 2, 3, 4])
32
- expect(ActiveRecord::Migrator.new(:down, migrations, schema_migration).runnable.map(&:class)).to eq(
33
- [
34
- PostDeployMigration, UntaggedMigration, MultiMigration, PreDeployMigration
35
- ]
36
- )
48
+ context 'when going down' do
49
+ let(:versions) { [1, 2, 3, 4] }
50
+ let(:direction) { :down }
51
+
52
+ it 'reverse sorts' do
53
+ expect(migrator.runnable.map(&:class)).to eq(
54
+ [
55
+ PostDeployMigration, UntaggedMigration, MultiMigration, PreDeployMigration
56
+ ]
57
+ )
58
+ end
37
59
  end
38
60
  end
39
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outrigger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Bowman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2023-10-06 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: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: railties
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '6.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.1'
42
+ version: '7.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,21 +49,7 @@ dependencies:
49
49
  version: '6.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.1'
53
- - !ruby/object:Gem::Dependency
54
- name: appraisal
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: '0'
60
- type: :development
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: '0'
52
+ version: '7.2'
67
53
  - !ruby/object:Gem::Dependency
68
54
  name: bundler
69
55
  requirement: !ruby/object:Gem::Requirement
@@ -218,15 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
204
  - !ruby/object:Gem::Version
219
205
  version: '0'
220
206
  requirements: []
221
- rubygems_version: 3.1.4
207
+ rubygems_version: 3.1.6
222
208
  signing_key:
223
209
  specification_version: 4
224
210
  summary: Tag migrations and run them separately
225
- test_files:
226
- - spec/outrigger/cops/migration/tagged_spec.rb
227
- - spec/outrigger/migrator_spec.rb
228
- - spec/outrigger/outrigger_spec.rb
229
- - spec/outrigger/railtie_spec.rb
230
- - spec/outrigger/taggable_proxy_spec.rb
231
- - spec/outrigger/taggable_spec.rb
232
- - spec/spec_helper.rb
211
+ test_files: []