Skip to content

Commit

Permalink
@ teracyhq#277 | bug fix: move init_system to the Vagrantfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hoatle committed Aug 16, 2018
1 parent 381d941 commit 2b11603
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 11 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ if ARGV[0] && !unloadable_sub_commands.include?(ARGV[0])
lib_dir = File.expand_path('./lib', __dir__)
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)

require 'teracy-dev/plugin'

def init_system
system_settings = YAML.load_file(File.join(File.dirname(__FILE__), 'system.yaml'))
# versions requirements
Vagrant.require_version system_settings['vagrant']['require_version']
TeracyDev::Plugin.sync(system_settings['vagrant']['plugins'])
end

init_system

require 'teracy-dev'

end
10 changes: 0 additions & 10 deletions lib/teracy-dev/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,13 @@ def initialize
def start
@processorsManager = Processors::Manager.new
@configManager = Config::Manager.new
init_system
@settings = build_settings().freeze
require_teracy_dev_version(settings['teracy-dev']['require_version'])
configure_vagrant(settings)
end

private

def init_system
system_settings = YAML.load_file(File.join(File.dirname(__FILE__), '../../system.yaml'))
@logger.debug("init_system: system_settings: #{system_settings}")
# versions requirements
Vagrant.require_version system_settings['vagrant']['require_version']
TeracyDev::Plugin.sync(system_settings['vagrant']['plugins'])
end


def build_settings
extension_entry_path = File.join(TeracyDev::BASE_DIR, TeracyDev::EXTENSION_ENTRY_PATH)
settingsManager = Settings::Manager.new
Expand Down

0 comments on commit 2b11603

Please sign in to comment.