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 +4 -4
- data/lib/outrigger/version.rb +1 -1
- data/spec/outrigger/migrator_spec.rb +31 -9
- metadata +8 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 989e78a7c21817b799bdeff0f01501e699bba2ee3e1936dc48dc152a1a3eea4a
|
4
|
+
data.tar.gz: 3130d720e01ce368f4906367a5405af50109e94fb184297fdbcc1703ad9da4d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a35da6e8ab04601eebac9a76a0fdbe7a948e7d2a9781125769241c5940962929d358d316184c1e3ece13c0abf6abd982d3a244cce5465074f9996f9f6648646f
|
7
|
+
data.tar.gz: 721a259d65008c0ab41b7777874546aac2e9ed9c6fbfe6ca197e161841fbf10893009878e7291cdc6644e8c68defe0cbafcc75e29ab29f091141e1c6dc091428
|
data/lib/outrigger/version.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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: []
|