console_table 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20cc9ca26b036bfe447968e6e351a9c701a22e56
4
- data.tar.gz: 3dff948fbf2f07604b93189d323b6d55a69efba3
3
+ metadata.gz: ab7d82bb06f02ef3d9801e976dadf6c7db1cbd3f
4
+ data.tar.gz: 22494271d6b5d07cefd7e08b86cdf2bcb8e3454b
5
5
  SHA512:
6
- metadata.gz: 1da3fe51b14f347d17e7670840d00a13c73599e4642518f9ae94769205dc74c222676fbad746b3c4719d476c8125131eaa4a2aac6f94b1d38606f462ad4b5bd0
7
- data.tar.gz: 920c48265acf2873c2ff40e86d17ea250a6ef8641b278bc4af148e380951984c625d50dd0c904b646ee3c50f0f2a9301c0ae2f31042db981ebd0033e96ed16fd
6
+ metadata.gz: 4b67854940872e00d6f531025bd67507cc22961271e44782bce78c61360a5b85ceb63044694c531482087a94d620b08ecc8ec2b0044fc75ee5a47487050780af
7
+ data.tar.gz: cef3669df0150ef6cc49a8e43557440999026c30d70e82707706963649699247b4fc8fa65f002697d25277751263bec9985f2ddd020fcd34385b8c4ed5638c02
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "console_table"
7
- spec.version = "0.2.3"
7
+ spec.version = "0.2.4"
8
8
  spec.authors = ["Rod Hilton"]
9
9
  spec.email = ["consoletable@rodhilton.com"]
10
10
  spec.summary = %q{Simplifies printing tables of information to commandline consoles}
@@ -16,6 +16,7 @@ module ConsoleTable
16
16
  end
17
17
 
18
18
  class ConsoleTableClass
19
+ require 'terminfo'
19
20
 
20
21
  # Add strings to the footer array to have them formatted when the table closes
21
22
  attr_reader :footer
@@ -277,14 +278,12 @@ module ConsoleTable
277
278
 
278
279
  total_width = @set_width
279
280
  begin
280
- require 'terminfo'
281
281
  total_width = TermInfo.screen_columns
282
282
  rescue => ex
283
- total_width = ENV["COLUMNS"].to_i || 79
283
+ total_width = ENV["COLUMNS"].to_i unless ENV["COLUMNS"].nil?
284
+ total_width = 79 if total_width.nil?
284
285
  end if total_width.nil?
285
286
 
286
- working_column_layout = []
287
-
288
287
  keys = @original_column_layout.collect { |d| d[:key] }.uniq
289
288
  if keys.length < @original_column_layout.length
290
289
  raise("ConsoleTable configuration invalid, same key defined more than once")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rod Hilton