general 2.0.1 → 2.0.2
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.
- checksums.yaml +4 -4
- data/lib/gpartials/gtext.rb +1 -1
- data/lib/gtemplates/gbasetemplate.rb +1 -1
- data/lib/gtemplates/gio.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3811fd53824c1198a6fda65a7cdcef373f25385
|
4
|
+
data.tar.gz: b74c9fffde42b92ec0ca6ca768689109852382e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa543b2e2d7ed4be03377a05609cccc99f384de309131e6fabe29ade150d3ee34780eea61d9f043c03b1ef67ff44471c83c41821fdadc2cff5921a6102ae1cbc
|
7
|
+
data.tar.gz: d904d520a54b247ad76935d8f4330b90de91c76f3833a44ded9f7fdec1c6b3fd71b70e48541a42bbaa2e8201155ff1075502578d527df2dc708e4d841e035d0b
|
data/lib/gpartials/gtext.rb
CHANGED
@@ -44,7 +44,7 @@ module General
|
|
44
44
|
partial = partials.find { |partial| m = partial::REGEX.match(string) }
|
45
45
|
|
46
46
|
# Raise error if no matching partial can be found
|
47
|
-
raise GError.new("Unmatched
|
47
|
+
raise GError.new("Unmatched character at #{(string.length <= 5 ? string : string[0..5] + "...").inspect}") if partial.nil?
|
48
48
|
|
49
49
|
# Add the partial to the array
|
50
50
|
@partials << partial.new(m, @defaults)
|
data/lib/gtemplates/gio.rb
CHANGED
@@ -113,7 +113,11 @@ module General
|
|
113
113
|
Dir.chdir cwd
|
114
114
|
|
115
115
|
# Return new GIO
|
116
|
-
|
116
|
+
begin
|
117
|
+
return self.new text, path
|
118
|
+
rescue GError => e
|
119
|
+
raise GError.new "Error when parsing template file #{path}"
|
120
|
+
end
|
117
121
|
end
|
118
122
|
|
119
123
|
# Creates a GIO with the given template string and source filename
|