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 CHANGED
@@ -136,31 +136,33 @@ module Valise
136
136
  protected :search_roots, :search_roots=
137
137
 
138
138
  include Unpath
139
- def get(path)
140
- return Stack.new(path, self,
141
- merge_diff(path),
142
- serialization(path))
143
- end
139
+ def get(path)
140
+ return Stack.new(path, self,
141
+ merge_diff(path),
142
+ serialization(path))
143
+ end
144
144
 
145
- def merge_diff(path)
146
- @merge_diff[unpath(path)]
147
- end
145
+ def merge_diff(path)
146
+ @merge_diff[unpath(path)]
147
+ end
148
148
 
149
- def serialization(path)
150
- @serialization[unpath(path)]
151
- end
149
+ def serialization(path)
150
+ @serialization[unpath(path)]
151
+ end
152
152
 
153
- def merge_handlers(merge_diff, serialization)
154
- @merge_diff.merge!(merge_diff)
155
- @serialization.merge!(serialization)
156
- end
153
+ def merge_handlers(merge_diff, serialization)
154
+ @merge_diff.merge!(merge_diff)
155
+ @serialization.merge!(serialization)
156
+ end
157
157
 
158
- def handler_lists
159
- [@merge_diff, @serialization]
160
- end
158
+ def handler_lists
159
+ [@merge_diff, @serialization]
160
+ end
161
161
 
162
162
  def find(path)
163
- return get(path).present.first
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
@@ -29,4 +29,3 @@ describe Valise do
29
29
  item.contents.should == {:another => "test hash"}
30
30
  end
31
31
  end
32
-
data/spec/fileset.rb CHANGED
@@ -166,5 +166,3 @@ describe Valise, " - the unpath method: " do
166
166
  @search_root.unpath(@file)
167
167
  end
168
168
  end
169
-
170
-
data/spec/merge_diff.rb CHANGED
@@ -90,4 +90,3 @@ describe Valise do
90
90
  end
91
91
  end
92
92
  end
93
-
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: valise
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.3"
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: 2011-12-14 00:00:00 Z
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.3 RDoc
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: -889118655
202
+ hash: -598266929
203
203
  segments:
204
204
  - 0
205
205
  version: "0"