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 +4 -4
- data/motion/motion_print/motion_print.rb +18 -0
- data/motion/motion_print/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12ea4afe2110c7add6e01033f181178c2573430f
|
4
|
+
data.tar.gz: 81911bf1c345fcc3c252e448c958e901c69ea910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = []
|
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.
|
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-
|
11
|
+
date: 2014-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bacon
|