Sha256: 8b1acc46e2433654942ed841c61c4660d8c3d7340e0200d9e57ae9d09cbd99c1
Contents?: true
Size: 908 Bytes
Versions: 15
Compression:
Stored size: 908 Bytes
Contents
require 'log4r' require 'json' require 'vagrant-skytap/api/environment' module VagrantPlugins module Skytap module Action # Fetches the environment from the environment URL file, assuming the # file exists and the corresponding Skytap environment does too. class FetchEnvironment def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant_skytap::action::fetch_environment") end def call(env) unless env[:environment] if props = API::Environment.properties(env) begin env[:environment] = API::Environment.fetch(env, props['url']) rescue Errors::DoesNotExist => ex @logger.info("Ignoring missing environment '#{props['url']}'.") end end end @app.call(env) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems