motion_print 0.0.2 → 0.0.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: f1e14d0022a0e5d1fc191558ecfe2c57005b666d
4
- data.tar.gz: f3b3d8cba96dab4f8b490ebc15cf9f50b4effd86
3
+ metadata.gz: 12ea4afe2110c7add6e01033f181178c2573430f
4
+ data.tar.gz: 81911bf1c345fcc3c252e448c958e901c69ea910
5
5
  SHA512:
6
- metadata.gz: 7f469c95aaa9f7e5b13eb4d06eba6b939edad8ad0e44928fe43798da339320c75429ecfa7cb8a2c6cc2d2b4fd0d2542cdb9ff0e9305d7101755e6bf6c9e4bd3f
7
- data.tar.gz: 85c69e3a07248eda2b9b0aa6c580d97623dfc1320c7625073344b047375e287dc38c01dff98efe2ea851678fec64f8bfa801068f47886eeef93176467c69697e
6
+ metadata.gz: 4148e6596230e9cf8c2f41e79be53f7287a778a1990058bacc6336a4f93508f425111f22504f4b4af9fda4c8521b820ecdd62968dc524262f58fa870466238b6
7
+ data.tar.gz: 4778dc04007a6b938fc9a0e7ac1ad39e7d798168e17542ed7ad1a56e71b70e91593841e6d5307008c6b191f8ecae95bcc1681eee4ba003f5a73cbff0b5a91b25
@@ -5,8 +5,14 @@ module MotionPrint
5
5
  !!defined?(MotionRepl)
6
6
  end
7
7
 
8
+ def cdq_object
9
+ return CDQManagedObject if defined? CDQManagedObject
10
+ end
11
+
8
12
  def logger(object, indent_level = 1)
9
13
  case object
14
+ when nil
15
+ colorize(object)
10
16
  when Symbol
11
17
  l_symbol object
12
18
  when Array
@@ -19,11 +25,23 @@ module MotionPrint
19
25
  # l_file object
20
26
  # when Struct
21
27
  # l_struct object
28
+ when cdq_object
29
+ l_cdq object, indent_level
22
30
  else
23
31
  colorize(object)
24
32
  end
25
33
  end
26
34
 
35
+ def l_cdq(c, indent_level = 1)
36
+ # Requires CDQ > v0.1.10
37
+ if c.respond_to? :attributes
38
+ "OID: " + colorize(c.oid.gsub('"','')) + "\n" + l_hash(c.attributes, indent_level)
39
+ else
40
+ # old colorless method, still more informative than nothing
41
+ c.log
42
+ end
43
+ end
44
+
27
45
  def l_array(a, indent_level = 1)
28
46
  return "[]" if a.empty?
29
47
  out = []
@@ -1,3 +1,3 @@
1
1
  module MotionPrint
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rickert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon