coffeeshop 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class Coffeeshop
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/coffeeshop.rb CHANGED
@@ -5,18 +5,16 @@ require_relative "coffeeshop/version"
5
5
 
6
6
  class Coffeeshop
7
7
  REDIS = Redis.new
8
- EXPIRE = 24 * 60 * 60
8
+ EXPIRE = 60 * 60
9
9
 
10
10
  def self.to_js( path )
11
11
  coffee = File.read( path )
12
12
  k = key( digest( coffee ) )
13
13
  unless js = REDIS.get( k )
14
14
  js = CoffeeScript.compile( coffee )
15
- REDIS.multi do
16
- REDIS.set( k, js )
17
- REDIS.expire( k, EXPIRE )
18
- end
15
+ REDIS.set( k, js )
19
16
  end
17
+ REDIS.expire( k, EXPIRE )
20
18
  js
21
19
  end
22
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coffeeshop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70206248599900 !ruby/object:Gem::Requirement
16
+ requirement: &70137123041340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70206248599900
24
+ version_requirements: *70137123041340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: coffee-script
27
- requirement: &70206248599480 !ruby/object:Gem::Requirement
27
+ requirement: &70137123040300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70206248599480
35
+ version_requirements: *70137123040300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: redis
38
- requirement: &70206248599060 !ruby/object:Gem::Requirement
38
+ requirement: &70137123039500 !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: *70206248599060
46
+ version_requirements: *70137123039500
47
47
  description: coffeeshop is a quick and dirty Sinatra app that serves up any CoffeeScript
48
48
  in a directory as JavaScript. It uses Redis for basic caching because that's how
49
49
  I roll.