fedux_org-stdlib 0.7.17 → 0.7.18

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
  SHA1:
3
- metadata.gz: 240f671fac277d1dc2adf2cb194d01a81413d71c
4
- data.tar.gz: f965cf7fb5772abf3e082a47d1b58eb14d7cecb4
3
+ metadata.gz: e61674d3165d7c29ddbfb16ff957f435e945e67f
4
+ data.tar.gz: 2b53ee529f9b9eac666c1624c0cc6d88876c88be
5
5
  SHA512:
6
- metadata.gz: 8d7ebd39d190dbd685d651e40be2aae536968a0a504495f0ebc7343febf05f96631e77ebcf789b112abe677a656a715193cb9f3401273207e0f07f7fc69fbab5
7
- data.tar.gz: d5890bdff2c34b7072b1fadc4f1a3c8760ffe53ea2a4570177a407d7f8d37e10f5be6117bc5c402bf1ce2b1acc26a9abf908712b989ff7f0449351a80f7ef6dc
6
+ metadata.gz: 6e6a1038779d52203f2e352f616531edbdcfbb2fa255c5defe7fc6e9de04201b938a88c68b5b722d3be890172e0463e331070fb3e3b8216ec207cc82adec89b1
7
+ data.tar.gz: a2d3f1d00fc557bff6221f7f2eb8d4f7f5eb6641a0f3a35f1441854a5e6adb691d74678d2b4ba4ee59b7a2694700889d2e5c8ec77cdfd66a2cd508e1f55526cd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fedux_org-stdlib (0.7.16)
4
+ fedux_org-stdlib (0.7.17)
5
5
  activesupport
6
6
 
7
7
  PATH
@@ -1,17 +1,20 @@
1
1
  # encoding: utf-8
2
2
  require 'fedux_org_stdlib/require_files'
3
+ require 'fedux_org_stdlib/core_ext/string/underline'
3
4
  require_library %w{ facter }
4
5
 
5
6
  module FeduxOrgStdlib
6
7
  class SupportInformation
7
8
  private
8
9
 
9
- attr_reader :logger
10
+ attr_reader :logger, :headlines, :underline_character
10
11
 
11
12
  public
12
13
 
13
- def initialize(logger: FeduxOrgStdlib::Logging::Logger.new)
14
- @logger = logger
14
+ def initialize(logger: FeduxOrgStdlib::Logging::Logger.new, headlines: {}, underline_character: '-')
15
+ @logger = logger
16
+ @headlines = headlines
17
+ @underline_character = underline_character
15
18
  end
16
19
 
17
20
  # Output support information as string
@@ -23,6 +26,7 @@ module FeduxOrgStdlib
23
26
 
24
27
  max_field_length = determine_max_field_length(facter_fields)
25
28
 
29
+ result << headlines.fetch(:system_information, 'System Information').underline(character: underline_character)
26
30
  result << format("%#{max_field_length}s | %s", 'Information', 'Value')
27
31
  result << format("%s + %s", '-' * max_field_length, '-' * 40)
28
32
  result.concat system_information.sort_by { |key, value| key }.map { |key, value| format("%#{max_field_length}s | %s", key, value) }
@@ -33,6 +37,7 @@ module FeduxOrgStdlib
33
37
 
34
38
  max_field_length = determine_max_field_length(rubygems_information.keys)
35
39
 
40
+ result << headlines.fetch(:rubygems_information, 'Rubygems Information').underline(character: underline_character)
36
41
  result << format("%#{max_field_length}s | %s", 'Information', 'Value')
37
42
  result << format("%s + %s", '-' * max_field_length, '-' * 40)
38
43
  result.concat rubygems_information.sort_by { |key, value| key }.map { |key, value| format("%#{max_field_length}s | %s", key, value) }
@@ -43,6 +48,7 @@ module FeduxOrgStdlib
43
48
 
44
49
  max_field_length = determine_max_field_length(installed_rubygems.keys)
45
50
 
51
+ result << headlines.fetch(:installed_rubygems, 'Installed Rubygems').underline(character: underline_character)
46
52
  result << format("%#{max_field_length}s | %s", 'Name', 'version')
47
53
  result << format("%s + %s", '-' * max_field_length, '-' * 40)
48
54
  result.concat installed_rubygems.sort_by { |key, value| key }.map { |key, value| format("%#{max_field_length}s | %s", key, value) }
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  # FeduxOrgStdlib
3
3
  module FeduxOrgStdlib
4
- VERSION = '0.7.17'
4
+ VERSION = '0.7.18'
5
5
  end
@@ -38,7 +38,6 @@ RSpec.describe GemPlugins::PluginManager do
38
38
  manager.disable_plugin 'plugin-no_load'
39
39
  manager.load_plugins
40
40
 
41
- binding.pry
42
41
  expect(manager.to_s).to include 'plugin'
43
42
  end
44
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedux_org-stdlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.17
4
+ version: 0.7.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer