Sha256: d299e3ea1e8e52e9e979fa1b5a2f2c75264be5cfc26366461fcbbbb1dbd00de2

Contents?: true

Size: 501 Bytes

Versions: 5

Compression:

Stored size: 501 Bytes

Contents

class OauthProviderEngineGenerator < Rails::Generators::Base
  include Rails::Generators::Migration
  source_root File.expand_path("../templates", __FILE__)

  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_oauth_provider_engine_tables.rb"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oauth_provider_engine-0.0.5 lib/generators/oauth_provider_engine/oauth_provider_engine_generator.rb
oauth_provider_engine-0.0.4 lib/generators/oauth_provider_engine/oauth_provider_engine_generator.rb
oauth_provider_engine-0.0.3 lib/generators/oauth_provider_engine/oauth_provider_engine_generator.rb
oauth_provider_engine-0.0.2 lib/generators/oauth_provider_engine/oauth_provider_engine_generator.rb
oauth_provider_engine-0.0.1 lib/generators/oauth_provider_engine/oauth_provider_engine_generator.rb