dtf 0.3.8 → 0.3.9
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/lib/dtf/version.rb +1 -1
- data/lib/tasks/setup.thor +8 -1
- metadata +1 -1
data/lib/dtf/version.rb
CHANGED
data/lib/tasks/setup.thor
CHANGED
@@ -16,7 +16,14 @@ class DtfSetup < Thor
|
|
16
16
|
from_dir = "#{File.join("#{Gem.loaded_specs['dtf'].gem_dir}", 'db/migrate')}"
|
17
17
|
# Add schema.rb to list of additional files to be pushed
|
18
18
|
other_files = ["#{from_dir}/../schema.rb"]
|
19
|
-
|
19
|
+
# Since the models may change in DTF, copy them over as well. This ensures all sub-gems have current models.
|
20
|
+
models_dir = "#{File.join("#{Gem.loaded_specs['dtf'].gem_dir}", 'app/models')}"
|
21
|
+
|
22
|
+
Dir["#{models_dir}/#{name}"].each do |model|
|
23
|
+
puts "Generating app/models/#{File.basename(model)}"
|
24
|
+
FileUtils.cp(model, "#{Dir.pwd}/app/models/#{File.basename(model)}" )
|
25
|
+
end
|
26
|
+
|
20
27
|
other_files.each do |source|
|
21
28
|
puts "Generating db/#{File.basename(source)}"
|
22
29
|
FileUtils.cp(source, "#{Dir.pwd}/db/#{File.basename(source)}" )
|