Sha256: 1de34700277d3604c5622a669d4d0cef79418704e5cf2a6aad6ef3cc51fee4cb

Contents?: true

Size: 925 Bytes

Versions: 2

Compression:

Stored size: 925 Bytes

Contents

require 'bundler'

begin
  require 'vagrant'
rescue LoadError
  Bundler.require(:default, :development)
end

require 'vagrant-invade/plugin'

module VagrantPlugins
  module Invade

    autoload :Validator, 'vagrant-invade/validator'
    autoload :Builder, 'vagrant-invade/builder'
    autoload :Generator, 'vagrant-invade/generator'

    def self.get_invade_config
      #Loading Invade configuration settings from file
      @source_root = VagrantPlugins::Invade.source_root
      invade_config_file = "#{@source_root}/invade.yml"

      if File.exist?(invade_config_file)
        begin
          return YAML.load_file(invade_config_file)
        rescue SyntaxError => e
          @logger.error e
          fail e
        end
      else
        @config_values = nil
      end

      @config_values
    end

    def self.source_root
      @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-invade-0.3.0 lib/vagrant-invade.rb
vagrant-invade-0.2.0 lib/vagrant-invade.rb