dtf 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Dtf
4
- VERSION = "0.3.8"
4
+ VERSION = "0.3.9"
5
5
  end
@@ -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)}" )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: