data_paths 0.3.0.rc2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.3.0 / 2011-05-14
1
+ ### 0.3.0 / 2011-07-04
2
2
 
3
3
  * Added {DataPaths::Finders#load_yaml_file}.
4
4
  * Added {DataPaths::Finders#load_yaml_files}.
data/README.md CHANGED
@@ -76,7 +76,7 @@ static-content directories:
76
76
 
77
77
  ## Install
78
78
 
79
- $ sudo gem install data_paths
79
+ $ gem install data_paths
80
80
 
81
81
  ## Copyright
82
82
 
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ task :test => :spec
25
25
  task :default => :spec
26
26
 
27
27
  begin
28
- gem 'yard', '~> 0.6.0'
28
+ gem 'yard', '~> 0.7.0'
29
29
  require 'yard'
30
30
 
31
31
  YARD::Rake::YardocTask.new
data/gemspec.yml CHANGED
@@ -15,4 +15,4 @@ has_yard: true
15
15
  development_dependencies:
16
16
  ore-tasks: ~> 0.4
17
17
  rspec: ~> 2.4
18
- yard: ~> 0.6.0
18
+ yard: ~> 0.7.0
@@ -28,6 +28,8 @@ module DataPaths
28
28
  # @since 0.3.0
29
29
  #
30
30
  def register_data_path(path)
31
+ path = File.expand_path(path)
32
+
31
33
  DataPaths.register(path)
32
34
 
33
35
  data_paths << path unless data_paths.include?(path)
@@ -1,4 +1,4 @@
1
1
  module DataPaths
2
2
  # data_paths version
3
- VERSION = '0.3.0.rc2'
3
+ VERSION = '0.3.0'
4
4
  end
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
@@ -0,0 +1,2 @@
1
+ ---
2
+ one: 1
@@ -0,0 +1,2 @@
1
+ ---
2
+ two: 2
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: 6
5
- version: 0.3.0.rc2
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-03 00:00:00 Z
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.6.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