valise 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/valise.rb +21 -19
- data/spec/dump_load.rb +0 -1
- data/spec/fileset.rb +0 -2
- data/spec/merge_diff.rb +0 -1
- metadata +4 -4
data/lib/valise.rb
CHANGED
@@ -136,31 +136,33 @@ module Valise
|
|
136
136
|
protected :search_roots, :search_roots=
|
137
137
|
|
138
138
|
include Unpath
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
139
|
+
def get(path)
|
140
|
+
return Stack.new(path, self,
|
141
|
+
merge_diff(path),
|
142
|
+
serialization(path))
|
143
|
+
end
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
|
145
|
+
def merge_diff(path)
|
146
|
+
@merge_diff[unpath(path)]
|
147
|
+
end
|
148
148
|
|
149
|
-
|
150
|
-
|
151
|
-
|
149
|
+
def serialization(path)
|
150
|
+
@serialization[unpath(path)]
|
151
|
+
end
|
152
152
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
153
|
+
def merge_handlers(merge_diff, serialization)
|
154
|
+
@merge_diff.merge!(merge_diff)
|
155
|
+
@serialization.merge!(serialization)
|
156
|
+
end
|
157
157
|
|
158
|
-
|
159
|
-
|
160
|
-
|
158
|
+
def handler_lists
|
159
|
+
[@merge_diff, @serialization]
|
160
|
+
end
|
161
161
|
|
162
162
|
def find(path)
|
163
|
-
|
163
|
+
item = get(path).present.first
|
164
|
+
return item unless item.nil?
|
165
|
+
raise "#{path} not found in #{@search_roots.inspect}"
|
164
166
|
end
|
165
167
|
|
166
168
|
def each(&block)
|
data/spec/dump_load.rb
CHANGED
data/spec/fileset.rb
CHANGED
data/spec/merge_diff.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: valise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: "0.
|
5
|
+
version: "0.4"
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Judson Lester
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2012-02-07 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: corundum
|
@@ -191,7 +191,7 @@ rdoc_options:
|
|
191
191
|
- --main
|
192
192
|
- doc/README
|
193
193
|
- --title
|
194
|
-
- valise-0.
|
194
|
+
- valise-0.4 RDoc
|
195
195
|
require_paths:
|
196
196
|
- lib/
|
197
197
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
199
|
requirements:
|
200
200
|
- - ">="
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
hash: -
|
202
|
+
hash: -598266929
|
203
203
|
segments:
|
204
204
|
- 0
|
205
205
|
version: "0"
|