fedux_org-stdlib 0.7.3 → 0.7.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: a2013fc856d9557df8f97c3a0f6d086566b6e60c
4
- data.tar.gz: 35b678a950969f1eac9990b23cc77c752b7bad76
3
+ metadata.gz: 1a0581a33c7705e0cf383ee22339a250b3764ab7
4
+ data.tar.gz: dd8d1a40c3ac246d1f464c2d5aee980ae474e215
5
5
  SHA512:
6
- metadata.gz: e6dbba644c141a67fa2245c949066cefc2e7ed3b786ed81a2accab06ebb6fdcdadc2ba6f32bbd4425911eb0e6059b17652c60d826696e8f71ab3000de959ed9b
7
- data.tar.gz: 8de62934525cd995a05363a57a6add3b191eabe6912d052cf77c38f6341d740ea6221d9a815d0f524d0a6990e34e119089ea79882fc6627ccd04e9c9e2c52cf1
6
+ metadata.gz: 74cceca59dfb67ed4588d7b633f3bfa8a9d22a672f0347963152f7308569300c6c22a14b05adcf4cf568e8383c358f9e0380bdb890893e03450427852d5528f1
7
+ data.tar.gz: bc80bccddfe93a02f30b4a76e878cf7ad86f406e51a375965d9498327041e11d81c0b9d03e97ac134708243e3492e4b71adb452fe2610edf139adc05c1834369
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fedux_org-stdlib (0.7.2)
4
+ fedux_org-stdlib (0.7.3)
5
5
  activesupport
6
6
 
7
7
  PATH
@@ -71,8 +71,8 @@ module FeduxOrgStdlib
71
71
  class AppConfig
72
72
  class << self
73
73
 
74
- # @api private
75
- def _known_options
74
+ # List known options
75
+ def known_options
76
76
  @options ||= Set.new
77
77
  end
78
78
 
@@ -104,7 +104,7 @@ module FeduxOrgStdlib
104
104
  _config.fetch(option, default_value)
105
105
  end
106
106
 
107
- self._known_options << option
107
+ self.known_options << option
108
108
  end
109
109
 
110
110
  # Define a writer for option
@@ -131,7 +131,7 @@ module FeduxOrgStdlib
131
131
  end
132
132
  end
133
133
 
134
- self._known_options << option
134
+ self.known_options << option
135
135
  end
136
136
 
137
137
  # Define a writer and a reader for option
@@ -205,12 +205,12 @@ module FeduxOrgStdlib
205
205
  elsif yaml.kind_of? Hash
206
206
  yaml = yaml.deep_symbolize_keys
207
207
 
208
- yaml_with_known_options = yaml.deep_symbolize_keys.slice(*self.class._known_options)
209
- unknown_options = yaml.keys - yaml_with_known_options.keys
208
+ yaml_withknown_options = yaml.deep_symbolize_keys.slice(*self.class.known_options)
209
+ unknown_options = yaml.keys - yaml_withknown_options.keys
210
210
 
211
211
  logger.warn "Unknown config options #{(unknown_options).to_list} in config file #{file} detected. Please define them in your config class or remove the entries in your config file or disable check via `check_unknown_options: false` to get rid of this warning." unless unknown_options.blank? && check_unknown_options == true
212
212
 
213
- @__config = Hash(yaml_with_known_options)
213
+ @__config = Hash(yaml_withknown_options)
214
214
  else
215
215
  logger.warn "There seems to be a problem transforming config file \"#{file}\" to a hash, therefor I will use an empty config object."
216
216
  @__config = {}
@@ -228,13 +228,13 @@ module FeduxOrgStdlib
228
228
  # An formatted version of the configuration
229
229
  def to_s
230
230
  # header 'length' = 6 letters
231
- length = self.class._known_options.inject(6) { |memo, o| o.size > memo ? o.size : memo }
231
+ length = self.class.known_options.inject(6) { |memo, o| o.size > memo ? o.size : memo }
232
232
 
233
233
  result = []
234
234
  result << sprintf("%#{length}s | %s", 'option', 'value')
235
235
  result << sprintf("%s + %s", '-' * length, '-' * 80)
236
236
 
237
- self.class._known_options.each do |o|
237
+ self.class.known_options.each do |o|
238
238
  value = public_send(o)
239
239
 
240
240
  value = if value == false
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  # FeduxOrgStdlib
3
3
  module FeduxOrgStdlib
4
- VERSION = '0.7.3'
4
+ VERSION = '0.7.4'
5
5
  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.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer