text_helpers 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/text_helpers/translation.rb +2 -2
- data/lib/text_helpers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4342beb840df0ee1900b30f38834af4369f59fb5
|
4
|
+
data.tar.gz: 8f9de833dd817c836b675069eacb469cb1913355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b91d57f519796838e79edd29bc909f0fa438044a008c402304f0898dcd1e9e552979feaad3f834da1c5d676055a109f9986db83cecdecc122fcae3c7eaad385c
|
7
|
+
data.tar.gz: 0df629319595bbe552627f3f3edc29b54ec1809230878bb4aef6cae25bde2bc28d829e9422d546cee3ba1776f5a27e79cf693dada354bd7a30e51b41d762cca5
|
@@ -18,8 +18,8 @@ module TextHelpers
|
|
18
18
|
default: "!#{key}!"
|
19
19
|
}.merge(options))
|
20
20
|
|
21
|
-
# Interpolate any keypaths (e.g., `!some.lookup.key!`) found in the text.
|
22
|
-
text.strip.gsub(/!([\w._]+)!/) do |match|
|
21
|
+
# Interpolate any keypaths (e.g., `!some.lookup.path/key!`) found in the text.
|
22
|
+
text.strip.gsub(/!([\w._\/]+)!/) do |match|
|
23
23
|
I18n.t($1)
|
24
24
|
end.html_safe
|
25
25
|
end
|
data/lib/text_helpers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: text_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Horner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|