rush 0.6.2 → 0.6.3

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 +5 -1
  4. metadata +6 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.2
1
+ 0.6.3
@@ -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}'"
83
+ "export #{key}=\"#{value.gsub('"', '\\"')}\""
84
84
  end
85
85
  vars.push(command).join("\n")
86
86
  end
@@ -38,7 +38,11 @@ describe Rush::Box do
38
38
  end
39
39
 
40
40
  it "builds a script of environment variables to prefix the bash command" do
41
- @box.command_with_environment('cmd', { :a => 'b' }).should == "export a='b'\ncmd"
41
+ @box.command_with_environment('cmd', { :a => 'b' }).should == "export a=\"b\"\ncmd"
42
+ end
43
+
44
+ it "escapes quotes on environment variables" do
45
+ @box.command_with_environment('cmd', { :a => 'a"b' }).should == "export a=\"a\\\"b\"\ncmd"
42
46
  end
43
47
 
44
48
  it "sets the environment variables from the provided hash" do
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.2
4
+ version: 0.6.3
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-08-17 00:00:00 -07:00
12
+ date: 2009-11-05 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -83,6 +83,8 @@ files:
83
83
  - spec/string_ext_spec.rb
84
84
  has_rdoc: true
85
85
  homepage: http://rush.heroku.com/
86
+ licenses: []
87
+
86
88
  post_install_message:
87
89
  rdoc_options:
88
90
  - --charset=UTF-8
@@ -103,9 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
105
  requirements: []
104
106
 
105
107
  rubyforge_project: ruby-shell
106
- rubygems_version: 1.3.1
108
+ rubygems_version: 1.3.5
107
109
  signing_key:
108
- specification_version: 2
110
+ specification_version: 3
109
111
  summary: A Ruby replacement for bash+ssh.
110
112
  test_files:
111
113
  - spec/access_spec.rb