sprockets 3.6.2 → 3.6.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprockets might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65038c23bce0f78dc46dbd1a795a5f7d63ae3e6d
4
- data.tar.gz: 2eb90ccca5227ccb89ad3d120d3f517a40207c82
3
+ metadata.gz: 60bd74a92e432ab26a1c9ff6a5f3a1ced8ccc1c8
4
+ data.tar.gz: 8708f6433b0ab2438bea014db7783388d2c0d493
5
5
  SHA512:
6
- metadata.gz: 8f679d41d2cf85076d30cfba047f7e339683e21942db8bda5e7199be98d5a985b386a9364ef8ebf093cc902bd6e1943d3c51a94526fa5525c626b68b3ee84551
7
- data.tar.gz: 01172abe899835640b8bb76ca6c8f2ba519c060c24306ba72255513fb85c8424ed481e681d86357bd4f221d7eb4276e5fd143821bc3671853fa6b526d484b320
6
+ metadata.gz: 41f481255492f56a331de0a8b5df114a9f60681b048a79cba5cf90f44b08622fb08f6cf23fa108fb2a448890c1808d685ba785934db949ac47911d6f1aebee98
7
+ data.tar.gz: 45204e3291b8427570c24e75a245039a02a8cb10ceda060984a904c7c9abea4d1f19e4ce50133fc83e2980da93ce1485f0d38b3c6188d075ab985b026d018971
@@ -1,3 +1,10 @@
1
+ **3.6.3** (July 1, 2016)
2
+
3
+ * Faster asset lookup in large directories #336
4
+ * Faster PathUtils.match_path_extname https://github.com/rails/sprockets/commit/697269cf81e5261fdd7072e32bd489403027fd7e
5
+ * Fixed uglifier comment stripping #326
6
+ * Error messages now show load path info #313
7
+
1
8
  **3.6.2** (June 21, 2016)
2
9
 
3
10
  * More performance improvements.
@@ -148,16 +148,19 @@ module Sprockets
148
148
  #
149
149
  # Returns [String extname, Object value] or nil nothing matched.
150
150
  def match_path_extname(path, extensions)
151
- match, key = nil, ""
152
- path_extnames(path).reverse_each do |extname|
153
- key.prepend(extname)
154
- if value = extensions[key]
155
- match = [key.dup, value]
156
- elsif match
157
- break
151
+ basename = File.basename(path)
152
+
153
+ i = basename.index('.'.freeze)
154
+ while i && i < basename.length - 1
155
+ extname = basename[i..-1]
156
+ if value = extensions[extname]
157
+ return extname, value
158
158
  end
159
+
160
+ i = basename.index('.'.freeze, i+1)
159
161
  end
160
- match
162
+
163
+ nil
161
164
  end
162
165
 
163
166
  # Internal: Returns all parents for path
@@ -60,6 +60,7 @@ module Sprockets
60
60
  end
61
61
 
62
62
  message << " with type '#{options[:accept]}'" if options[:accept]
63
+ message << "\nChecked in these paths: \n #{ config[:paths].join("\n ") }"
63
64
 
64
65
  raise FileNotFound, message
65
66
  end
@@ -177,6 +178,7 @@ module Sprockets
177
178
  candidates = []
178
179
  entries = self.entries(dirname)
179
180
  entries.each do |entry|
181
+ next unless File.basename(entry).start_with?(basename)
180
182
  name, type, _, _ = parse_path_extnames(entry)
181
183
  if basename == name
182
184
  candidates << [File.join(dirname, entry), type]
@@ -41,7 +41,7 @@ module Sprockets
41
41
  options[:copyright] ||= false
42
42
  else
43
43
  # Uglifier >= 2.x
44
- options[:copyright] ||= :none
44
+ options[:comments] ||= :none
45
45
  end
46
46
 
47
47
  @uglifier = Autoload::Uglifier.new(options)
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "3.6.2"
2
+ VERSION = "3.6.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-21 00:00:00.000000000 Z
12
+ date: 2016-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack