Sha256: 525bb0635f0ecda8835956345de8b219919814addb5d10552d05d4ceed039515
Contents?: true
Size: 991 Bytes
Versions: 6
Compression:
Stored size: 991 Bytes
Contents
# Install hook code here require 'ftools' # keep everything inside fo this scope class InstallMetricTrackingTables def initialize show_banner check_system_cosistency copy_migration_files end def here File.dirname(__FILE__) end def sources Dir.glob(File.join([here, 'migrations', '*.*'])) end def target File.join([here, '..', '..', '..', 'db', 'migrate']) end def validate_file_existance(file) abort "File not found: #{target}" unless File.exist? file end def show_banner puts ' ** Copying migrations to your application ' end def check_system_cosistency validate_file_existance(target) sources.each { |file| validate_file_existance(file) } end def copy_migration_files sources.each do |file| File.copy(file, target) puts " Source : #{file} Target : #{target} " end end end InstallMetricTrackingTables.new
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
mountain-goat-0.0.6 | install.rb |
mountain-goat-0.0.5 | install.rb |
mountain-goat-0.0.4 | install.rb |
mountain-goat-0.0.3 | install.rb |
mountain-goat-0.0.2 | install.rb |
mountain-goat-0.0.1 | install.rb |