lite-redis 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -3
- data/.travis.yml +1 -0
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +75 -70
- data/lib/lite/redis/configuration.rb +2 -0
- data/lib/lite/redis/helpers/hash_helper.rb +1 -1
- data/lib/lite/redis/helpers/key_helper.rb +2 -2
- data/lib/lite/redis/helpers/set_helper.rb +1 -1
- data/lib/lite/redis/helpers/sorted_set_helper.rb +18 -18
- data/lib/lite/redis/helpers/string_helper.rb +1 -1
- data/lib/lite/redis/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f523666b4936dc7274106b5f344b1ab4aa4e92dec0f376b4bf877323563b9275
|
4
|
+
data.tar.gz: a182db77b276ff088f5a6f6830e7d17c59aa60022996c6090286153ecbb9ba8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdde529f536fae5ffec5798b22bf049b24ed9f4cdd6c348baa6d193096447e3d88db2e3330837aef0294388f683288c1cb05a2df2213c880758c0fd6f11dce3c
|
7
|
+
data.tar.gz: 877ed963442d8756b1cd25f3af02fbe9eae09071c2cc420214758751b0edcf73d1c82b721d3c0eec8c0ea1d60c87dcde66901521365143a72f3aaae53b513dca
|
data/.rubocop.yml
CHANGED
@@ -2,11 +2,12 @@ require:
|
|
2
2
|
- rubocop-performance
|
3
3
|
- rubocop-rspec
|
4
4
|
AllCops:
|
5
|
-
TargetRubyVersion: 2.
|
5
|
+
TargetRubyVersion: 2.7
|
6
|
+
NewCops: enable
|
6
7
|
DisplayCopNames: true
|
7
8
|
DisplayStyleGuide: true
|
8
|
-
|
9
|
-
|
9
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
10
|
+
Enabled: true
|
10
11
|
Layout/EmptyLinesAroundBlockBody:
|
11
12
|
Exclude:
|
12
13
|
- 'spec/**/**/*'
|
@@ -14,6 +15,14 @@ Layout/EmptyLinesAroundClassBody:
|
|
14
15
|
EnforcedStyle: empty_lines_except_namespace
|
15
16
|
Layout/EmptyLinesAroundModuleBody:
|
16
17
|
EnforcedStyle: empty_lines_except_namespace
|
18
|
+
Layout/LineLength:
|
19
|
+
Max: 100
|
20
|
+
Layout/SpaceAroundMethodCallOperator:
|
21
|
+
Enabled: true
|
22
|
+
Lint/RaiseException:
|
23
|
+
Enabled: true
|
24
|
+
Lint/StructNewOverride:
|
25
|
+
Enabled: true
|
17
26
|
Metrics/BlockLength:
|
18
27
|
Exclude:
|
19
28
|
- 'spec/**/**/*'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.0.5] - 2020-07-03
|
10
|
+
### Added
|
11
|
+
- Added Ruby 2.7 support
|
12
|
+
|
9
13
|
## [1.0.4] - 2019-08-24
|
10
14
|
### Changed
|
11
|
-
-
|
15
|
+
- Improved how configuration works
|
12
16
|
|
13
17
|
## [1.0.3] - 2019-08-15
|
14
18
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,120 +1,125 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-redis (1.0.
|
4
|
+
lite-redis (1.0.5)
|
5
5
|
redis
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (6.0.
|
11
|
-
actionview (= 6.0.
|
12
|
-
activesupport (= 6.0.
|
13
|
-
rack (~> 2.0)
|
10
|
+
actionpack (6.0.3.2)
|
11
|
+
actionview (= 6.0.3.2)
|
12
|
+
activesupport (= 6.0.3.2)
|
13
|
+
rack (~> 2.0, >= 2.0.8)
|
14
14
|
rack-test (>= 0.6.3)
|
15
15
|
rails-dom-testing (~> 2.0)
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
-
actionview (6.0.
|
18
|
-
activesupport (= 6.0.
|
17
|
+
actionview (6.0.3.2)
|
18
|
+
activesupport (= 6.0.3.2)
|
19
19
|
builder (~> 3.1)
|
20
20
|
erubi (~> 1.4)
|
21
21
|
rails-dom-testing (~> 2.0)
|
22
22
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
-
activesupport (6.0.
|
23
|
+
activesupport (6.0.3.2)
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
25
|
i18n (>= 0.7, < 2)
|
26
26
|
minitest (~> 5.1)
|
27
27
|
tzinfo (~> 1.1)
|
28
|
-
zeitwerk (~> 2.
|
29
|
-
ast (2.4.
|
30
|
-
builder (3.2.
|
28
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
29
|
+
ast (2.4.1)
|
30
|
+
builder (3.2.4)
|
31
31
|
colorize (0.8.1)
|
32
|
-
concurrent-ruby (1.1.
|
33
|
-
connection_pool (2.2.
|
34
|
-
crass (1.0.
|
35
|
-
diff-lcs (1.
|
36
|
-
erubi (1.
|
37
|
-
fakeredis (0.
|
38
|
-
redis (
|
39
|
-
fasterer (0.
|
32
|
+
concurrent-ruby (1.1.6)
|
33
|
+
connection_pool (2.2.3)
|
34
|
+
crass (1.0.6)
|
35
|
+
diff-lcs (1.4.4)
|
36
|
+
erubi (1.9.0)
|
37
|
+
fakeredis (0.8.0)
|
38
|
+
redis (~> 4.1)
|
39
|
+
fasterer (0.8.3)
|
40
40
|
colorize (~> 0.7)
|
41
|
-
ruby_parser (>= 3.
|
41
|
+
ruby_parser (>= 3.14.1)
|
42
42
|
generator_spec (0.9.4)
|
43
43
|
activesupport (>= 3.0.0)
|
44
44
|
railties (>= 3.0.0)
|
45
|
-
i18n (1.
|
45
|
+
i18n (1.8.3)
|
46
46
|
concurrent-ruby (~> 1.0)
|
47
|
-
|
48
|
-
loofah (2.2.3)
|
47
|
+
loofah (2.6.0)
|
49
48
|
crass (~> 1.0.2)
|
50
49
|
nokogiri (>= 1.5.9)
|
51
|
-
method_source (0.
|
50
|
+
method_source (1.0.0)
|
52
51
|
mini_portile2 (2.4.0)
|
53
|
-
minitest (5.
|
54
|
-
nokogiri (1.10.
|
52
|
+
minitest (5.14.1)
|
53
|
+
nokogiri (1.10.9)
|
55
54
|
mini_portile2 (~> 2.4.0)
|
56
|
-
parallel (1.
|
57
|
-
parser (2.
|
58
|
-
ast (~> 2.4.
|
59
|
-
rack (2.
|
55
|
+
parallel (1.19.2)
|
56
|
+
parser (2.7.1.4)
|
57
|
+
ast (~> 2.4.1)
|
58
|
+
rack (2.2.3)
|
60
59
|
rack-test (1.1.0)
|
61
60
|
rack (>= 1.0, < 3)
|
62
61
|
rails-dom-testing (2.0.3)
|
63
62
|
activesupport (>= 4.2.0)
|
64
63
|
nokogiri (>= 1.6)
|
65
|
-
rails-html-sanitizer (1.
|
66
|
-
loofah (~> 2.
|
67
|
-
railties (6.0.
|
68
|
-
actionpack (= 6.0.
|
69
|
-
activesupport (= 6.0.
|
64
|
+
rails-html-sanitizer (1.3.0)
|
65
|
+
loofah (~> 2.3)
|
66
|
+
railties (6.0.3.2)
|
67
|
+
actionpack (= 6.0.3.2)
|
68
|
+
activesupport (= 6.0.3.2)
|
70
69
|
method_source
|
71
70
|
rake (>= 0.8.7)
|
72
71
|
thor (>= 0.20.3, < 2.0)
|
73
72
|
rainbow (3.0.0)
|
74
|
-
rake (
|
75
|
-
redis (4.1
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
rspec-
|
80
|
-
|
81
|
-
rspec-
|
82
|
-
rspec-
|
73
|
+
rake (13.0.1)
|
74
|
+
redis (4.2.1)
|
75
|
+
regexp_parser (1.7.1)
|
76
|
+
rexml (3.2.4)
|
77
|
+
rspec (3.9.0)
|
78
|
+
rspec-core (~> 3.9.0)
|
79
|
+
rspec-expectations (~> 3.9.0)
|
80
|
+
rspec-mocks (~> 3.9.0)
|
81
|
+
rspec-core (3.9.2)
|
82
|
+
rspec-support (~> 3.9.3)
|
83
|
+
rspec-expectations (3.9.2)
|
83
84
|
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-mocks (3.
|
85
|
+
rspec-support (~> 3.9.0)
|
86
|
+
rspec-mocks (3.9.1)
|
86
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-rails (
|
89
|
-
actionpack (>=
|
90
|
-
activesupport (>=
|
91
|
-
railties (>=
|
92
|
-
rspec-core (~> 3.
|
93
|
-
rspec-expectations (~> 3.
|
94
|
-
rspec-mocks (~> 3.
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-support (3.
|
97
|
-
rubocop (0.
|
98
|
-
jaro_winkler (~> 1.5.1)
|
88
|
+
rspec-support (~> 3.9.0)
|
89
|
+
rspec-rails (4.0.1)
|
90
|
+
actionpack (>= 4.2)
|
91
|
+
activesupport (>= 4.2)
|
92
|
+
railties (>= 4.2)
|
93
|
+
rspec-core (~> 3.9)
|
94
|
+
rspec-expectations (~> 3.9)
|
95
|
+
rspec-mocks (~> 3.9)
|
96
|
+
rspec-support (~> 3.9)
|
97
|
+
rspec-support (3.9.3)
|
98
|
+
rubocop (0.86.0)
|
99
99
|
parallel (~> 1.10)
|
100
|
-
parser (>= 2.
|
100
|
+
parser (>= 2.7.0.1)
|
101
101
|
rainbow (>= 2.2.2, < 4.0)
|
102
|
+
regexp_parser (>= 1.7)
|
103
|
+
rexml
|
104
|
+
rubocop-ast (>= 0.0.3, < 1.0)
|
102
105
|
ruby-progressbar (~> 1.7)
|
103
|
-
unicode-display_width (>= 1.4.0, <
|
104
|
-
rubocop-
|
106
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
107
|
+
rubocop-ast (0.1.0)
|
108
|
+
parser (>= 2.7.0.1)
|
109
|
+
rubocop-performance (1.6.1)
|
105
110
|
rubocop (>= 0.71.0)
|
106
|
-
rubocop-rspec (1.
|
107
|
-
rubocop (>= 0.
|
111
|
+
rubocop-rspec (1.41.0)
|
112
|
+
rubocop (>= 0.68.1)
|
108
113
|
ruby-progressbar (1.10.1)
|
109
|
-
ruby_parser (3.
|
114
|
+
ruby_parser (3.14.2)
|
110
115
|
sexp_processor (~> 4.9)
|
111
|
-
sexp_processor (4.
|
112
|
-
thor (0.
|
116
|
+
sexp_processor (4.15.0)
|
117
|
+
thor (1.0.1)
|
113
118
|
thread_safe (0.3.6)
|
114
|
-
tzinfo (1.2.
|
119
|
+
tzinfo (1.2.7)
|
115
120
|
thread_safe (~> 0.1)
|
116
|
-
unicode-display_width (1.
|
117
|
-
zeitwerk (2.1
|
121
|
+
unicode-display_width (1.7.0)
|
122
|
+
zeitwerk (2.3.1)
|
118
123
|
|
119
124
|
PLATFORMS
|
120
125
|
ruby
|
@@ -134,4 +139,4 @@ DEPENDENCIES
|
|
134
139
|
rubocop-rspec
|
135
140
|
|
136
141
|
BUNDLED WITH
|
137
|
-
2.
|
142
|
+
2.1.4
|
@@ -21,7 +21,7 @@ module Lite
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def sort(key, opts = {})
|
24
|
-
client.sort(key.to_s, opts)
|
24
|
+
client.sort(key.to_s, **opts)
|
25
25
|
end
|
26
26
|
|
27
27
|
def sample
|
@@ -87,7 +87,7 @@ module Lite
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def scan(cursor, opts = {})
|
90
|
-
client.scan(cursor, opts)
|
90
|
+
client.scan(cursor, **opts)
|
91
91
|
end
|
92
92
|
|
93
93
|
end
|
@@ -6,65 +6,65 @@ module Lite
|
|
6
6
|
|
7
7
|
def find(key, position, opts = {})
|
8
8
|
position -= 1
|
9
|
-
value = client.zrange(key.to_s, position, position, opts)
|
9
|
+
value = client.zrange(key.to_s, position, position, **opts)
|
10
10
|
value.first
|
11
11
|
end
|
12
12
|
|
13
13
|
def find_score(key, position, opts = {})
|
14
|
-
value = client.zrangebyscore(key.to_s, position, position, opts)
|
14
|
+
value = client.zrangebyscore(key.to_s, position, position, **opts)
|
15
15
|
value.first
|
16
16
|
end
|
17
17
|
|
18
18
|
def first(key, opts = {})
|
19
|
-
value = client.zrange(key.to_s, 0, 0, opts)
|
19
|
+
value = client.zrange(key.to_s, 0, 0, **opts)
|
20
20
|
value.first
|
21
21
|
end
|
22
22
|
|
23
23
|
def first_score(key, opts = {})
|
24
|
-
value = client.zrangebyscore(key.to_s, 1, 1, opts)
|
24
|
+
value = client.zrangebyscore(key.to_s, 1, 1, **opts)
|
25
25
|
value.first
|
26
26
|
end
|
27
27
|
|
28
28
|
def last(key, opts = {})
|
29
|
-
value = client.zrevrange(key.to_s, 0, 0, opts)
|
29
|
+
value = client.zrevrange(key.to_s, 0, 0, **opts)
|
30
30
|
value.first
|
31
31
|
end
|
32
32
|
|
33
33
|
def last_score(key, opts = {})
|
34
|
-
value = client.zrevrangebyscore(key.to_s, 1, 1, opts)
|
34
|
+
value = client.zrevrangebyscore(key.to_s, 1, 1, **opts)
|
35
35
|
value.first
|
36
36
|
end
|
37
37
|
|
38
38
|
def between(key, start, finish, opts = {})
|
39
|
-
client.zrange(key.to_s, start - 1, finish - 1, opts)
|
39
|
+
client.zrange(key.to_s, start - 1, finish - 1, **opts)
|
40
40
|
end
|
41
41
|
|
42
42
|
def between_reverse(key, start, finish, opts = {})
|
43
|
-
client.zrevrange(key.to_s, start - 1, finish - 1, opts)
|
43
|
+
client.zrevrange(key.to_s, start - 1, finish - 1, **opts)
|
44
44
|
end
|
45
45
|
|
46
46
|
def between_scores(key, min, max, opts = {})
|
47
|
-
client.zrangebyscore(key.to_s, min, max, opts)
|
47
|
+
client.zrangebyscore(key.to_s, min, max, **opts)
|
48
48
|
end
|
49
49
|
|
50
50
|
def between_scores_reverse(key, min, max, opts = {})
|
51
|
-
client.zrevrangebyscore(key.to_s, min, max, opts)
|
51
|
+
client.zrevrangebyscore(key.to_s, min, max, **opts)
|
52
52
|
end
|
53
53
|
|
54
54
|
def between_lex(key, min, max, opts = {})
|
55
|
-
client.zrangebylex(key.to_s, min, max, opts)
|
55
|
+
client.zrangebylex(key.to_s, min, max, **opts)
|
56
56
|
end
|
57
57
|
|
58
58
|
def between_lex_reverse(key, min, max, opts = {})
|
59
|
-
client.zrevrangebylex(key.to_s, min, max, opts)
|
59
|
+
client.zrevrangebylex(key.to_s, min, max, **opts)
|
60
60
|
end
|
61
61
|
|
62
62
|
def all(key, opts = {})
|
63
|
-
client.zrange(key.to_s, 0, -1, opts)
|
63
|
+
client.zrange(key.to_s, 0, -1, **opts)
|
64
64
|
end
|
65
65
|
|
66
66
|
def all_reverse(key, opts = {})
|
67
|
-
client.zrevrange(key.to_s, 0, -1, opts)
|
67
|
+
client.zrevrange(key.to_s, 0, -1, **opts)
|
68
68
|
end
|
69
69
|
|
70
70
|
def position(key, value)
|
@@ -96,11 +96,11 @@ module Lite
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def create_intersection(key, keys, opts = {})
|
99
|
-
client.zinterstore(key.to_s, keys, opts)
|
99
|
+
client.zinterstore(key.to_s, keys, **opts)
|
100
100
|
end
|
101
101
|
|
102
102
|
def create_combination(key, keys, opts = {})
|
103
|
-
client.zunionstore(key.to_s, keys, opts)
|
103
|
+
client.zunionstore(key.to_s, keys, **opts)
|
104
104
|
end
|
105
105
|
|
106
106
|
def increment(key, value, count)
|
@@ -124,11 +124,11 @@ module Lite
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def destroy_lex(key, min, max, opts = {})
|
127
|
-
client.zrevrangebylex(key.to_s, max, min, opts)
|
127
|
+
client.zrevrangebylex(key.to_s, max, min, **opts)
|
128
128
|
end
|
129
129
|
|
130
130
|
def scan(key, cursor, opts = {})
|
131
|
-
client.zscan(key.to_s, cursor, opts)
|
131
|
+
client.zscan(key.to_s, cursor, **opts)
|
132
132
|
end
|
133
133
|
|
134
134
|
end
|
data/lib/lite/redis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -178,7 +178,7 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
-
description:
|
181
|
+
description:
|
182
182
|
email:
|
183
183
|
- j.gomez@drexed.com
|
184
184
|
executables: []
|
@@ -250,7 +250,7 @@ homepage: http://drexed.github.io/lite-redis
|
|
250
250
|
licenses:
|
251
251
|
- MIT
|
252
252
|
metadata: {}
|
253
|
-
post_install_message:
|
253
|
+
post_install_message:
|
254
254
|
rdoc_options: []
|
255
255
|
require_paths:
|
256
256
|
- lib
|
@@ -265,8 +265,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
265
|
- !ruby/object:Gem::Version
|
266
266
|
version: '0'
|
267
267
|
requirements: []
|
268
|
-
rubygems_version: 3.
|
269
|
-
signing_key:
|
268
|
+
rubygems_version: 3.1.4
|
269
|
+
signing_key:
|
270
270
|
specification_version: 4
|
271
271
|
summary: Access Redis with an ActiveRecord like ORM interface
|
272
272
|
test_files: []
|