kondate 0.4.13 → 0.4.14

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: 7813919c569904c53baf4c6d2cb9a16f70b1cf1a
4
- data.tar.gz: eb7ec59e0efae2a9ffd3cd40c3cfa96dd4190ee3
3
+ metadata.gz: 4f4016b800044110c5f1914d717121a740481abb
4
+ data.tar.gz: d2d83388b006f1df5b17dd6e1daa6f0e874b764e
5
5
  SHA512:
6
- metadata.gz: 8cd8af292e79696ccbc05c56dc0871c61650676029177417cb7caa80230a6ab0c172804fddfc1adec18d51cadbfb8bc9eae4e00be3a83175f5511197503dc6c6
7
- data.tar.gz: df119a15ea7614d09924105d790e27b1808e917b5bae051c9b828fb0fe9626f47857ffe09b9115f6008cab3088ebd8f2315e962e9e5c67cbfa1b0668300cb132
6
+ metadata.gz: 9ac9f32b64c6b633a88e99d3f22b7a1234817c5528f2d9eb32ca9bda6c84ffe9b79408c9157deb73e9336ff4ddac8f341bc5bdfff346e51d11d04c3afc95a4d7
7
+ data.tar.gz: 7cfd62d55909477eda7b89a174b0d153516657720db131b0a0aeca295e9abecb16d0ee2fa3f61ac57fe1f347e07242bace3fdc1e916bbbe845d571209a9dd36c
@@ -1,3 +1,9 @@
1
+ # 0.4.14 (2017-03-27)
2
+
3
+ Reverts:
4
+
5
+ * Fallback to ENV['USER'] rather than Etc.getlogin if ssh_config[:ssh_user] is not available
6
+
1
7
  # 0.4.13 (2017-03-27)
2
8
 
3
9
  Enhancements:
@@ -147,7 +147,9 @@ module Kondate
147
147
  else
148
148
  # itamae itself sees Net:SSH::Config.for(host)
149
149
  # here, we set ssh config if property file specially specifies
150
- command << " -u #{properties['ssh_user']}" if properties['ssh_user']
150
+ config = Net::SSH::Config.for(host, Net::SSH::Config.default_files)
151
+ # itamae fallbacks to Etc.getlogin, but we prefer to fallback to ENV['USER'], then Etc.getlogin
152
+ command << " -u #{properties['ssh_user'] || config[:user] || ENV['USER'] || ENV['LOGNAME'] || Etc.getlogin || Etc.getpwuid.name}"
151
153
  command << " -i #{(Array(properties['ssh_keys']) || []).first}" if properties['ssh_keys']
152
154
  command << " -p #{properties['ssh_port']}" if properties['ssh_port']
153
155
  end
@@ -1,3 +1,3 @@
1
1
  module Kondate
2
- VERSION = "0.4.13"
2
+ VERSION = "0.4.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kondate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - sonots