L2 0.5.1 → 0.5.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/L2.rb +4 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1260aec7e85dc8ab823d5c3934d3109004978f8696a5b33a2ce074b58a255f5f
4
- data.tar.gz: c307860877c31b19ad2fb3bd4b84ebb151dc7d5378a56291b50214efa63daa91
3
+ metadata.gz: 8f5e9930b82ffc7f5f3a66591eee6ffc2c97a1db169bb202f39fb39871fecb69
4
+ data.tar.gz: 64b6423227df08d3b7796a8b087cb761b1e3aaf9bf17956718174dc6ca965af7
5
5
  SHA512:
6
- metadata.gz: f41b27e3c76c37599b3c25cfc2311c93ab9bbb4d6082b35c5d221ae701208e7083f569158d3ab992da5a9c5a87264e5d8f897e95ba44aef8c189af5c8e9cd24b
7
- data.tar.gz: 5b6c3500eecbb3485a51642062462e70e507b3f6f29a4c1be17b88a8348309bacdc7ded21e4ef24d938a185a499c0e611a3ddff2a388111ef81e100779b5277b
6
+ metadata.gz: d6fe2e60bbeadec8ff814e7484236a3045d1d35fe0ab8fdd658eb49d5bc1059ee08a55b946650a3cf415ec2a7d705b98d2ea43c97cd90466b73a6aa96cbf2855
7
+ data.tar.gz: 88011e6b7a0160c64cb3381c6580f9bf11d248fd5fe2b5a047f3639477ba05902d4a7d59cadce53f36ba26b47631b31baba55d61edb3a169ba351f8002d1a23d
data/lib/L2.rb CHANGED
@@ -58,7 +58,7 @@ module L2
58
58
 
59
59
  # calculate the console width
60
60
  # tputcols is not available on windows
61
- WIDTH = `tput cols`.to_i rescue 5;
61
+ WIDTH = `tput cols`.to_i rescue 1;
62
62
 
63
63
 
64
64
  def self.m *messages
@@ -238,7 +238,10 @@ module L2
238
238
 
239
239
 
240
240
  def self.pretty(message, colour = :default, bg_colour = :default)
241
+
241
242
  width = WIDTH - message.length - 4
243
+ width = 1 if width.negative?
244
+
242
245
  return colorize("\ \ #{ message } #{"\ " * width}", colour, bg_colour)
243
246
  end
244
247
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: L2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -39,7 +39,7 @@ metadata:
39
39
  homepage_uri: https://github.com/LesliTech/L2
40
40
  source_code_uri: https://github.com/LesliTech/L2
41
41
  bug_tracker_uri: https://github.com/LesliTech/L2/issues
42
- changelog_uri: https://github.com/LesliTech/L2/releases/tag/v0.5.1
42
+ changelog_uri: https://github.com/LesliTech/L2/releases/tag/v0.5.2
43
43
  post_install_message:
44
44
  rdoc_options: []
45
45
  require_paths: