fedux_org-stdlib 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fedux_org_stdlib/list.rb +2 -2
- data/lib/fedux_org_stdlib/version.rb +1 -1
- data/spec/list_spec.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b853439520dde85108744f24b94463130791d82
|
4
|
+
data.tar.gz: 8f97edebdae65cd7cf58fd3a402ad3feb81d98f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09192109cee44cc63e2364cb48954f75779dcf1d5b23bf537bff096c874b52da9ced615594720363e9775eb460da5162d1ad3ee00996e8ed679ae5e0170c77b3
|
7
|
+
data.tar.gz: 05671174c5b4691e01b25a364e8471cfbcd093d5d95862a28e068ec810999f8f85372b3d6688df3f6a392e2cfdac05ed68c8877b46ecf7b355b6fa4f0276577b
|
@@ -36,8 +36,8 @@ module FeduxOrgStdlib
|
|
36
36
|
#
|
37
37
|
# @param [Hash] options
|
38
38
|
# Options which are supported by Hirb
|
39
|
-
def to_s(**options)
|
40
|
-
Hirb::Helpers::Table.render data, header_filter: proc(&:humanize), **options
|
39
|
+
def to_s(max_width: ENV['COLUMNS'].to_i, **options)
|
40
|
+
Hirb::Helpers::Table.render data, header_filter: proc(&:humanize), max_width: max_width, **options
|
41
41
|
end
|
42
42
|
|
43
43
|
# Data as array
|
data/spec/list_spec.rb
CHANGED
@@ -31,9 +31,10 @@ RSpec.describe List do
|
|
31
31
|
it 'passes options to table helper' do
|
32
32
|
list = List.new(name: 'user1', age: 30)
|
33
33
|
expect_result = <<-EOS.strip_heredoc
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
****** 1. row ******
|
35
|
+
Age: 30
|
36
|
+
Name: user1
|
37
|
+
1 row in set
|
37
38
|
EOS
|
38
39
|
|
39
40
|
expect(list.to_s(style: :vertical)).to include expect_result
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fedux_org-stdlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Meyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|