deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 5/8] * server/Rakefile (mock:fixtures:setup): do not chain calls to gsub!
Date Thu, 07 Mar 2013 02:18:50 GMT
From: David Lutterkort <lutter@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


Mime
View raw message