fangorn 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fangorn/js.rb +4 -0
- 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: c9404fcd64d916340ab207aec4b40c469dd188fb
|
4
|
+
data.tar.gz: 0ecb4a2009470a400ddec5d2849dd8f09989a821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f64226364744791c7b18ec04963666ae0c965ea8d48d7678bc91a979adb1a44f4f3db9c60366ef7ca896b909c3525c4fcf4ab1ee5e528b709558b8aee6004cb
|
7
|
+
data.tar.gz: bdb569701e8aafac48d56434ab4a708dc26eb3a3976501b7a424d292682391ed8cb6d41cd693a0e4aa326142bc33936c65ab7a02698c16680dae4e4413c467c2
|
data/lib/fangorn/js.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'yaml'
|
2
|
+
require 'securerandom'
|
2
3
|
module Fangorn
|
3
4
|
class Js < Output
|
5
|
+
|
6
|
+
CACHE_BREAK = SecureRandom.hex(4)
|
4
7
|
@@cleaned = false
|
5
8
|
|
6
9
|
def initialize(input)
|
@@ -24,6 +27,7 @@ module Fangorn
|
|
24
27
|
contents.gsub!("${#{key}}", val.to_s)
|
25
28
|
end
|
26
29
|
end
|
30
|
+
contents.gsub!(/(templateUrl:\s*["'])([^'"]+)(['"])/, "\\1\\2?q=#{CACHE_BREAK}\\3")
|
27
31
|
|
28
32
|
if Output::dist?
|
29
33
|
open("| uglifyjs", 'w+') do |uglifyjs|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fangorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Calhoun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|