lite-redis 1.1.2 → 1.3.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 +4 -4
- data/.rubocop.yml +5 -2
- data/CHANGELOG.md +11 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +73 -72
- data/README.md +12 -19
- data/Rakefile +2 -2
- data/bin/console +3 -3
- data/docs/CONNECTION.md +8 -4
- data/docs/GEO.md +8 -4
- data/docs/HASH.md +8 -4
- data/docs/HYPER_LOG_LOG.md +7 -3
- data/docs/KEY.md +7 -3
- data/docs/LIST.md +7 -3
- data/docs/PUB_SUB.md +6 -2
- data/docs/SCRIPT.md +7 -3
- data/docs/SET.md +7 -3
- data/docs/SORTED_SET.md +8 -4
- data/docs/STRING.md +7 -3
- data/docs/TRANSACTION.md +8 -4
- data/lib/generators/lite/redis/install_generator.rb +2 -2
- data/lib/lite/redis/base.rb +53 -2
- data/lib/lite/redis/configuration.rb +2 -2
- data/lib/lite/redis/connection.rb +96 -3
- data/lib/lite/redis/geo.rb +24 -3
- data/lib/lite/redis/hash.rb +60 -3
- data/lib/lite/redis/hyper_log_log.rb +12 -3
- data/lib/lite/redis/key.rb +86 -3
- data/lib/lite/redis/list.rb +124 -3
- data/lib/lite/redis/pub_sub.rb +36 -3
- data/lib/lite/redis/railtie.rb +1 -1
- data/lib/lite/redis/script.rb +12 -3
- data/lib/lite/redis/set.rb +60 -3
- data/lib/lite/redis/sorted_set.rb +127 -3
- data/lib/lite/redis/string.rb +87 -3
- data/lib/lite/redis/transaction.rb +20 -3
- data/lib/lite/redis/version.rb +1 -1
- data/lib/lite/redis.rb +17 -32
- data/lib/tasks/redis.rake +10 -10
- data/lite-redis.gemspec +27 -33
- metadata +9 -17
- data/lib/lite/redis/helpers/base_helper.rb +0 -41
- data/lib/lite/redis/helpers/connection_helper.rb +0 -105
- data/lib/lite/redis/helpers/geo_helper.rb +0 -33
- data/lib/lite/redis/helpers/hash_helper.rb +0 -69
- data/lib/lite/redis/helpers/hyper_log_log_helper.rb +0 -21
- data/lib/lite/redis/helpers/key_helper.rb +0 -95
- data/lib/lite/redis/helpers/list_helper.rb +0 -133
- data/lib/lite/redis/helpers/pub_sub_helper.rb +0 -45
- data/lib/lite/redis/helpers/script_helper.rb +0 -21
- data/lib/lite/redis/helpers/set_helper.rb +0 -69
- data/lib/lite/redis/helpers/sorted_set_helper.rb +0 -136
- data/lib/lite/redis/helpers/string_helper.rb +0 -96
- data/lib/lite/redis/helpers/transaction_helper.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fecc0a6a4777336e6cc102628f7bf2327a1e4c2e15a4bc0751e90548f03df99e
|
4
|
+
data.tar.gz: dda8f438f3294cda99f4bf02c54d6597fd7dbdc20f6a932bcfe37576f2b5d965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5445af5825a97e587b2bcbaeeceec785a008fc1dffefd50d5b0c1001dc5c17177737cab713b88ad966a7cca40e09e32e36fc9ca888af7ab4f591be16da020706
|
7
|
+
data.tar.gz: 0d33ac48c3d09f2ccf834c826eca89a961032d1e5ffa9ba8d99b111ea9e86edcb1b60e67de08490beebab83ae201143fd5e601f644c0b114aa8bf32496b580f0
|
data/.rubocop.yml
CHANGED
@@ -3,7 +3,6 @@ require:
|
|
3
3
|
- rubocop-rake
|
4
4
|
- rubocop-rspec
|
5
5
|
AllCops:
|
6
|
-
TargetRubyVersion: 3.0
|
7
6
|
NewCops: enable
|
8
7
|
DisplayCopNames: true
|
9
8
|
DisplayStyleGuide: true
|
@@ -19,7 +18,7 @@ Layout/EmptyLinesAroundClassBody:
|
|
19
18
|
Layout/EmptyLinesAroundModuleBody:
|
20
19
|
EnforcedStyle: empty_lines_except_namespace
|
21
20
|
Layout/LineLength:
|
22
|
-
|
21
|
+
Enabled: false
|
23
22
|
Layout/SpaceAroundMethodCallOperator:
|
24
23
|
Enabled: true
|
25
24
|
Lint/RaiseException:
|
@@ -30,6 +29,8 @@ Metrics/BlockLength:
|
|
30
29
|
Exclude:
|
31
30
|
- 'spec/**/**/*'
|
32
31
|
- '*.gemspec'
|
32
|
+
Naming/BlockForwarding:
|
33
|
+
Enabled: false
|
33
34
|
Naming/InclusiveLanguage:
|
34
35
|
Enabled: false
|
35
36
|
RSpec/EmptyExampleGroup:
|
@@ -44,3 +45,5 @@ Style/Documentation:
|
|
44
45
|
Enabled: false
|
45
46
|
Style/ExpandPathArguments:
|
46
47
|
Enabled: false
|
48
|
+
Style/StringLiterals:
|
49
|
+
EnforcedStyle: double_quotes
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
2
3
|
All notable changes to this project will be documented in this file.
|
3
4
|
|
4
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
@@ -6,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
7
|
|
7
8
|
## [Unreleased]
|
8
9
|
|
10
|
+
## [1.3.0] - 2022-11-19
|
11
|
+
### Changed
|
12
|
+
- Improved docs
|
13
|
+
- Improve internal setup
|
14
|
+
- Improved rubocop setup
|
15
|
+
|
16
|
+
## [1.2.0] - 2022-09-26
|
17
|
+
### Removed
|
18
|
+
- Removed deprecated `Redis.exists_returns_integer`
|
19
|
+
|
9
20
|
## [1.1.2] - 2021-07-22
|
10
21
|
### Changed
|
11
22
|
- Improved setup
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,130 +1,131 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-redis (1.
|
4
|
+
lite-redis (1.3.0)
|
5
5
|
redis
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (
|
11
|
-
actionview (=
|
12
|
-
activesupport (=
|
13
|
-
rack (~> 2.0, >= 2.0
|
10
|
+
actionpack (7.0.4)
|
11
|
+
actionview (= 7.0.4)
|
12
|
+
activesupport (= 7.0.4)
|
13
|
+
rack (~> 2.0, >= 2.2.0)
|
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 (
|
18
|
-
activesupport (=
|
17
|
+
actionview (7.0.4)
|
18
|
+
activesupport (= 7.0.4)
|
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 (
|
23
|
+
activesupport (7.0.4)
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
25
|
i18n (>= 1.6, < 2)
|
26
26
|
minitest (>= 5.1)
|
27
27
|
tzinfo (~> 2.0)
|
28
|
-
zeitwerk (~> 2.3)
|
29
28
|
ast (2.4.2)
|
30
29
|
builder (3.2.4)
|
31
30
|
colorize (0.8.1)
|
32
|
-
concurrent-ruby (1.1.
|
33
|
-
connection_pool (2.
|
31
|
+
concurrent-ruby (1.1.10)
|
32
|
+
connection_pool (2.3.0)
|
34
33
|
crass (1.0.6)
|
35
|
-
diff-lcs (1.
|
36
|
-
erubi (1.
|
34
|
+
diff-lcs (1.5.0)
|
35
|
+
erubi (1.11.0)
|
37
36
|
fakeredis (0.8.0)
|
38
37
|
redis (~> 4.1)
|
39
|
-
fasterer (0.
|
38
|
+
fasterer (0.10.0)
|
40
39
|
colorize (~> 0.7)
|
41
|
-
ruby_parser (>= 3.
|
40
|
+
ruby_parser (>= 3.19.1)
|
42
41
|
generator_spec (0.9.4)
|
43
42
|
activesupport (>= 3.0.0)
|
44
43
|
railties (>= 3.0.0)
|
45
|
-
i18n (1.
|
44
|
+
i18n (1.12.0)
|
46
45
|
concurrent-ruby (~> 1.0)
|
47
|
-
|
46
|
+
json (2.6.2)
|
47
|
+
loofah (2.19.0)
|
48
48
|
crass (~> 1.0.2)
|
49
49
|
nokogiri (>= 1.5.9)
|
50
50
|
method_source (1.0.0)
|
51
|
-
mini_portile2 (2.
|
52
|
-
minitest (5.
|
53
|
-
nokogiri (1.
|
54
|
-
mini_portile2 (~> 2.
|
51
|
+
mini_portile2 (2.8.0)
|
52
|
+
minitest (5.16.3)
|
53
|
+
nokogiri (1.13.9)
|
54
|
+
mini_portile2 (~> 2.8.0)
|
55
55
|
racc (~> 1.4)
|
56
|
-
parallel (1.
|
57
|
-
parser (3.
|
56
|
+
parallel (1.22.1)
|
57
|
+
parser (3.1.2.1)
|
58
58
|
ast (~> 2.4.1)
|
59
|
-
racc (1.
|
60
|
-
rack (2.2.
|
61
|
-
rack-test (
|
62
|
-
rack (>= 1.
|
59
|
+
racc (1.6.0)
|
60
|
+
rack (2.2.4)
|
61
|
+
rack-test (2.0.2)
|
62
|
+
rack (>= 1.3)
|
63
63
|
rails-dom-testing (2.0.3)
|
64
64
|
activesupport (>= 4.2.0)
|
65
65
|
nokogiri (>= 1.6)
|
66
|
-
rails-html-sanitizer (1.3
|
66
|
+
rails-html-sanitizer (1.4.3)
|
67
67
|
loofah (~> 2.3)
|
68
|
-
railties (
|
69
|
-
actionpack (=
|
70
|
-
activesupport (=
|
68
|
+
railties (7.0.4)
|
69
|
+
actionpack (= 7.0.4)
|
70
|
+
activesupport (= 7.0.4)
|
71
71
|
method_source
|
72
|
-
rake (>=
|
72
|
+
rake (>= 12.2)
|
73
73
|
thor (~> 1.0)
|
74
|
-
|
74
|
+
zeitwerk (~> 2.5)
|
75
|
+
rainbow (3.1.1)
|
75
76
|
rake (13.0.6)
|
76
|
-
redis (4.
|
77
|
-
regexp_parser (2.
|
77
|
+
redis (4.8.0)
|
78
|
+
regexp_parser (2.6.1)
|
78
79
|
rexml (3.2.5)
|
79
|
-
rspec (3.
|
80
|
-
rspec-core (~> 3.
|
81
|
-
rspec-expectations (~> 3.
|
82
|
-
rspec-mocks (~> 3.
|
83
|
-
rspec-core (3.
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-expectations (3.
|
80
|
+
rspec (3.12.0)
|
81
|
+
rspec-core (~> 3.12.0)
|
82
|
+
rspec-expectations (~> 3.12.0)
|
83
|
+
rspec-mocks (~> 3.12.0)
|
84
|
+
rspec-core (3.12.0)
|
85
|
+
rspec-support (~> 3.12.0)
|
86
|
+
rspec-expectations (3.12.0)
|
86
87
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-mocks (3.
|
88
|
+
rspec-support (~> 3.12.0)
|
89
|
+
rspec-mocks (3.12.0)
|
89
90
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
|
-
rspec-support (~> 3.
|
91
|
-
rspec-rails (
|
92
|
-
actionpack (>=
|
93
|
-
activesupport (>=
|
94
|
-
railties (>=
|
95
|
-
rspec-core (~> 3.
|
96
|
-
rspec-expectations (~> 3.
|
97
|
-
rspec-mocks (~> 3.
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-support (3.
|
100
|
-
rubocop (1.
|
91
|
+
rspec-support (~> 3.12.0)
|
92
|
+
rspec-rails (6.0.1)
|
93
|
+
actionpack (>= 6.1)
|
94
|
+
activesupport (>= 6.1)
|
95
|
+
railties (>= 6.1)
|
96
|
+
rspec-core (~> 3.11)
|
97
|
+
rspec-expectations (~> 3.11)
|
98
|
+
rspec-mocks (~> 3.11)
|
99
|
+
rspec-support (~> 3.11)
|
100
|
+
rspec-support (3.12.0)
|
101
|
+
rubocop (1.39.0)
|
102
|
+
json (~> 2.3)
|
101
103
|
parallel (~> 1.10)
|
102
|
-
parser (>= 3.
|
104
|
+
parser (>= 3.1.2.1)
|
103
105
|
rainbow (>= 2.2.2, < 4.0)
|
104
106
|
regexp_parser (>= 1.8, < 3.0)
|
105
|
-
rexml
|
106
|
-
rubocop-ast (>= 1.
|
107
|
+
rexml (>= 3.2.5, < 4.0)
|
108
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
107
109
|
ruby-progressbar (~> 1.7)
|
108
110
|
unicode-display_width (>= 1.4.0, < 3.0)
|
109
|
-
rubocop-ast (1.
|
110
|
-
parser (>= 3.
|
111
|
-
rubocop-performance (1.
|
111
|
+
rubocop-ast (1.23.0)
|
112
|
+
parser (>= 3.1.1.0)
|
113
|
+
rubocop-performance (1.15.1)
|
112
114
|
rubocop (>= 1.7.0, < 2.0)
|
113
115
|
rubocop-ast (>= 0.4.0)
|
114
116
|
rubocop-rake (0.6.0)
|
115
117
|
rubocop (~> 1.0)
|
116
|
-
rubocop-rspec (2.
|
117
|
-
rubocop (~> 1.
|
118
|
-
rubocop-ast (>= 1.1.0)
|
118
|
+
rubocop-rspec (2.15.0)
|
119
|
+
rubocop (~> 1.33)
|
119
120
|
ruby-progressbar (1.11.0)
|
120
|
-
ruby_parser (3.
|
121
|
-
sexp_processor (~> 4.
|
122
|
-
sexp_processor (4.
|
123
|
-
thor (1.1
|
124
|
-
tzinfo (2.0.
|
121
|
+
ruby_parser (3.19.1)
|
122
|
+
sexp_processor (~> 4.16)
|
123
|
+
sexp_processor (4.16.1)
|
124
|
+
thor (1.2.1)
|
125
|
+
tzinfo (2.0.5)
|
125
126
|
concurrent-ruby (~> 1.0)
|
126
|
-
unicode-display_width (2.
|
127
|
-
zeitwerk (2.
|
127
|
+
unicode-display_width (2.3.0)
|
128
|
+
zeitwerk (2.6.6)
|
128
129
|
|
129
130
|
PLATFORMS
|
130
131
|
ruby
|
@@ -145,4 +146,4 @@ DEPENDENCIES
|
|
145
146
|
rubocop-rspec
|
146
147
|
|
147
148
|
BUNDLED WITH
|
148
|
-
2.
|
149
|
+
2.3.26
|
data/README.md
CHANGED
@@ -5,8 +5,6 @@
|
|
5
5
|
|
6
6
|
Lite::Redis is a library for accessing Redis with an ActiveRecord like ORM interface.
|
7
7
|
|
8
|
-
**NOTE:** If you are coming from `ActiveRedisDB`, please read the [port](#port) section.
|
9
|
-
|
10
8
|
## Installation
|
11
9
|
|
12
10
|
Add this line to your application's Gemfile:
|
@@ -29,12 +27,11 @@ Or install it yourself as:
|
|
29
27
|
* [Pooling](#pooling)
|
30
28
|
* [Commands](#commands)
|
31
29
|
* [Callers](#callers)
|
32
|
-
* [Port](#port)
|
33
30
|
|
34
31
|
## Configurations
|
35
32
|
|
36
|
-
`rails g lite:redis:install` will generate the following file:
|
37
|
-
|
33
|
+
`rails g lite:redis:install` will generate the following file in your application root:
|
34
|
+
`config/initalizers/lite_redis.rb`
|
38
35
|
|
39
36
|
```ruby
|
40
37
|
Lite::Redis.configure do |config|
|
@@ -69,25 +66,21 @@ end
|
|
69
66
|
|
70
67
|
## Callers
|
71
68
|
|
72
|
-
|
73
|
-
|
69
|
+
Redis commands could be via a class or instance call.
|
70
|
+
Instance access reuses a Redis connection for better performance.
|
74
71
|
|
72
|
+
#### Instance
|
75
73
|
```ruby
|
76
|
-
# Single class access
|
77
|
-
Lite::Redis::String.create(:example, '123')
|
78
|
-
Lite::Redis::String.find(:example)
|
79
|
-
|
80
|
-
# - or -
|
81
|
-
|
82
|
-
# Multiple instance access
|
83
74
|
string = Lite::Redis::String.new
|
84
75
|
string.create(:example, '123')
|
85
76
|
string.find(:example)
|
86
77
|
```
|
87
78
|
|
88
|
-
|
89
|
-
|
90
|
-
|
79
|
+
#### Class
|
80
|
+
```ruby
|
81
|
+
Lite::Redis::String.create(:example, '123')
|
82
|
+
Lite::Redis::String.find(:example)
|
83
|
+
```
|
91
84
|
|
92
85
|
## Development
|
93
86
|
|
@@ -97,7 +90,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
97
90
|
|
98
91
|
## Contributing
|
99
92
|
|
100
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
93
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/drexed/lite-redis. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
101
94
|
|
102
95
|
## License
|
103
96
|
|
@@ -105,4 +98,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
105
98
|
|
106
99
|
## Code of Conduct
|
107
100
|
|
108
|
-
Everyone interacting in the Lite::Redis project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
101
|
+
Everyone interacting in the Lite::Redis project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/drexed/lite-redis/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "bundler/setup"
|
5
|
+
require "lite/redis"
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require 'lite/redis'
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require "irb"
|
15
15
|
IRB.start(__FILE__)
|
data/docs/CONNECTION.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Connection
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/connection.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/connection_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
connection = Lite::Redis::Connection.new
|
11
|
-
connection.
|
12
|
+
connection.connected? #=> true
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
#### Class
|
16
|
+
```ruby
|
17
|
+
Lite::Redis::Connection.connected? #=> true
|
14
18
|
```
|
data/docs/GEO.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Geo
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/geo.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/geo_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
geo = Lite::Redis::Geo.new
|
11
|
-
geo.
|
12
|
+
geo.position('Sicily', 'Catania') #=> [['15.08726745843887329', '37.50266842333162032']]
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
#### Class
|
16
|
+
```ruby
|
17
|
+
Lite::Redis::Geo.position('Sicily', 'Catania') #=> [['15.08726745843887329', '37.50266842333162032']]
|
14
18
|
```
|
data/docs/HASH.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Hash
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/hash.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/hash_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
hash = Lite::Redis::Hash.new
|
11
|
-
hash.
|
12
|
+
hash.find(:example, :name) #=> 1
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
#### Class
|
16
|
+
```ruby
|
17
|
+
Lite::Redis::Hash.find(:example, :name) #=> 1
|
14
18
|
```
|
data/docs/HYPER_LOG_LOG.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# HyperLogLog
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/hyper_log_log.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/hyper_log_log_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
hyper_log_log = Lite::Redis::HyperLogLog.new
|
11
|
-
hyper_log_log.
|
12
|
+
hyper_log_log.count(:foo) #=> 1
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::HyperLogLog.count(:foo) #=> 1
|
14
18
|
```
|
data/docs/KEY.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Key
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/key.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/key_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
key = Lite::Redis::Key.new
|
11
|
-
key.
|
12
|
+
key.exists?(:example) #=> true
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::Key.exists?(:example) #=> true
|
14
18
|
```
|
data/docs/LIST.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# List
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/list.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/list_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
list = Lite::Redis::List.new
|
11
|
-
list.
|
12
|
+
list.first(:example) #=> 'one'
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::List.first(:example) #=> 'one'
|
14
18
|
```
|
data/docs/PUB_SUB.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# PubSub
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/pub_sub.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/pub_sub_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
pub_sub = Lite::Redis::PubSub.new
|
11
12
|
pub_sub.subscribe('foo') do |on|
|
@@ -26,6 +27,9 @@ pub_sub.subscribe('foo') do |on|
|
|
26
27
|
@t2 = total
|
27
28
|
end
|
28
29
|
end
|
30
|
+
```
|
29
31
|
|
32
|
+
#### Class
|
33
|
+
```ruby
|
30
34
|
Lite::Redis::PubSub.subscribed? #=> true
|
31
35
|
```
|
data/docs/SCRIPT.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Script
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/script.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/script_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
# Instance
|
9
10
|
```ruby
|
10
11
|
script = Lite::Redis::Script.new
|
11
|
-
script.
|
12
|
+
script.eval('return #KEYS') #=> 0
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::Script.eval('return #KEYS') #=> 0
|
14
18
|
```
|
data/docs/SET.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Set
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/set.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/set_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
set = Lite::Redis::Set.new
|
11
|
-
set.
|
12
|
+
set.find(:example) #=> ['1']
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::Set.find(:example) #=> ['1']
|
14
18
|
```
|
data/docs/SORTED_SET.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# Sorted Set
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/sorted_set.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/sorted_set_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
sorted_set = Lite::Redis::SortedSet.new
|
11
|
-
sorted_set.
|
12
|
+
sorted_set.find(:example, 2) #=> 'two'
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
#### Class
|
16
|
+
```ruby
|
17
|
+
Lite::Redis::SortedSet.find(:example, 2) #=> 'two'
|
14
18
|
```
|
data/docs/STRING.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
# String
|
2
2
|
|
3
|
-
|
3
|
+
## Usage
|
4
4
|
|
5
|
-
Please read the corresponding [
|
5
|
+
Please read the corresponding [class](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/string.rb) file to see all available methods.
|
6
6
|
|
7
7
|
Please read the corresponding [spec](https://github.com/drexed/lite-redis/blob/master/spec/lite/redis/string_spec.rb) file to see more example usages.
|
8
8
|
|
9
|
+
#### Instance
|
9
10
|
```ruby
|
10
11
|
string = Lite::Redis::String.new
|
11
|
-
string.create(:example1, '123')
|
12
|
+
string.create(:example1, '123') #=> 'OK'
|
13
|
+
```
|
12
14
|
|
15
|
+
#### Class
|
16
|
+
```ruby
|
13
17
|
Lite::Redis::String.find(:example1) #=> '123'
|
14
18
|
```
|