greenhat 0.7.1 → 0.7.2

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
  SHA256:
3
- metadata.gz: 59cf0b783668bbd10f045e7c245359262549aacb781dab57da33af64ff37332b
4
- data.tar.gz: b75a278308026c29ea1fd374c5377a49422168bf14320488cb1992661fb11784
3
+ metadata.gz: ba6197971082cb194c319fd71d5353d6be2329445c6808cabed9b764a9ab74c7
4
+ data.tar.gz: c319e5bbf5dd591a70ca1195d20dd0fd79c7642fde4b95f45c4f88da9f153c5f
5
5
  SHA512:
6
- metadata.gz: dcb1078556170ae64c046173c1e8c8b947795cc8eab3d39bf133c8046383fddafe4f47383fe353ea2926010865b6c3d3c1a7dcb92e03e2347a039d7120c33f27
7
- data.tar.gz: 4f5eb83041777d345d0e60a649898454a51c96f9f1cfd350fa7428771d3602e1941ec1715430294330c1b8f89422ec355796c1fd98a3ed69fffdda8a6c7d9b39
6
+ metadata.gz: fb274b40665cebb795104e7eef72f968928e916a811146811b7607c4d048950291c540ac8d8eec3f1fe74acdb91a15e1acbd52c8d2bb69ce612c8e6f313bdde7
7
+ data.tar.gz: 849ce3aa1d387ac0294b86b3bf75b3451eff3278bd229c2b43c960228c689425aa6ee7bbc9a7a1b26d100e072da537a88ad286e888bda76a219f0cd1341d4b7f
data/lib/greenhat/motd.rb CHANGED
@@ -27,6 +27,8 @@ module GreenHat
27
27
 
28
28
  def self.gitlab_rb
29
29
  file = Thing.find_by(name: 'gitlab/gitlab.rb')
30
+
31
+ return if file.nil?
30
32
  return unless file.raw_full.length > 3
31
33
 
32
34
  puts 'gitlab/gitlab.rb'.ljust(25, ' ').pastel(:bright_black) + check
@@ -7,7 +7,11 @@ module GreenHat
7
7
  end
8
8
 
9
9
  def table_style
10
- flags[:table_style]&.to_sym || :unicode
10
+ if flags[:table_style] == true
11
+ :basic
12
+ else
13
+ flags[:table_style]&.to_sym || :unicode
14
+ end
11
15
  end
12
16
 
13
17
  def stats
@@ -16,6 +16,8 @@ module GreenHat
16
16
  when Array
17
17
  # Check for Nested Arrays (Array Table)
18
18
  if data.first.instance_of? Array
19
+ return if data.flatten.empty? # Don't try to render empty arrays
20
+
19
21
  render_array_table(data)
20
22
  else
21
23
  self.output = data
@@ -39,7 +41,7 @@ module GreenHat
39
41
  end
40
42
 
41
43
  # Line breaks for basic tables
42
- self.output += "\n" if table_style == :basic
44
+ self.output += "\n\n" if table_style == :basic
43
45
  rescue StandardError => e
44
46
  if ENV['DEBUG']
45
47
  LogBot.warn('Table', message: e.message)
@@ -1,3 +1,3 @@
1
1
  module GreenHat
2
- VERSION = '0.7.1'.freeze
2
+ VERSION = '0.7.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenhat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davin Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-31 00:00:00.000000000 Z
11
+ date: 2023-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print