idrac 0.1.40 → 0.1.41

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.
data/lib/idrac/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IDRAC
4
- VERSION = "0.1.40"
4
+ VERSION = "0.1.41"
5
5
  end
data/lib/idrac.rb CHANGED
@@ -10,18 +10,39 @@ require 'colorize'
10
10
  # If dev, required debug
11
11
  require 'debug' if ENV['RUBY_ENV'] == 'development'
12
12
 
13
- require_relative "idrac/version"
14
- require_relative "idrac/error"
15
- require_relative "idrac/session"
16
- require_relative "idrac/web"
17
- require_relative "idrac/client"
18
- require_relative "idrac/firmware"
19
- require_relative "idrac/firmware_catalog"
20
-
21
13
  module IDRAC
14
+ # Provides debugging functionality to IDRAC classes
15
+ module Debuggable
16
+ # Debug output helper - only outputs if verbosity level is high enough
17
+ def debug(message, level = 0, color = :light_cyan)
18
+ return unless respond_to?(:verbosity) && verbosity >= level
19
+ color_method = color.is_a?(Symbol) && String.method_defined?(color) ? color : :to_s
20
+ puts message.send(color_method)
21
+
22
+ # For highest verbosity, also print stack trace
23
+ if respond_to?(:verbosity) && verbosity >= 3 && caller.length > 1
24
+ puts " Called from:".light_yellow
25
+ caller[1..3].each do |call|
26
+ puts " #{call}".light_yellow
27
+ end
28
+ end
29
+ end
30
+ end
31
+
22
32
  class Error < StandardError; end
23
33
 
24
34
  def self.new(options = {})
25
35
  Client.new(options)
26
36
  end
27
37
  end
38
+
39
+ require_relative "idrac/version"
40
+ require_relative "idrac/error"
41
+ require_relative "idrac/session"
42
+ require_relative "idrac/web"
43
+ require_relative "idrac/power"
44
+ require_relative "idrac/jobs"
45
+ require_relative "idrac/lifecycle"
46
+ require_relative "idrac/client"
47
+ require_relative "idrac/firmware"
48
+ require_relative "idrac/firmware_catalog"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Siegel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-02 00:00:00.000000000 Z
11
+ date: 2025-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -224,6 +224,9 @@ files:
224
224
  - lib/idrac/error.rb
225
225
  - lib/idrac/firmware.rb
226
226
  - lib/idrac/firmware_catalog.rb
227
+ - lib/idrac/jobs.rb
228
+ - lib/idrac/lifecycle.rb
229
+ - lib/idrac/power.rb
227
230
  - lib/idrac/session.rb
228
231
  - lib/idrac/version.rb
229
232
  - lib/idrac/web.rb