quiverstaskrunner 0.1.254558 → 0.1.254562
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quiverstaskrunner/helpers/clihelper.rb +3 -4
- data/lib/quiverstaskrunner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 980268acfa25464daf6109ffc7da2a53ea2da0ee
|
4
|
+
data.tar.gz: 61b652653a8b6ae0782d8fa572a96a4aa6149b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b034e1680b92f563ccf981472818d8b4409864d77e233a2174766cf9e3f6704a235270b4636253ec3e7aeb00349b043a4b880442c845010c4277cec580e9fa
|
7
|
+
data.tar.gz: fcfc7277ecb8a2edad3f459ce23b05f459941257029cd4206871013dc76f246fae2454be3b1a684e2ead7bf4111ea7d8fa8ffcfbd6b0dbae7a58220609767b65
|
@@ -6,15 +6,14 @@ module QuiversTaskrunner
|
|
6
6
|
def self.pretty_print(object, indent=0)
|
7
7
|
indent_space = (1..indent).map { |x| @@indent_unit }.join('')
|
8
8
|
next_indent_space = (1..(indent+1)).map { |x| @@indent_unit }.join('')
|
9
|
-
|
10
|
-
|
11
|
-
if object.is_a?(Hash)
|
9
|
+
if !object.nil?
|
10
|
+
if (object.is_a?(Hash)) && (!object.empty?)
|
12
11
|
open_bracket = "{"
|
13
12
|
body = object.map { |k,v| "#{next_indent_space}\"#{k}\" => #{CliHelper.pretty_print(v, indent+1)}" }.join(",#{@@cr}")
|
14
13
|
close_bracket = "#{indent_space}}"
|
15
14
|
|
16
15
|
return [ open_bracket, body, close_bracket].join(@@cr)
|
17
|
-
elsif object.is_a?(Array)
|
16
|
+
elsif (object.is_a?(Array)) && (!object.empty?)
|
18
17
|
open_bracket = "["
|
19
18
|
body = object.map { |v| "#{next_indent_space}#{CliHelper.pretty_print(v, indent+1)}" }.join(",#{@@cr}")
|
20
19
|
close_bracket = "#{indent_space}]"
|
@@ -1 +1 @@
|
|
1
|
-
module QuiversTaskrunner
|
1
|
+
module QuiversTaskrunner
|