Fix some issues around push, fix tests, add missing translations
This commit is contained in:
parent
44e6ec6df8
commit
4a64da5663
|
@ -49,7 +49,7 @@ module VagrantPlugins
|
||||||
raise Vagrant::Errors::PushStrategyNotProvided, pushes: pushes
|
raise Vagrant::Errors::PushStrategyNotProvided, pushes: pushes
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if !pushes.key?(name.to_sym)
|
if !pushes.include?(name.to_sym)
|
||||||
raise Vagrant::Errors::PushStrategyNotDefined,
|
raise Vagrant::Errors::PushStrategyNotDefined,
|
||||||
name: name,
|
name: name,
|
||||||
pushes: pushes
|
pushes: pushes
|
||||||
|
|
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
class UploaderNotFound < Error
|
class UploaderNotFound < Error
|
||||||
error_key(:uploader_error)
|
error_key(:uploader_not_found)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,3 +9,9 @@ en:
|
||||||
config.push.define "atlas" do |push|
|
config.push.define "atlas" do |push|
|
||||||
push.%{attribute} = "..."
|
push.%{attribute} = "..."
|
||||||
end
|
end
|
||||||
|
uploader_not_found: |-
|
||||||
|
Vagrant was unable to find the Atlas uploader CLI. If your Vagrantfile
|
||||||
|
specifies the path explicitly with "uploader_path", then make sure that
|
||||||
|
path is valid. Otherwise, make sure that you have a valid install of
|
||||||
|
Vagrant. If you installed Vagrant outside of the official installers,
|
||||||
|
the "atlas-upload" binary must exist on your PATH.
|
||||||
|
|
|
@ -42,7 +42,7 @@ describe VagrantPlugins::CommandPush::Command do
|
||||||
|
|
||||||
describe "#validate_pushes!" do
|
describe "#validate_pushes!" do
|
||||||
context "when there are no pushes defined" do
|
context "when there are no pushes defined" do
|
||||||
let(:pushes) { {} }
|
let(:pushes) { [] }
|
||||||
|
|
||||||
context "when a strategy is given" do
|
context "when a strategy is given" do
|
||||||
it "raises an exception" do
|
it "raises an exception" do
|
||||||
|
@ -61,7 +61,7 @@ describe VagrantPlugins::CommandPush::Command do
|
||||||
|
|
||||||
context "when there is one push defined" do
|
context "when there is one push defined" do
|
||||||
let(:noop) { double("noop") }
|
let(:noop) { double("noop") }
|
||||||
let(:pushes) { { noop: noop } }
|
let(:pushes) { [:noop] }
|
||||||
|
|
||||||
context "when a strategy is given" do
|
context "when a strategy is given" do
|
||||||
context "when that strategy is not defined" do
|
context "when that strategy is not defined" do
|
||||||
|
@ -90,7 +90,7 @@ describe VagrantPlugins::CommandPush::Command do
|
||||||
context "when there are multiple pushes defined" do
|
context "when there are multiple pushes defined" do
|
||||||
let(:noop) { double("noop") }
|
let(:noop) { double("noop") }
|
||||||
let(:ftp) { double("ftp") }
|
let(:ftp) { double("ftp") }
|
||||||
let(:pushes) { { noop: noop, ftp: ftp } }
|
let(:pushes) { [:noop, :ftp] }
|
||||||
|
|
||||||
context "when a strategy is given" do
|
context "when a strategy is given" do
|
||||||
context "when that strategy is not defined" do
|
context "when that strategy is not defined" do
|
||||||
|
|
Loading…
Reference in New Issue