Skip to content

Commit

Permalink
Revert "Make Command and Path more string-like"
Browse files Browse the repository at this point in the history
This reverts commit b3adc4c.

Turns out that this doesn't provide a lot of value, since a lot of
operations don't work on the Path and Command objects anyway, and it's
even somewhat misleading.
  • Loading branch information
AndrewRadev committed May 11, 2013
1 parent b3adc4c commit 33792bf
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion lib/vimrunner/command.rb
Expand Up @@ -7,6 +7,5 @@ def initialize(command)
def to_s
@command.to_s.gsub("'", "''")
end
alias_method :to_str, :to_s
end
end
1 change: 0 additions & 1 deletion lib/vimrunner/path.rb
Expand Up @@ -7,6 +7,5 @@ def initialize(path)
def to_s
@path.to_s.gsub(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1")
end
alias_method :to_str, :to_s
end
end
4 changes: 0 additions & 4 deletions spec/vimrunner/command_spec.rb
Expand Up @@ -9,9 +9,5 @@ module Vimrunner
it "escapes single quotes" do
Command.new("echo 'foo'").to_s.should eq("echo ''foo''")
end

it "acts mostly as a string" do
("one " + Command.new("two")).should eq('one two')
end
end
end
4 changes: 0 additions & 4 deletions spec/vimrunner/path_spec.rb
Expand Up @@ -9,9 +9,5 @@ module Vimrunner
it "escapes non-standard characters in paths" do
Path.new("foo bar!.txt").to_s.should eq('foo\ bar\!.txt')
end

it "acts mostly as a string" do
("one " + Path.new("two")).should eq('one two')
end
end
end

0 comments on commit 33792bf

Please sign in to comment.