Module: Bootstrap Private

Defined in:
lib/bootstrap.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Note:

requiring this file will automatically invoke run.

The Complish Bootstrap module

Author:

Since:

  • 0.1.0-alpha

Version:

  • 1.2

Class Method Summary collapse

Class Method Details

.runBoolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Note:

operations of run:

  1. Get the configuration or create the configuration.
  2. Create the database if it doesn't already exist.
  3. Connect Sequel::Model to the database.

Bootstrap the Complish Gem

Examples:

Bootstrap the gem

Bootstrap.run
 #=> true

Raises:

  • (StandardError)

    if bootstrap fails

Since:

  • 0.1.0-alpha

Version:

  • 1.3


27
28
29
30
31
32
# File 'lib/bootstrap.rb', line 27

def run
  Complish::Configuration.from_file_or_persist_defaults
  database = Complish::Database.new
  Sequel::Model.db = database.connection
  run_success? database
end