trackman 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock
CHANGED
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
PATH
|
10
10
|
remote: .
|
11
11
|
specs:
|
12
|
-
trackman (0.4.
|
12
|
+
trackman (0.4.2)
|
13
13
|
heroku (>= 2.26.2)
|
14
14
|
json
|
15
15
|
nokogiri
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
blockenspiel (0.4.5)
|
25
25
|
diff-lcs (1.1.3)
|
26
26
|
excon (0.16.2)
|
27
|
-
heroku (2.31.
|
27
|
+
heroku (2.31.2)
|
28
28
|
heroku-api (~> 0.3.4)
|
29
29
|
launchy (>= 0.3.2)
|
30
30
|
netrc (~> 0.7.7)
|
@@ -2,7 +2,9 @@ module Trackman
|
|
2
2
|
module Assets
|
3
3
|
module Components
|
4
4
|
module CompositeAsset
|
5
|
-
|
5
|
+
@@url = /url\(['"]?([^'")]+)['"]?\)/
|
6
|
+
@@import = /url\(['"]?[^'"]+['"]?\)/
|
7
|
+
|
6
8
|
def self.included(mod)
|
7
9
|
mod.send(:include, PathResolver)
|
8
10
|
end
|
@@ -24,10 +26,7 @@ module Trackman
|
|
24
26
|
end
|
25
27
|
|
26
28
|
def inner_css_paths
|
27
|
-
@@
|
28
|
-
@@import ||= /url\(['"]?[^'"]+['"]?\)/
|
29
|
-
|
30
|
-
data.scan(@@import).collect{|x| @@url.match(x)[1] }
|
29
|
+
data.scan(@@import).collect{|x| @@url.match(x)[1]}.select{|x| !x.embedded? }
|
31
30
|
end
|
32
31
|
end
|
33
32
|
end
|
@@ -37,5 +36,8 @@ end
|
|
37
36
|
class String
|
38
37
|
def internal_path?
|
39
38
|
self !~ /^http/
|
39
|
+
end
|
40
|
+
def embedded?
|
41
|
+
self.include? 'data:'
|
40
42
|
end
|
41
43
|
end
|
@@ -23,7 +23,8 @@ module Trackman
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def refine_path(paths, node)
|
26
|
-
paths.map{|n| n[node].to_s.gsub(/\?[^\?]*$/, '') }
|
26
|
+
temp = paths.map{|n| n[node].to_s.gsub(/\?[^\?]*$/, '') }
|
27
|
+
temp.select{|n| n && n =~ /\w/ && n.internal_path? && !n.embedded? }
|
27
28
|
end
|
28
29
|
end
|
29
30
|
end
|
data/lib/trackman/version.rb
CHANGED