sprockets 1.0.1 → 1.0.2

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/Rakefile CHANGED
@@ -11,6 +11,9 @@ Rake::TestTask.new do |t|
11
11
  end
12
12
 
13
13
  Rake::GemPackageTask.new(eval(IO.read(File.join(File.dirname(__FILE__), "sprockets.gemspec")))) do |pkg|
14
+ require File.join(File.dirname(__FILE__), "lib", "sprockets", "version")
15
+ raise "Error: Sprockets::Version doesn't match gemspec" if Sprockets::Version::STRING != pkg.version.to_s
16
+
14
17
  pkg.need_zip = true
15
18
  pkg.need_tar = true
16
19
  end
@@ -48,7 +48,7 @@ module Sprockets
48
48
  def mtime
49
49
  File.mtime(pathname.absolute_location)
50
50
  rescue Errno::ENOENT
51
- 0
51
+ Time.now
52
52
  end
53
53
  end
54
54
  end
@@ -29,11 +29,11 @@ module Sprockets
29
29
  end
30
30
 
31
31
  def ends_multiline_comment?
32
- line =~ /^(.*)*\*\/\s*/
32
+ line =~ /^(.*)\*\/\s*/
33
33
  end
34
34
 
35
35
  def ends_pdoc_comment?
36
- line =~ /^(.*)*\*\*\/\s*/
36
+ line =~ /^(.*)\*\*\/\s*/
37
37
  end
38
38
 
39
39
  def require
@@ -2,7 +2,7 @@ module Sprockets
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join(".")
8
8
  end
@@ -27,4 +27,8 @@ class SourceFileTest < Test::Unit::TestCase
27
27
  assert_not_equal source_file("src/foo/foo.js"), source_file("src/foo.js")
28
28
  assert_not_equal source_file("src/foo/foo.js"), source_file("src/foo/bar.js")
29
29
  end
30
+
31
+ def test_mtime_should_return_now_if_file_does_not_exist
32
+ assert source_file("src/foo/nonexistent.js").mtime.instance_of?(Time)
33
+ end
30
34
  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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stephenson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-19 00:00:00 -06:00
12
+ date: 2009-02-24 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies: []
15
15