drawer 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/drawer.rb +3 -2
  2. metadata +12 -5
@@ -18,11 +18,12 @@ class Drawer
18
18
  attr :store
19
19
 
20
20
  def initialize(file, store = DrawerStore)
21
+ @file = file
21
22
  @store = store
22
23
  @cache = store.load(file) || {}
23
24
 
24
25
  at_exit do
25
- save(file)
26
+ save
26
27
  end
27
28
  end
28
29
 
@@ -54,7 +55,7 @@ class Drawer
54
55
  "Drawer count: #{cache.size}. Type 'cache' to view the content."
55
56
  end
56
57
 
57
- def save(file)
58
+ def save(file=@file)
58
59
  store.save(@cache, file)
59
60
  end
60
61
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drawer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 9
9
+ version: 0.0.9
5
10
  platform: ruby
6
11
  authors:
7
12
  - Michel Martens
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-06-17 00:00:00 -03:00
17
+ date: 2010-04-01 00:00:00 -03:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -46,18 +51,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
51
  requirements:
47
52
  - - ">="
48
53
  - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
49
56
  version: "0"
50
- version:
51
57
  required_rubygems_version: !ruby/object:Gem::Requirement
52
58
  requirements:
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
61
+ segments:
62
+ - 0
55
63
  version: "0"
56
- version:
57
64
  requirements: []
58
65
 
59
66
  rubyforge_project: drawer
60
- rubygems_version: 1.3.4
67
+ rubygems_version: 1.3.6
61
68
  signing_key:
62
69
  specification_version: 3
63
70
  summary: Ultra light file-based cache.