vagrantup 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/vagrant/action/vm/network.rb +2 -2
- data/lib/vagrant/command/box_add.rb +1 -0
- data/lib/vagrant/command/box_remove.rb +1 -0
- data/lib/vagrant/command/box_repackage.rb +1 -0
- data/lib/vagrant/communication/ssh.rb +4 -2
- data/lib/vagrant/driver/virtualbox_4_0.rb +2 -0
- data/lib/vagrant/driver/virtualbox_4_1.rb +2 -0
- data/lib/vagrant/errors.rb +5 -0
- data/lib/vagrant/guest/linux.rb +1 -1
- data/lib/vagrant/util/ansi_escape_code_remover.rb +35 -0
- data/lib/vagrant/version.rb +1 -1
- data/templates/locales/en.yml +5 -0
- data/test/unit/vagrant/config/base_test.rb +4 -3
- data/test/unit/vagrant/util/ansi_escape_code_remover_test.rb +17 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bce7b6eeae444bf20234892e06d974d0612aa928
|
4
|
+
data.tar.gz: bfa089718d5c2387d5580c4207c20f79b1071ef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3645050437b980983b3613cb280d4eb422cf84072292a9ef678be4ed7d565531fe21fc084ac07ddd6271eccf9edd84d9614734341b47771ad60e3cf18b64b14a
|
7
|
+
data.tar.gz: 64c5d97c804d76b14615aaf5ae4d8967cb6827fd7cade81305741b667c134a3f1454fc2bb3a63405c1e7a23d390b51c8995d344f5f113130aac96890705bd05c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 0.9.3 (January 24, 2012)
|
2
|
+
|
3
|
+
- Proper error handling for not enough arguments to `box` commands.
|
4
|
+
- Fix issue causing crashes with bridged networking. [GH-673]
|
5
|
+
- Ignore host only network interfaces that are "down." [GH-675]
|
6
|
+
- Use "printf" instead of "echo" to determine shell expanded files paths
|
7
|
+
which is more generally POSIX compliant. [GH-676]
|
8
|
+
|
1
9
|
## 0.9.2 (January 20, 2012)
|
2
10
|
|
3
11
|
- Support shell expansions in shared folder guest paths again. [GH-656]
|
@@ -298,7 +298,7 @@ module Vagrant
|
|
298
298
|
|
299
299
|
@env[:vm].driver.read_bridged_interfaces.each do |interface|
|
300
300
|
that_netaddr = network_address(interface[:ip], interface[:netmask])
|
301
|
-
raise Errors::NetworkCollision if this_netaddr == that_netaddr
|
301
|
+
raise Errors::NetworkCollision if this_netaddr == that_netaddr && interface[:status] != "Down"
|
302
302
|
end
|
303
303
|
end
|
304
304
|
|
@@ -341,7 +341,7 @@ module Vagrant
|
|
341
341
|
chosen_bridge = bridgedifs[choice - 1][:name]
|
342
342
|
end
|
343
343
|
|
344
|
-
@logger.info("Bridging adapter #{config[:adapter]} to #{
|
344
|
+
@logger.info("Bridging adapter #{config[:adapter]} to #{chosen_bridge}")
|
345
345
|
|
346
346
|
# Given the choice we can now define the adapter we're using
|
347
347
|
return {
|
@@ -4,6 +4,7 @@ require 'log4r'
|
|
4
4
|
require 'net/ssh'
|
5
5
|
require 'net/scp'
|
6
6
|
|
7
|
+
require 'vagrant/util/ansi_escape_code_remover'
|
7
8
|
require 'vagrant/util/file_mode'
|
8
9
|
require 'vagrant/util/platform'
|
9
10
|
require 'vagrant/util/retryable'
|
@@ -12,6 +13,7 @@ module Vagrant
|
|
12
13
|
module Communication
|
13
14
|
# Provides communication with the VM via SSH.
|
14
15
|
class SSH < Base
|
16
|
+
include Util::ANSIEscapeCodeRemover
|
15
17
|
include Util::Retryable
|
16
18
|
|
17
19
|
def initialize(vm)
|
@@ -169,7 +171,7 @@ module Vagrant
|
|
169
171
|
ch2.on_data do |ch3, data|
|
170
172
|
if block_given?
|
171
173
|
# Filter out the clear screen command
|
172
|
-
data
|
174
|
+
data = remove_ansi_escape_codes(data)
|
173
175
|
@logger.debug("stdout: #{data}")
|
174
176
|
yield :stdout, data
|
175
177
|
end
|
@@ -178,7 +180,7 @@ module Vagrant
|
|
178
180
|
ch2.on_extended_data do |ch3, type, data|
|
179
181
|
if block_given?
|
180
182
|
# Filter out the clear screen command
|
181
|
-
data
|
183
|
+
data = remove_ansi_escape_codes(data)
|
182
184
|
@logger.debug("stderr: #{data}")
|
183
185
|
yield :stderr, data
|
184
186
|
end
|
data/lib/vagrant/errors.rb
CHANGED
@@ -128,6 +128,11 @@ module Vagrant
|
|
128
128
|
error_key(:failed, "vagrant.actions.box.verify")
|
129
129
|
end
|
130
130
|
|
131
|
+
class CLIInvalidUsage < VagrantError
|
132
|
+
status_code(69)
|
133
|
+
error_key(:cli_invalid_usage)
|
134
|
+
end
|
135
|
+
|
131
136
|
class CLIInvalidOptions < VagrantError
|
132
137
|
status_code(1)
|
133
138
|
error_key(:cli_invalid_options)
|
data/lib/vagrant/guest/linux.rb
CHANGED
@@ -47,7 +47,7 @@ module Vagrant
|
|
47
47
|
# else, things like '~' don't expand properly in shared folders. We have
|
48
48
|
# to `echo` here to get that path.
|
49
49
|
real_guestpath = nil
|
50
|
-
@vm.channel.execute("
|
50
|
+
@vm.channel.execute("printf #{guestpath}") do |type, data|
|
51
51
|
if type == :stdout
|
52
52
|
real_guestpath ||= ""
|
53
53
|
real_guestpath += data
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Util
|
3
|
+
module ANSIEscapeCodeRemover
|
4
|
+
# Removes ANSI escape code sequences from the text and returns
|
5
|
+
# it.
|
6
|
+
#
|
7
|
+
# This removes all the ANSI escape codes listed here along with
|
8
|
+
# the escape codes for VT100 terminals:
|
9
|
+
#
|
10
|
+
# http://ascii-table.com/ansi-escape-sequences.php
|
11
|
+
def remove_ansi_escape_codes(text)
|
12
|
+
# An array of regular expressions which match various kinds
|
13
|
+
# of escape sequences. I can't think of a better single regular
|
14
|
+
# expression or any faster way to do this.
|
15
|
+
matchers = [/\e\[\d*[ABCD]/, # Matches things like \e[4D
|
16
|
+
/\e\[(\d*;)?\d*[HF]/, # Matches \e[1;2H or \e[H
|
17
|
+
/\e\[(s|u|2J|K)/, # Matches \e[s, \e[2J, etc.
|
18
|
+
/\e\[(\d*;){0,2}\d*m/, # Matches color escapes: \e[32m
|
19
|
+
/\e\[=\d*[hl]/, # Matches \e[=24h
|
20
|
+
/\e\[\?[1-9][hl]/, # Matches \e[?2h
|
21
|
+
/\e\[20[hl]/, # Matches \e[20l]
|
22
|
+
/\e[DME78H]/, # Matches \eD, \eH, etc.
|
23
|
+
/\e\[[0-2]?[JK]/, # Matches \e[0J, \e[K, etc.
|
24
|
+
]
|
25
|
+
|
26
|
+
# Take each matcher and replace it with emptiness.
|
27
|
+
matchers.each do |matcher|
|
28
|
+
text.gsub!(matcher, "")
|
29
|
+
end
|
30
|
+
|
31
|
+
text
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/vagrant/version.rb
CHANGED
data/templates/locales/en.yml
CHANGED
@@ -30,6 +30,11 @@ en:
|
|
30
30
|
An invalid option was specified. The help for this command
|
31
31
|
is available below.
|
32
32
|
|
33
|
+
%{help}
|
34
|
+
cli_invalid_usage: |-
|
35
|
+
This command was not invoked properly. The help for this command is
|
36
|
+
available below.
|
37
|
+
|
33
38
|
%{help}
|
34
39
|
config_validation: |-
|
35
40
|
There was a problem with the configuration of Vagrant. The error message(s)
|
@@ -25,10 +25,11 @@ describe Vagrant::Config::Base do
|
|
25
25
|
|
26
26
|
it "doesn't merge values that start with a double underscore" do
|
27
27
|
bar_class = Class.new(foo_class) do
|
28
|
-
|
28
|
+
class_variable_set(:@@counter, 0)
|
29
|
+
|
29
30
|
def initialize
|
30
|
-
@__test =
|
31
|
-
|
31
|
+
@__test = self.class.send(:class_variable_get, :@@counter)
|
32
|
+
self.class.send(:class_variable_set, :@@counter, @__test + 1)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.expand_path("../../../base", __FILE__)
|
2
|
+
|
3
|
+
require "vagrant/util/ansi_escape_code_remover"
|
4
|
+
|
5
|
+
describe Vagrant::Util::ANSIEscapeCodeRemover do
|
6
|
+
let(:klass) do
|
7
|
+
Class.new do
|
8
|
+
extend Vagrant::Util::ANSIEscapeCodeRemover
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should remove ANSI escape codes" do
|
13
|
+
klass.remove_ansi_escape_codes("\e[Hyo").should == "yo"
|
14
|
+
klass.remove_ansi_escape_codes("\e[38myo").should == "yo"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrantup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -376,6 +376,7 @@ files:
|
|
376
376
|
- lib/vagrant/test_helpers.rb
|
377
377
|
- lib/vagrant/ui.rb
|
378
378
|
- lib/vagrant/util.rb
|
379
|
+
- lib/vagrant/util/ansi_escape_code_remover.rb
|
379
380
|
- lib/vagrant/util/busy.rb
|
380
381
|
- lib/vagrant/util/counter.rb
|
381
382
|
- lib/vagrant/util/file_checksum.rb
|
@@ -535,6 +536,7 @@ files:
|
|
535
536
|
- test/unit/vagrant/environment_test.rb
|
536
537
|
- test/unit/vagrant/hosts_test.rb
|
537
538
|
- test/unit/vagrant/registry_test.rb
|
539
|
+
- test/unit/vagrant/util/ansi_escape_code_remover_test.rb
|
538
540
|
- test/unit/vagrant/util/file_checksum_test.rb
|
539
541
|
- test/unit/vagrant/util/hash_with_indifferent_access_test.rb
|
540
542
|
- test/unit/vagrant/util/network_ip_test.rb
|