data_migrate 6.0.0.beta → 6.0.1.beta
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82df1d98f4ca46a882e5008667428c15a91fdfb41601df6d1241b9e87cb4e35f
|
|
4
|
+
data.tar.gz: 81b2c71177397ad31851e998235d2c116ebca7c94c04abdcb3dc6257cfa4ff54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64257b2ed0d1a71caad5b3ef113a1c578e09cbff58e98f304dc6abc1919ae279da186103cb1af9b4d873163365cec76d62d6ba311861a3a7cccb860fc171a707
|
|
7
|
+
data.tar.gz: 0df8009342ec00db007e572377103057280e70f49076050fb840fcf70aef1fedea5a5e8020bb0000f5eb1de978beb919e536c027609b62a505470f90c15af7c2
|
data/Changelog.md
CHANGED
data/gemfiles/rails_6.0.gemfile
CHANGED
data/lib/data_migrate/version.rb
CHANGED
|
@@ -14,7 +14,7 @@ module DataMigrate
|
|
|
14
14
|
|
|
15
15
|
def create_data_migration
|
|
16
16
|
set_local_assigns!
|
|
17
|
-
migration_template "data_migration.rb",
|
|
17
|
+
migration_template "data_migration.rb", data_migrations_file_path
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
protected
|
|
@@ -36,6 +36,10 @@ module DataMigrate
|
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
def data_migrations_file_path
|
|
40
|
+
File.join(data_migrations_path, "#{file_name}.rb")
|
|
41
|
+
end
|
|
42
|
+
|
|
39
43
|
def data_migrations_path
|
|
40
44
|
DataMigrate.config.data_migrations_path
|
|
41
45
|
end
|
|
@@ -24,4 +24,37 @@ describe DataMigrate::Generators::DataMigrationGenerator do
|
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
describe :create_data_migration do
|
|
29
|
+
let(:subject) { DataMigrate::Generators::DataMigrationGenerator.new(['my_migration']) }
|
|
30
|
+
let(:data_migrations_file_path) { 'abc/my_migration.rb' }
|
|
31
|
+
|
|
32
|
+
context 'when custom data migrations path has a trailing slash' do
|
|
33
|
+
before do
|
|
34
|
+
DataMigrate.config.data_migrations_path = 'abc/'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'returns correct file path' do
|
|
38
|
+
expect(subject).to receive(:migration_template).with(
|
|
39
|
+
'data_migration.rb', data_migrations_file_path
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
subject.create_data_migration
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
context 'when custom data migrations path does not have a trailing slash' do
|
|
47
|
+
before do
|
|
48
|
+
DataMigrate.config.data_migrations_path = 'abc'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
it 'returns correct file path' do
|
|
52
|
+
expect(subject).to receive(:migration_template).with(
|
|
53
|
+
'data_migration.rb', data_migrations_file_path
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
subject.create_data_migration
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
27
60
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: data_migrate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.1.beta
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew J Vargo
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-05-05 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|
|
@@ -285,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
285
285
|
- !ruby/object:Gem::Version
|
|
286
286
|
version: 1.3.1
|
|
287
287
|
requirements: []
|
|
288
|
-
rubygems_version: 3.0.
|
|
288
|
+
rubygems_version: 3.0.3
|
|
289
289
|
signing_key:
|
|
290
290
|
specification_version: 4
|
|
291
291
|
summary: Rake tasks to migrate data alongside schema changes.
|