active_redis 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/active_redis.gemspec +3 -3
- data/lib/active_redis/connection_ext/persistence_layer.rb +9 -0
- data/lib/active_redis/persistence.rb +8 -0
- data/lib/active_redis/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 714e87fed728d64204b22bf03e507a3da63cd670
|
4
|
+
data.tar.gz: 6f626a9bc8c1f070b735bdf02e59db2b5a828027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e137faf3d688792a89611ed83e33e32c8565be4f896e7270ed5270288794e95e859504d6a5f49367658327c48a4d6bd2a737bc06d62aca3cbc357695d8c61f6b
|
7
|
+
data.tar.gz: 58c1b780aa0e7410b16a034f674c0e30b872c14af4c4eef49943c271f8f86d28211e91b28205d51780182ca9d9c479546de55a90bb24e20d6f7d48e6394ab52f
|
data/README.md
CHANGED
data/active_redis.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "redis"
|
22
|
-
spec.add_dependency "activesupport"
|
23
|
-
spec.add_dependency "colorize"
|
21
|
+
spec.add_dependency "redis", '3.0.7'
|
22
|
+
spec.add_dependency "activesupport", '>= 3.0.0'
|
23
|
+
spec.add_dependency "colorize", '0.7.3'
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
26
|
spec.add_development_dependency "rake"
|
@@ -25,6 +25,15 @@ module ActiveRedis::ConnectionExt
|
|
25
25
|
destroy_by_keys fetch_keys(model)
|
26
26
|
end
|
27
27
|
|
28
|
+
def expire_record(model, id, seconds = -1)
|
29
|
+
raise ActiveRedis::NotSpecifiedIdError, "Must specified ID for destroy record!" unless id
|
30
|
+
if seconds > 0
|
31
|
+
adapter.expire model.table_name(id), seconds
|
32
|
+
else
|
33
|
+
adapter.persist model.table_name(id)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
28
37
|
private
|
29
38
|
def destroy_by_keys(keys)
|
30
39
|
adapter.del keys
|
data/lib/active_redis/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Gernyak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colorize
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.7.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.7.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.
|
204
|
+
rubygems_version: 2.2.2
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: Small childly ORM for Redis
|