yarb 0.0.2 → 0.0.3

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 (4) hide show
  1. data/Manifest +0 -1
  2. data/lib/yarb.rb +4 -7
  3. metadata +2 -3
  4. data/Rakefile +0 -12
data/Manifest CHANGED
@@ -1,5 +1,4 @@
1
1
  Manifest
2
2
  README.rdoc
3
- Rakefile
4
3
  lib/yarb.rb
5
4
  yarb.gemspec
@@ -3,12 +3,9 @@ require 'yaml'
3
3
 
4
4
  module YARB
5
5
  def self.load(read_or_string, options = {:binding => TOPLEVEL_BINDING})
6
- pass_binding = options[:binding]
7
-
8
- if read_or_string.respond_to? :read
9
- YAML::load(ERB.new(read_or_string.read).result(pass_binding))
10
- else
11
- YAML::load(ERB.new(read_or_string).result(pass_binding))
12
- end
6
+ pass_binding = options[:binding]
7
+ read_or_string = (read_or_string.respond_to?(:read) ? read_or_string.read : read_or_string.to_s)
8
+
9
+ YAML::load(ERB.new(read_or_string).result(pass_binding))
13
10
  end
14
11
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Vermaak
@@ -29,7 +29,6 @@ extra_rdoc_files: []
29
29
  files:
30
30
  - lib/yarb.rb
31
31
  - Manifest
32
- - Rakefile
33
32
  - README.rdoc
34
33
  has_rdoc: true
35
34
  homepage: http://github.com/matthewvermaak/yarb
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'echoe'
4
-
5
- Echoe.new('yarb', '0.0.1') do |g|
6
- g.description = "ERB enabled YAML"
7
- g.url = "http://github.com/matthewvermaak/yarb"
8
- g.author = "Matthew Vermaak"
9
- g.email = "matthewvermaak@gmail.com"
10
- g.ignore_pattern = ["tmp/*", "script/*"]
11
- g.development_dependencies = []
12
- end