haml-i18n-extractor 0.5.6 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ module Haml
|
|
6
6
|
module StringHelpers
|
7
7
|
|
8
8
|
# do not pollute the key space it will make it invalid yaml
|
9
|
-
NOT_ALLOWED_IN_KEYNAME = %w( ~ ` ! @ # $ % ^ & * - ( ) , ? { } = ' " : ; \\ / . | > < )
|
9
|
+
NOT_ALLOWED_IN_KEYNAME = %w( ~ ` ! @ # $ % ^ & * - ( ) , ? { } = ' " : ; \\ / . | > < [ ] )
|
10
10
|
# limit the number of chars
|
11
11
|
LIMIT_KEY_NAME = 30
|
12
12
|
|
data/test/text_replacer_test.rb
CHANGED
@@ -50,7 +50,7 @@ module Haml
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_it_does_not_allow_weird_characters_in_the_keyname
|
53
|
-
weird_line = "t<>hi:s = (is \"' `ch@ract.er ~ ma?dne{}
|
53
|
+
weird_line = "t<>hi:s = (is \"' `ch@ract.er ~ ma?dne{}s[]s!"
|
54
54
|
replacer = Haml::I18n::Extractor::TextReplacer.new(weird_line, weird_line, :plain, "/path/to/doesntmatter.haml")
|
55
55
|
assert_equal replacer.replace_hash, { :modified_line => "= t('.this_is_chracter_madness')",
|
56
56
|
:t_name => "this_is_chracter_madness", :replaced_text => weird_line, :path => "/path/to/doesntmatter.haml" }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-i18n-extractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 8
|
10
|
+
version: 0.5.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Shai Rosenfeld
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-09-
|
18
|
+
date: 2013-09-15 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: tilt
|