better_record 0.21.2 → 0.21.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/better_record/fake_redis.rb +10 -0
- data/lib/better_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e7333954348a14017d9656ebb1dad398b7b2cde2f079cd1d28f9c4a996644a6
|
4
|
+
data.tar.gz: 6d75a37541af0305d17227205631db27b3a1908886de354baf59a695bb4b22b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 282f473b7382023664f51d68e5e30d62d98039a749c0ca6101a537588430d7eb7905cf1a0efd8088dcde563a2ac1308a1cea7a02708bfa3a1a7f421baa516227
|
7
|
+
data.tar.gz: ec97ecd9c65d53b34b1c1d78299c5e30b150ace7982b6863a569084a6aab5107005cdaad851ad9bf0961dec39cc0f90eced8fa2b755180d6e6cff12c465f2e4c
|
@@ -80,6 +80,16 @@ module BetterRecord
|
|
80
80
|
val
|
81
81
|
end
|
82
82
|
|
83
|
+
def keys(pattern = ".*")
|
84
|
+
data.keys.filter {|k| k.to_s =~ /^#{pattern}$/}
|
85
|
+
end
|
86
|
+
|
87
|
+
def del(*keys)
|
88
|
+
i = 0
|
89
|
+
keys.map {|k| data.delete(k) && (i += 1) }
|
90
|
+
i
|
91
|
+
end
|
92
|
+
|
83
93
|
def method_missing
|
84
94
|
return nil
|
85
95
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sampson Crowley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|