look_up_table 0.1.0.rc1 → 0.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module LookUpTable
2
- VERSION = "0.1.0.rc1"
2
+ VERSION = "0.1.0.rc2"
3
3
  end
data/lib/look_up_table.rb CHANGED
@@ -36,6 +36,8 @@ module LookUpTable
36
36
  # Reset complete lut if name is omitted, resets given lut otherwise.
37
37
  # HACK
38
38
  def lut_reset(name=nil)
39
+ @@lut ||= {}
40
+
39
41
  if name
40
42
  @@lut[name.to_sym] = nil
41
43
  lut_write_cache_item(name, 0, nil) unless lut_options[:skip_memcached]
@@ -45,6 +47,15 @@ module LookUpTable
45
47
  end
46
48
  end
47
49
 
50
+ def lut_reload(name=nil)
51
+ if name
52
+ lut_reset(name)
53
+ lut(name)
54
+ else
55
+ @@lut.keys.each { |k| lut_reload(k) }
56
+ end
57
+ end
58
+
48
59
 
49
60
 
50
61
  #private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: look_up_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc1
4
+ version: 0.1.0.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &68895000 !ruby/object:Gem::Requirement
16
+ requirement: &80526310 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *68895000
24
+ version_requirements: *80526310
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &68894640 !ruby/object:Gem::Requirement
27
+ requirement: &80525310 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *68894640
35
+ version_requirements: *80525310
36
36
  description: A simple LookUpTable to cache large (!) and static(!) data
37
37
  email:
38
38
  - ph@werbeboten.de
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: -568637135
105
+ hash: 879587375
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements: