docstache 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +8 -0
- data/lib/docstache/data_scope.rb +9 -0
- data/lib/docstache/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4663953840e841ea911fdd47ba74cb5bd4ef5f37
|
4
|
+
data.tar.gz: 1b7d7b96dad91ec189f742a6f575bc3dd0b4a298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1bdf1f42ad5f50efe553cb65d678ee0047889179e41c4359611100ca363238761fcfe8dfa6903b5301093bf36ed23bb5c346ae84114d04ba6c7875e51d90371
|
7
|
+
data.tar.gz: e37304fd77b542fb41efde67a4ea600e1d709f36a2f918bccd60a9efce9dde1e943d066da2c9b18d38cc10d70429e354a769ea2d3fca506e082c32d0b812073b
|
data/changelog.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0
|
4
|
+
|
5
|
+
* [08f09d19] Hash keys inside DataScope are symbolized
|
6
|
+
|
7
|
+
## 0.0.6
|
8
|
+
|
9
|
+
* [fcba2080] Fixed a bug When two tags were inside one xml node, it would mistakenly report that there was an error when there wasn't.
|
10
|
+
|
3
11
|
## 0.0.5
|
4
12
|
|
5
13
|
* Fixed a bug that caused {{^tags}} to always show up as errors
|
data/lib/docstache/data_scope.rb
CHANGED
@@ -7,6 +7,7 @@ module Docstache
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def get(key, hash=@data, original_key=key)
|
10
|
+
symbolize_keys!(hash)
|
10
11
|
tokens = key.split('.')
|
11
12
|
if tokens.length == 1
|
12
13
|
return hash.fetch(key.to_sym) { |key| @parent.get(original_key) }
|
@@ -21,6 +22,14 @@ module Docstache
|
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
25
|
+
private
|
26
|
+
|
27
|
+
def symbolize_keys!(hash)
|
28
|
+
hash.keys.each do |key|
|
29
|
+
hash[(key.to_sym rescue key)] = hash.delete(key)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
24
33
|
end
|
25
34
|
|
26
35
|
class EmptyDataScope
|
data/lib/docstache/version.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docstache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Cosgrove
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubyzip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.1.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.1.0
|
55
55
|
description: Integrates data into MS Word docx template files. Processing supports
|
@@ -60,7 +60,7 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
-
|
63
|
+
- .gitignore
|
64
64
|
- Gemfile
|
65
65
|
- LICENSE.txt
|
66
66
|
- README.md
|
@@ -90,17 +90,17 @@ require_paths:
|
|
90
90
|
- lib
|
91
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - '>='
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - '>='
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.0.14
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Merges Hash of Data into Word docx template files using mustache syntax
|