rubyipmi 0.9.2 → 0.9.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: 1fb4c5a2ee5350e88825085a4d8bc8629c0540a7
4
- data.tar.gz: 4e4ecc9f2c3cda0a9bc9d1dc2f95c85f01209abd
3
+ metadata.gz: 73a317277673e2c70ada368153734878751b0697
4
+ data.tar.gz: ca3ae9b2f301a9ed9c4327af190912dc16525e73
5
5
  SHA512:
6
- metadata.gz: 524f30bca98d535eab2ba5ff77a68816f8bcffe6d7c290e2f0024e25f1ccb2c994134fdaba359088d4c9eaec4338f9d8dc64193450c52428573e6fa198f8e5fb
7
- data.tar.gz: d6304c667418b10143d7e9b753a2c2dfab367acbd888de03efc12a589a444cacf10d8e486ee136166626f85b37a5f4dbfd03ddba817576629d6baf20ad58dc67
6
+ metadata.gz: 4b09be14a0edc2c20bc479f4e430311f081daa98601cc064ced0e69b680b8f5c637ecbaf05c505ddf164d7d42ffd9dd7aee8d39f0d03dcf3a36b7b0327257f1a
7
+ data.tar.gz: c56d4d03854fa96d484c515a6e2ac05d47be8fc7f578846901c08a2807fa893a4454ca775e08ff0d57120329b6272edd9afed05c67efa80c66fcbd4426982b10
data/RELEASE_NOTES.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 0.9.3
2
+ * normalize the options being passed into the connect method
3
+
4
+ ### 0.9.2
5
+ * fixes an issue where is_provider_installed? should only return a boolean value instead of raising and error
6
+ * fixes a minor style issue where providers_installed? was returning an array when a boolean might have been expected
7
+
1
8
  ### 0.9.1
2
9
  * fixes an issue with connection_works? api call when command raises an error
3
10
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.3
data/lib/rubyipmi.rb CHANGED
@@ -77,6 +77,14 @@ module Rubyipmi
77
77
  # use this variable to reduce cmd calls
78
78
  installed = false
79
79
 
80
+ # if the user supplied nil, we want to fix this automatically
81
+ opts = {:driver => 'auto', :timeout => 'default'} if opts.nil?
82
+
83
+ # convert all keys to symbols for opts, we can't assume the user will use symbols
84
+ opts.keys.each do |key|
85
+ opts[(key.to_sym rescue key) || key] = opts.delete(key)
86
+ end
87
+
80
88
  # allow the user to specify an options hash instead of the provider
81
89
  # in the future I would stop using the provider and use the opts hash instead to get the provider
82
90
  # This allows us to be a little more flexible if the user is doesn't supply us what we need.
data/rubyipmi.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rubyipmi 0.9.2 ruby lib
5
+ # stub: rubyipmi 0.9.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rubyipmi"
9
- s.version = "0.9.2"
9
+ s.version = "0.9.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Corey Osman"]
14
- s.date = "2015-03-19"
14
+ s.date = "2015-04-10"
15
15
  s.description = "Provides a library for controlling IPMI devices using pure ruby code"
16
16
  s.email = "corey@logicminds.biz"
17
17
  s.extra_rdoc_files = [
@@ -5,6 +5,7 @@ describe :Rubyipmi do
5
5
 
6
6
  before :each do
7
7
 
8
+ allow(Rubyipmi).to receive(:locate_command).with('ipmitool').and_return("#{@path}/ipmitool")
8
9
  end
9
10
 
10
11
  it 'is provider installed should return ipmitool true' do
@@ -27,6 +28,23 @@ describe :Rubyipmi do
27
28
  expect(Rubyipmi.is_provider_installed?('bad_provider')).to be_falsey
28
29
  end
29
30
 
31
+ it 'converts string to symbols' do
32
+ user = "ipmiuser"
33
+ pass = "impipass"
34
+ host = "ipmihost"
35
+ provider = "ipmitool"
36
+ conn = Rubyipmi.connect(user, pass, host, provider, {'driver' => 'lan15'})
37
+ expect(conn.options).to eq({"H"=>"ipmihost", "U"=>"ipmiuser", "P"=>"impipass", "I"=>"lan"})
38
+ end
39
+
40
+ it 'does not error when converting strings to symbols' do
41
+ user = "ipmiuser"
42
+ pass = "impipass"
43
+ host = "ipmihost"
44
+ provider = "ipmitool"
45
+ conn = Rubyipmi.connect(user, pass, host, provider, {:driver => 'lan15'})
46
+ expect(conn.options).to eq({"H"=>"ipmihost", "U"=>"ipmiuser", "P"=>"impipass", "I"=>"lan"})
47
+ end
30
48
  end
31
49
 
32
50
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyipmi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec