persistent-cache-storage-ram 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -2
- data/README.md +5 -0
- data/lib/persistent-cache/storage_ram.rb +6 -6
- data/lib/persistent-cache/version.rb +1 -1
- data/persistent-cache-storage-ram.gemspec +8 -6
- metadata +44 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 610b962e17b0ac46efe529c176cb3da5181a58aeede66713edd6c471599dba28
|
4
|
+
data.tar.gz: 40bf5aa326be44273428e67b049fa8264ddd8da25c837645ffb341efb6ccaa56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f876bed5df29902ddb927c81fd12a203a98de59dd8acadefa3fb1123dd433dd6698f5b3148cc450ed591d4c6b0764cdab3279d2a66ddbb198bef7d5d2bf93c5a
|
7
|
+
data.tar.gz: c5de44022552e03ec6312afddb0f08c5a1a30647d4243ba9e8130968d8767f7d1f0e4419376cc3150a062f4e0e5d685b0a5f79bc02caebe62f33d15579ae23b9
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Persistent::StorageRAM
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/persistent-cache-storage-ram.png)](https://badge.fury.io/rb/persistent-cache-storage-ram)
|
4
|
+
[![Build Status](https://travis-ci.org/evangraan/persistent-cache-storage-ram.svg?branch=master)](https://travis-ci.org/evangraan/persistent-cache-storage-ram)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/evangraan/persistent-cache-storage-ram/badge.svg?branch=master)](https://coveralls.io/github/evangraan/persistent-cache-storage-ram?branch=master)
|
6
|
+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/08eedbc4456b49f990802d3730667aa8)](https://www.codacy.com/app/ernst-van-graan/persistent-cache-storage-ram?utm_source=github.com&utm_medium=referral&utm_content=evangraan/persistent-cache-storage-ram&utm_campaign=Badge_Grade)
|
7
|
+
|
3
8
|
This gem provides a RAM storage back-end to Persistent::Cache. Please see https://rubygems.org/gems/persistent-cache.
|
4
9
|
|
5
10
|
## Installation
|
@@ -14,39 +14,39 @@ module Persistent
|
|
14
14
|
def save_key_value_pair(serialized_key, serialized_value, timestamp = nil)
|
15
15
|
delete_entry(serialized_key)
|
16
16
|
time_entry = timestamp.nil? ? Time.now.to_s : timestamp.to_s
|
17
|
-
EH
|
17
|
+
EH.retry!(:args => [serialized_key, serialized_value, time_entry]) do
|
18
18
|
@storage[serialized_key] = {:value => serialized_value, :timestamp => time_entry}
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
def lookup_key(serialized_key)
|
23
|
-
EH
|
23
|
+
EH.retry!(:args => [serialized_key]) do
|
24
24
|
return [] if @storage[serialized_key].nil?
|
25
25
|
[@storage[serialized_key][:value], @storage[serialized_key][:timestamp]]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def delete_entry(serialized_key)
|
30
|
-
EH
|
30
|
+
EH.retry!(:args => [serialized_key]) do
|
31
31
|
@storage.delete(serialized_key)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
def size
|
36
|
-
EH
|
36
|
+
EH.retry!(:args => []) do
|
37
37
|
@storage.size
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
def keys
|
42
|
-
EH
|
42
|
+
EH.retry!(:args => []) do
|
43
43
|
return [] if @storage.keys == []
|
44
44
|
[@storage.keys]
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
def clear
|
49
|
-
EH
|
49
|
+
EH.retry!(:args => []) do
|
50
50
|
@storage.clear
|
51
51
|
end
|
52
52
|
end
|
@@ -6,12 +6,12 @@ require 'persistent-cache/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "persistent-cache-storage-ram"
|
8
8
|
spec.version = Persistent::Storage::Ram::VERSION
|
9
|
-
spec.authors = ["Ernst Van Graan"]
|
10
|
-
spec.email = ["ernst.
|
9
|
+
spec.authors = ["Ernst Van Graan", "xneelo (Pty) Ltd"]
|
10
|
+
spec.email = ["ernst.vangraan@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{This gem provides a RAM storage back-end to Persistent::Cache}
|
13
13
|
spec.description = %q{This gem provides a RAM storage back-end to Persistent::Cache}
|
14
|
-
spec.homepage = "https://github.com/
|
14
|
+
spec.homepage = "https://github.com/xneelo/persistent-cache-storage-ram"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -19,9 +19,11 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
-
spec.add_development_dependency "rspec"
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_development_dependency 'coveralls'
|
26
|
+
spec.add_development_dependency 'byebug'
|
25
27
|
spec.add_dependency "persistent-cache-storage-api"
|
26
28
|
spec.add_dependency "eh"
|
27
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: persistent-cache-storage-ram
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernst Van Graan
|
8
|
+
- xneelo (Pty) Ltd
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
@@ -16,42 +17,70 @@ dependencies:
|
|
16
17
|
requirements:
|
17
18
|
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
20
|
+
version: '1.3'
|
20
21
|
type: :development
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
25
|
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
27
|
+
version: '1.3'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: rake
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- - "
|
32
|
+
- - ">="
|
32
33
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
+
version: '0'
|
34
35
|
type: :development
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
|
-
- - "
|
39
|
+
- - ">="
|
39
40
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
+
version: '0'
|
41
42
|
- !ruby/object:Gem::Dependency
|
42
43
|
name: rspec
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
|
-
- - "
|
46
|
+
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
+
version: '0'
|
48
49
|
type: :development
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
|
-
- - "
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: coveralls
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: byebug
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
55
84
|
- !ruby/object:Gem::Dependency
|
56
85
|
name: persistent-cache-storage-api
|
57
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +111,7 @@ dependencies:
|
|
82
111
|
version: '0'
|
83
112
|
description: This gem provides a RAM storage back-end to Persistent::Cache
|
84
113
|
email:
|
85
|
-
- ernst.
|
114
|
+
- ernst.vangraan@gmail.com
|
86
115
|
executables: []
|
87
116
|
extensions: []
|
88
117
|
extra_rdoc_files: []
|
@@ -101,7 +130,7 @@ files:
|
|
101
130
|
- lib/persistent-cache/storage_ram.rb
|
102
131
|
- lib/persistent-cache/version.rb
|
103
132
|
- persistent-cache-storage-ram.gemspec
|
104
|
-
homepage: https://github.com/
|
133
|
+
homepage: https://github.com/xneelo/persistent-cache-storage-ram
|
105
134
|
licenses:
|
106
135
|
- MIT
|
107
136
|
metadata: {}
|
@@ -120,8 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
149
|
- !ruby/object:Gem::Version
|
121
150
|
version: '0'
|
122
151
|
requirements: []
|
123
|
-
|
124
|
-
rubygems_version: 2.5.1
|
152
|
+
rubygems_version: 3.0.6
|
125
153
|
signing_key:
|
126
154
|
specification_version: 4
|
127
155
|
summary: This gem provides a RAM storage back-end to Persistent::Cache
|