Sha256: f49313e1be5af66293cf500176dc3769d9435da83fba8e3a6f416549d067cc6f

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

module Kue
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path('../templates', __FILE__)
      
      desc "add the migrations"

      def self.next_migration_number(path)
        unless @prev_migration_nr
          @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
        else
          @prev_migration_nr += 1
        end
        @prev_migration_nr.to_s
      end
      
      def copy_migrations
        migration_template "migration.rb", "db/migrate/kue_settings_table_create_migration.rb"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kue-0.1.2 lib/generators/kue/install/install_generator.rb
kue-0.1.0 lib/generators/kue/install/install_generator.rb
kue-0.0.8 lib/generators/kue/install/install_generator.rb
kue-0.0.7 lib/generators/kue/install/install_generator.rb
kue-0.0.6 lib/generators/kue/install/install_generator.rb
kue-0.0.5 lib/generators/kue/install/install_generator.rb
kue-0.0.4 lib/generators/kue/install/install_generator.rb
kue-0.0.3 lib/generators/kue/install/install_generator.rb
kue-0.0.2 lib/generators/kue/install/install_generator.rb
kue-0.0.1 lib/generators/kue/install/install_generator.rb