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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b7706d5689b8d8ec5895fa2f7ebb7830d948fb2
4
- data.tar.gz: b4b9980d307c7b998708d2ce235abd427808a2d9
3
+ metadata.gz: 980268acfa25464daf6109ffc7da2a53ea2da0ee
4
+ data.tar.gz: 61b652653a8b6ae0782d8fa572a96a4aa6149b1f
5
5
  SHA512:
6
- metadata.gz: 9124e1c59c79968d71b38cf0020f2f049d3af8f5523c402f9dc7dd05a8dd03e104f42450312d9af91ba50f6c26a12fc0c947beaa6129b4cf2027e9935caa0059
7
- data.tar.gz: 4bcf3ccc267343a25d95f873af5127064b0f95f59131d802584329884459f67d7e8c6b0f8e06ef55af8c1dad2073d249f07c7b041da1b50c58116791fcfe9395
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
- puts object
10
- if (!object.nil?) && (!object.empty?)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quiverstaskrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.254558
4
+ version: 0.1.254562
5
5
  platform: ruby
6
6
  authors:
7
7
  - ndao