rake-remote_task 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +10 -0
- data/README.txt +20 -0
- data/lib/rake/remote_task.rb +1 -1
- data/lib/rake/test_case.rb +10 -0
- data/test/test_rake_remote_task.rb +8 -18
- metadata +25 -10
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -15,6 +15,26 @@ Rake with remote task goodness.
|
|
15
15
|
* Uses ssh with your ssh settings already in place.
|
16
16
|
* Uses rsync for efficient transfers.
|
17
17
|
|
18
|
+
== EXAMPLE:
|
19
|
+
|
20
|
+
require 'rake/remote_task'
|
21
|
+
|
22
|
+
set :domain, 'abc.example.com'
|
23
|
+
|
24
|
+
remote_task :foo do
|
25
|
+
run "ls"
|
26
|
+
end
|
27
|
+
|
28
|
+
== EXAMPLE SSH CUSTOMIZATION:
|
29
|
+
|
30
|
+
To set the ssh command location:
|
31
|
+
|
32
|
+
set :ssh_cmd, '/usr/local/bin/ssh'
|
33
|
+
|
34
|
+
To set ssh flags for the login and port:
|
35
|
+
|
36
|
+
set :ssh_flags, %w[-l joe -p 2000]
|
37
|
+
|
18
38
|
== SYNOPSIS:
|
19
39
|
|
20
40
|
remote_task :setup_app, :roles => :app do
|
data/lib/rake/remote_task.rb
CHANGED
data/lib/rake/test_case.rb
CHANGED
@@ -65,10 +65,20 @@ class Rake::TestCase < MiniTest::Unit::TestCase
|
|
65
65
|
Rake.application.clear
|
66
66
|
@task_count = Rake.application.tasks.size
|
67
67
|
@rake.set :domain, "example.com"
|
68
|
+
@lock = Mutex.new
|
68
69
|
end
|
69
70
|
|
70
71
|
def util_set_hosts
|
71
72
|
@rake.host "app.example.com", :app
|
72
73
|
@rake.host "db.example.com", :db
|
73
74
|
end
|
75
|
+
|
76
|
+
def util_setup_task(options = {})
|
77
|
+
@task = @rake.remote_task :test_task, options
|
78
|
+
@task.commands = []
|
79
|
+
@task.output = []
|
80
|
+
@task.error = []
|
81
|
+
@task.action = nil
|
82
|
+
@task
|
83
|
+
end
|
74
84
|
end
|
@@ -1,14 +1,9 @@
|
|
1
1
|
require 'rake/test_case'
|
2
2
|
|
3
3
|
class TestRakeRemoteTask < Rake::TestCase
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
yield
|
8
|
-
end
|
9
|
-
|
10
|
-
assert_empty err
|
11
|
-
assert_empty out
|
4
|
+
def teardown
|
5
|
+
Object.send :remove_method, :old_domain if
|
6
|
+
Object.public_instance_methods.include? :old_domain
|
12
7
|
end
|
13
8
|
|
14
9
|
def test_enhance
|
@@ -34,7 +29,11 @@ class TestRakeRemoteTask < Rake::TestCase
|
|
34
29
|
set :can_set_nil, nil
|
35
30
|
set :lies_are, false
|
36
31
|
x = 5
|
37
|
-
task = @rake.remote_task(:some_task)
|
32
|
+
task = @rake.remote_task(:some_task) do
|
33
|
+
@lock.synchronize do
|
34
|
+
x += some_variable
|
35
|
+
end
|
36
|
+
end
|
38
37
|
task.execute nil
|
39
38
|
assert_equal 1, task.some_variable
|
40
39
|
assert_equal 7, x
|
@@ -260,13 +259,4 @@ class TestRakeRemoteTask < Rake::TestCase
|
|
260
259
|
assert_equal ["ssh", "app.example.com", "sudo -p Password: ls"],
|
261
260
|
commands.first, 'app'
|
262
261
|
end
|
263
|
-
|
264
|
-
def util_setup_task(options = {})
|
265
|
-
@task = @rake.remote_task :test_task, options
|
266
|
-
@task.commands = []
|
267
|
-
@task.output = []
|
268
|
-
@task.error = []
|
269
|
-
@task.action = nil
|
270
|
-
@task
|
271
|
-
end
|
272
262
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-remote_task
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 6
|
10
|
+
version: 2.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
FBHgymkyj/AOSqKRIpXPhjC6
|
39
39
|
-----END CERTIFICATE-----
|
40
40
|
|
41
|
-
date:
|
41
|
+
date: 2012-01-05 00:00:00 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rake
|
@@ -78,17 +78,32 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - ~>
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
hash:
|
81
|
+
hash: 17
|
82
82
|
segments:
|
83
83
|
- 2
|
84
|
-
-
|
85
|
-
version: "2.
|
84
|
+
- 9
|
85
|
+
version: "2.9"
|
86
86
|
type: :development
|
87
87
|
version_requirements: *id003
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
|
-
name:
|
89
|
+
name: rdoc
|
90
90
|
prerelease: false
|
91
91
|
requirement: &id004 !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
hash: 19
|
97
|
+
segments:
|
98
|
+
- 3
|
99
|
+
- 10
|
100
|
+
version: "3.10"
|
101
|
+
type: :development
|
102
|
+
version_requirements: *id004
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: hoe
|
105
|
+
prerelease: false
|
106
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
92
107
|
none: false
|
93
108
|
requirements:
|
94
109
|
- - ~>
|
@@ -99,7 +114,7 @@ dependencies:
|
|
99
114
|
- 12
|
100
115
|
version: "2.12"
|
101
116
|
type: :development
|
102
|
-
version_requirements: *
|
117
|
+
version_requirements: *id005
|
103
118
|
description: |-
|
104
119
|
Vlad the Deployer's sexy brainchild is rake-remote_task, extending
|
105
120
|
Rake with remote task goodness.
|
@@ -155,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
170
|
requirements: []
|
156
171
|
|
157
172
|
rubyforge_project: hitsquad
|
158
|
-
rubygems_version: 1.8.
|
173
|
+
rubygems_version: 1.8.12
|
159
174
|
signing_key:
|
160
175
|
specification_version: 3
|
161
176
|
summary: Vlad the Deployer's sexy brainchild is rake-remote_task, extending Rake with remote task goodness.
|
metadata.gz.sig
CHANGED
Binary file
|