risky 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/risky/cron_list.rb +6 -8
- data/lib/risky/version.rb +1 -1
- metadata +4 -4
data/lib/risky/cron_list.rb
CHANGED
@@ -28,13 +28,7 @@ module Risky::CronList
|
|
28
28
|
end.reverse
|
29
29
|
)
|
30
30
|
|
31
|
-
|
32
|
-
p.items = items[0...limit]
|
33
|
-
p.removed_items = items[limit..-1] || []
|
34
|
-
else
|
35
|
-
p.items = items
|
36
|
-
end
|
37
|
-
|
31
|
+
p.trim
|
38
32
|
p
|
39
33
|
end
|
40
34
|
|
@@ -137,6 +131,10 @@ module Risky::CronList
|
|
137
131
|
#def cleanup
|
138
132
|
#end
|
139
133
|
|
134
|
+
def limit
|
135
|
+
self.class.limit
|
136
|
+
end
|
137
|
+
|
140
138
|
# Remove an item by key.
|
141
139
|
def remove(item_key)
|
142
140
|
if key = items.delete(item_key)
|
@@ -183,7 +181,7 @@ module Risky::CronList
|
|
183
181
|
|
184
182
|
def trim
|
185
183
|
# Remove expired items
|
186
|
-
if limit = self.
|
184
|
+
if limit = self.limit
|
187
185
|
if removed = items.slice!(limit..-1)
|
188
186
|
@removed_items += removed
|
189
187
|
end
|
data/lib/risky/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: risky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-22 00:00:00.000000000 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riak-client
|
17
|
-
requirement: &
|
17
|
+
requirement: &16680300 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 1.0.0.beta
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *16680300
|
26
26
|
description:
|
27
27
|
email: aphyr@aphyr.com
|
28
28
|
executables: []
|