sshkit 1.19.0 → 1.21.2

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