Sha256: 8463ff07aa54c766ba7b4e4dbdaed8fa1e1820b1859ce2b73a1059f24bf561c8
Contents?: true
Size: 887 Bytes
Versions: 14
Compression:
Stored size: 887 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' module CloudhdrRails module Generators class SetupGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations Time.new.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file migration_template 'migration.rb', 'db/migrate/create_cloudhdr_jobs.rb' end def create_config_file template 'cloudhdr.yml', File.join('config','cloudhdr.yml') end end end end
Version data entries
14 entries across 14 versions & 1 rubygems