outrigger 3.0.0 → 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: 470f381099cffd17d79737efc2f7501ab70a3de44df06c92e0a14b579314bd76
4
- data.tar.gz: 5fe33a5c351cb9a0511a62c0480d15a23e0cb4fe67bfd32f67aec9eeaefd9b5e
3
+ metadata.gz: 989e78a7c21817b799bdeff0f01501e699bba2ee3e1936dc48dc152a1a3eea4a
4
+ data.tar.gz: 3130d720e01ce368f4906367a5405af50109e94fb184297fdbcc1703ad9da4d3
5
5
  SHA512:
6
- metadata.gz: 53692e56afb3a76874bb7000811daed3cfac224e7dc344e946bf78cb97b2b44fdabc28529e36f12fb901d8d92f15d86183c9b42cfdd03cd90dbd566e9be68b2c
7
- data.tar.gz: fd62d320a416ecbdeb31ef47efd5102097e55407f3213217c9f22b340287429d46bf636e4a4a91197082432e4c50fb4d048e919dcd80563e5cdffabcadfe470c
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.0'
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
@@ -5,14 +5,14 @@ describe Outrigger do
5
5
  it 'returns a proc that tests migrations' do
6
6
  filter = described_class.filter(:predeploy)
7
7
 
8
- expect(filter.call(PreDeployMigration)).to eq(true)
8
+ expect(filter.call(PreDeployMigration)).to be(true)
9
9
  end
10
10
 
11
11
  it 'accepts multiple tags' do
12
12
  filter = described_class.filter(:predeploy, :postdeploy)
13
13
 
14
- expect(filter.call(MultiMigration)).to eq(true)
15
- expect(filter.call(PreDeployMigration)).to eq(false)
14
+ expect(filter.call(MultiMigration)).to be(true)
15
+ expect(filter.call(PreDeployMigration)).to be(false)
16
16
  end
17
17
  end
18
18
  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.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: 2021-09-10 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: '6.2'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,55 +29,55 @@ dependencies:
29
29
  version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.2'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
- name: bundler
34
+ name: railties
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '2.2'
40
- type: :development
39
+ version: '6.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '7.2'
43
+ type: :runtime
41
44
  prerelease: false
42
45
  version_requirements: !ruby/object:Gem::Requirement
43
46
  requirements:
44
- - - "~>"
47
+ - - ">="
45
48
  - !ruby/object:Gem::Version
46
- version: '2.2'
49
+ version: '6.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '7.2'
47
53
  - !ruby/object:Gem::Dependency
48
- name: byebug
54
+ name: bundler
49
55
  requirement: !ruby/object:Gem::Requirement
50
56
  requirements:
51
57
  - - "~>"
52
58
  - !ruby/object:Gem::Version
53
- version: '11.1'
59
+ version: '2.2'
54
60
  type: :development
55
61
  prerelease: false
56
62
  version_requirements: !ruby/object:Gem::Requirement
57
63
  requirements:
58
64
  - - "~>"
59
65
  - !ruby/object:Gem::Version
60
- version: '11.1'
66
+ version: '2.2'
61
67
  - !ruby/object:Gem::Dependency
62
- name: railties
68
+ name: byebug
63
69
  requirement: !ruby/object:Gem::Requirement
64
70
  requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: '6.0'
68
- - - "<"
71
+ - - "~>"
69
72
  - !ruby/object:Gem::Version
70
- version: '6.2'
73
+ version: '11.1'
71
74
  type: :development
72
75
  prerelease: false
73
76
  version_requirements: !ruby/object:Gem::Requirement
74
77
  requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: '6.0'
78
- - - "<"
78
+ - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '6.2'
80
+ version: '11.1'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rake
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -162,20 +162,6 @@ dependencies:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0.21'
165
- - !ruby/object:Gem::Dependency
166
- name: wwtd
167
- requirement: !ruby/object:Gem::Requirement
168
- requirements:
169
- - - "~>"
170
- - !ruby/object:Gem::Version
171
- version: '1.4'
172
- type: :development
173
- prerelease: false
174
- version_requirements: !ruby/object:Gem::Requirement
175
- requirements:
176
- - - "~>"
177
- - !ruby/object:Gem::Version
178
- version: '1.4'
179
165
  description: Migrations
180
166
  email:
181
167
  executables: []
@@ -191,8 +177,6 @@ files:
191
177
  - lib/outrigger/taggable_proxy.rb
192
178
  - lib/outrigger/version.rb
193
179
  - lib/tasks/outrigger.rake
194
- - spec/gemfiles/rails_6.0.gemfile
195
- - spec/gemfiles/rails_6.1.gemfile
196
180
  - spec/outrigger/cops/migration/tagged_spec.rb
197
181
  - spec/outrigger/migrator_spec.rb
198
182
  - spec/outrigger/outrigger_spec.rb
@@ -203,7 +187,8 @@ files:
203
187
  homepage: https://github.com/instructure/outrigger
204
188
  licenses:
205
189
  - MIT
206
- metadata: {}
190
+ metadata:
191
+ rubygems_mfa_required: 'true'
207
192
  post_install_message:
208
193
  rdoc_options: []
209
194
  require_paths:
@@ -219,17 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
204
  - !ruby/object:Gem::Version
220
205
  version: '0'
221
206
  requirements: []
222
- rubygems_version: 3.2.24
207
+ rubygems_version: 3.1.6
223
208
  signing_key:
224
209
  specification_version: 4
225
210
  summary: Tag migrations and run them separately
226
- test_files:
227
- - spec/gemfiles/rails_6.0.gemfile
228
- - spec/gemfiles/rails_6.1.gemfile
229
- - spec/outrigger/cops/migration/tagged_spec.rb
230
- - spec/outrigger/migrator_spec.rb
231
- - spec/outrigger/outrigger_spec.rb
232
- - spec/outrigger/railtie_spec.rb
233
- - spec/outrigger/taggable_proxy_spec.rb
234
- - spec/outrigger/taggable_spec.rb
235
- - spec/spec_helper.rb
211
+ test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec path: '../../'
6
-
7
- gem 'activerecord', '~> 6.0.0'
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec path: '../../'
6
-
7
- gem 'activerecord', '~> 6.1.0'