pea 0.1.2 → 1.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.
Files changed (2) hide show
  1. data/lib/pea.rb +16 -8
  2. metadata +2 -2
data/lib/pea.rb CHANGED
@@ -1,20 +1,28 @@
1
1
  class Pea
2
+ module Version
3
+ MAJOR = 1
4
+ MINOR = 3
5
+ PATCH = 0
6
+
7
+ FULL = [MAJOR, MINOR, PATCH].join('.')
8
+
9
+ class << self
10
+ def to_s
11
+ FULL
12
+ end
13
+ end
14
+ end
2
15
 
3
16
  attr_accessor :contents, :file, :hash, :rendered
4
17
 
5
- def initialize(file = nil, relative_to = nil)
18
+ def initialize(file = nil)
6
19
  unless file.nil?
7
- self.read(file, relative_to)
20
+ self.read(file)
8
21
  end
9
22
  end
10
23
 
11
24
 
12
- def read(file, relative_to = nil)
13
-
14
- unless relative_to.nil?
15
- file = File.join(relative_to, file)
16
- end
17
-
25
+ def read(file)
18
26
  @file = File.new file, "r"
19
27
 
20
28
  if !file.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-08 00:00:00.000000000 Z
12
+ date: 2013-03-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: You can simply provide Pea with a file and a hash of values and pea will
15
15
  return the contents of the file with the hash keys replaced with the values