data_paths 0.3.0.rc2 → 0.3.0
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.
- data/ChangeLog.md +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/gemspec.yml +1 -1
- data/lib/data_paths/methods.rb +2 -0
- data/lib/data_paths/version.rb +1 -1
- data/spec/finders_spec.rb +12 -0
- data/spec/helpers/data1/data.yml +2 -0
- data/spec/helpers/data2/data.yml +2 -0
- metadata +6 -4
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
data/gemspec.yml
CHANGED
data/lib/data_paths/methods.rb
CHANGED
data/lib/data_paths/version.rb
CHANGED
data/spec/finders_spec.rb
CHANGED
@@ -39,4 +39,16 @@ describe DataPaths::Finders do
|
|
39
39
|
File.join(Helpers::DATA_DIRS[1],'dir','two.txt')
|
40
40
|
]
|
41
41
|
end
|
42
|
+
|
43
|
+
it "should load the first found YAML file" do
|
44
|
+
data = subject.load_yaml_file('data.yml')
|
45
|
+
|
46
|
+
data.should == {'one' => 1}
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should load all matching YAML files" do
|
50
|
+
data = subject.load_yaml_files('data.yml')
|
51
|
+
|
52
|
+
data.should == [{'one' => 1}, {'two' => 2}]
|
53
|
+
end
|
42
54
|
end
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_paths
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.3.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Postmodern
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-04 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ore-tasks
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.7.0
|
46
46
|
type: :development
|
47
47
|
version_requirements: *id003
|
48
48
|
description: DataPaths is a library to manage the paths of directories containing static-content across multiple libraries. For example, DataPaths can manage the `data/` directories of multiple RubyGems, in much the same way RubyGems manages the paths of `lib/` directories using `$LOAD_PATH`.
|
@@ -73,8 +73,10 @@ files:
|
|
73
73
|
- spec/data_paths_spec.rb
|
74
74
|
- spec/finders_spec.rb
|
75
75
|
- spec/helpers/data.rb
|
76
|
+
- spec/helpers/data1/data.yml
|
76
77
|
- spec/helpers/data1/dir/two.txt
|
77
78
|
- spec/helpers/data1/one.txt
|
79
|
+
- spec/helpers/data2/data.yml
|
78
80
|
- spec/helpers/data2/dir/two.txt
|
79
81
|
- spec/methods_examples.rb
|
80
82
|
- spec/spec_helper.rb
|