lib/dj_dashboard/tasks/install.rb in dj_dashboard-0.0.7 vs lib/dj_dashboard/tasks/install.rb in dj_dashboard-0.0.8

- old
+ new

@@ -9,30 +9,32 @@ copy_db_files copy_config_files run_migrations end + # TODO: This is wierd... def self.copy_assets_files + puts 'now copying assets' return nil if Rails.version =~ /3.0/ # not needed for rails 3.0 origin = File.join(gem_path, 'public') destination = Rails.root.join('app/assets') if Rails.version =~ /3.1/ destination = Rails.root.join('public') if Rails.version =~ /3.0/ - puts copy_files(%w( stylesheets images javascripts ), origin, destination, 'dj_dashboard') + copy_files(%w( stylesheets images javascripts ), origin, destination, 'dj_dashboard') end def self.copy_db_files puts 'now copying db files' origin = File.join(gem_path, 'db') destination = Rails.root.join('db') - puts copy_files(%w( migrate ), origin, destination) + copy_files(%w( migrate ), origin, destination) end def self.copy_config_files puts 'now copying initializer file' origin = File.join(gem_path, 'config') destination = Rails.root.join('config') - puts copy_files(%w( initializers ), origin, destination) + copy_files(%w( initializers ), origin, destination) end def self.gem_path File.expand_path('../../..', File.dirname(__FILE__)) end @@ -62,9 +64,10 @@ end @copier end def self.run_migrations + puts 'now running migrations' Rake::Task['db:migrate'].invoke end end end