sprockets-dotjs 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +15 -14
- data/app/assets/javascripts/encode_html.js +4 -4
- data/lib/sprockets-dotjs/version.rb +1 -1
- data/lib/support/doT.js +7 -9
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sprockets-dotjs (
|
4
|
+
sprockets-dotjs (2.0.0)
|
5
5
|
libv8
|
6
6
|
railties
|
7
7
|
rake
|
@@ -11,9 +11,9 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: http://rubygems.org/
|
13
13
|
specs:
|
14
|
-
actionpack (3.2.
|
15
|
-
activemodel (= 3.2.
|
16
|
-
activesupport (= 3.2.
|
14
|
+
actionpack (3.2.11)
|
15
|
+
activemodel (= 3.2.11)
|
16
|
+
activesupport (= 3.2.11)
|
17
17
|
builder (~> 3.0.0)
|
18
18
|
erubis (~> 2.7.0)
|
19
19
|
journey (~> 1.0.4)
|
@@ -21,10 +21,10 @@ GEM
|
|
21
21
|
rack-cache (~> 1.2)
|
22
22
|
rack-test (~> 0.6.1)
|
23
23
|
sprockets (~> 2.2.1)
|
24
|
-
activemodel (3.2.
|
25
|
-
activesupport (= 3.2.
|
24
|
+
activemodel (3.2.11)
|
25
|
+
activesupport (= 3.2.11)
|
26
26
|
builder (~> 3.0.0)
|
27
|
-
activesupport (3.2.
|
27
|
+
activesupport (3.2.11)
|
28
28
|
i18n (~> 0.6)
|
29
29
|
multi_json (~> 1.0)
|
30
30
|
builder (3.0.4)
|
@@ -32,19 +32,19 @@ GEM
|
|
32
32
|
hike (1.2.1)
|
33
33
|
i18n (0.6.1)
|
34
34
|
journey (1.0.4)
|
35
|
-
json (1.7.
|
36
|
-
libv8 (3.11.8.
|
35
|
+
json (1.7.6)
|
36
|
+
libv8 (3.11.8.9)
|
37
37
|
multi_json (1.5.0)
|
38
|
-
rack (1.4.
|
38
|
+
rack (1.4.4)
|
39
39
|
rack-cache (1.2)
|
40
40
|
rack (>= 0.4)
|
41
41
|
rack-ssl (1.3.2)
|
42
42
|
rack
|
43
43
|
rack-test (0.6.2)
|
44
44
|
rack (>= 1.0)
|
45
|
-
railties (3.2.
|
46
|
-
actionpack (= 3.2.
|
47
|
-
activesupport (= 3.2.
|
45
|
+
railties (3.2.11)
|
46
|
+
actionpack (= 3.2.11)
|
47
|
+
activesupport (= 3.2.11)
|
48
48
|
rack-ssl (~> 1.3.2)
|
49
49
|
rake (>= 0.8.7)
|
50
50
|
rdoc (~> 3.4)
|
@@ -58,7 +58,8 @@ GEM
|
|
58
58
|
multi_json (~> 1.0)
|
59
59
|
rack (~> 1.0)
|
60
60
|
tilt (~> 1.1, != 1.3.0)
|
61
|
-
therubyracer (0.11.
|
61
|
+
therubyracer (0.11.1)
|
62
|
+
libv8 (~> 3.11.8.7)
|
62
63
|
ref
|
63
64
|
thor (0.16.0)
|
64
65
|
tilt (1.3.3)
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
String.prototype.encodeHTML=function encodeHTMLSource() {
|
2
2
|
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/' },
|
3
3
|
matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
|
4
|
-
return function(
|
5
|
-
return
|
4
|
+
return function() {
|
5
|
+
return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : this;
|
6
6
|
};
|
7
|
-
}
|
7
|
+
}
|
data/lib/support/doT.js
CHANGED
@@ -54,15 +54,13 @@
|
|
54
54
|
if (code.indexOf('def.') === 0) {
|
55
55
|
code = code.substring(4);
|
56
56
|
}
|
57
|
-
if (
|
58
|
-
if (
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
new Function("def", "def['"+code+"']=" + value)(def);
|
65
|
-
}
|
57
|
+
if (assign === ':') {
|
58
|
+
if (c.defineParams) value.replace(c.defineParams, function(m, param, v) {
|
59
|
+
def[code] = {arg: param, text: v};
|
60
|
+
});
|
61
|
+
if (!(code in def)) def[code]= value;
|
62
|
+
} else {
|
63
|
+
new Function("def", "def['"+code+"']=" + value)(def);
|
66
64
|
}
|
67
65
|
return '';
|
68
66
|
})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-dotjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|