Class: UnlightCLI::Commands::Initialize Private

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/unlight_cli/commands/initialize.rb

Overview

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

Create OpenUnlight Project

Since:

  • 0.1.0

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject

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.

Since:

  • 0.1.0



19
20
21
# File 'lib/unlight_cli/commands/initialize.rb', line 19

def self.source_root
  UnlightCLI.root
end

Instance Method Details

#create_projectObject

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.

Create default project files

Since:

  • 0.1.0



27
28
29
30
31
# File 'lib/unlight_cli/commands/initialize.rb', line 27

def create_project
  template('templates/env.erb', "#{name}/.env")
  template('templates/docker-compose.yml.erb',
           "#{name}/docker-compose.yml")
end

#initialize_loadObject

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.

Initialize Load

Since:

  • 0.1.0



37
38
39
40
41
42
43
# File 'lib/unlight_cli/commands/initialize.rb', line 37

def initialize_load
  Dir.chdir name do
    # TODO: Improve invoke action
    invoke 'unlight_c_l_i:commands:update'
    invoke 'unlight_c_l_i:commands:start'
  end
end

#messagesObject

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.

Setup finished message

Since:

  • 0.1.0



49
50
51
# File 'lib/unlight_cli/commands/initialize.rb', line 49

def messages
  puts "The database root password is #{database_password}"
end