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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ac1182988cd87a3abf3a2a8ac483790e458809ae
4
- data.tar.gz: f123784895f973a10cbe187627e41a923bb316dd
2
+ SHA256:
3
+ metadata.gz: 80730587f4d86a0bc33887c0ad10d64174dc4ad57233d87ae772bbe82c5597b6
4
+ data.tar.gz: 764026bf98b336f0025d0b46bae915269c6428cc5d1b74eac9b9a356ce6654d9
5
5
  SHA512:
6
- metadata.gz: c2b440527b64f4e41c73c0948b9ac3154acaf93dc6e860d21490f15064b8322a13f3f6ef05e107e269f754ca61929aa496fb141a8864cd2ebf941653330d6ecb
7
- data.tar.gz: d85dc76088913b6ce36ecab33f2c47de741b83b62c6e1852b4e3f6ed0c237e1c0900f707defebffe32cd9e2885ef83f72d8bcc73cbe803e59fb8f3156ef0f974
6
+ metadata.gz: 3bf82422d17e3accf2d95cbd6233cd594e7f51d4531f6ddc580b2d16a3c0875d02cdefc682620f8967fd4ffb7c6aed5d63ea35b2123db3973148d5b74f29ea08
7
+ data.tar.gz: b26a640c8771d030ceecb4a34c2f4a8273c1c65409bdc13e00c856b646f9165b78b25d3cb97c8d8e5296dc72a8d3cd89898331e53f870b4fcf65ece1b7142c3a
@@ -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
- RussellEdge::DataMigrator.initialize_data_migrations_table unless data_migrations_table_exists?
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)
@@ -1,7 +1,7 @@
1
1
  module DataMigrator
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
- MINOR = 1
4
+ MINOR = 2
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join(".")
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.1.0
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: 2018-10-10 00:00:00.000000000 Z
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.4.5.1
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.