You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by lu...@redhat.com on 2013/03/07 03:18:50 UTC
[PATCH 5/8] * server/Rakefile (mock:fixtures:setup): do not chain calls to gsub!
From: David Lutterkort <lu...@redhat.com>
String#gsub! returns nil when nothing was substituted
---
server/Rakefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/Rakefile b/server/Rakefile
index da068b8..ec7dd4e 100644
--- a/server/Rakefile
+++ b/server/Rakefile
@@ -66,7 +66,8 @@ namespace :mock do
task 'setup' => :initialize do
srcdir = File::join(File::dirname(__FILE__), "lib", "deltacloud", "drivers", "mock", "data")
data = Dir::glob(File::join(srcdir, "*"))
- srcdir.gsub!(/^#{ENV["PWD"]}/, ".").gsub!(/^#{ENV["HOME"]}/, "~")
+ srcdir.gsub!(/^#{ENV["PWD"]}/, ".")
+ srcdir.gsub!(/^#{ENV["HOME"]}/, "~")
puts "Copy mock data to #{MOCK_STORAGE_DIR}"
puts " (from #{srcdir})"
FileUtils::cp_r(data, MOCK_STORAGE_DIR, :verbose => false)
--
1.8.1.4