require 'rails/generators/active_record'
require 'dunlop/generators'
class Dunlop::Install::TargetFilesGenerator < Rails::Generators::Base
  include Rails::Generators::Migration
  include Dunlop::Generators::GeneratorHelpers
  source_root File.expand_path('../templates', __FILE__)

  def setup_target_files
    copy_file "rspec/target_files_factory.rb", "spec/factories/target_files.rb"
    copy_file "models/target_file.rb", "app/models/target_file.rb"
    migration_template "migrations/create_target_files.rb", "db/migrate/create_target_files.rb"
    directory "locales", "config/locales"
  end
end
