consolr 1.1.2 → 1.1.3

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
2
  SHA1:
3
- metadata.gz: 7eb31e066e210418fbe7c6322611f76d988a49fc
4
- data.tar.gz: dcfe84428f442dd250f542d7ed08816e623568c4
3
+ metadata.gz: a508a9f27ad22e59d1dc29480259e48d484cdde9
4
+ data.tar.gz: afa9831abc4ed16dcf009193411d0061aece3c49
5
5
  SHA512:
6
- metadata.gz: 69348501f3c78ea1c7ceb8849cb7737729ef005617d4b8cf6abc218fd83871a9131bb4107960539db3dd2810431006579bc7ca266db16af52bbc31404218217a
7
- data.tar.gz: abfb2941c47af3c9764a443d78fed46a42921deb879374b264927a6b11e7a86a9199e171430fa1bfba6786e8013d6e57bb550e72354e475671246ec1aedca8c1
6
+ metadata.gz: 99774ce8839bc823f20f421fd61fbd7199b0bfc014f3d8bc2a360408b16427e1527e3e22beeb5f28867b52af1bb827854c5e423f52fde758ce8650c66829f09e
7
+ data.tar.gz: 1dbf503be95263b4b9e806f3e545bea7bb8d272b986881831c1bcafd9e4226db8097677f87f4d2c007bf5003d648395a9211ff26f7e7f51edb51944cb0b0e6e6
@@ -1,3 +1,3 @@
1
1
  module Consolr
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
data/lib/consolr.rb CHANGED
@@ -12,11 +12,19 @@ module Consolr
12
12
  attr_reader :ipmitool_exec, :dangerous_assets, :dangerous_status, :dangerous_actions, :options, :opt_parser
13
13
 
14
14
  def initialize
15
- config_file = [ENV['CONSOLR_CONFIG'],
16
- '~/.consolr.yml', '~/.consolr.yaml',
17
- '/etc/consolr.yml', '/etc/consolr.yaml',
18
- '/var/db/consolr.yml', '/var/db/consolr.yaml'].compact.find do |conf|
19
- File.readable?(File.expand_path(conf, __FILE__)) and File.size(File.expand_path(conf, __FILE__)) > 0
15
+ potential_config_paths = [ENV['CONSOLR_CONFIG'],
16
+ '~/.consolr.yml', '~/.consolr.yaml',
17
+ '/etc/consolr.yml', '/etc/consolr.yaml',
18
+ '/var/db/consolr.yml', '/var/db/consolr.yaml']
19
+ config_file = potential_config_paths.compact.find do |conf|
20
+ begin
21
+ expanded_path = File.expand_path(conf, __FILE__)
22
+ File.readable?(expand_path) and File.size(expand_path) > 0
23
+ rescue ArgumentError
24
+ # if $HOME is not set, or if `~` cannot be expanded, `expand_path` will throw and ArgumentError
25
+ # in that case, just go to the next potential config file - this one obviously will not work
26
+ false
27
+ end
20
28
  end
21
29
 
22
30
  @config_params = begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consolr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Richard
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.4.8
159
+ rubygems_version: 2.4.6
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: consolr is a pure ruby wrapper over IPMI to allow Out of Band communiation