nucleon 0.1.13 → 0.1.14

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: f70ed4e699ce46380540f987964c6dc765f542a0
4
- data.tar.gz: 291ade54e0558e342f349adc551b0ebd7d0bf492
3
+ metadata.gz: 48e62bf112b4bd13ecd4f96651ce25a420c1bcbd
4
+ data.tar.gz: 5d0ea41b9a3e78b341f948fad1f457bd006336df
5
5
  SHA512:
6
- metadata.gz: 19ba8e9c5ccfb4bbbcc44115ceda60d0af1f11879e65e10d81b4ce4b5ff11e69da0d03648a899c236197a7fb1e8e1944145965e8228213c8f9623956ebf8cdd4
7
- data.tar.gz: 970bef07364f59149c7c87cd20b598b1cb9372709e04a10aad3d3a7187818d7fb85423be7d0fb86cc4602bc1398d1ced493815f62ab3b5a6c4381fde730f9c80
6
+ metadata.gz: 6aacc8129db572a34d23ed12c7ec265c34319de350aed2b1e9a86a9e385ed0a41a299b196952beaf5ab79fcd28668243980086b941c672e116fc9b18fbfbfb99
7
+ data.tar.gz: 3e030e1bddd136de67db37f7d8838f13f866511f2910500655b58a6965e7ca0aa5624fa9fe8180d137bd66b46dadee3e6a8e5a3348a9d7e29494b1481faa48e5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.13
1
+ 0.1.14
@@ -282,6 +282,27 @@ module ObjectInterface
282
282
 
283
283
  # TODO: Figure out a way to effectively cache this search operation
284
284
  #------------------------------------------------------------------
285
+
286
+ add_settings = lambda do |final_options, obj_settings|
287
+ if obj_settings
288
+ local_options = {}
289
+ array(obj_settings).each do |group_name|
290
+ if group_options = Marshal.load(Marshal.dump(settings(group_name)))
291
+ if group_options.has_key?(:settings)
292
+ group_options = add_settings.call(group_options, group_options[:settings])
293
+ end
294
+ local_options = Util::Data.merge([ local_options, group_options ], true)
295
+ end
296
+ end
297
+ unless local_options.empty?
298
+ final_options = Util::Data.merge([ local_options, final_options ], true)
299
+ end
300
+ end
301
+ final_options
302
+ end
303
+
304
+ #---
305
+
285
306
  settings = {}
286
307
 
287
308
  keys = [ keys ] unless keys.is_a?(Array)
@@ -291,26 +312,15 @@ module ObjectInterface
291
312
 
292
313
  logger.debug("Searching specialized settings")
293
314
  until temp.empty? do
294
- if obj_settings = obj_config.get([ temp, :settings ])
295
- array(obj_settings).each do |group_name|
296
- if group_settings = Marshal.load(Marshal.dump(settings(group_name)))
297
- settings = Util::Data.merge([ group_settings.dup, settings ], true)
298
- end
299
- end
300
- end
315
+ settings = add_settings.call(settings, obj_config.get([ temp, :settings ]))
301
316
  temp.pop
302
317
  end
303
318
 
304
319
  logger.debug("Specialized settings found: #{settings.inspect}")
305
320
  logger.debug("Searching general settings")
306
-
307
- if obj_settings = obj_config.get(:settings)
308
- array(obj_settings).each do |group_name|
309
- if group_settings = Marshal.load(Marshal.dump(settings(group_name)))
310
- settings = Util::Data.merge([ group_settings, settings ], true)
311
- end
312
- end
313
- end
321
+
322
+ settings = add_settings.call(settings, obj_config.get(:settings))
323
+
314
324
  #------------------------------------------------------------------
315
325
  # TODO: Cache the above!!!
316
326
 
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: nucleon 0.1.13 ruby lib
5
+ # stub: nucleon 0.1.14 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "nucleon"
9
- s.version = "0.1.13"
9
+ s.version = "0.1.14"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Adrian Webb"]
14
- s.date = "2014-04-14"
14
+ s.date = "2014-04-15"
15
15
  s.description = "\nA framework that provides a simple foundation for building Ruby applications that are:\n\n* Highly configurable (with both distributed and persistent configurations)\n* Extremely pluggable and extendable\n* Easily parallel\n\nNote: This framework is still very early in development!\n"
16
16
  s.email = "adrian.webb@coralnexus.com"
17
17
  s.executables = ["nucleon"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nucleon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Webb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-14 00:00:00.000000000 Z
11
+ date: 2014-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: log4r