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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -2
  3. data/CHANGELOG.md +11 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +73 -72
  6. data/README.md +12 -19
  7. data/Rakefile +2 -2
  8. data/bin/console +3 -3
  9. data/docs/CONNECTION.md +8 -4
  10. data/docs/GEO.md +8 -4
  11. data/docs/HASH.md +8 -4
  12. data/docs/HYPER_LOG_LOG.md +7 -3
  13. data/docs/KEY.md +7 -3
  14. data/docs/LIST.md +7 -3
  15. data/docs/PUB_SUB.md +6 -2
  16. data/docs/SCRIPT.md +7 -3
  17. data/docs/SET.md +7 -3
  18. data/docs/SORTED_SET.md +8 -4
  19. data/docs/STRING.md +7 -3
  20. data/docs/TRANSACTION.md +8 -4
  21. data/lib/generators/lite/redis/install_generator.rb +2 -2
  22. data/lib/lite/redis/base.rb +53 -2
  23. data/lib/lite/redis/configuration.rb +2 -2
  24. data/lib/lite/redis/connection.rb +96 -3
  25. data/lib/lite/redis/geo.rb +24 -3
  26. data/lib/lite/redis/hash.rb +60 -3
  27. data/lib/lite/redis/hyper_log_log.rb +12 -3
  28. data/lib/lite/redis/key.rb +86 -3
  29. data/lib/lite/redis/list.rb +124 -3
  30. data/lib/lite/redis/pub_sub.rb +36 -3
  31. data/lib/lite/redis/railtie.rb +1 -1
  32. data/lib/lite/redis/script.rb +12 -3
  33. data/lib/lite/redis/set.rb +60 -3
  34. data/lib/lite/redis/sorted_set.rb +127 -3
  35. data/lib/lite/redis/string.rb +87 -3
  36. data/lib/lite/redis/transaction.rb +20 -3
  37. data/lib/lite/redis/version.rb +1 -1
  38. data/lib/lite/redis.rb +17 -32
  39. data/lib/tasks/redis.rake +10 -10
  40. data/lite-redis.gemspec +27 -33
  41. metadata +9 -17
  42. data/lib/lite/redis/helpers/base_helper.rb +0 -41
  43. data/lib/lite/redis/helpers/connection_helper.rb +0 -105
  44. data/lib/lite/redis/helpers/geo_helper.rb +0 -33
  45. data/lib/lite/redis/helpers/hash_helper.rb +0 -69
  46. data/lib/lite/redis/helpers/hyper_log_log_helper.rb +0 -21
  47. data/lib/lite/redis/helpers/key_helper.rb +0 -95
  48. data/lib/lite/redis/helpers/list_helper.rb +0 -133
  49. data/lib/lite/redis/helpers/pub_sub_helper.rb +0 -45
  50. data/lib/lite/redis/helpers/script_helper.rb +0 -21
  51. data/lib/lite/redis/helpers/set_helper.rb +0 -69
  52. data/lib/lite/redis/helpers/sorted_set_helper.rb +0 -136
  53. data/lib/lite/redis/helpers/string_helper.rb +0 -96
  54. 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: 3f426319d9631235a0f5a27972f6c1b0310fb4c2b97ea17e8dea360535d8e649
4
- data.tar.gz: ffcc5b53f7dd53f476f81b797f7a1557185e13b6c3d63417f90ba675b2546cd3
3
+ metadata.gz: fecc0a6a4777336e6cc102628f7bf2327a1e4c2e15a4bc0751e90548f03df99e
4
+ data.tar.gz: dda8f438f3294cda99f4bf02c54d6597fd7dbdc20f6a932bcfe37576f2b5d965
5
5
  SHA512:
6
- metadata.gz: 0d64d95c65dacc323c2615196b885d5489a4e28df967412f0939f80becf722714b7e7617fbbc58f4191480bbabe4abedaeee133cfe4b79444b854915365b7698
7
- data.tar.gz: 05bb6998220c88c4407644b02b42dfe518d3a8c6e6dfd8d4c04bcb0ccaa8e7c61bdff4852bc7d0bdb401485f5d9747686efba2a890e7abf04d81b2358b77ba46
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
- Max: 100
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in lite-redis.gemspec
6
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,130 +1,131 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-redis (1.1.2)
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 (6.1.4)
11
- actionview (= 6.1.4)
12
- activesupport (= 6.1.4)
13
- rack (~> 2.0, >= 2.0.9)
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 (6.1.4)
18
- activesupport (= 6.1.4)
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 (6.1.4)
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.9)
33
- connection_pool (2.2.5)
31
+ concurrent-ruby (1.1.10)
32
+ connection_pool (2.3.0)
34
33
  crass (1.0.6)
35
- diff-lcs (1.4.4)
36
- erubi (1.10.0)
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.9.0)
38
+ fasterer (0.10.0)
40
39
  colorize (~> 0.7)
41
- ruby_parser (>= 3.14.1)
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.8.10)
44
+ i18n (1.12.0)
46
45
  concurrent-ruby (~> 1.0)
47
- loofah (2.10.0)
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.5.3)
52
- minitest (5.14.4)
53
- nokogiri (1.11.7)
54
- mini_portile2 (~> 2.5.0)
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.20.1)
57
- parser (3.0.2.0)
56
+ parallel (1.22.1)
57
+ parser (3.1.2.1)
58
58
  ast (~> 2.4.1)
59
- racc (1.5.2)
60
- rack (2.2.3)
61
- rack-test (1.1.0)
62
- rack (>= 1.0, < 3)
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.0)
66
+ rails-html-sanitizer (1.4.3)
67
67
  loofah (~> 2.3)
68
- railties (6.1.4)
69
- actionpack (= 6.1.4)
70
- activesupport (= 6.1.4)
68
+ railties (7.0.4)
69
+ actionpack (= 7.0.4)
70
+ activesupport (= 7.0.4)
71
71
  method_source
72
- rake (>= 0.13)
72
+ rake (>= 12.2)
73
73
  thor (~> 1.0)
74
- rainbow (3.0.0)
74
+ zeitwerk (~> 2.5)
75
+ rainbow (3.1.1)
75
76
  rake (13.0.6)
76
- redis (4.3.1)
77
- regexp_parser (2.1.1)
77
+ redis (4.8.0)
78
+ regexp_parser (2.6.1)
78
79
  rexml (3.2.5)
79
- rspec (3.10.0)
80
- rspec-core (~> 3.10.0)
81
- rspec-expectations (~> 3.10.0)
82
- rspec-mocks (~> 3.10.0)
83
- rspec-core (3.10.1)
84
- rspec-support (~> 3.10.0)
85
- rspec-expectations (3.10.1)
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.10.0)
88
- rspec-mocks (3.10.2)
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.10.0)
91
- rspec-rails (5.0.1)
92
- actionpack (>= 5.2)
93
- activesupport (>= 5.2)
94
- railties (>= 5.2)
95
- rspec-core (~> 3.10)
96
- rspec-expectations (~> 3.10)
97
- rspec-mocks (~> 3.10)
98
- rspec-support (~> 3.10)
99
- rspec-support (3.10.2)
100
- rubocop (1.18.3)
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.0.0.0)
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.7.0, < 2.0)
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.8.0)
110
- parser (>= 3.0.1.1)
111
- rubocop-performance (1.11.4)
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.4.0)
117
- rubocop (~> 1.0)
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.16.0)
121
- sexp_processor (~> 4.15, >= 4.15.1)
122
- sexp_processor (4.15.3)
123
- thor (1.1.0)
124
- tzinfo (2.0.4)
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.0.0)
127
- zeitwerk (2.4.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.2.24
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
- `../config/initalizers/lite_redis.rb`
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
- There are two ways to access Redis commands, single class and multiple instance access.
73
- Multiple instance access reuses a Redis connection for better performance.
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
- ## Port
89
-
90
- `Lite::Redis` is a near compatible port of [ActiveRedisDB](https://github.com/drexed/active_redis_db).
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/[USERNAME]/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.
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/[USERNAME]/lite-redis/blob/master/CODE_OF_CONDUCT.md).
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
data/bin/console CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'bundler/setup'
5
- require 'lite/redis'
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 'irb'
14
+ require "irb"
15
15
  IRB.start(__FILE__)
data/docs/CONNECTION.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # Connection
2
2
 
3
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/connection_helper.rb) file to see all available methods.
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.authenticate('pass') #=> 'OK'
12
+ connection.connected? #=> true
13
+ ```
12
14
 
13
- Lite::Redis::Connection.connected? #=> true
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/geo_helper.rb) file to see all available methods.
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.create('Sicily', 13.361389, 38.115556) #=> 1
12
+ geo.position('Sicily', 'Catania') #=> [['15.08726745843887329', '37.50266842333162032']]
13
+ ```
12
14
 
13
- Lite::Redis::Geo.position('Sicily', 'Catania') #=> [['15.08726745843887329', '37.50266842333162032']]
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/hash_helper.rb) file to see all available methods.
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.create(:example, :name, 1)
12
+ hash.find(:example, :name) #=> 1
13
+ ```
12
14
 
13
- Lite::Redis::Hash.find(:example, :name) #=> 1
15
+ #### Class
16
+ ```ruby
17
+ Lite::Redis::Hash.find(:example, :name) #=> 1
14
18
  ```
@@ -1,14 +1,18 @@
1
1
  # HyperLogLog
2
2
 
3
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/hyper_log_log_helper.rb) file to see all available methods.
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.create(:foo, 's1') #=> true
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/key_helper.rb) file to see all available methods.
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.create(:example, 'hello') #=> 'OK'
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/list_helper.rb) file to see all available methods.
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.create(:example, 'one') #=> 'OK'
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/pub_sub_helper.rb) file to see all available methods.
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/script_helper.rb) file to see all available methods.
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.script(:load, script) #=> 'OK'
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/set_helper.rb) file to see all available methods.
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.create(:example, '1') #=> 'OK'
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/sorted_set_helper.rb) file to see all available methods.
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.create(:example, 1, 1, 2, 'two', 3, '3') #=> 'OK'
12
+ sorted_set.find(:example, 2) #=> 'two'
13
+ ```
12
14
 
13
- Lite::Redis::SortedSet.find(:example, 2) #=> 'two'
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
- #### Usage
3
+ ## Usage
4
4
 
5
- Please read the corresponding [helper](https://github.com/drexed/lite-redis/blob/master/lib/lite/redis/helpers/string_helper.rb) file to see all available methods.
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') #=> 'OK'
12
+ string.create(:example1, '123') #=> 'OK'
13
+ ```
12
14
 
15
+ #### Class
16
+ ```ruby
13
17
  Lite::Redis::String.find(:example1) #=> '123'
14
18
  ```