sprockets 2.1.0 → 2.1.1

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.

data/README.md CHANGED
@@ -354,9 +354,14 @@ submit a pull request.
354
354
 
355
355
  ## Version History ##
356
356
 
357
+ **2.1.1** (November 18, 2011)
358
+
359
+ * Fix windows absolute path check bug.
360
+
357
361
  **2.1.0** (November 11, 2011)
358
362
 
359
- * Preserve directive whitespace.
363
+ * Directive comment lines are now turned into empty lines instead of removed. This way line numbers in
364
+ CoffeeScript syntax errors are correct.
360
365
  * Performance and caching bug fixes.
361
366
 
362
367
  **2.0.3** (October 17, 2011)
@@ -149,7 +149,7 @@ module Sprockets
149
149
  logical_path = path
150
150
  pathname = Pathname.new(path)
151
151
 
152
- if pathname.to_s =~ /^\//
152
+ if pathname.absolute?
153
153
  return unless stat(pathname)
154
154
  logical_path = attributes_for(pathname).logical_path
155
155
  else
@@ -6,14 +6,11 @@ module Sprockets
6
6
  module Cache
7
7
  # A simple file system cache store.
8
8
  #
9
- # environment.cache = Sprockets::Cache::FileStore.new("tmp/sprockets")
9
+ # environment.cache = Sprockets::Cache::FileStore.new("/tmp")
10
10
  #
11
11
  class FileStore
12
12
  def initialize(root)
13
13
  @root = Pathname.new(root)
14
-
15
- # Ensure directory exists
16
- FileUtils.mkdir_p @root
17
14
  end
18
15
 
19
16
  # Lookup value in cache
@@ -24,6 +21,9 @@ module Sprockets
24
21
 
25
22
  # Save value to cache
26
23
  def []=(key, value)
24
+ # Ensure directory exists
25
+ FileUtils.mkdir_p @root.join(key).dirname
26
+
27
27
  @root.join(key).open('w') { |f| Marshal.dump(value, f)}
28
28
  value
29
29
  end
@@ -78,7 +78,7 @@ module Sprockets
78
78
  pathname = Pathname.new(path)
79
79
  attributes = environment.attributes_for(pathname)
80
80
 
81
- if pathname.to_s =~ /^\//
81
+ if pathname.absolute?
82
82
  pathname
83
83
 
84
84
  elsif content_type = options[:content_type]
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 0
10
- version: 2.1.0
9
+ - 1
10
+ version: 2.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Stephenson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-11-11 00:00:00 -06:00
19
+ date: 2011-11-18 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency