rid-core 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rid/document.rb +10 -2
- data/rid-core.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
data/lib/rid/document.rb
CHANGED
@@ -49,8 +49,16 @@ module Rid
|
|
49
49
|
key.sub!(/\.erb$/, '')
|
50
50
|
|
51
51
|
value = block_given? ? block.call(filename) : read_file(filename)
|
52
|
-
|
53
|
-
|
52
|
+
|
53
|
+
if key =~ /\.json$/
|
54
|
+
# parse json files
|
55
|
+
value = JSON.parse(value)
|
56
|
+
key.sub!(/\.json$/, '')
|
57
|
+
else
|
58
|
+
# strip value if its a one-liner
|
59
|
+
value.strip! if value.count("\n") == 1
|
60
|
+
end
|
61
|
+
|
54
62
|
@hash.update_at key, value
|
55
63
|
end
|
56
64
|
|
data/rid-core.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rid-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Johannes J. Schmidt
|