fangorn 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fangorn/js.rb +4 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e37c359b1b7105b3fdefbfa0dd8325622ba0f0d
4
- data.tar.gz: 2d73dcb1515a223b029a1d1548752f47e0000cc2
3
+ metadata.gz: c9404fcd64d916340ab207aec4b40c469dd188fb
4
+ data.tar.gz: 0ecb4a2009470a400ddec5d2849dd8f09989a821
5
5
  SHA512:
6
- metadata.gz: 91fa471cf72cd3a5a4b4a836071a7ccba0d542c04ef37bbc6881ca29c35ba5566a6c764982a95c6f199cab6c2c3d42faebf65c2c886b68189c792e5f81b81d18
7
- data.tar.gz: 8a999110a5d9de7ec580edc7c07717bda4fb44ce8b3f1a0677d75a036f778e48eb97a9f4b29aa9c14e55f153e2a4e6dccd8fd1e311811863a90522f6c20886e4
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.12
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-04 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen