jasmine-sprockets 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ .idea
@@ -5,12 +5,16 @@ require "sprockets/environment"
5
5
  module Rack
6
6
 
7
7
  class JasmineFile < Rack::File
8
+ @@cache = {}
8
9
  def sprocket
9
10
  @sprocket ||= ::Sprockets::Environment.new.tap{|s| s.append_path @root}
10
11
  end
11
12
 
12
13
  def serving
13
- base = sprocket[@path]
14
+ unless @@cache[@path] && @@cache[@path][0] >= F.mtime(@path)
15
+ @@cache[@path] = [F.mtime(@path), sprocket[@path]]
16
+ end
17
+ base = @@cache[@path][1]
14
18
  ctype = base.content_type
15
19
 
16
20
  body = [base.to_s]
@@ -1,5 +1,5 @@
1
1
  module Jasmine
2
2
  module Sprockets
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jasmine
16
- requirement: &70359355537520 !ruby/object:Gem::Requirement
16
+ requirement: &70243142993560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70359355537520
24
+ version_requirements: *70243142993560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sprockets
27
- requirement: &70359355537020 !ruby/object:Gem::Requirement
27
+ requirement: &70243142993060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70359355537020
35
+ version_requirements: *70243142993060
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack
38
- requirement: &70359355536640 !ruby/object:Gem::Requirement
38
+ requirement: &70243142992680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70359355536640
46
+ version_requirements: *70243142992680
47
47
  description:
48
48
  email:
49
49
  - sgonyea@truecar.com