Module: SecondStep

Extended by:
ActiveSupport::Autoload
Defined in:
lib/second_step.rb,
lib/second_step/config.rb,
lib/second_step/version.rb,
lib/second_step/mac_os_notify.rb,
lib/second_step/second_step_error.rb,
lib/second_step/memory_adapter/application_user.rb,
lib/generators/second_step/install/install_generator.rb,
lib/second_step/memory_adapter/application_user_link.rb,
lib/generators/second_step/user_relationship_generator.rb,
lib/generators/second_step/migration/migration_generator.rb

Defined Under Namespace

Modules: APIRequests, ActiveRecordAdapter, MacOSNotify, MemoryAdapter, Models Classes: AppUserMismatch, Config, InitializerGenerator, InstallGenerator, NotEnoughEntropyForPhraseError, NotificationError, ORMAlreadySetError, PublicKeyMismatch, SecondStepError, TokenDecodeError, TokenError, UserLinkMismatch, UserRelationshipGenerator

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.config(&block) ⇒ Object



111
112
113
# File 'lib/second_step/config.rb', line 111

def self.config(&block)
  block ? @config = Config.new(&block) : @config
end

.register_orm_adapter(**opts) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/second_step/config.rb', line 6

def self.register_orm_adapter(**opts)
  if @registered_orm_adapters
    @registered_orm_adapters.merge! opts
  else
    @registered_orm_adapters = opts
  end
end

.use_orm(orm) ⇒ Object



17
18
19
20
# File 'lib/second_step/config.rb', line 17

def self.use_orm(orm)
  return :none if orm == :none
  include @registered_orm_adapters[orm].to_s.camelcase.constantize
end