ridgepole-replace_db_task 0.3.0 → 0.4.0

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: f14de3119a516d59e6b4ccaabd389a9d20021cdee17d35adbbb58aee33d4cd3e
4
- data.tar.gz: 210873f810798356311f3a3dbb7679f8714ac9b6c6a3e28bdc3987f5a873f0dd
3
+ metadata.gz: 913aaa5b3bf2e3bae60e0a3bd6f302cb561dfd631d7b83b6bba7093597d10b26
4
+ data.tar.gz: 1556456d9b0d35edd56564c78c05522f2b84124ad6ce64de9e861050a26e62f3
5
5
  SHA512:
6
- metadata.gz: b06c52355f3021aeea3175a0d85e9b43e254a577e2fd8d10b18abd9fb6f61155581f85f47845697cd28a69e1e49acddd1208d8c41a92182d0d0f6e3d9523d4d7
7
- data.tar.gz: a027236aa6c6f42b128770ba3e95b58609e4647806438b8f1aa672715d2d835e0eb4597bc1826e5454847ac4a80f4c4c13e3f93a0ee0dabe289038bcf063d855
6
+ metadata.gz: 1da72ee0afc4a7a22da039131fad6c394886ed55ab614557154310291afa0a9dd2e4537233d7142e272c51b7d83a6e7115c3649173294f3a2f68674428299fa8
7
+ data.tar.gz: 7b249d396cc2845c0c08e059104fbaa59c6cfb8df8e4f09cf60ae2ca9becf9e49e2bc2a450fc5544d237aa9131c0516f75f56eaffec967b902c41356d8630a99
@@ -11,6 +11,7 @@ module Ridgepole
11
11
  config_accessor :skip_drop_table
12
12
  config_accessor :ignore_tables
13
13
  config_accessor :migrate_with_test_when_development
14
+ config_accessor :multiple_migration_settings
14
15
  end
15
16
  end
16
17
  end
@@ -1,5 +1,5 @@
1
1
  module Ridgepole
2
2
  module ReplaceDbTask
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ module Ridgepole
23
23
  config.ridgepole = 'bundle exec ridgepole'
24
24
  config.skip_drop_table = false
25
25
  config.ignore_tables = []
26
- config.migrate_with_test_when_development = true
26
+ config.multiple_migration_settings = {development: %i[test]}
27
27
  end
28
28
  end
29
29
  end
@@ -10,8 +10,9 @@ namespace :db do
10
10
  ENV['RAILS_ENV'] ||= 'development'
11
11
  apply(ENV['RAILS_ENV'], '--apply') { |line| puts line }
12
12
 
13
- if ENV['RAILS_ENV'] == 'development' && ::Ridgepole::ReplaceDbTask.config.migrate_with_test_when_development
14
- apply('test', '--apply') { |line| puts line }
13
+ envs = ::Ridgepole::ReplaceDbTask.config.multiple_migration_settings.dig(ENV['RAILS_ENV'].to_sym) || []
14
+ envs.each do |env|
15
+ apply(env, '--apply') { |line| puts line }
15
16
  end
16
17
  end
17
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole-replace_db_task
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties