rush 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/rush/box.rb +1 -1
  3. data/spec/box_spec.rb +4 -0
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
@@ -80,7 +80,7 @@ class Rush::Box
80
80
  return command unless env
81
81
 
82
82
  vars = env.map do |key, value|
83
- "export #{key}=\"#{value.gsub('"', '\\"')}\""
83
+ "export #{key}=\"#{value.to_s.gsub('"', '\\"')}\""
84
84
  end
85
85
  vars.push(command).join("\n")
86
86
  end
@@ -45,6 +45,10 @@ describe Rush::Box do
45
45
  @box.command_with_environment('cmd', { :a => 'a"b' }).should == "export a=\"a\\\"b\"\ncmd"
46
46
  end
47
47
 
48
+ it "converts environment variables to_s" do
49
+ @box.command_with_environment('cmd', { :a => nil, :b => 123 }).should == "export a=\"\"\nexport b=\"123\"\ncmd"
50
+ end
51
+
48
52
  it "sets the environment variables from the provided hash" do
49
53
  @box.connection.stub!(:bash)
50
54
  @box.should_receive(:command_with_environment).with('cmd', { 1 => 2 })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Wiggins
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-05 00:00:00 -08:00
12
+ date: 2009-11-10 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency