sshkit 0.0.32 → 0.0.33

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
  SHA1:
3
- metadata.gz: adba0b2b8ee9c2ecd9c7a18e4b5105a0d7d65327
4
- data.tar.gz: e8bf3a4f035431a7bc045d0d81e3e50ede3523bb
3
+ metadata.gz: 324909062c6ba178db01c1b415cb44632aded0e4
4
+ data.tar.gz: d5cf7ed31688bc73f277bfca22f7709479f616e9
5
5
  SHA512:
6
- metadata.gz: b1543b130f2034cf6cc81738ed64f458e12b52227dd08e60d9ffd4f1d67175b8a47a42cfeac3296e64c8266260b55e102b3430b7b0ad9753a637e75682dd8042
7
- data.tar.gz: 5fd88eb2a5ae471ca9b6bb3f5e9d529966f040041ec03cd56f701f512fd3d689b591584500fa321b5e3b0f48284154ee7363fa93b29d48072fc4faea1db8cfba
6
+ metadata.gz: a30e0cf010601387eb7918fe6c730703a74848440085f437c36cf18669cb9884e303b08b8cd7f71ff0d028fa8f74d78b717c554689be24edeed6cceb11056906
7
+ data.tar.gz: dbbe5738efe368b0089e8226018832cb343583a970a3db0148c1f083c21b911582bb96eb74011bd92a2d42c23483218846fc760e473200919792a5493228f9eb
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  This file is written in reverse chronological order, newer releases will
4
4
  appear at the top.
5
5
 
6
+ ## 0.0.32
7
+
8
+ * Lots of small changes since 0.0.27.
9
+ * Particularly working around a possible NaN issue when uploading
10
+ comparatively large files.
11
+
6
12
  ## 0.0.27
7
13
 
8
14
  * Don't clobber SSH options with empty values. This allows Net::SSH to
@@ -61,11 +61,15 @@ module SSHKit
61
61
 
62
62
  def upload!(local, remote, options = {})
63
63
  ssh.scp.upload!(local, remote, options) do |ch, name, sent, total|
64
- percentage = (sent.to_f * 100 / total.to_f).to_i
65
- if percentage > 0 && percentage % 10 == 0
66
- info "Uploading #{name} #{percentage}%"
64
+ percentage = (sent.to_f * 100 / total.to_f)
65
+ unless percentage.nan?
66
+ if percentage > 0 && percentage % 10 == 0
67
+ info "Uploading #{name} #{percentage}%"
68
+ else
69
+ debug "Uploading #{name} #{percentage}%"
70
+ end
67
71
  else
68
- debug "Uploading #{name} #{percentage}%"
72
+ warn "Error calculating percentage #{percentage} is NaN"
69
73
  end
70
74
  end
71
75
  end
@@ -6,7 +6,7 @@ module SSHKit
6
6
 
7
7
  def initialize(raw_hosts)
8
8
  @raw_hosts = Array(raw_hosts)
9
- raise SSHKit::NoValidHosts unless Array(raw_hosts).any?
9
+ raise "No matching hosts!" unless Array(raw_hosts).any?
10
10
  resolve_hosts!
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module SSHKit
2
- VERSION = "0.0.32"
2
+ VERSION = "0.0.33"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.32
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Hambley
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-08 00:00:00.000000000 Z
12
+ date: 2013-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh