trackman 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- trackman (0.4.0)
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.1)
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
- @@url ||= /url\(['"]?([^'")]+)['"]?\)/
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(/\?[^\?]*$/, '') }.select{|n| n && n =~ /\w/ && n.internal_path? }
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
@@ -1,3 +1,3 @@
1
1
  module Trackman
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -74,7 +74,6 @@ describe 'full path' do
74
74
  remote = RemoteAsset.all
75
75
 
76
76
  remote.count.should == 7
77
-
78
77
  local.each{|l| remote.should include(l) }
79
78
  end
80
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: