crossroads_capistrano 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "crossroads_capistrano"
|
6
|
-
s.version = "1.4.
|
6
|
+
s.version = "1.4.8"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Steve Kenworthy", "Ben Tillman", "Nathan Broadbent"]
|
9
9
|
s.email = ["it_dept@crossroads.org.hk"]
|
@@ -23,7 +23,8 @@ end
|
|
23
23
|
|
24
24
|
# Replaces strings in a file, i.e. @SOME_STRING@ is replaced with 'replacement'
|
25
25
|
def sed(file, args, char="@")
|
26
|
-
|
26
|
+
cmd = "sed -i #{file} " << args.map{|k,v|"-e 's%#{char}#{k}#{char}%#{v}%g'"}.join(" ")
|
27
|
+
exists?(:use_sudo) && !use_sudo ? run cmd : sudo cmd
|
27
28
|
end
|
28
29
|
|
29
30
|
# Helper function which prompts for user input.
|