rake-remote_task 2.3.1 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 81fc5d41e6cb0acdcb42a4192aa37ea1eac7beb5
4
- data.tar.gz: f6e8d8ecb671f8715ad46e8fb2274b6edc835821
2
+ SHA256:
3
+ metadata.gz: 20397f031e6a41e3cbcb77310cfc7341c17835b1b0448641388a56c5d7103898
4
+ data.tar.gz: 56cdfe213923f29a229c95994a25786d9b1f6c70f94245c6673d89c7a3058a76
5
5
  SHA512:
6
- metadata.gz: 31fd46533b666e7649e77b6993574dbdf006c4d3710afce544629d4523bb490bf28cca403bd584df9f3b380f097751fa54ea4949b1df5be2a472f38e02f56d83
7
- data.tar.gz: 0bd41871eff9f9d17440069a482b35c34353810ccd91fe15a27ae9d3e063a044d2bce49c4546b77eb2d4443c77113a60b383410ae5bb0513ad590e3951b8fafb
6
+ metadata.gz: b2fb7a93240236990d3f599e3c79f6ec344989516071a07ed465c4e6aa5a803b246656785d7565b7d9b0570425362b3c30c32382d9020296e3c69f38ea3250be
7
+ data.tar.gz: de30d9507ef68f957ffc815d9aa031f96406aade48931ff1b495ad01742a3385d122e1cc4275f26638736b198c4af860a2a9fcd5e37078bc8b6c9da9fbe865ad
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,33 @@
1
+ === 2.4.4 / 2020-12-22
2
+
3
+ * 1 bug fix:
4
+
5
+ * Bumped rake version. (nearapogee)
6
+
7
+ === 2.4.3 / 2018-03-17
8
+
9
+ * 1 minor enhancement:
10
+
11
+ * Extend to allow rake v 12. (piclane)
12
+
13
+ === 2.4.2 / 2017-02-27
14
+
15
+ * 1 bug fix:
16
+
17
+ * Fixed 2.4+ Fixnum deprecation warning. (salemine)
18
+
19
+ === 2.4.1 / 2016-10-09
20
+
21
+ * 1 minor enhancement:
22
+
23
+ * Extend to include rake 11 (purcell)
24
+
25
+ === 2.4.0 / 2016-08-01
26
+
27
+ * 1 minor enhancement:
28
+
29
+ * Add optional yield to run. (bhenderson)
30
+
1
31
  === 2.3.1 / 2016-05-16
2
32
 
3
33
  * 1 bug fix:
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Hoe.spec 'rake-remote_task' do
11
11
  developer 'Eric Hodel', 'drbrain@segment7.net'
12
12
  developer 'Wilson Bilkovich', 'wilson@supremetyrant.com'
13
13
 
14
- dependency 'rake', ['>= 0.8', '< 11.0']
14
+ dependency 'rake', ['>= 0.8', '< 15.0']
15
15
  dependency 'open4', '~> 1.0'
16
16
 
17
17
  multiruby_skip << "rubinius"
@@ -45,7 +45,7 @@ end
45
45
 
46
46
  class Rake::RemoteTask < Rake::Task
47
47
 
48
- VERSION = "2.3.1"
48
+ VERSION = "2.4.4"
49
49
 
50
50
  @@current_roles = []
51
51
 
@@ -172,6 +172,8 @@ class Rake::RemoteTask < Rake::Task
172
172
  #
173
173
  # If +command_prefix+ has been filled up with one or several commands, they
174
174
  # will be run on target_host before +command+.
175
+ #
176
+ # Yields input channel, :out or :err, and data.
175
177
 
176
178
  def run command
177
179
  commands = []
@@ -224,6 +226,8 @@ class Rake::RemoteTask < Rake::Task
224
226
  $stderr.write "\n"
225
227
  end
226
228
 
229
+ yield inn, stream == out ? :out : :err, data if block_given?
230
+
227
231
  result << data
228
232
  end
229
233
  end
@@ -385,7 +389,7 @@ class Rake::RemoteTask < Rake::Task
385
389
 
386
390
  def self.safe_dup v # :nodoc:
387
391
  case v
388
- when Symbol, Fixnum, nil, true, false, 42 then # ummmm... yeah. bite me.
392
+ when Symbol, Integer, nil, true, false, 42 then # ummmm... yeah. bite me.
389
393
  v
390
394
  else
391
395
  v.dup
@@ -45,7 +45,7 @@ class TestRakeRemoteTask < Rake::TestCase
45
45
  set :can_set_nil, nil
46
46
  set :lies_are, false
47
47
 
48
- assert_equal nil, task.send(:can_set_nil)
48
+ assert_nil task.send(:can_set_nil)
49
49
 
50
50
  assert_equal false, task.send(:lies_are)
51
51
  assert_equal false, Rake::RemoteTask.fetch(:lies_are)
@@ -108,8 +108,9 @@ class TestRakeRemoteTask < Rake::TestCase
108
108
  @task.target_host = "app.example.com"
109
109
  @task.action = proc { false }
110
110
 
111
- e = assert_raises Rake::CommandFailedError do
112
- assert_silent do
111
+ e = nil
112
+ assert_silent do
113
+ e = assert_raises Rake::CommandFailedError do
113
114
  @task.rsync 'local', 'host:remote'
114
115
  end
115
116
  end
@@ -248,6 +249,41 @@ class TestRakeRemoteTask < Rake::TestCase
248
249
  assert_equal "Password:\n", err
249
250
  end
250
251
 
252
+ def test_run_with_block
253
+ util_setup_task
254
+ @task.output << "file1\nfile2\n"
255
+ @task.error << 'Enter Password:'
256
+ @task.target_host = "app.example.com"
257
+ result = nil
258
+
259
+ out, err = capture_io do
260
+ result = @task.run("./command/with/input") do |input, stream, data|
261
+ if stream == :out and data == "file1\nfile2\n"
262
+ input << "myinput\n"
263
+ elsif stream == :err and data == "Enter Password:"
264
+ input << "mysecret\n"
265
+ end
266
+ end
267
+ end
268
+
269
+ commands = @task.commands
270
+
271
+ assert_equal 1, commands.size, 'not enough commands'
272
+ assert_equal ['ssh', 'app.example.com', './command/with/input'],
273
+ commands.first
274
+
275
+ assert_equal "myinput\nmysecret\n", @task.input.string
276
+
277
+ # WARN: Technically incorrect, the password line should be
278
+ # first... this is an artifact of changes to the IO code in run
279
+ # and the fact that we have a very simplistic (non-blocking)
280
+ # testing model.
281
+ assert_equal "file1\nfile2\nEnter Password:", result
282
+
283
+ assert_equal "file1\nfile2\n", out
284
+ assert_equal "Enter Password:", err
285
+ end
286
+
251
287
  def test_sudo
252
288
  util_setup_task
253
289
  @task.target_host = "app.example.com"
metadata CHANGED
@@ -1,20 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-remote_task
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
8
  - Eric Hodel
9
9
  - Wilson Bilkovich
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
15
- MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
15
+ MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
16
16
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
17
- GRYDY29tMB4XDTE1MDkxOTIwNTEyMloXDTE2MDkxODIwNTEyMlowRTETMBEGA1UE
17
+ GRYDY29tMB4XDTE5MTIxMzAwMDIwNFoXDTIwMTIxMjAwMDIwNFowRTETMBEGA1UE
18
18
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
19
19
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
20
20
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -23,78 +23,84 @@ cert_chain:
23
23
  GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
24
24
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
25
25
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
26
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
27
- AQB+Hx8xUgrpZa4P8H8gR8zme5kISwQrG80MbpqJV6/G3/ZicRFhN5sjwu0uHGue
28
- bd9Cymf6oIRwHVarJux2M32T6bL07Hmi07w2QaPc3MnMKB/D46SRZ2JSSGPFRBTc
29
- SilobMRoGs/7B15uGFUEnNrCB/ltMqhwwSx1r++UQPfeySHEV9uqu03E5Vb7J37O
30
- 2Er6PLXHRiYsIycD1LkMi6YnixdITRHmrqJYE2rsjaIfpIehiusVAPHkNf7qbpHq
31
- qx3h45R1CAsObX0SQDIT+rRbQrtKz1GHIZTOFYvEJjUY1XmRTZupD3CJ8Q7sDqSy
32
- NLq5jm1fq6Y9Uolu3RJbmycf
26
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
27
+ AQCkkcHqAa6IKLYGl93rn78J3L+LnqyxaA059n4IGMHWN5bv9KBQnIjOrpLadtYZ
28
+ vhWkunWDKdfVapBEq5+T4HzqnsEXC3aCv6JEKJY6Zw7iSzl0M8hozuzRr+w46wvT
29
+ fV2yTN6QTVxqbMsJJyjosks4ZdQYov2zdvQpt1HsLi+Qmckmg8SPZsd+T8uiiBCf
30
+ b+1ORSM5eEfBQenPXy83LZcoQz8i6zVB4aAfTGGdhxjoMGUEmSZ6xpkOzmnGa9QK
31
+ m5x9IDiApM+vCELNwDXXGNFEnQBBK+wAe4Pek8o1V1TTOxL1kGPewVOitX1p3xoN
32
+ h7iEjga8iM1LbZUfiISZ+WrB
33
33
  -----END CERTIFICATE-----
34
- date: 2016-05-16 00:00:00.000000000 Z
34
+ date: 2020-12-22 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0.8'
43
- - - <
43
+ - - "<"
44
44
  - !ruby/object:Gem::Version
45
- version: '11.0'
45
+ version: '15.0'
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - '>='
50
+ - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0.8'
53
- - - <
53
+ - - "<"
54
54
  - !ruby/object:Gem::Version
55
- version: '11.0'
55
+ version: '15.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: open4
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rdoc
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '4.0'
77
+ - - "<"
78
+ - !ruby/object:Gem::Version
79
+ version: '7'
77
80
  type: :development
78
81
  prerelease: false
79
82
  version_requirements: !ruby/object:Gem::Requirement
80
83
  requirements:
81
- - - ~>
84
+ - - ">="
82
85
  - !ruby/object:Gem::Version
83
86
  version: '4.0'
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: '7'
84
90
  - !ruby/object:Gem::Dependency
85
91
  name: hoe
86
92
  requirement: !ruby/object:Gem::Requirement
87
93
  requirements:
88
- - - ~>
94
+ - - "~>"
89
95
  - !ruby/object:Gem::Version
90
- version: '3.15'
96
+ version: '3.22'
91
97
  type: :development
92
98
  prerelease: false
93
99
  version_requirements: !ruby/object:Gem::Requirement
94
100
  requirements:
95
- - - ~>
101
+ - - "~>"
96
102
  - !ruby/object:Gem::Version
97
- version: '3.15'
103
+ version: '3.22'
98
104
  description: |-
99
105
  Vlad the Deployer's sexy brainchild is rake-remote_task, extending
100
106
  Rake with remote task goodness.
@@ -109,7 +115,7 @@ extra_rdoc_files:
109
115
  - Manifest.txt
110
116
  - README.txt
111
117
  files:
112
- - .autotest
118
+ - ".autotest"
113
119
  - History.txt
114
120
  - Manifest.txt
115
121
  - README.txt
@@ -120,27 +126,27 @@ files:
120
126
  homepage: https://github.com/seattlerb/rake-remote_task
121
127
  licenses:
122
128
  - MIT
123
- metadata: {}
124
- post_install_message:
129
+ metadata:
130
+ homepage_uri: https://github.com/seattlerb/rake-remote_task
131
+ post_install_message:
125
132
  rdoc_options:
126
- - --main
133
+ - "--main"
127
134
  - README.txt
128
135
  require_paths:
129
136
  - lib
130
137
  required_ruby_version: !ruby/object:Gem::Requirement
131
138
  requirements:
132
- - - '>='
139
+ - - ">="
133
140
  - !ruby/object:Gem::Version
134
141
  version: '0'
135
142
  required_rubygems_version: !ruby/object:Gem::Requirement
136
143
  requirements:
137
- - - '>='
144
+ - - ">="
138
145
  - !ruby/object:Gem::Version
139
146
  version: '0'
140
147
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.4.5
143
- signing_key:
148
+ rubygems_version: 3.1.4
149
+ signing_key:
144
150
  specification_version: 4
145
151
  summary: Vlad the Deployer's sexy brainchild is rake-remote_task, extending Rake with
146
152
  remote task goodness.
metadata.gz.sig CHANGED
Binary file