fedux_org-stdlib 0.6.28 → 0.6.29
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fedux_org_stdlib/app_config.rb +6 -3
- data/lib/fedux_org_stdlib/version.rb +1 -1
- data/spec/app_config_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71dc4bf0767ab3219bc50668bfde8fa9279942b0
|
4
|
+
data.tar.gz: bf133d1dbbd30301f67f417473b38f6ca84e9726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a8483583b670d5a452f8b88addf36f90c208ed14c30ccbe141b9ee1a0d85080479d62cc64d622f80ea43afc72f6c0be9c79fbe95ee4f8e8ae9e9f078b04173a
|
7
|
+
data.tar.gz: 1c23e6c990a2f02daf17f3dbe932f294673baedea15b7ba2651597c1afc24e384c7b4f22339f35eb9c5ea6f674cb86d93b09177bfb383da74e754af1d6371d86
|
data/Gemfile.lock
CHANGED
@@ -226,12 +226,15 @@ module FeduxOrgStdlib
|
|
226
226
|
# @return [String]
|
227
227
|
# An formatted version of the configuration
|
228
228
|
def to_s
|
229
|
+
# header 'length' = 6 letters
|
230
|
+
length = self.class._known_options.inject(6) { |memo, o| o.size > memo ? o.size : memo }
|
231
|
+
|
229
232
|
result = []
|
230
|
-
result << sprintf("
|
231
|
-
result << sprintf("%s + %s", '-' *
|
233
|
+
result << sprintf("%#{length}s | %s", 'option', 'value')
|
234
|
+
result << sprintf("%s + %s", '-' * length, '-' * 80)
|
232
235
|
|
233
236
|
self.class._known_options.each do |o|
|
234
|
-
result << sprintf("
|
237
|
+
result << sprintf("%#{length}s | %s", o, Array(public_send(o)).join(', '))
|
235
238
|
end
|
236
239
|
|
237
240
|
result.join("\n")
|
data/spec/app_config_spec.rb
CHANGED
@@ -353,10 +353,10 @@ RSpec.describe AppConfig do
|
|
353
353
|
|
354
354
|
config = config_klass.new
|
355
355
|
expect(config.to_s).to eq <<-EOS.strip_heredoc.chomp
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
356
|
+
option | value
|
357
|
+
------ + --------------------------------------------------------------------------------
|
358
|
+
opt1 | test1
|
359
|
+
opt2 | test2
|
360
360
|
EOS
|
361
361
|
end
|
362
362
|
end
|
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.6.
|
4
|
+
version: 0.6.29
|
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-
|
11
|
+
date: 2014-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project:
|
196
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.2.2
|
197
197
|
signing_key:
|
198
198
|
specification_version: 4
|
199
199
|
summary: Collection of useful libraries. It maybe depend on external libraries.
|