kelredd-useful 0.1.8.5 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/useful/cap_tasks/gems.rb +8 -5
- data/lib/useful/cap_tasks/globals.rb +8 -9
- data/lib/useful/version.rb +2 -3
- metadata +2 -2
@@ -1,11 +1,14 @@
|
|
1
1
|
Capistrano::Configuration.instance.load do
|
2
2
|
namespace :gems do
|
3
|
-
|
3
|
+
|
4
4
|
desc "Update code, run 'rake gems:install'"
|
5
|
-
task :install, :roles => :app do
|
5
|
+
task :install, :roles => fetch(:install_roles, :app) do
|
6
6
|
deploy.update_code
|
7
|
-
|
7
|
+
run_with_password("sudo #{fetch(:rake, "rake")} -f #{current_release}/Rakefile #{"RAILS_ENV=#{rails_env}" if rails_env} #{fetch(:gems, "gems")}:install", {
|
8
|
+
:prompt => "Enter sudo pw: ",
|
9
|
+
:pty => false
|
10
|
+
})
|
8
11
|
end
|
9
|
-
|
10
|
-
end
|
12
|
+
|
13
|
+
end
|
11
14
|
end
|
@@ -1,12 +1,11 @@
|
|
1
|
-
def run_with_password(cmd,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
1
|
+
def run_with_password(cmd, options={})
|
2
|
+
prompt = options.delete(:prompt) || 'Password: '
|
3
|
+
password = options.delete(:password)
|
4
|
+
log (options.delete(:confirmation) || "Running: '#{cmd}'")
|
5
|
+
password ||= Capistrano::CLI.password_prompt(prompt)
|
6
|
+
run cmd, options do |ch, stream, out|
|
7
|
+
ch.send_data(password+"\n")
|
8
|
+
end
|
10
9
|
password
|
11
10
|
end
|
12
11
|
|
data/lib/useful/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kelredd-useful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kelredd
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-23 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|