sshkit 1.18.2 → 1.21.1

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.
@@ -6,6 +6,9 @@ rvm:
6
6
  - 2.2
7
7
  - 2.1
8
8
  - 2.0
9
+ branches:
10
+ only:
11
+ - master
9
12
  matrix:
10
13
  include:
11
14
  # Run Danger only once, on 2.5
@@ -1,779 +1 @@
1
- ## Changelog
2
-
3
- This file is written in reverse chronological order, newer releases will
4
- appear at the top.
5
-
6
- ## [Unreleased][]
7
-
8
- * Your contribution here!
9
-
10
- ## [1.18.2][] (2019-02-03)
11
-
12
- * [#448](https://github.com/capistrano/sshkit/pull/448): Fix misbehaving connection eviction loop when disabling connection pooling - [Sebastian Cohnen](https://github.com/tisba)
13
-
14
- ## [1.18.1][] (2019-01-26)
15
-
16
- * [#447](https://github.com/capistrano/sshkit/pull/447): Fix broken thread safety by widening critical section - [Takumasa Ochi](https://github.com/aeroastro)
17
-
18
- ## [1.18.0][] (2018-10-21)
19
-
20
- * [#435](https://github.com/capistrano/sshkit/pull/435): Consistent verbosity configuration #capture and #test methods - [@NikolayRys](https://github.com/NikolayRys)
21
-
22
- ## [1.17.0][] (2018-07-07)
23
-
24
- * [#430](https://github.com/capistrano/sshkit/pull/430): [Feature] Command Argument STDOUT/capistrano.log Hiding - [@NorseGaud](https://github.com/NorseGaud)
25
-
26
- ## [1.16.1][] (2018-05-20)
27
-
28
- * [#425](https://github.com/capistrano/sshkit/pull/425): Command#group incorrectly escapes double quotes, resulting in a a syntax error when specifying the group execution using `as`. This issue manifested when user command quotes changed from double quotes to single quotes. This fix removes the double quote escaping - [@pblesi](https://github.com/pblesi).
29
-
30
- ## [1.16.0][] (2018-02-03)
31
-
32
- * [#417](https://github.com/capistrano/sshkit/pull/417): Cache key generation for connections becomes slow when `known_hosts` is a valid `net/ssh` options and `known_hosts` file is big. This changes the cache key generation and fixes performance issue - [@ElvinEfendi](https://github.com/ElvinEfendi).
33
-
34
- ## [1.15.1][] (2017-11-18)
35
-
36
- This is a small bug-fix release that fixes problems with `upload!` and `download!` that were inadvertently introduced in 1.15.0.
37
-
38
- ### Breaking changes
39
-
40
- * None
41
-
42
- ### Bug fixes
43
-
44
- * [#410](https://github.com/capistrano/sshkit/pull/410): fix NoMethodError when using upload!/download! with Pathnames - [@UnderpantsGnome](https://github.com/UnderpantsGnome)
45
- * [#411](https://github.com/capistrano/sshkit/pull/410): fix upload!/download! when using relative paths outside of `within` blocks - [@Fjan](https://github.com/Fjan)
46
-
47
- ## [1.15.0][] (2017-11-03)
48
-
49
- ### New features
50
-
51
- * [#408](https://github.com/capistrano/sshkit/pull/408): upload! and download! now respect `within` - [@sj26](https://github.com/sj26)
52
-
53
- ### Potentially breaking changes
54
-
55
- * `upload!` and `download!` now support remote paths which are
56
- relative to the `within` working directory. They were previously documented
57
- as only supporting absolute paths, but relative paths still worked relative
58
- to the remote working directory. If you rely on the previous behaviour you
59
- may need to adjust your code.
60
-
61
- ## [1.14.0][] (2017-06-30)
62
-
63
- ### Breaking changes
64
-
65
- * None
66
-
67
- ### New features
68
-
69
- * [#401](https://github.com/capistrano/sshkit/pull/401): Add :log_percent option to specify upload!/download! transfer log percentage - [@aubergene](https://github.com/aubergene)
70
-
71
- ## [1.13.1][] (2017-03-31)
72
-
73
- ### Breaking changes
74
-
75
- * None
76
-
77
- ### Bug fixes
78
-
79
- * [#397](https://github.com/capistrano/sshkit/pull/397): Fix NoMethodError assign_defaults with net-ssh older than 4.0.0 - [@shirosaki](https://github.com/shirosaki)
80
-
81
- ## [1.13.0][] (2017-03-24)
82
-
83
- ### Breaking changes
84
-
85
- * None
86
-
87
- ### New features
88
-
89
- * [#372](https://github.com/capistrano/sshkit/pull/372): Use cp_r in local backend with recursive option - [@okuramasafumi](https://github.com/okuramasafumi)
90
-
91
- ### Bug fixes
92
-
93
- * [#390](https://github.com/capistrano/sshkit/pull/390): Properly wrap Ruby StandardError w/ add'l context - [@mattbrictson](https://github.com/mattbrictson)
94
- * [#392](https://github.com/capistrano/sshkit/pull/392): Fix open two connections with changed cache key - [@shirosaki](https://github.com/shirosaki)
95
-
96
- ## [1.12.0][] (2017-02-10)
97
-
98
- ### Breaking changes
99
-
100
- * None
101
-
102
- ### New features
103
-
104
- * Add `SSHKit.config.default_runner_config` option that allows overriding default runner configs.
105
-
106
- ## [1.11.5][] (2016-12-16)
107
-
108
- ### Bug fixes
109
-
110
- * Do not prefix `exec` command
111
- [PR #378](https://github.com/capistrano/sshkit/pull/378) @dreyks
112
-
113
- ## [1.11.4][] (2016-11-02)
114
-
115
- * Use string interpolation for environment variables to avoid escaping issues
116
- with sprintf
117
- [PR #280](https://github.com/capistrano/sshkit/pull/280)
118
- @Sinjo - Chris Sinjakli
119
-
120
- ## [1.11.3][] (2016-09-16)
121
-
122
- * Fix known_hosts caching to match on the entire hostlist
123
- [PR #364](https://github.com/capistrano/sshkit/pull/364) @byroot
124
-
125
- ## [1.11.2][] (2016-07-29)
126
-
127
- ### Bug fixes
128
-
129
- * Fixed a crash occurring when `Host@keys` was set to a non-Enumerable.
130
- @xavierholt [PR #360](https://github.com/capistrano/sshkit/pull/360)
131
-
132
- ## [1.11.1][] (2016-06-17)
133
-
134
- ### Bug fixes
135
-
136
- * Fixed a regression in 1.11.0 that would cause
137
- `ArgumentError: invalid option(s): known_hosts` in some older versions of
138
- net-ssh. @byroot [#357](https://github.com/capistrano/sshkit/issues/357)
139
-
140
- ## [1.11.0][] (2016-06-14)
141
-
142
- ### Bug fixes
143
-
144
- * Fixed colorized output alignment in Logger::Pretty. @xavierholt
145
- [PR #349](https://github.com/capistrano/sshkit/pull/349)
146
- * Fixed a bug that prevented nested `with` calls
147
- [#43](https://github.com/capistrano/sshkit/issues/43)
148
-
149
- ### Other changes
150
-
151
- * Known hosts lookup optimization is now enabled by default. @byroot
152
-
153
- ## 1.10.0 (2016-04-22)
154
-
155
- * You can now opt-in to caching of SSH's known_hosts file for a speed boost
156
- when deploying to a large fleet of servers. Refer to the
157
- [README](https://github.com/capistrano/sshkit/tree/v1.10.0#known-hosts-caching) for
158
- details. We plan to turn this on by default in a future version of SSHKit.
159
- [PR #330](https://github.com/capistrano/sshkit/pull/330) @byroot
160
- * SSHKit now explicitly closes its pooled SSH connections when Ruby exits;
161
- this fixes `zlib(finalizer): the stream was freed prematurely` warnings
162
- [PR #343](https://github.com/capistrano/sshkit/pull/343) @mattbrictson
163
- * Allow command map entries (`SSHKit::CommandMap#[]`) to be Procs
164
- [PR #310](https://github.com/capistrano/sshkit/pull/310)
165
- @mikz
166
-
167
- ## 1.9.0
168
-
169
- **Refer to the 1.9.0.rc1 release notes for a full list of new features, fixes,
170
- and potentially breaking changes since SSHKit 1.8.1.** There are no changes
171
- since 1.9.0.rc1.
172
-
173
- ## 1.9.0.rc1
174
-
175
- ### Potentially breaking changes
176
-
177
- * The SSHKit DSL is no longer automatically included when you `require` it.
178
- **This means you must now explicitly `include SSHKit::DSL`.**
179
- See [PR #219](https://github.com/capistrano/sshkit/pull/219) for details.
180
- @beatrichartz
181
- * `SSHKit::Backend::Printer#test` now always returns true
182
- [PR #312](https://github.com/capistrano/sshkit/pull/312) @mikz
183
-
184
- ### New features
185
-
186
- * `SSHKit::Formatter::Abstract` now accepts an optional Hash of options
187
- [PR #308](https://github.com/capistrano/sshkit/pull/308) @mattbrictson
188
- * Add `SSHKit::Backend.current` so that Capistrano plugin authors can refactor
189
- helper methods and still have easy access to the currently-executing Backend
190
- without having to use global variables.
191
- * Add `SSHKit.config.default_runner` options that allows to override default command runner.
192
- This option also accepts a name of the custom runner class.
193
- * The ConnectionPool has been rewritten in this release to be more efficient
194
- and have a cleaner internal API. You can still completely disable the pool
195
- by setting `SSHKit::Backend::Netssh.pool.idle_timeout = 0`.
196
- @mattbrictson @byroot [PR #328](https://github.com/capistrano/sshkit/pull/328)
197
-
198
- ### Bug fixes
199
-
200
- * make sure working directory for commands is properly cleared after `within` blocks
201
- [PR #307](https://github.com/capistrano/sshkit/pull/307)
202
- @steved
203
- * display more accurate string for commands with spaces being output in `Formatter::Pretty`
204
- [PR #304](https://github.com/capistrano/sshkit/pull/304)
205
- @steved
206
- [PR #319](https://github.com/capistrano/sshkit/pull/319) @mattbrictson
207
- * Fix a race condition experienced in JRuby that could cause multi-server
208
- deploys to fail. [PR #322](https://github.com/capistrano/sshkit/pull/322)
209
- @mattbrictson
210
-
211
- ## 1.8.1
212
-
213
- * Change license to MIT, thanks to all the patient contributors who gave
214
- their permissions.
215
-
216
- ## 1.8.0
217
-
218
- * add SSHKit::Backend::ConnectionPool#close_connections
219
- [PR #285](https://github.com/capistrano/sshkit/pull/285)
220
- @akm
221
- * Clean up rubocop lint warnings
222
- [PR #275](https://github.com/capistrano/sshkit/pull/275)
223
- @cshaffer
224
- * Prepend unused parameter names with an underscore
225
- * Prefer “safe assignment in condition”
226
- * Disambiguate regexp literals with parens
227
- * Prefer `sprintf` over `String#%`
228
- * No longer shadow `caller_line` variable in `DeprecationLogger`
229
- * Rescue `StandardError` instead of `Exception`
230
- * Remove useless `private` access modifier in `TestAbstract`
231
- * Disambiguate block operator with parens
232
- * Disambiguate between grouped expression and method params
233
- * Remove assertion in `TestHost#test_assert_hosts_compare_equal` that compares something with itself
234
- * Export environment variables and execute command in a subshell.
235
- [PR #273](https://github.com/capistrano/sshkit/pull/273)
236
- @kuon
237
- * Introduce `log_command_start`, `log_command_data`, `log_command_exit` methods on `Formatter`
238
- [PR #257](https://github.com/capistrano/sshkit/pull/257)
239
- @robd
240
- * Deprecate `@stdout` and `@stderr` accessors on `Command`
241
- * Add support for deprecation logging options.
242
- [README](README.md#deprecation-warnings),
243
- [PR #258](https://github.com/capistrano/sshkit/pull/258)
244
- @robd
245
- * Quote environment variable values.
246
- [PR #250](https://github.com/capistrano/sshkit/pull/250)
247
- @Sinjo - Chris Sinjakli
248
- * Simplified formatter hierarchy.
249
- [PR #248](https://github.com/capistrano/sshkit/pull/248)
250
- @robd
251
- * `SimpleText` formatter now extends `Pretty`, rather than duplicating.
252
- * Hide ANSI color escape sequences when outputting to a file.
253
- [README](README.md#output-colors),
254
- [Issue #245](https://github.com/capistrano/sshkit/issues/245),
255
- [PR #246](https://github.com/capistrano/sshkit/pull/246)
256
- @robd
257
- * Now only color the output if it is associated with a tty,
258
- or the `SSHKIT_COLOR` environment variable is set.
259
- * Removed broken support for assigning an `IO` to the `output` config option.
260
- [Issue #243](https://github.com/capistrano/sshkit/issues/243),
261
- [PR #244](https://github.com/capistrano/sshkit/pull/244)
262
- @robd
263
- * Use `SSHKit.config.output = SSHKit::Formatter::SimpleText.new($stdin)` instead
264
- * Added support for `:interaction_handler` option on commands.
265
- [PR #234](https://github.com/capistrano/sshkit/pull/234),
266
- [PR #242](https://github.com/capistrano/sshkit/pull/242)
267
- @robd
268
- * Removed partially supported `TRACE` log level.
269
- [2aa7890](https://github.com/capistrano/sshkit/commit/2aa78905f0c521ad9f697e7a4ed04ba438d5ee78)
270
- @robd
271
- * Add support for the `:strip` option to the `capture` method and strip by default on the `Local` backend.
272
- [PR #239](https://github.com/capistrano/sshkit/pull/239),
273
- [PR #249](https://github.com/capistrano/sshkit/pull/249)
274
- @robd
275
- * The `Local` backend now strips by default to be consistent with the `Netssh` one.
276
- * This reverses change [7d15a9a](https://github.com/capistrano/sshkit/commit/7d15a9aebfcc43807c8151bf6f3a4bc038ce6218) to the `Local` capture API to remove stripping by default.
277
- * If you require the raw, unstripped output, pass the `strip: false` option: `capture(:ls, strip: false)`
278
- * Simplified backend hierarchy.
279
- [PR #235](https://github.com/capistrano/sshkit/pull/235),
280
- [PR #237](https://github.com/capistrano/sshkit/pull/237)
281
- @robd
282
- * Moved duplicate implementations of `make`, `rake`, `test`, `capture`, `background` on to `Abstract` backend.
283
- * Backend implementations now only need to implement `execute_command`, `upload!` and `download!`
284
- * Removed `Printer` from backend hierarchy for `Local` and `Netssh` backends (they now just extend `Abstract`)
285
- * Removed unused `Net::SSH:LogLevelShim`
286
- * Removed dependency on the `colorize` gem. SSHKit now implements its own ANSI color logic, with no external dependencies. Note that SSHKit now only supports the `:bold` or plain modes. Other modes will be gracefully ignored. [#263](https://github.com/capistrano/sshkit/issues/263)
287
- * New API for setting the formatter: `use_format`. This differs from `format=` in that it accepts options or arguments that will be passed to the formatter's constructor. The `format=` syntax will be deprecated in a future release. [#295](https://github.com/capistrano/sshkit/issues/295)
288
- * SSHKit now immediately raises a `NameError` if you try to set a formatter that does not exist. [#295](https://github.com/capistrano/sshkit/issues/295)
289
- * Fix error message when the formatter does not exist. [#301](https://github.com/capistrano/sshkit/pull/301)
290
-
291
- ## 1.7.1
292
-
293
- * Fix a regression in 1.7.0 that caused command completion messages to be removed from log output. @mattbrictson
294
-
295
- ## 1.7.0
296
-
297
- * Update Vagrantfile to use multi-provider Hashicorp precise64 box - remove URLs. @townsen
298
- * Merge host ssh_options and Netssh defaults @townsen
299
- Previously if host-level ssh_options were defined the Netssh defaults
300
- were ignored.
301
- * Merge host ssh_options and Netssh defaults
302
- * Fixed race condition where output of failed command would be empty. @townsen
303
- Caused random failures of `test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr`
304
- Also fixes output handling in failed commands, and generally buggy output.
305
- * Remove override of backtrace() and backtrace_locations() from ExecuteError. @townsen
306
- This interferes with rake default behaviour and creates duplicate stacktraces.
307
- * Allow running local commands using `on(:local)`
308
- * Implement the upload! and download! methods for the local backend
309
-
310
- ## 1.6.0
311
-
312
- * Fix colorize to use the correct API (@fazibear)
313
- * Lock colorize (sorry guys) version at >= 0.7.0
314
-
315
- ## 1.6.0 (Yanked, because of colorize.)
316
-
317
- * Force dependency on colorize v0.6.0
318
- * Add your entries here, remember to credit yourself however you want to be
319
- credited!
320
- * Remove strip from capture to preserve whitespace. Nick Townsend
321
- * Add vmware_fusion Vagrant provider. Nick Townsend
322
- * Add some padding to the pretty log formatter
323
-
324
- ## 1.5.1
325
-
326
- * Use `sudo -u` rather than `sudo su` to switch users. Mat Trudel
327
-
328
- ## 1.5.0
329
-
330
- * Deprecate background helper - too many badly behaved pseudo-daemons. Lee Hambley
331
- * Don't colourize unless $stdout is a tty. Lee Hambley
332
- * Remove out of date "Known Issues" section from README. Lee Hambley
333
- * Dealy variable interpolation inside `as()` block. Nick Townsend
334
- * Fixes for functional tests under modern Vagrant. Lewis Marshal
335
- * Fixes for connection pooling. Chris Heald
336
- * Add `localhost` hostname to local backend. Adam Mckaig
337
- * Wrap execptions to include hostname. Brecht Hoflack
338
- * Remove `shellwords` stdlib dependency Bruno Sutic
339
- * Remove unused `cooldown` accessor. Bruno Sutic
340
- * Replace Term::ANSIColor with a lighter solution. Tom Clements
341
- * Documentation fixes. Matt Brictson
342
-
343
- ## 1.4.0
344
-
345
- https://github.com/capistrano/sshkit/compare/v1.3.0...v1.4.0
346
-
347
- * Removed `invoke` alias for [`SSHKit::Backend::Printer.execute`](https://github.com/capistrano/sshkit/blob/master/lib/sshkit/backends/printer.rb#L20). This is to prevent collisions with
348
- methods in capistrano with similar names, and to provide a cleaner API. See [capistrano issue 912](https://github.com/capistrano/capistrano/issues/912) and [issue 107](https://github.com/capistrano/sshkit/issues/107) for more details.
349
- * Connection pooling now uses a thread local to store connection pool, giving each thread its own connection pool. Thank you @mbrictson see [#101](https://github.com/capistrano/sshkit/pull/101) for more.
350
- * Command map indifferent towards strings and symbols thanks to @thomasfedb see [#91](https://github.com/capistrano/sshkit/pull/91)
351
- * Moved vagrant wrapper to `support` directory, added ability to run tests with vagrant using ssh. @miry see [#64](https://github.com/capistrano/sshkit/pull/64)
352
- * Removed unnecessary require `require_relative '../sshkit'` in `lib/sshkit/dsl.rb` prevents warnings thanks @brabic.
353
- * Doc fixes thanks @seanhandley @vojto
354
-
355
- ## 1.3.0
356
-
357
- https://github.com/capistrano/sshkit/compare/v1.2.0...v1.3.0
358
-
359
- * Connection pooling. SSH connections are reused across multiple invocations
360
- of `on()`, which can result in significant performance gains. See:
361
- https://github.com/capistrano/sshkit/pull/70. Matt @mbrictson Brictson.
362
- * Fixes to the Formatter::Dot and to the formatter class name resolver. @hab287:w
363
- * Added the license to the Gemspec. @anatol.
364
- * Fix :limit handling for the `in: :groups` run mode. Phil @phs Smith
365
- * Doc fixes @seanhandley, @sergey-alekseev.
366
-
367
- ## 1.2.0
368
-
369
- https://github.com/capistrano/sshkit/compare/v1.1.0...v1.2.0
370
-
371
- * Support picking up a project local SSH config file, if a SSH config file
372
- exists at ./.ssh/config it will be merged with the ~/.ssh/config. This is
373
- ideal for defining project-local proxies/gateways, etc. Thanks to Alex
374
- @0rca Vzorov.
375
- * Tests and general improvements to the Printer backends (mostly used
376
- internally). Thanks to Michael @miry Nikitochkin.
377
- * Update the net-scp dependency version. Thanks again to Michael @miry
378
- Nikitochkin.
379
- * Improved command map. This feature allows mapped variables to be pushed
380
- and unshifted onto the mapping so that the Capistrano extensions for
381
- rbenv and bundler, etc can work together. For discussion about the reasoning
382
- see https://github.com/capistrano/capistrano/issues/639 and
383
- https://github.com/capistrano/sshkit/pull/45. A big thanks to Kir @kirs
384
- Shatrov.
385
- * `test()` and `capture()` now behave as expected inside a `run_locally` block
386
- meaning that they now run on your local machine, rather than erring out. Thanks
387
- to Kentaro @kentaroi Imai.
388
- * The `:wait` option is now successfully passed to the runner now. Previously the
389
- `:wait` option was ignored. Thanks to Jordan @jhollinger Hollinger for catching
390
- the mistake in our test coverage.
391
- * Fixes and general improvements to the `download()` method which until now was
392
- quite naïve. Thanks to @chqr.
393
-
394
- ## 1.1.0
395
-
396
- https://github.com/capistrano/sshkit/compare/v1.0.0...v1.1.0
397
-
398
- * Please see the Git history. `git rebase` ate our changelog (we should have been
399
- more careful)
400
-
401
- ## 1.0.0
402
-
403
- * The gem now supports a run_locally, although it's nothing to do with SSH,
404
- it makes a nice API. There are examples in the EXAMPLES.md.
405
-
406
- ## 0.0.34
407
-
408
- * Allow the setting of global SSH options on the `backend.ssh` as a hash,
409
- these options are the same as Net::SSH configure expects. Thanks to Rafał
410
- @lisukorin Lisowski
411
-
412
- ## 0.0.32
413
-
414
- * Lots of small changes since 0.0.27.
415
- * Particularly working around a possible NaN issue when uploading
416
- comparatively large files.
417
-
418
- ## 0.0.27
419
-
420
- * Don't clobber SSH options with empty values. This allows Net::SSH to
421
- do the right thing most of the time, and look into the SSH configuration
422
- files.
423
-
424
- ## 0.0.26
425
-
426
- * Pretty output no longer prints white text. ("Command.....")
427
- * Fixed a double-output bug, where upon receiving the exit status from a
428
- remote command, the last data packet that it sent would be re-printed
429
- by the pretty formatter.
430
- * Integration tests now use an Ubuntu Precise 64 Vagrant base box.
431
- * Additional host declaration syntax, `SSHKit::Host` can now take a hash of
432
- host properties in addition to a number of new (common sense) DSN type
433
- syntaxes.
434
- * Changes to the constants used for logging, we no longer re-define a
435
- `Logger::TRACE` constant on the global `Logger` class, rather everyhing
436
- now uses `SSHKit::Logger` (Thanks to Rafa Garcia)
437
- * Various syntax and documentation fixes.
438
-
439
- ## 0.0.25
440
-
441
- * `upload!` and `download!` now log to different levels depending on
442
- completion percentage. When the upload is 0 percent complete or a number
443
- indivisible by 10, the message is logged to `Logger::DEBUG` otherwise the
444
- message is logged to `Logger::INFO`, this should mean that normal users at
445
- a sane log level should see upload progress jump to `100%` for small
446
- files, and otherwise for larger files they'll see output every `10%`.
447
-
448
- ## 0.0.24
449
-
450
- * Pretty output now streams stdout and stderr. Previous versions would
451
- append (`+=`) chunks of data written by the remote host to the `Command`
452
- instance, and the `Pretty` formatter would only print stdout/stderr if the
453
- command was `#complete?`. Historically this lead to issues where the
454
- remote process was blocking for input, had written the prompt to stdout,
455
- but it was not visible on the client side.
456
-
457
- Now each time the command is passed to the output stream, the
458
- stdout/stderr are replaced with the lines returned from the remote server
459
- in this chunk. (i.e were yielded to the callback block). Commands now have
460
- attribute accessors for `#full_stdout` and `#full_stderr` which are appended
461
- in the way that `#stdout` and `#stderr` were previously.
462
-
463
- This should be considered a private API, and one should beware of relying
464
- on `#full_stdout` or `#full_stderr`, they will likely be replaced with a
465
- cleaner soltion eventually.
466
-
467
- * `upload!` and `download!` now print progress reports at the `Logger::INFO`
468
- verbosity level.
469
-
470
- ## 0.0.23
471
-
472
- * Explicitly rely on `net-scp` gem.
473
-
474
- ## 0.0.22
475
-
476
- * Added naïve implementations of `upload!()` and `download!()` (syncoronous) to
477
- the Net::SSH backend. See `EXAMPLES.md` for more extensive usage examples.
478
-
479
- The `upload!()` method can take a filename, or an `IO`, this reflects the way
480
- the underlying Net::SCP implementation works. The same is true of
481
- `download!()`, when called with a single argument it captures the file's
482
- contents, otherwise it downloads the file to the local disk.
483
-
484
- on hosts do |host|
485
- upload!(StringIO.new('some-data-here'), '~/.ssh/authorized_keys')
486
- upload!('~/.ssh/id_rsa.pub', '~/.ssh/authorized_keys')
487
- puts download!('/etc/monit/monitrc')
488
- download!('/etc/monit/monitrc', '~/monitrc')
489
- end
490
-
491
- ## 0.0.21
492
-
493
- * Fixed an issue with default formatter
494
- * Modified `SSHKit.config.output_verbosity=` to accept different objects:
495
-
496
- SSHKit.config.output_verbosity = Logger::INFO
497
- SSHKit.config.output_verbosity = :info
498
- SSHKit.config.output_verbosity = 1
499
-
500
- ## 0.0.20
501
-
502
- * Fixed a bug where the log level would be assigned, not compared in the
503
- pretty formatter, breaking the remainder of the output verbosity.
504
-
505
- ## 0.0.19
506
-
507
- * Modified the `Pretty` formatter to include the log level in front of
508
- executed commands.
509
-
510
- * Modified the `Pretty` formatter not to print stdout and stderr by default,
511
- the log level must be raised to Logger::DEBUG to see the command outputs.
512
-
513
- * Modified the `Pretty` formatter to use `Command#to_s` when printing the
514
- command, this prints the short form (without modifications/wrappers applied
515
- to the command for users, groups, directories, umasks, etc).
516
-
517
- ## 0.0.18
518
-
519
- * Enable `as()` to take either a string/symbol as previously, but also now
520
- accepts a hash of `{user: ..., group: ...}`. In case that your host system
521
- supports the command `sg` (`man 1 sg`) to switch your effective group ID
522
- then one can work on files as a team group user.
523
-
524
- on host do |host|
525
- as user: :peter, group: griffin do
526
- execute :touch, 'somefile'
527
- end
528
- end
529
-
530
- will result in a file with the following permissions:
531
-
532
- -rw-r--r-- 1 peter griffin 0 Jan 27 08:12 somefile
533
-
534
- This should make it much easier to share deploy scripts between team
535
- members.
536
-
537
- **Note:** `sg` has some very strict user and group password requirements
538
- (the user may not have a password (`passwd username -l` to lock an account
539
- that already has a password), and the group may not have a password.)
540
-
541
- Additionally, and unsurprisingly *the user must also be a member of the
542
- group.*
543
-
544
- `sg` was chosen over `newgrp` as it's easier to embed in a one-liner
545
- command, `newgrp` could be used with a heredoc, but my research suggested
546
- that it might be better to use sg, as it better represents my intention, a
547
- temporary switch to a different effective group.
548
-
549
- * Fixed a bug with environmental variables and umasking introduced in 0.0.14.
550
- Since that version the environmental variables were being presented to the
551
- umask command's subshell, and not to intended command's subshell.
552
-
553
- incorrect: `ENV=var umask 002 && env`
554
- correct: `umask 002 && ENV=var env`
555
-
556
- * Changed the exception handler, if a command returns with a non-zero exit
557
- status then the output will be prefixed with the command name and which
558
- channel any output was written to, for example:
559
-
560
- Command.new("echo ping; false")
561
- => echo stdout: ping
562
- echo stderr: Nothing written
563
-
564
- In this contrived example that's more or less useless, however with badly
565
- behaved commands that write errors to stdout, and don't include their name
566
- in the program output, it can help a lot with debugging.
567
-
568
- ## 0.0.17
569
-
570
- * Fixed a bug introduced in 0.0.16 where the capture() helper returned
571
- the name of the command that had been run, not it's output.
572
-
573
- * Classify the pre-directory switch, and pre-user switch command guards
574
- as having a DEBUG log level to exclude them from the logs.
575
-
576
- ## 0.0.16
577
-
578
- * Fixed a bug introduced in 0.0.15 where the capture() helper returned
579
- boolean, discarding any output from the server.
580
-
581
- ## 0.0.15
582
-
583
- * `Command` now takes a `verbosity` option. This defaults to `Logger::INFO`
584
- and can be set to any of the Ruby logger level constants. You can also set
585
- it to the symbol `:debug` (and friends) which will be expanded into the correct
586
- constants.
587
-
588
- The log verbosity level is set to Logger::INFO by default, and can be
589
- overridden by setting `SSHKit.config.output_verbosity = Logger::{...}`,
590
- pick a level that works for you.
591
-
592
- By default `test()` and `capture()` calls are surpressed, and not printed
593
- by the pretty logger as of this version.
594
-
595
- ## 0.0.14
596
-
597
- * Umasks can now be set on `Command` instances. It can be set globally with
598
- `SSHKit.config.umask` (default, nil; meaning take the system default). This
599
- can be used to set, for example a umask of `007` for allowing users with
600
- the same primary group to share code without stepping on eachother's toes.
601
-
602
- ## 0.0.13
603
-
604
- * Correctly quote `as(user)` commands, previously it would expand to:
605
- `sudo su user -c /usr/bin/env echo "Hello World"`, in which the command to
606
- run was taken as simply `/usr/bin/env`. By quoting all arguments it should
607
- now work as expected. `sudo su user -c "/usr/bin/env echo \""Hello World\""`
608
-
609
- ## 0.0.12
610
-
611
- * Also print anything the program wrote to stdout when the exit status is
612
- non-zero and the command raises an error. (assits debugging badly behaved
613
- programs that fail, and write their error output to stdout.)
614
-
615
- ## 0.0.11
616
-
617
- * Implementing confuguration objects on the backends (WIP, undocumented)
618
- * Implement `SSHKit.config.default_env`, a hash which can be modified and
619
- will act as a global `with`.
620
- * Fixed #9 (with(a: 'b', c: 'c') being parsed as `A=bC=d`. Now properly space
621
- separated.
622
- * Fixed #10 (overly aggressive shell escaping), one can now do:
623
- `with(path: 'foo:$PATH') without the $ being escaped too early.
624
-
625
- ## 0.0.10
626
-
627
- * Include more attributes in `Command#to_hash`.
628
-
629
- ## 0.0.9
630
-
631
- * Include more attributes in `Command#to_hash`.
632
-
633
- ## 0.0.8
634
-
635
- * Added DSL method `background()` this sends a task to the background using
636
- `nohup` and redirects it's output to `/dev/null` so as to avoid littering
637
- the filesystem with `nohup.out` files.
638
-
639
- **Note:** Backgrounding a task won't work as you expect if you give it a
640
- string, that is you must do `background(:sleep, 5)` and not `background("sleep 5")`
641
- according to the rules by which a command is not processed in any way **if it
642
- contains a spaca character in it's first argument**.
643
-
644
- Usage Example:
645
-
646
- on hosts do
647
- background :rake, "assets:precompile" # typically takes 5 minutes!
648
- end
649
-
650
- **Further:** Many programs are badly behaved and no not work well with `nohup`
651
- it has to do with the way nohup works, reopening the processe's file
652
- descriptors and redirecting them. Programs that re-open, or otherwise
653
- manipulate their own file descriptors may lock up when the SSH session is
654
- disconnected, often they block writing to, or reading from stdin/out.
655
-
656
- ## 0.0.7
657
-
658
- * DSL method `execute()` will now raise `SSHKit::Command::Failed` when the
659
- exit status is non-zero. The message of the exception will be whatever the
660
- process had written to stdout.
661
- * New DSL method `test()` behaves as `execute()` used to until this version.
662
- * `Command` now raises an error in `#exit_status=()` if the exit status given
663
- is not zero. (see below)
664
- * All errors raised by error conditions of SSHKit are defined as subclasses of
665
- `SSHKit::StandardError` which is itself a subclass of `StandardError`.
666
-
667
- The `Command` objects can be set to not raise, by passing `raise_on_non_zero_exit: false`
668
- when instantiating them, this is exactly what `test()` does internally.
669
-
670
- Example:
671
-
672
- on hosts do |host
673
- if test "[ -d /opt/sites ]" do
674
- within "/opt/sites" do
675
- execute :git, :pull
676
- end
677
- else
678
- execute :git, :clone, 'some-repository', '/opt/sites'
679
- end
680
- end
681
-
682
- ## 0.0.6
683
-
684
- * Support arbitrary properties on Host objects. (see below)
685
-
686
- Starting with this version, the `Host` class supports arbitrary properties,
687
- here's a proposed use-case:
688
-
689
- servers = %w{one.example.com two.example.com
690
- three.example.com four.example.com}.collect do |s|
691
- h = SSHKit::Host.new(s)
692
- if s.match /(one|two)/
693
- h.properties.roles = [:web]
694
- else
695
- h.properties.roles = [:app]
696
- end
697
- end
698
-
699
- on servers do |host|
700
- if host.properties.roles.include?(:web)
701
- # Do something pertinent to web servers
702
- elsif host.properties.roles.include?(:app)
703
- # Do something pertinent to application servers
704
- end
705
- end
706
-
707
- Naturally, this is a contrived example, the `#properties` attribute on the
708
- Host instance is implemented as an [`OpenStruct`](http://ruby-doc.org/stdlib-1.9.3/libdoc/ostruct/rdoc/OpenStruct.html) and
709
- will behave exactly as such.
710
-
711
- ## 0.0.5
712
-
713
- * Removed configuration option `SSHKit.config.format` (see below)
714
- * Removed configuration option `SSHKit.config.runner` (see below)
715
-
716
- The format should now be set by doing:
717
-
718
- SSHKit.config.output = File.open('/dev/null')
719
- SSHKit.config.output = MyFormatterClass.new($stdout)
720
-
721
- The library ships with three formatters, `BlackHole`, `Dot` and `Pretty`.
722
-
723
- The default is `Pretty`, but can easily be changed:
724
-
725
- SSHKit.config.output = SSHKit::Formatter::Pretty.new($stdout)
726
- SSHKit.config.output = SSHKit::Formatter::Dot.new($stdout)
727
- SSHKit.config.output = SSHKit::Formatter::BlackHole.new($stdout)
728
-
729
- The one and only argument to the formatter is the *String/StringIO*ish object
730
- to which the output should be sent. (It should be possible to stack
731
- formatters, or build a multi-formatter to log, and stream to the screen, for
732
- example)
733
-
734
- The *runner* is now set by `default_options` on the Coordinator class. The
735
- default is still *:parallel*, and can be overridden on the `on()` (or
736
- `Coordinator#each`) calls directly.
737
-
738
- There is no global way to change the runner style for all `on()` calls as of
739
- version `0.0.5`.
740
-
741
- ## 0.0.4
742
-
743
- * Rename the ConnectionManager class to Coordinator, connections are handled
744
- in the backend, if it needs to create some connections.
745
-
746
- ## 0.0.3
747
-
748
- * Refactor the runner classes into an abstract heirarchy.
749
-
750
- ## 0.0.2
751
-
752
- * Include a *Pretty* formatter
753
- * Modify example to use Pretty formatter.
754
- * Move common behaviour to an abstract formatter.
755
- * Formatters no longer inherit StringIO
756
-
757
- ## 0.0.1
758
-
759
- First release.
760
-
761
- [Unreleased]: https://github.com/capistrano/sshkit/compare/v1.18.2...HEAD
762
- [1.18.2]: https://github.com/capistrano/sshkit/compare/v1.18.1...v1.18.2
763
- [1.18.1]: https://github.com/capistrano/sshkit/compare/v1.18.0...v1.18.1
764
- [1.18.0]: https://github.com/capistrano/sshkit/compare/v1.17.0...v1.18.0
765
- [1.17.0]: https://github.com/capistrano/sshkit/compare/v1.16.1...v1.17.0
766
- [1.16.1]: https://github.com/capistrano/sshkit/compare/v1.16.0...v1.16.1
767
- [1.16.0]: https://github.com/capistrano/sshkit/compare/v1.15.1...v1.16.0
768
- [1.15.1]: https://github.com/capistrano/sshkit/compare/v1.15.0...v1.15.1
769
- [1.15.0]: https://github.com/capistrano/sshkit/compare/v1.14.0...v1.15.0
770
- [1.14.0]: https://github.com/capistrano/sshkit/compare/v1.13.1...v1.14.0
771
- [1.13.1]: https://github.com/capistrano/sshkit/compare/v1.13.0...v1.13.1
772
- [1.13.0]: https://github.com/capistrano/sshkit/compare/v1.12.0...v1.13.0
773
- [1.12.0]: https://github.com/capistrano/sshkit/compare/v1.11.5...v1.12.0
774
- [1.11.5]: https://github.com/capistrano/sshkit/compare/v1.11.4...v1.11.5
775
- [1.11.4]: https://github.com/capistrano/sshkit/compare/v1.11.3...v1.11.4
776
- [1.11.3]: https://github.com/capistrano/sshkit/compare/v1.11.2...v1.11.3
777
- [1.11.2]: https://github.com/capistrano/sshkit/compare/v1.11.1...v1.11.2
778
- [1.11.1]: https://github.com/capistrano/sshkit/compare/v1.11.0...v1.11.1
779
- [1.11.0]: https://github.com/capistrano/sshkit/compare/v1.10.0...v1.11.0
1
+ Release notes for this project are kept here: https://github.com/capistrano/sshkit/releases