bmc-sdk-development 0.0.1 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bmc-sdk.rb +10 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9b8172a7e9be24285622b8edf0742b17dcb265cf03dbc6e51e1c70882458a73
4
- data.tar.gz: a2d67cf55a12e57787e77a04d20fcbeffa565ea12b2f3f88a1c5eed5dd6ff4b8
3
+ metadata.gz: f855acb0d7b519821001d017b4dd588500b30dcf2a4dfed061a440af1c02a7e3
4
+ data.tar.gz: 063b6a2bd026248d42bf5d5ce8d37a16f9160dca59b10ea0340a526ffc89850b
5
5
  SHA512:
6
- metadata.gz: 2750dd847b8c823b51e52920672569b07fb74bb80c1c3e65de55b1aa8b00a32070e56252597e2e29c2acaedba529cb3a1d0a09380dbbd6fe157dfaa2d8b1d61a
7
- data.tar.gz: 484864ec591398198d1b3ee2816ce4587f1ff18fd530a67202b09b747ad87981dcd9cb4a08523919ca9e8f2ec73db46caa9cb8777667b82bc2630ed9f52c0615
6
+ metadata.gz: 51a6cf7e4d851d43609ddaededdb4a6445c4f2a8190d30041a5262dafeec7f82c2a79e2a03dbad1ff3f4c83d1fbe5d222f9c09df4a7cecd5e17eb890b2941acf
7
+ data.tar.gz: 67ddb8983d5391659c6da79b7de80a0ebdb03e56a553837fa5935d5b35085558dda5470a7f5c05040eab4e6c80bdbb2ac864adffc78d34f1f2d875ba7f023dac
data/lib/bmc-sdk.rb CHANGED
@@ -30,7 +30,11 @@ module Bmc::Sdk
30
30
 
31
31
  ##
32
32
  # The computed configuration file location based on the current system
33
- ConfigPath = OS.windows? ? Dir.home + WindowsPath : Dir.home + POSIXPath
33
+ begin
34
+ ConfigPath = OS.windows? ? Dir.home + WindowsPath : Dir.home + POSIXPath
35
+ rescue ArgumentError, NoMethodError
36
+ ConfigPath = nil
37
+ end
34
38
 
35
39
  require 'commands.rb'
36
40
  require 'dtos.rb'
@@ -66,7 +70,11 @@ module Bmc::Sdk
66
70
  # load_config loads a YAML file from the expected file path.
67
71
 
68
72
  def load_config
69
- return YAML.load_file(ConfigPath)
73
+ unless ConfigPath.nil?
74
+ return YAML.load_file(ConfigPath)
75
+ else
76
+ raise "No home directory found, consider using the new_client approach"
77
+ end
70
78
  end
71
79
  module_function :load_config
72
80
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmc-sdk-development
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhoenixNAP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-01 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  requirements: []
83
- rubygems_version: 3.2.3
83
+ rubygems_version: 3.1.4
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: An SDK for interacting with the BMC API.