valise 0.8 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/valise/utils.rb +1 -0
  2. data/spec/fileset.rb +8 -0
  3. metadata +5 -5
data/lib/valise/utils.rb CHANGED
@@ -19,6 +19,7 @@ module Valise
19
19
 
20
20
  module Unpath
21
21
  def string_to_segments(string)
22
+ return string if string.empty?
22
23
  string.split(::File::Separator)
23
24
  end
24
25
 
data/spec/fileset.rb CHANGED
@@ -164,6 +164,14 @@ describe Valise, " - the unpath method: " do
164
164
  @search_root.unpath(["step", "step/step"]).should == %w{step step step}
165
165
  end
166
166
 
167
+ it '/etc/configs => ["", "etc", "configs"]' do
168
+ @search_root.unpath("/etc/configs").should == [""] + %w{etc configs}
169
+ end
170
+
171
+ it '["", "etc", "configs"] => ["", "etc", "configs"]' do
172
+ @search_root.unpath(["", "etc", "configs"]).should == [""] + %w{etc configs}
173
+ end
174
+
167
175
  it 'a File => #path' do
168
176
  @file = File.new(__FILE__)
169
177
  @path = __FILE__.split("/")
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'
4
+ version: 0.8.1
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: &73826910 !ruby/object:Gem::Requirement
16
+ requirement: &84635770 !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: *73826910
24
+ version_requirements: *84635770
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 RDoc
197
+ - valise-0.8.1 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: 796712559
208
+ hash: 940870351
209
209
  required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  none: false
211
211
  requirements: