Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

prettify shellwords usage #951

Merged
merged 2 commits into from
Jul 3, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rspec/core/configuration_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def options_from(path)
def args_from_options_file(path)
return [] unless path && File.exist?(path)
config_string = options_file_as_erb_string(path)
config_string.split(/\n+/).map {|l| Shellwords.shellwords(l) }.flatten
config_string.split(/\n+/).map(&:shellsplit).flatten
end

def options_file_as_erb_string(path)
Expand Down
6 changes: 1 addition & 5 deletions lib/rspec/core/rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,11 @@ def run_task(verbose)

private

def shellescape(string)
string.shellescape
end

def files_to_run
if ENV['SPEC']
FileList[ ENV['SPEC'] ].sort
else
FileList[ pattern ].sort.map { |f| shellescape(f) }
FileList[ pattern ].sort.map(&:shellescape)
end
end

Expand Down