2014-10-29 03:54:16 +00:00
|
|
|
require "vagrant"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module HarmonyPush
|
2014-10-29 16:39:26 +00:00
|
|
|
autoload :Errors, File.expand_path("../errors", __FILE__)
|
|
|
|
|
2014-10-29 03:54:16 +00:00
|
|
|
class Plugin < Vagrant.plugin("2")
|
|
|
|
name "harmony"
|
|
|
|
description <<-DESC
|
|
|
|
Deploy using HashiCorp's Harmony service.
|
|
|
|
DESC
|
|
|
|
|
|
|
|
config(:harmony, :push) do
|
|
|
|
require File.expand_path("../config", __FILE__)
|
2014-10-29 16:41:47 +00:00
|
|
|
init!
|
2014-10-29 03:54:16 +00:00
|
|
|
Config
|
|
|
|
end
|
|
|
|
|
|
|
|
push(:harmony) do
|
|
|
|
require File.expand_path("../push", __FILE__)
|
2014-10-29 16:41:47 +00:00
|
|
|
init!
|
2014-10-29 03:54:16 +00:00
|
|
|
Push
|
|
|
|
end
|
2014-10-29 16:41:47 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def self.init!
|
|
|
|
return if defined?(@_init)
|
|
|
|
I18n.load_path << File.expand_path(
|
|
|
|
"templates/locales/TODO.yml", Vagrant.source_root)
|
|
|
|
I18n.reload!
|
|
|
|
@_init = true
|
|
|
|
end
|
2014-10-29 03:54:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|