ruby-nuggets 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.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to ruby-nuggets version 0.7.3
5
+ This documentation refers to ruby-nuggets version 0.7.4
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -157,13 +157,21 @@ module Util
157
157
  end
158
158
  end
159
159
 
160
+ def load_config(file = options[:config] || defaults[:config])
161
+ @config = YAML.load_file(file) if File.readable?(file)
162
+ end
163
+
164
+ def merge_config(args = [config, defaults])
165
+ args.each { |hash| hash.each { |key, value|
166
+ options[key] = value unless options.has_key?(key)
167
+ } }
168
+ end
169
+
160
170
  def parse_options(arguments)
161
171
  option_parser.parse!(arguments)
162
172
 
163
- config_file = options[:config] || defaults[:config]
164
- @config = YAML.load_file(config_file) if File.readable?(config_file)
165
-
166
- [config, defaults].each { |hash| hash.each { |key, value| options[key] ||= value } }
173
+ load_config
174
+ merge_config
167
175
  end
168
176
 
169
177
  def option_parser
@@ -4,7 +4,7 @@ module Nuggets
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 7
7
- TINY = 3
7
+ TINY = 4
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-nuggets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 3
10
- version: 0.7.3
9
+ - 4
10
+ version: 0.7.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jens Wille
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-14 00:00:00 Z
18
+ date: 2011-07-26 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Some extensions to the Ruby programming language.
@@ -192,14 +192,14 @@ licenses: []
192
192
 
193
193
  post_install_message:
194
194
  rdoc_options:
195
- - --title
196
- - ruby-nuggets Application documentation (v0.7.3)
197
- - --line-numbers
198
- - --main
199
- - README
200
195
  - --all
201
196
  - --charset
202
197
  - UTF-8
198
+ - --main
199
+ - README
200
+ - --title
201
+ - ruby-nuggets Application documentation (v0.7.4)
202
+ - --line-numbers
203
203
  require_paths:
204
204
  - lib
205
205
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  requirements: []
224
224
 
225
225
  rubyforge_project: prometheus
226
- rubygems_version: 1.8.5
226
+ rubygems_version: 1.8.6
227
227
  signing_key:
228
228
  specification_version: 3
229
229
  summary: Some extensions to the Ruby programming language.