valise 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ module Valise
13
13
  @segments = unpath(path)
14
14
  end
15
15
 
16
- attr_reader :segments
16
+ attr_accessor :segments
17
17
 
18
18
  def each
19
19
  paths = [[]]
data/lib/valise/set.rb CHANGED
@@ -35,9 +35,12 @@ module Valise
35
35
  end
36
36
 
37
37
  def sub_set(path)
38
+ segments = unpath(path)
38
39
  set = Set.new
39
40
  set.search_roots = @search_roots.map do |root|
40
- SearchRoot.new(root.segments + unpath(path))
41
+ new_root = root.dup
42
+ new_root.segments += segments
43
+ new_root
41
44
  end
42
45
  set.merge_diff = @merge_diff.dup
43
46
  set.serialization = @serialization.dup
@@ -3,6 +3,21 @@ module Valise
3
3
  def initialize(stem, search_root)
4
4
  @stem, @search_root = stem, search_root
5
5
  end
6
+ attr_reader :stem, :search_root
7
+ protected :stem, :search_root
8
+
9
+ def initialize_copy(other)
10
+ @stem = other.stem
11
+ @search_root = other.search_root.dup
12
+ end
13
+
14
+ def segments
15
+ @search_root.segments
16
+ end
17
+
18
+ def segments=(segments)
19
+ @search_root.segments = segments
20
+ end
6
21
 
7
22
  def under_stem(path)
8
23
  segments = unpath(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: corundum
16
- requirement: &84635770 !ruby/object:Gem::Requirement
16
+ requirement: &82482560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *84635770
24
+ version_requirements: *82482560
25
25
  description: ! " Valise provides an API for accessing configuration and data files
26
26
  for your\n application, including the population of default values, and managing
27
27
  search\n paths. Written to encourage a cross-platform approach to maintaining
@@ -194,7 +194,7 @@ rdoc_options:
194
194
  - --main
195
195
  - doc/README
196
196
  - --title
197
- - valise-0.8.1 RDoc
197
+ - valise-0.8.2 RDoc
198
198
  require_paths:
199
199
  - lib/
200
200
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  segments:
207
207
  - 0
208
- hash: 940870351
208
+ hash: 1028994253
209
209
  required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  none: false
211
211
  requirements: