erp_base_erp_svcs 3.0.7 → 3.1.0
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.
- data/app/models/category.rb +2 -1
- data/app/models/category_classification.rb +2 -0
- data/app/models/compass_ae_instance.rb +1 -1
- data/app/models/contact.rb +34 -32
- data/app/models/contact_purpose.rb +6 -4
- data/app/models/contact_type.rb +3 -1
- data/app/models/currency.rb +6 -4
- data/app/models/descriptive_asset.rb +2 -0
- data/app/models/email_address.rb +2 -0
- data/app/models/geo_country.rb +2 -0
- data/app/models/geo_zone.rb +2 -0
- data/app/models/individual.rb +2 -0
- data/app/models/iso_country_code.rb +0 -1
- data/app/models/money.rb +1 -0
- data/app/models/note.rb +2 -0
- data/app/models/note_type.rb +2 -0
- data/app/models/organization.rb +2 -0
- data/app/models/party.rb +4 -3
- data/app/models/party_relationship.rb +6 -5
- data/app/models/party_role.rb +7 -5
- data/app/models/phone_number.rb +2 -0
- data/app/models/postal_address.rb +2 -0
- data/app/models/relationship_type.rb +7 -5
- data/app/models/role_type.rb +2 -0
- data/app/models/valid_note_type.rb +2 -0
- data/app/models/view_type.rb +2 -0
- data/db/data_migrations/20110913145838_setup_compass_ae_instance.rb +1 -1
- data/db/migrate/20080805000020_base_erp_services.rb +222 -222
- data/lib/erp_base_erp_svcs/engine.rb +2 -0
- data/lib/erp_base_erp_svcs/extensions/active_record/migration.rb +39 -0
- data/lib/erp_base_erp_svcs/extensions.rb +1 -2
- data/lib/erp_base_erp_svcs/version.rb +2 -2
- data/lib/erp_base_erp_svcs.rb +15 -15
- data/lib/tasks/erp_base_erp_svcs_tasks.rake +58 -23
- data/spec/dummy/config/application.rb +6 -0
- data/spec/dummy/config/environments/spec.rb +3 -0
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/migrate/20130107214414_base_erp_services.erp_base_erp_svcs.rb +461 -0
- data/spec/dummy/db/schema.rb +383 -0
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +17576 -0
- data/spec/models/email_address_spec.rb +1 -1
- data/spec/models/party_spec.rb +19 -19
- data/spec/spec_helper.rb +14 -5
- metadata +70 -149
- data/db/migrate/20110913145329_create_compass_ae_instance.rb +0 -15
- data/db/migrate/upgrade/20110907171257_add_notes.rb +0 -63
- data/lib/erp_base_erp_svcs/extensions/active_record/data_migrator.rb +0 -46
- data/lib/erp_base_erp_svcs/extensions/active_record/migrator.rb +0 -76
@@ -1,46 +0,0 @@
|
|
1
|
-
module RussellEdge
|
2
|
-
class DataMigrator
|
3
|
-
|
4
|
-
class << self
|
5
|
-
def prepare_upgrade_migrations
|
6
|
-
dirs = Rails::Application::Railties.engines.map{|p| p.config.root.to_s}
|
7
|
-
dirs.each do |dir|
|
8
|
-
if File.directory? File.join(dir,'db/data_migrations/upgrade')
|
9
|
-
target = File.join(dir,'db/data_migrations/')
|
10
|
-
files = Dir["#{target}*.rb"]
|
11
|
-
unless files.empty?
|
12
|
-
FileUtils.mkdir_p "#{target}app/"
|
13
|
-
FileUtils.cp files, "#{target}app/"
|
14
|
-
puts "copied #{files.size} upgrade data migrations to #{target}app"
|
15
|
-
end
|
16
|
-
|
17
|
-
files = Dir["#{File.join(dir,'db/data_migrations/upgrade')}/*.rb"]
|
18
|
-
FileUtils.cp files, File.join(dir,'db/data_migrations/')
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def cleanup_upgrade_migrations
|
24
|
-
dirs = Rails::Application::Railties.engines.map{|p| p.config.root.to_s}
|
25
|
-
dirs.each do |dir|
|
26
|
-
if File.directory? File.join(dir,'db/data_migrations/app')
|
27
|
-
target = File.join(dir,'db/data_migrations/')
|
28
|
-
files = Dir["#{target}/*.rb"]
|
29
|
-
unless files.empty?
|
30
|
-
FileUtils.rm files
|
31
|
-
puts "removed #{files.size} data migrations from #{target}"
|
32
|
-
end
|
33
|
-
|
34
|
-
files = Dir["#{target}/app/*.rb"]
|
35
|
-
unless files.empty?
|
36
|
-
FileUtils.cp files, target
|
37
|
-
puts "copied #{files.size} data migrations back to #{target}"
|
38
|
-
end
|
39
|
-
FileUtils.rm_rf "#{target}/app"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end#DataMigrator
|
46
|
-
end#RussellEdge
|
@@ -1,76 +0,0 @@
|
|
1
|
-
ActiveRecord::Migrator.instance_eval do
|
2
|
-
def prepare_migrations
|
3
|
-
target = "#{Rails.root}/db/migrate/"
|
4
|
-
# first copy all app migrations away
|
5
|
-
files = Dir["#{target}*.rb"]
|
6
|
-
|
7
|
-
unless files.empty?
|
8
|
-
FileUtils.mkdir_p "#{target}app/"
|
9
|
-
FileUtils.cp files, "#{target}app/"
|
10
|
-
puts "copied #{files.size} migrations to db/migrate/app"
|
11
|
-
end
|
12
|
-
|
13
|
-
dirs = Rails::Application::Railties.engines.map{|p| p.config.root.to_s}
|
14
|
-
files = Dir["{#{dirs.join(',')}}/db/migrate/*.rb"]
|
15
|
-
|
16
|
-
unless files.empty?
|
17
|
-
FileUtils.mkdir_p target
|
18
|
-
FileUtils.cp files, target
|
19
|
-
puts "copied #{files.size} migrations to db/migrate"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def cleanup_migrations
|
24
|
-
target = "#{Rails.root}/db/migrate"
|
25
|
-
files = Dir["#{target}/*.rb"]
|
26
|
-
unless files.empty?
|
27
|
-
FileUtils.rm files
|
28
|
-
puts "removed #{files.size} migrations from db/migrate"
|
29
|
-
end
|
30
|
-
files = Dir["#{target}/app/*.rb"]
|
31
|
-
unless files.empty?
|
32
|
-
FileUtils.cp files, target
|
33
|
-
puts "copied #{files.size} migrations back to db/migrate"
|
34
|
-
end
|
35
|
-
FileUtils.rm_rf "#{target}/app"
|
36
|
-
end
|
37
|
-
|
38
|
-
def prepare_upgrade_migrations
|
39
|
-
dirs = Rails::Application::Railties.engines.map{|p| p.config.root.to_s}
|
40
|
-
dirs.each do |dir|
|
41
|
-
if File.directory? File.join(dir,'db/migrate/upgrade')
|
42
|
-
target = File.join(dir,'db/migrate/')
|
43
|
-
files = Dir["#{target}*.rb"]
|
44
|
-
unless files.empty?
|
45
|
-
FileUtils.mkdir_p "#{target}app/"
|
46
|
-
FileUtils.cp files, "#{target}app/"
|
47
|
-
puts "copied #{files.size} upgrade migrations to #{target}app"
|
48
|
-
end
|
49
|
-
|
50
|
-
files = Dir["#{File.join(dir,'db/migrate/upgrade')}/*.rb"]
|
51
|
-
FileUtils.cp files, File.join(dir,'db/migrate/')
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def cleanup_upgrade_migrations
|
57
|
-
dirs = Rails::Application::Railties.engines.map{|p| p.config.root.to_s}
|
58
|
-
dirs.each do |dir|
|
59
|
-
if File.directory? File.join(dir,'db/migrate/app')
|
60
|
-
target = File.join(dir,'db/migrate/')
|
61
|
-
files = Dir["#{target}/*.rb"]
|
62
|
-
unless files.empty?
|
63
|
-
FileUtils.rm files
|
64
|
-
puts "removed #{files.size} migrations from #{target}"
|
65
|
-
end
|
66
|
-
|
67
|
-
files = Dir["#{target}/app/*.rb"]
|
68
|
-
unless files.empty?
|
69
|
-
FileUtils.cp files, target
|
70
|
-
puts "copied #{files.size} migrations back to #{target}"
|
71
|
-
end
|
72
|
-
FileUtils.rm_rf "#{target}/app"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|