class SimpleMobileOauth::Generators::InstallGenerator

Public Class Methods

next_migration_number(path) click to toggle source
# File lib/generators/simple_mobile_oauth/install_generator.rb, line 20
def self.next_migration_number(path)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end
orm() click to toggle source
# File lib/generators/simple_mobile_oauth/install_generator.rb, line 12
def self.orm
  Rails::Generators.options[:rails][:orm]
end
orm_has_migration?() click to toggle source
# File lib/generators/simple_mobile_oauth/install_generator.rb, line 16
def self.orm_has_migration?
  [:active_record].include? orm
end

Public Instance Methods

copy_identity_model() click to toggle source

def copy_initializer

template "simple_mobile_oauth.rb", "config/initializers/simple_mobile_oauth.rb"

end

# File lib/generators/simple_mobile_oauth/install_generator.rb, line 34
def copy_identity_model
  template "identity.rb", "app/models/identity.rb"
end
create_migration_file() click to toggle source
# File lib/generators/simple_mobile_oauth/install_generator.rb, line 24
def create_migration_file
  if self.class.orm_has_migration?
    migration_template 'migration.rb', 'db/migrate/simple_mobile_oauth_migration.rb'
  end
end