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 CHANGED
Binary file
@@ -1,3 +1,13 @@
1
+ === 2.0.6 / 2012-01-04
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Add simple SSH example to the readme. (SixArm)
6
+
7
+ * 1 bug fix:
8
+
9
+ * Fix concurrent modification in test with real threads (dekellum)
10
+
1
11
  === 2.0.5 / 2011-10-14
2
12
 
3
13
  * 1 minor enhancement:
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
@@ -45,7 +45,7 @@ end
45
45
 
46
46
  class Rake::RemoteTask < Rake::Task
47
47
 
48
- VERSION = "2.0.5"
48
+ VERSION = "2.0.6"
49
49
 
50
50
  @@current_roles = []
51
51
 
@@ -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
- # TODO: move to minitest
5
- def assert_silent
6
- out, err = capture_io do
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) { x += some_variable }
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 5
10
- version: 2.0.5
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: 2011-10-14 00:00:00 Z
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: 9
81
+ hash: 17
82
82
  segments:
83
83
  - 2
84
- - 5
85
- version: "2.5"
84
+ - 9
85
+ version: "2.9"
86
86
  type: :development
87
87
  version_requirements: *id003
88
88
  - !ruby/object:Gem::Dependency
89
- name: hoe
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: *id004
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.10
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