redjs-sprockets 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redjs/processor.rb +7 -3
- data/lib/redjs/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: 97b02d06976b4cb164b134978f153e842eab5e83
|
4
|
+
data.tar.gz: 8565625aa9bfcb01f80b21c520bcd5d041fb0173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1a95e3de86f07e4acd1f473eee1b05f64064be25ee61b38aeafb3a63084fdf8bd473d94c4ec885265a006a4ba726c95d49b8798cb276b67cab99882da790841
|
7
|
+
data.tar.gz: a88737c6ce422e74cafe2422331db3412b9838fd4a58db9f60d7cece5458e10cc1bc41336449fdb3c41cc93b55436058223543f1d226f8339b9c2924e6c77e97
|
data/lib/redjs/processor.rb
CHANGED
@@ -9,11 +9,15 @@ module RedJS
|
|
9
9
|
|
10
10
|
required = []
|
11
11
|
|
12
|
-
unless data
|
12
|
+
unless data =~ /\$define\s*\(\s*['"]#{ path }['"]\s*,/
|
13
13
|
|
14
|
-
unless data
|
14
|
+
unless data.gsub! /\$define\s*\(/, "\\0'#{ path }',"
|
15
15
|
|
16
|
-
data
|
16
|
+
unless data =~ /\$defines\s*\(\s*['"]#{ path }['"]/
|
17
|
+
|
18
|
+
data += "\n" + "$define('#{ path }',void 0);"
|
19
|
+
|
20
|
+
end
|
17
21
|
|
18
22
|
end
|
19
23
|
|
data/lib/redjs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redjs-sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Maganov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|