pick_and_roll 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pick_and_roll.rb +27 -28
- metadata +9 -7
- checksums.yaml +0 -7
data/lib/pick_and_roll.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'json'
|
2
|
-
require 'deep'
|
3
2
|
#require 'awesome_print'
|
4
3
|
|
5
4
|
class PickAndRoll
|
@@ -77,30 +76,30 @@ class PickAndRoll
|
|
77
76
|
end
|
78
77
|
end
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
79
|
+
class Hash
|
80
|
+
|
81
|
+
def deep_merge!(specialized_hash)
|
82
|
+
return internal_deep_merge!(self, specialized_hash)
|
83
|
+
end
|
84
|
+
|
85
|
+
def deep_merge(specialized_hash)
|
86
|
+
return internal_deep_merge!(Hash.new.replace(self), specialized_hash)
|
87
|
+
end
|
88
|
+
|
89
|
+
protected
|
90
|
+
def internal_deep_merge!(source_hash, specialized_hash)
|
91
|
+
specialized_hash.each_pair do |rkey, rval|
|
92
|
+
if source_hash.has_key?(rkey) then
|
93
|
+
if rval.is_a?(Hash) and source_hash[rkey].is_a?(Hash) then
|
94
|
+
internal_deep_merge!(source_hash[rkey], rval)
|
95
|
+
elsif rval == source_hash[rkey] then
|
96
|
+
else
|
97
|
+
source_hash[rkey] = rval
|
98
|
+
end
|
99
|
+
else
|
100
|
+
source_hash[rkey] = rval
|
101
|
+
end
|
102
|
+
end
|
103
|
+
return source_hash
|
104
|
+
end
|
105
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pick_and_roll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Dima Salakhov
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-16 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: Creates customizable configuration files
|
14
15
|
email: to@dimasalakhov.com
|
@@ -20,25 +21,26 @@ files:
|
|
20
21
|
homepage: https://rubygems.org/gems/pick_and_roll
|
21
22
|
licenses:
|
22
23
|
- MIT
|
23
|
-
metadata: {}
|
24
24
|
post_install_message:
|
25
25
|
rdoc_options: []
|
26
26
|
require_paths:
|
27
27
|
- lib
|
28
28
|
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
29
30
|
requirements:
|
30
|
-
- - '>='
|
31
|
+
- - ! '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
34
36
|
requirements:
|
35
|
-
- - '>='
|
37
|
+
- - ! '>='
|
36
38
|
- !ruby/object:Gem::Version
|
37
39
|
version: '0'
|
38
40
|
requirements: []
|
39
41
|
rubyforge_project:
|
40
|
-
rubygems_version:
|
42
|
+
rubygems_version: 1.8.11
|
41
43
|
signing_key:
|
42
|
-
specification_version:
|
44
|
+
specification_version: 3
|
43
45
|
summary: Configuration helper
|
44
46
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 73616cb908100f380eb2e2818ce72f68e165f0c6
|
4
|
-
data.tar.gz: b45aecd506c90312c122d98c97f7b8bd1776f4e3
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: f3c480d5346cb15b60532fd7e4bc2293e53b33268c868ccb7666a25399397ba0d2ba381e4c7d2b2dc09eac26a7c988cffe4e04268d259b08d719a7510ce659d6
|
7
|
-
data.tar.gz: 6c7b38bf6e2f708768572202f0191dc4dddb6e91a4f30662f5159caaa4eeea842c656f4f5aaf51a86f14fad005434eddc4f2c1dcc4acd237fe6e790c49c58770
|