hashconfig 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -1
- data/Rakefile +4 -0
- data/hashconfig.gemspec +2 -0
- data/lib/hashconfig.rb +2 -1
- data/lib/hashconfig/version.rb +1 -1
- metadata +21 -4
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/hashconfig.gemspec
CHANGED
@@ -8,6 +8,8 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.summary = %q{Simple configuration mechanism through serialized hash}
|
9
9
|
gem.homepage = "http://github.com/pboehm/hashconfig"
|
10
10
|
|
11
|
+
gem.add_runtime_dependency(%q<hash-deep-merge>)
|
12
|
+
|
11
13
|
gem.files = `git ls-files`.split($\)
|
12
14
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
15
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
data/lib/hashconfig.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "hashconfig/version"
|
2
|
+
require 'hash_deep_merge'
|
2
3
|
require 'yaml'
|
3
4
|
|
4
5
|
module Hashconfig
|
@@ -22,7 +23,7 @@ module Hashconfig
|
|
22
23
|
persistent_config = YAML.load(File.new(yaml_file, "rb").read)
|
23
24
|
persistent_config = Hash.new unless persistent_config.is_a? Hash
|
24
25
|
|
25
|
-
config = self.
|
26
|
+
config = self.deep_merge(persistent_config)
|
26
27
|
File.open(yaml_file, 'w') {|f| f.write(config.to_yaml) }
|
27
28
|
|
28
29
|
return config
|
data/lib/hashconfig/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: hash-deep-merge
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description: Simple configuration mechanism through serialized hash
|
15
31
|
email:
|
16
32
|
- philipp@i77i.de
|
@@ -49,10 +65,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
65
|
version: '0'
|
50
66
|
requirements: []
|
51
67
|
rubyforge_project:
|
52
|
-
rubygems_version: 1.8.
|
68
|
+
rubygems_version: 1.8.24
|
53
69
|
signing_key:
|
54
70
|
specification_version: 3
|
55
71
|
summary: Simple configuration mechanism through serialized hash
|
56
72
|
test_files:
|
57
73
|
- spec/hashconfig_spec.rb
|
58
74
|
- spec/spec_helper.rb
|
75
|
+
has_rdoc:
|