data_migrator 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/data_migrator.rb +13 -7
- data/lib/data_migrator/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 80730587f4d86a0bc33887c0ad10d64174dc4ad57233d87ae772bbe82c5597b6
|
4
|
+
data.tar.gz: 764026bf98b336f0025d0b46bae915269c6428cc5d1b74eac9b9a356ce6654d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf82422d17e3accf2d95cbd6233cd594e7f51d4531f6ddc580b2d16a3c0875d02cdefc682620f8967fd4ffb7c6aed5d63ea35b2123db3973148d5b74f29ea08
|
7
|
+
data.tar.gz: b26a640c8771d030ceecb4a34c2f4a8273c1c65409bdc13e00c856b646f9165b78b25d3cb97c8d8e5296dc72a8d3cd89898331e53f870b4fcf65ece1b7142c3a
|
data/lib/data_migrator.rb
CHANGED
@@ -9,6 +9,18 @@ class DataMigrationTask < Rails::Railtie
|
|
9
9
|
end
|
10
10
|
|
11
11
|
module RussellEdge
|
12
|
+
class DataMigratorEngine < ::Rails::Engine
|
13
|
+
isolate_namespace DataMigratorEngine
|
14
|
+
|
15
|
+
initializer :append_migrations do |app|
|
16
|
+
unless app.root.to_s.match root.to_s
|
17
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
18
|
+
app.config.paths["db/migrate"] << expanded_path
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
12
24
|
class DataMigrator
|
13
25
|
REMOVE_FILES_REGEX = /^\./
|
14
26
|
|
@@ -44,12 +56,6 @@ module RussellEdge
|
|
44
56
|
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % number].max
|
45
57
|
end
|
46
58
|
|
47
|
-
def initialize_data_migrations_table
|
48
|
-
puts "** data_migrations table missing creating now...."
|
49
|
-
puts ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "../db/migrate/"), 20100819181805)
|
50
|
-
puts "** done"
|
51
|
-
end
|
52
|
-
|
53
59
|
def copy(destination, sources, options = {})
|
54
60
|
copied = []
|
55
61
|
|
@@ -182,7 +188,7 @@ module RussellEdge
|
|
182
188
|
private
|
183
189
|
|
184
190
|
def setup
|
185
|
-
|
191
|
+
raise "Data Migration table missing" unless data_migrations_table_exists?
|
186
192
|
|
187
193
|
unless File.directory? @default_migrations_path
|
188
194
|
FileUtils.mkdir_p(@default_migrations_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_migrator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Holmes, Adam Hull
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
65
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.
|
66
|
+
rubygems_version: 2.7.6
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: Creates Data Migrations for data similar to schema migrations.
|