Sha256: 5dd1e0591ba499c38dfccaef3b9212fb390b14720572579fefcedde0fe12f19a

Contents?: true

Size: 511 Bytes

Versions: 12

Compression:

Stored size: 511 Bytes

Contents

class GdshowsdatabaseGenerator < Rails::Generators::Base
  include Rails::Generators::Migration

  @@migrations_dir = File.expand_path('../../db/migrations', __FILE__) 
  source_root @@migrations_dir

  def self.next_migration_number(path)
    Time.now.utc.strftime("%Y%m%d%H%M%S")
  end

  def create_migration_files
    Dir.entries(@@migrations_dir).each do |file|
      sleep 1 #gross
      migration_template(file, "db/migrate/#{file.sub(/\d\d\d_/, '')}") unless File.directory?(file)
    end    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gdshowsdb-4.0.2 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-4.0.1 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-4.0.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-3.0.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-2.1.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-2.0.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-1.0.3 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-1.0.2 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-1.0.1 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-1.0.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-0.9.1 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb
gdshowsdb-0.9.0 lib/gdshowsdb/generators/gdshowsdatabase_generator.rb