Module: Openbox

Defined in:
lib/openbox.rb,
lib/openbox/command.rb,
lib/openbox/runtime.rb,
lib/openbox/version.rb,
lib/openbox/database.rb,
lib/openbox/entrypoint.rb,
lib/openbox/commands/rake.rb,
lib/openbox/commands/seed.rb,
lib/openbox/commands/server.rb,
lib/openbox/commands/console.rb,
lib/openbox/commands/migrate.rb,
lib/openbox/commands/sidekiq.rb

Overview

The tool to build Ruby container easier

Since:

  • 0.1.0

Defined Under Namespace

Modules: Commands Classes: Command, Database, Entrypoint, Runtime

Constant Summary collapse

LOCK =

Since:

  • 0.1.0

Mutex.new
VERSION =

Since:

  • 0.1.0

'0.5.1'

Class Method Summary collapse

Class Method Details

.databaseOpenbox::Database

Returns:

Since:

  • 0.1.0



34
35
36
37
38
39
40
# File 'lib/openbox.rb', line 34

def database
  return @database if @database

  LOCK.synchronize do
    @database ||= Database.new
  end
end

.runtimeOpenbox::Runtime

Returns:

Since:

  • 0.1.0



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/openbox.rb', line 18

def runtime
  return @runtime if @runtime

  LOCK.synchronize do
    dependencies = if defined?(Bundler)
                     Bundler.definition.current_dependencies
                   else
                     []
                   end
    @runtime ||= Runtime.new(dependencies)
  end
end