data_migrator 2.0.2 → 3.0.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
  SHA1:
3
- metadata.gz: 6f3a9a4d51cfe574a006b795916430224b8371b6
4
- data.tar.gz: fea2aa1f3166c066eb409edea332dc20b5e13e40
3
+ metadata.gz: 328f33efadf003ef2ef20398248f03201d81f39e
4
+ data.tar.gz: 70d2bdeffe3a76d47d64b6d645c598280fe0484a
5
5
  SHA512:
6
- metadata.gz: 49068e423aabde866d5a1841068496d6a07d1619f32e3583e930d3183a00ea2b1a6226a497524e22a1774df02b419937745d649109694569da53fe6fbf570647
7
- data.tar.gz: db1d8e7c14c5c33056aeb45ab0c043a7864ef9846534d14d93b025a8ef6a245535ba197bafa620550ff5fe92be78bc06d5f0389a27da227b126ade8b6ea15598
6
+ metadata.gz: 5d4fc77bbf7e97f6151d0af5700cc38fa1138cbf8635b0cb4f7f47e9b224ee953cc2de315997909c03226c70a617b49dd3fe737fb99cf3a03397d1004cfef1bd
7
+ data.tar.gz: 2385828c73f1e4a3e2afa4100f43c7338735b5bdd9d5aa0371311eb1f5f1af80d21ad044f0eb18cf5354de9fe0c39471e2e83cfddab1dd0720475b702384e06e
@@ -1,7 +1,7 @@
1
- class CreateDataMigrationsTable < ActiveRecord::Migration
1
+ class CreateDataMigrationsTable < ActiveRecord::Migration[5.1]
2
2
  def self.up
3
3
  unless table_exists?(:data_migrations)
4
- create_table :data_migrations, {:id => false} do |t|
4
+ create_table :data_migrations, {:id => false} do |t|
5
5
  t.column :version, :string
6
6
  end
7
7
  end
@@ -9,7 +9,7 @@ class CreateDataMigrationsTable < ActiveRecord::Migration
9
9
 
10
10
  def self.down
11
11
  if table_exists?(:data_migrations)
12
- drop_table :data_migrations
12
+ drop_table :data_migrations
13
13
  end
14
14
  end
15
15
  end
@@ -1,8 +1,8 @@
1
1
  module DataMigrator
2
2
  module VERSION #:nodoc:
3
- MAJOR = 2
3
+ MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -2,29 +2,35 @@ Rails::Engine::Configuration.class_eval do
2
2
  def paths
3
3
  @paths ||= begin
4
4
  paths = Rails::Paths::Root.new(@root)
5
- paths.add "app", :eager_load => true, :glob => "*"
6
- paths.add "app/assets", :glob => "*"
7
- paths.add "app/controllers", :eager_load => true
8
- paths.add "app/helpers", :eager_load => true
9
- paths.add "app/models", :eager_load => true
10
- paths.add "app/mailers", :eager_load => true
5
+
6
+ paths.add "app", eager_load: true, glob: "{*,*/concerns}"
7
+ paths.add "app/assets", glob: "*"
8
+ paths.add "app/controllers", eager_load: true
9
+ paths.add "app/channels", eager_load: true, glob: "**/*_channel.rb"
10
+ paths.add "app/helpers", eager_load: true
11
+ paths.add "app/models", eager_load: true
12
+ paths.add "app/mailers", eager_load: true
11
13
  paths.add "app/views"
12
- paths.add "lib", :load_path => true
13
- paths.add "lib/assets", :glob => "*"
14
- paths.add "lib/tasks", :glob => "**/*.rake"
14
+
15
+ paths.add "lib", load_path: true
16
+ paths.add "lib/assets", glob: "*"
17
+ paths.add "lib/tasks", glob: "**/*.rake"
18
+
15
19
  paths.add "config"
16
- paths.add "config/environments", :glob => "#{Rails.env}.rb"
17
- paths.add "config/initializers", :glob => "**/*.rb"
18
- paths.add "config/locales", :glob => "*.{rb,yml}"
19
- paths.add "config/routes", :with => "config/routes.rb"
20
+ paths.add "config/environments", glob: "#{Rails.env}.rb"
21
+ paths.add "config/initializers", glob: "**/*.rb"
22
+ paths.add "config/locales", glob: "*.{rb,yml}"
23
+ paths.add "config/routes.rb"
24
+
20
25
  paths.add "db"
21
26
  paths.add "db/migrate"
22
27
  paths.add "db/data_migrations"
23
- paths.add "db/seeds", :with => "db/seeds.rb"
24
- paths.add "vendor", :load_path => true
25
- paths.add "vendor/assets", :glob => "*"
26
- paths.add "vendor/plugins"
28
+ paths.add "db/seeds.rb"
29
+
30
+ paths.add "vendor", load_path: true
31
+ paths.add "vendor/assets", glob: "*"
32
+
27
33
  paths
28
34
  end
29
35
  end
30
- end
36
+ end
@@ -8,9 +8,9 @@ namespace :db do
8
8
  Rake::Task["db:schema:dump"].reenable
9
9
  Rake::Task["db:schema:dump"].invoke
10
10
  end#end migrate_data task
11
-
11
+
12
12
  namespace :migrate_data do
13
- task :list_pending => :environment do
13
+ task :list_pending => :environment do
14
14
  pending_migrations = RussellEdge::DataMigrator.new.pending_migrations
15
15
  puts "================Pending Data Migrations=========="
16
16
  puts pending_migrations
@@ -21,7 +21,7 @@ namespace :db do
21
21
  version = RussellEdge::DataMigrator.new.get_current_version
22
22
  puts (version.nil?) ? "** No migrations ran" : "** Current version #{version}"
23
23
  end#end version task
24
-
24
+
25
25
  task :up => :environment do
26
26
  passed_version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
27
27
  raise "VERSION is required" unless passed_version
@@ -31,7 +31,7 @@ namespace :db do
31
31
  Rake::Task["db:schema:dump"].reenable
32
32
  Rake::Task["db:schema:dump"].invoke
33
33
  end#end up task
34
-
34
+
35
35
  task :down => :environment do
36
36
  passed_version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
37
37
  raise "VERSION is required" unless passed_version
@@ -54,7 +54,7 @@ namespace :railties do
54
54
  #refresh will replace migrations from engines
55
55
  refresh = ENV['REFRESH'].blank? ? false : (ENV['REFRESH'].to_s.downcase == "true")
56
56
  railties = ActiveSupport::OrderedHash.new
57
- Rails.application.railties.all do |railtie|
57
+ Rails.application.railties.each do |railtie|
58
58
  next unless to_load == :all || to_load.include?(railtie.railtie_name)
59
59
 
60
60
  if railtie.respond_to?(:paths) && (path = railtie.paths['db/data_migrations'].first)
@@ -70,14 +70,12 @@ namespace :railties do
70
70
  puts "Copied data_migration #{migration[:name]} from #{name}"
71
71
  end
72
72
 
73
- RussellEdge::DataMigrator.copy(RussellEdge::DataMigrator.migrations_path, railties,
74
- :on_skip => on_skip,
75
- :on_copy => on_copy,
73
+ RussellEdge::DataMigrator.copy(RussellEdge::DataMigrator.migrations_path, railties,
74
+ :on_skip => on_skip,
75
+ :on_copy => on_copy,
76
76
  :preserve_timestamp => preserve_timestamp,
77
77
  :refresh => refresh)
78
78
  end #data_migrations
79
-
79
+
80
80
  end #install
81
81
  end #railties
82
-
83
-
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_migrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 3.0.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: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - "<="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.0
19
+ version: '5.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - "<="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.0
26
+ version: '5.3'
27
27
  description: Allows you to create data migrations that can be run up and down to insert
28
28
  data into the database.
29
29
  email: russellfholmes@gmail.com
@@ -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.8
66
+ rubygems_version: 2.6.13
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: Creates Data Migrations for data similar to schema migrations.