timed_lru 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +8 -0
- data/.travis.yml +5 -5
- data/Gemfile +1 -2
- data/Gemfile.lock +40 -28
- data/Rakefile +4 -9
- data/lib/timed_lru.rb +32 -34
- data/spec/coverage_helper.rb +0 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/timed_lru_spec.rb +67 -64
- data/timed_lru.gemspec +11 -12
- metadata +8 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 256a5775aadc75a4ba0151c3b2530d77b6fe66d8a80163bd4a51500008fc81c4
|
|
4
|
+
data.tar.gz: 2e46aa41b37eac70b04bcabac5abf3d160af09c4da00f8fa89b5e35223b9bf6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 225fa64f43a2d8c4d730060df4af035697a628f4080c06542828fef00b58c9c7f53d0b871bb60d27cf203f5a0fd34cb47540e4eb3655fe06a192df9a8d1f12ba
|
|
7
|
+
data.tar.gz: 9a24526b95949e25e55b919d66a393a2fe7a1f0fcdd0315c7e8edf0c662038fdd9198d0a0fe808e54b4a66ac534763e6ca798a71f07238232ceeb0ef3214ea2d
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,45 +1,58 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
timed_lru (0.
|
|
4
|
+
timed_lru (0.4.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: http://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
|
|
9
|
+
ast (2.4.0)
|
|
10
|
+
coveralls (0.8.23)
|
|
10
11
|
json (>= 1.8, < 3)
|
|
11
|
-
simplecov (~> 0.
|
|
12
|
+
simplecov (~> 0.16.1)
|
|
12
13
|
term-ansicolor (~> 1.3)
|
|
13
|
-
thor (
|
|
14
|
+
thor (>= 0.19.4, < 2.0)
|
|
14
15
|
tins (~> 1.6)
|
|
15
16
|
diff-lcs (1.3)
|
|
16
|
-
docile (1.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rspec
|
|
25
|
-
rspec-
|
|
26
|
-
|
|
17
|
+
docile (1.3.2)
|
|
18
|
+
jaro_winkler (1.5.3)
|
|
19
|
+
json (2.2.0)
|
|
20
|
+
parallel (1.17.0)
|
|
21
|
+
parser (2.6.3.0)
|
|
22
|
+
ast (~> 2.4.0)
|
|
23
|
+
rainbow (3.0.0)
|
|
24
|
+
rake (12.3.3)
|
|
25
|
+
rspec (3.8.0)
|
|
26
|
+
rspec-core (~> 3.8.0)
|
|
27
|
+
rspec-expectations (~> 3.8.0)
|
|
28
|
+
rspec-mocks (~> 3.8.0)
|
|
29
|
+
rspec-core (3.8.2)
|
|
30
|
+
rspec-support (~> 3.8.0)
|
|
31
|
+
rspec-expectations (3.8.4)
|
|
27
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
28
|
-
rspec-support (~> 3.
|
|
29
|
-
rspec-mocks (3.
|
|
33
|
+
rspec-support (~> 3.8.0)
|
|
34
|
+
rspec-mocks (3.8.1)
|
|
30
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
31
|
-
rspec-support (~> 3.
|
|
32
|
-
rspec-support (3.
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
rspec-support (~> 3.8.0)
|
|
37
|
+
rspec-support (3.8.2)
|
|
38
|
+
rubocop (0.71.0)
|
|
39
|
+
jaro_winkler (~> 1.5.1)
|
|
40
|
+
parallel (~> 1.10)
|
|
41
|
+
parser (>= 2.6)
|
|
42
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
43
|
+
ruby-progressbar (~> 1.7)
|
|
44
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
45
|
+
ruby-progressbar (1.10.1)
|
|
46
|
+
simplecov (0.16.1)
|
|
47
|
+
docile (~> 1.1)
|
|
35
48
|
json (>= 1.8, < 3)
|
|
36
49
|
simplecov-html (~> 0.10.0)
|
|
37
50
|
simplecov-html (0.10.2)
|
|
38
|
-
term-ansicolor (1.
|
|
51
|
+
term-ansicolor (1.7.1)
|
|
39
52
|
tins (~> 1.0)
|
|
40
|
-
thor (0.
|
|
41
|
-
tins (1.
|
|
42
|
-
|
|
53
|
+
thor (0.20.3)
|
|
54
|
+
tins (1.21.1)
|
|
55
|
+
unicode-display_width (1.6.0)
|
|
43
56
|
|
|
44
57
|
PLATFORMS
|
|
45
58
|
ruby
|
|
@@ -49,10 +62,9 @@ DEPENDENCIES
|
|
|
49
62
|
coveralls
|
|
50
63
|
json (>= 1.7.7)
|
|
51
64
|
rake
|
|
52
|
-
redcarpet
|
|
53
65
|
rspec
|
|
66
|
+
rubocop
|
|
54
67
|
timed_lru!
|
|
55
|
-
yard
|
|
56
68
|
|
|
57
69
|
BUNDLED WITH
|
|
58
|
-
|
|
70
|
+
2.0.1
|
data/Rakefile
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
require 'bundler/setup'
|
|
2
2
|
require 'bundler/gem_tasks'
|
|
3
|
-
|
|
4
3
|
require 'rspec/core/rake_task'
|
|
5
|
-
|
|
6
|
-
RSpec::Core::RakeTask.new(:coverage) do |c|
|
|
7
|
-
c.ruby_opts = '-r ./spec/coverage_helper'
|
|
8
|
-
end
|
|
4
|
+
require 'rubocop/rake_task'
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
7
|
+
RuboCop::RakeTask.new(:rubocop)
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
task :default => :spec
|
|
9
|
+
task default: %i[spec rubocop]
|
data/lib/timed_lru.rb
CHANGED
|
@@ -28,15 +28,15 @@ class TimedLRU
|
|
|
28
28
|
# that extra bit of performance
|
|
29
29
|
# @option opts [Integer] ttl
|
|
30
30
|
# the TTL in seconds
|
|
31
|
-
def initialize(opts
|
|
31
|
+
def initialize(opts={})
|
|
32
32
|
super() # MonitorMixin
|
|
33
33
|
|
|
34
34
|
@hash = {}
|
|
35
35
|
@max_size = Integer(opts[:max_size] || 100)
|
|
36
36
|
@ttl = Integer(opts[:ttl]) if opts[:ttl]
|
|
37
37
|
|
|
38
|
-
raise ArgumentError,
|
|
39
|
-
raise ArgumentError,
|
|
38
|
+
raise ArgumentError, 'Option :max_size must be > 0' unless max_size.positive?
|
|
39
|
+
raise ArgumentError, 'Option :ttl must be > 0' unless ttl.nil? || ttl.positive?
|
|
40
40
|
|
|
41
41
|
extend ThreadUnsafe if opts[:thread_safe] == false
|
|
42
42
|
end
|
|
@@ -48,13 +48,13 @@ class TimedLRU
|
|
|
48
48
|
def store(key, value)
|
|
49
49
|
mon_synchronize do
|
|
50
50
|
node = (@hash[key] ||= Node.new(key))
|
|
51
|
-
node.value
|
|
51
|
+
node.value = value
|
|
52
52
|
touch(node)
|
|
53
53
|
compact!
|
|
54
54
|
node.value
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
|
-
|
|
57
|
+
alias []= store
|
|
58
58
|
|
|
59
59
|
# Retrieves a `value` by `key`
|
|
60
60
|
# @param [Object] key the storage key
|
|
@@ -68,7 +68,7 @@ class TimedLRU
|
|
|
68
68
|
node.value
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
|
-
|
|
71
|
+
alias [] fetch
|
|
72
72
|
|
|
73
73
|
# Deletes by `key`
|
|
74
74
|
# @param [Object] key the storage key
|
|
@@ -82,38 +82,36 @@ class TimedLRU
|
|
|
82
82
|
|
|
83
83
|
private
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
remove(@tail)
|
|
88
|
-
end
|
|
85
|
+
def compact!
|
|
86
|
+
remove(@tail) while @hash.size > max_size
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
def remove(node)
|
|
96
|
-
@hash.delete(node.key)
|
|
97
|
-
left, right = node.left, node.right
|
|
98
|
-
left.nil? ? @head = right : left.right = right
|
|
99
|
-
right.nil? ? @tail = left : right.left = left
|
|
100
|
-
node
|
|
101
|
-
end
|
|
88
|
+
remove(@tail) while ttl && @tail.expires_at < Time.now.to_i
|
|
89
|
+
end
|
|
102
90
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
def remove(node)
|
|
92
|
+
@hash.delete(node.key)
|
|
93
|
+
left = node.left
|
|
94
|
+
right = node.right
|
|
95
|
+
left.nil? ? @head = right : left.right = right
|
|
96
|
+
right.nil? ? @tail = left : right.left = left
|
|
97
|
+
node
|
|
98
|
+
end
|
|
106
99
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
def touch(node)
|
|
101
|
+
node.expires_at = Time.now.to_i + ttl if ttl
|
|
102
|
+
return if node == @head
|
|
110
103
|
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
left = node.left
|
|
105
|
+
right = node.right
|
|
106
|
+
node.left = nil
|
|
107
|
+
node.right = @head
|
|
108
|
+
@head.left = node if @head
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
@tail = @head unless @tail
|
|
117
|
-
end
|
|
110
|
+
left.right = right if left
|
|
111
|
+
right.left = left if right
|
|
118
112
|
|
|
113
|
+
@tail = left if @tail == node
|
|
114
|
+
@head = node
|
|
115
|
+
@tail ||= @head
|
|
116
|
+
end
|
|
119
117
|
end
|
data/spec/coverage_helper.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/timed_lru_spec.rb
CHANGED
|
@@ -8,9 +8,12 @@ describe TimedLRU do
|
|
|
8
8
|
return [] unless head
|
|
9
9
|
|
|
10
10
|
res = [head]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
loop do
|
|
12
|
+
current = res.last.right
|
|
13
|
+
break unless current
|
|
14
|
+
|
|
15
|
+
expect(current.left).to eq(res.last)
|
|
16
|
+
res << current
|
|
14
17
|
end
|
|
15
18
|
expect(head.left).to be_nil
|
|
16
19
|
expect(tail.right).to be_nil
|
|
@@ -30,7 +33,7 @@ describe TimedLRU do
|
|
|
30
33
|
subject.instance_variable_get(:@tail)
|
|
31
34
|
end
|
|
32
35
|
|
|
33
|
-
describe
|
|
36
|
+
describe 'defaults' do
|
|
34
37
|
subject { described_class.new }
|
|
35
38
|
|
|
36
39
|
describe '#max_size' do
|
|
@@ -51,7 +54,7 @@ describe TimedLRU do
|
|
|
51
54
|
it { is_expected.to respond_to(:each_key) }
|
|
52
55
|
end
|
|
53
56
|
|
|
54
|
-
describe
|
|
57
|
+
describe 'init' do
|
|
55
58
|
subject { described_class.new max_size: 25, ttl: 120, thread_safe: false }
|
|
56
59
|
|
|
57
60
|
describe '#max_size' do
|
|
@@ -63,91 +66,91 @@ describe TimedLRU do
|
|
|
63
66
|
subject { super().ttl }
|
|
64
67
|
it { is_expected.to be(120) }
|
|
65
68
|
end
|
|
66
|
-
it
|
|
69
|
+
it { is_expected.to be_a(described_class::ThreadUnsafe) }
|
|
67
70
|
|
|
68
71
|
it 'should assert correct option values' do
|
|
69
|
-
expect { described_class.new(max_size:
|
|
72
|
+
expect { described_class.new(max_size: 'X') }.to raise_error(ArgumentError)
|
|
70
73
|
expect { described_class.new(max_size: -1) }.to raise_error(ArgumentError)
|
|
71
74
|
expect { described_class.new(max_size: 0) }.to raise_error(ArgumentError)
|
|
72
75
|
|
|
73
|
-
expect { described_class.new(ttl:
|
|
76
|
+
expect { described_class.new(ttl: 'X') }.to raise_error(ArgumentError)
|
|
74
77
|
expect { described_class.new(ttl: true) }.to raise_error(TypeError)
|
|
75
78
|
expect { described_class.new(ttl: 0) }.to raise_error(ArgumentError)
|
|
76
79
|
end
|
|
77
80
|
end
|
|
78
81
|
|
|
79
|
-
describe
|
|
82
|
+
describe 'storing' do
|
|
80
83
|
|
|
81
|
-
it
|
|
82
|
-
expect
|
|
83
|
-
expect(subject.store(
|
|
84
|
-
|
|
84
|
+
it 'should set head + tail on first item' do
|
|
85
|
+
expect do
|
|
86
|
+
expect(subject.store('a', 1)).to eq(1)
|
|
87
|
+
end.to change { chain }.from([]).to(['a'])
|
|
85
88
|
end
|
|
86
89
|
|
|
87
|
-
it
|
|
88
|
-
subject[
|
|
89
|
-
expect { subject[
|
|
90
|
-
expect { subject[
|
|
91
|
-
expect { subject[
|
|
90
|
+
it 'should shift chain when new items are added' do
|
|
91
|
+
subject['a'] = 1
|
|
92
|
+
expect { subject['b'] = 2 }.to change { chain }.from(%w[a]).to(%w[b a])
|
|
93
|
+
expect { subject['c'] = 3 }.to change { chain }.to(%w[c b a])
|
|
94
|
+
expect { subject['d'] = 4 }.to change { chain }.to(%w[d c b a])
|
|
92
95
|
end
|
|
93
96
|
|
|
94
|
-
it
|
|
95
|
-
(
|
|
96
|
-
expect { subject[
|
|
97
|
-
expect { subject[
|
|
97
|
+
it 'should expire LRU items when chain exceeds max size' do
|
|
98
|
+
('a'..'d').each {|x| subject[x] = 1 }
|
|
99
|
+
expect { subject['e'] = 5 }.to change { chain }.to(%w[e d c b])
|
|
100
|
+
expect { subject['f'] = 6 }.to change { chain }.to(%w[f e d c])
|
|
98
101
|
end
|
|
99
102
|
|
|
100
|
-
it
|
|
101
|
-
(
|
|
102
|
-
expect { subject[
|
|
103
|
-
expect { subject[
|
|
104
|
-
expect { subject[
|
|
105
|
-
expect { subject[
|
|
103
|
+
it 'should update items' do
|
|
104
|
+
('a'..'d').each {|x| subject[x] = 1 }
|
|
105
|
+
expect { subject['d'] = 2 }.not_to change { chain }
|
|
106
|
+
expect { subject['c'] = 2 }.to change { chain }.to(%w[c d b a])
|
|
107
|
+
expect { subject['b'] = 2 }.to change { chain }.to(%w[b c d a])
|
|
108
|
+
expect { subject['a'] = 2 }.to change { chain }.to(%w[a b c d])
|
|
106
109
|
end
|
|
107
110
|
|
|
108
111
|
end
|
|
109
112
|
|
|
110
|
-
describe
|
|
113
|
+
describe 'retrieving' do
|
|
111
114
|
|
|
112
115
|
it 'should fetch values' do
|
|
113
|
-
expect(subject.fetch(
|
|
114
|
-
expect(subject[
|
|
115
|
-
subject[
|
|
116
|
-
expect(subject[
|
|
116
|
+
expect(subject.fetch('a')).to be_nil
|
|
117
|
+
expect(subject['a']).to be_nil
|
|
118
|
+
subject['a'] = 1
|
|
119
|
+
expect(subject['a']).to eq(1)
|
|
117
120
|
end
|
|
118
121
|
|
|
119
122
|
it 'should renew membership on access' do
|
|
120
|
-
(
|
|
121
|
-
expect { subject[
|
|
122
|
-
expect { subject[
|
|
123
|
-
expect { subject[
|
|
124
|
-
expect { subject[
|
|
125
|
-
expect { subject[
|
|
123
|
+
('a'..'d').each {|x| subject[x] = 1 }
|
|
124
|
+
expect { subject['d'] }.not_to change { chain }
|
|
125
|
+
expect { subject['c'] }.to change { chain }.to(%w[c d b a])
|
|
126
|
+
expect { subject['b'] }.to change { chain }.to(%w[b c d a])
|
|
127
|
+
expect { subject['a'] }.to change { chain }.to(%w[a b c d])
|
|
128
|
+
expect { subject['x'] }.not_to change { chain }
|
|
126
129
|
end
|
|
127
130
|
|
|
128
131
|
end
|
|
129
132
|
|
|
130
|
-
describe
|
|
133
|
+
describe 'deleting' do
|
|
131
134
|
|
|
132
135
|
it 'should delete an return values' do
|
|
133
|
-
expect(subject.delete(
|
|
134
|
-
subject[
|
|
135
|
-
expect(subject.delete(
|
|
136
|
+
expect(subject.delete('a')).to be_nil
|
|
137
|
+
subject['a'] = 1
|
|
138
|
+
expect(subject.delete('a')).to eq(1)
|
|
136
139
|
end
|
|
137
140
|
|
|
138
141
|
it 'should re-arrange membership chain' do
|
|
139
|
-
(
|
|
140
|
-
expect { subject.delete(
|
|
141
|
-
expect { subject.delete(
|
|
142
|
-
expect { subject.delete(
|
|
143
|
-
expect { subject.delete(
|
|
144
|
-
expect { subject.delete(
|
|
142
|
+
('a'..'d').each {|x| subject[x] = 1 }
|
|
143
|
+
expect { subject.delete('x') }.not_to change { chain }
|
|
144
|
+
expect { subject.delete('c') }.to change { chain }.to(%w[d b a])
|
|
145
|
+
expect { subject.delete('a') }.to change { chain }.to(%w[d b])
|
|
146
|
+
expect { subject.delete('d') }.to change { chain }.to(%w[b])
|
|
147
|
+
expect { subject.delete('b') }.to change { subject.size }.from(1).to(0)
|
|
145
148
|
end
|
|
146
149
|
|
|
147
150
|
end
|
|
148
151
|
|
|
149
|
-
describe
|
|
150
|
-
subject
|
|
152
|
+
describe 'TTL expiration' do
|
|
153
|
+
subject { described_class.new max_size: 4, ttl: 60 }
|
|
151
154
|
|
|
152
155
|
def in_past(ago)
|
|
153
156
|
allow(Time).to receive_messages now: (Time.now - ago)
|
|
@@ -158,33 +161,33 @@ describe TimedLRU do
|
|
|
158
161
|
|
|
159
162
|
it 'should expire on access' do
|
|
160
163
|
in_past(70) do
|
|
161
|
-
subject[
|
|
162
|
-
expect(chain).to eq(%w
|
|
164
|
+
subject['a'] = 1
|
|
165
|
+
expect(chain).to eq(%w[a])
|
|
163
166
|
end
|
|
164
167
|
|
|
165
168
|
in_past(50) do
|
|
166
|
-
subject[
|
|
167
|
-
expect(chain).to eq(%w
|
|
169
|
+
subject['b'] = 2
|
|
170
|
+
expect(chain).to eq(%w[b a])
|
|
168
171
|
end
|
|
169
172
|
|
|
170
|
-
subject[
|
|
171
|
-
expect(chain).to eq(%w
|
|
173
|
+
subject['c'] = 3
|
|
174
|
+
expect(chain).to eq(%w[c b])
|
|
172
175
|
end
|
|
173
176
|
|
|
174
177
|
it 'should renew expiration on access' do
|
|
175
178
|
in_past(70) do
|
|
176
|
-
subject[
|
|
177
|
-
subject[
|
|
178
|
-
expect(chain).to eq(%w
|
|
179
|
+
subject['a'] = 1
|
|
180
|
+
subject['b'] = 2
|
|
181
|
+
expect(chain).to eq(%w[b a])
|
|
179
182
|
end
|
|
180
183
|
|
|
181
184
|
in_past(50) do
|
|
182
|
-
expect(subject[
|
|
183
|
-
expect(chain).to eq(%w
|
|
185
|
+
expect(subject['a']).to eq(1)
|
|
186
|
+
expect(chain).to eq(%w[a b])
|
|
184
187
|
end
|
|
185
188
|
|
|
186
|
-
subject[
|
|
187
|
-
expect(chain).to eq(%w
|
|
189
|
+
subject['c'] = 3
|
|
190
|
+
expect(chain).to eq(%w[c a])
|
|
188
191
|
end
|
|
189
192
|
|
|
190
193
|
end
|
data/timed_lru.gemspec
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
|
-
s.required_ruby_version = '>= 2.
|
|
2
|
+
s.required_ruby_version = '>= 2.4.0'
|
|
3
3
|
|
|
4
4
|
s.name = File.basename(__FILE__, '.gemspec')
|
|
5
|
-
s.summary =
|
|
6
|
-
s.description =
|
|
7
|
-
s.version =
|
|
5
|
+
s.summary = 'Timed LRU'
|
|
6
|
+
s.description = 'Thread-safe LRU implementation with (optional) TTL and constant time operations'
|
|
7
|
+
s.version = '0.4.0'
|
|
8
8
|
|
|
9
|
-
s.authors = [
|
|
10
|
-
s.email =
|
|
11
|
-
s.homepage =
|
|
9
|
+
s.authors = ['Black Square Media']
|
|
10
|
+
s.email = 'info@blacksquaremedia.com'
|
|
11
|
+
s.homepage = 'https://github.com/bsm/timed_lru'
|
|
12
12
|
|
|
13
13
|
s.require_path = 'lib'
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
|
15
15
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
16
16
|
|
|
17
|
-
s.add_development_dependency
|
|
18
|
-
s.add_development_dependency
|
|
19
|
-
s.add_development_dependency
|
|
20
|
-
s.add_development_dependency
|
|
21
|
-
s.add_development_dependency "redcarpet"
|
|
17
|
+
s.add_development_dependency 'bundler'
|
|
18
|
+
s.add_development_dependency 'rake'
|
|
19
|
+
s.add_development_dependency 'rspec'
|
|
20
|
+
s.add_development_dependency 'rubocop'
|
|
22
21
|
end
|
metadata
CHANGED
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: timed_lru
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Black Square Media
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: rake
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: bundler
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -39,7 +25,7 @@ dependencies:
|
|
|
39
25
|
- !ruby/object:Gem::Version
|
|
40
26
|
version: '0'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
28
|
+
name: rake
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
44
30
|
requirements:
|
|
45
31
|
- - ">="
|
|
@@ -53,7 +39,7 @@ dependencies:
|
|
|
53
39
|
- !ruby/object:Gem::Version
|
|
54
40
|
version: '0'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
42
|
+
name: rspec
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
|
58
44
|
requirements:
|
|
59
45
|
- - ">="
|
|
@@ -67,7 +53,7 @@ dependencies:
|
|
|
67
53
|
- !ruby/object:Gem::Version
|
|
68
54
|
version: '0'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
56
|
+
name: rubocop
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
72
58
|
requirements:
|
|
73
59
|
- - ">="
|
|
@@ -88,6 +74,7 @@ extensions: []
|
|
|
88
74
|
extra_rdoc_files: []
|
|
89
75
|
files:
|
|
90
76
|
- ".gitignore"
|
|
77
|
+
- ".rubocop.yml"
|
|
91
78
|
- ".travis.yml"
|
|
92
79
|
- Gemfile
|
|
93
80
|
- Gemfile.lock
|
|
@@ -109,15 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
109
96
|
requirements:
|
|
110
97
|
- - ">="
|
|
111
98
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 2.
|
|
99
|
+
version: 2.4.0
|
|
113
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
101
|
requirements:
|
|
115
102
|
- - ">="
|
|
116
103
|
- !ruby/object:Gem::Version
|
|
117
104
|
version: '0'
|
|
118
105
|
requirements: []
|
|
119
|
-
|
|
120
|
-
rubygems_version: 2.6.14
|
|
106
|
+
rubygems_version: 3.0.3
|
|
121
107
|
signing_key:
|
|
122
108
|
specification_version: 4
|
|
123
109
|
summary: Timed LRU
|