diff --git a/plugins/pushes/ftp/push.rb b/plugins/pushes/ftp/push.rb index 3cf4169a0..90f7df07a 100644 --- a/plugins/pushes/ftp/push.rb +++ b/plugins/pushes/ftp/push.rb @@ -33,16 +33,6 @@ module VagrantPlugins ftp.connect(&block) end - # Parse the host into it's url and port parts. - # @return [Array] - def parse_host(host) - if host.include?(":") - host.split(":", 2) - else - [host, "22"] - end - end - # The list of all files that should be pushed by this push. This method # only returns **files**, not folders or symlinks! # @return [Array] diff --git a/test/unit/plugins/pushes/ftp/push_test.rb b/test/unit/plugins/pushes/ftp/push_test.rb index 5b5ec7c10..39dd6dd79 100644 --- a/test/unit/plugins/pushes/ftp/push_test.rb +++ b/test/unit/plugins/pushes/ftp/push_test.rb @@ -93,34 +93,6 @@ describe VagrantPlugins::FTPPush::Push do end end - describe "#parse_host" do - let(:result) { subject.parse_host(host) } - - context "when no port is given" do - let(:host) { "127.0.0.1" } - - it "returns the url and port 22" do - expect(result).to eq(["127.0.0.1", "22"]) - end - end - - context "when a port is given" do - let(:host) { "127.0.0.1:23456" } - - it "returns the url and port 23456" do - expect(result).to eq(["127.0.0.1", "23456"]) - end - end - - context "when more than more port is given" do - let(:host) { "127.0.0.1:22:33:44" } - - it "returns the url and everything after" do - expect(result).to eq(["127.0.0.1", "22:33:44"]) - end - end - end - describe "#all_files" do before(:all) do @dir = Dir.mktmpdir