sideroo 1.0.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.
@@ -0,0 +1,45 @@
1
+ module Sideroo
2
+ class SortedSet < Base
3
+ redis_methods %w[
4
+ zadd
5
+ zcard
6
+ zcount
7
+ zincrby
8
+ zlexcount
9
+ zpopmax
10
+ zpopmin
11
+ zrange
12
+ zrangebylex
13
+ zrangebyscore
14
+ zrank
15
+ zrem
16
+ zremrangebyrank
17
+ zremrangebyscore
18
+ zrevrange
19
+ zrevrangebylex
20
+ zrevrangebyscore
21
+ zrevrank
22
+ zscan
23
+ zscan_each
24
+ zscore
25
+ ]
26
+
27
+ def zinterstore(destination, *other_keys)
28
+ redis_client.zinterstore(destination, key, *other_keys)
29
+ end
30
+
31
+ # Use `self.key` as destination
32
+ def zinterstore!(*other_keys)
33
+ redis_client.zinterstore(key, *other_keys)
34
+ end
35
+
36
+ def zunionstore(destination, *other_keys)
37
+ redis_client.zunionstore(destination, key, *other_keys)
38
+ end
39
+
40
+ # Use `self.key` as destination
41
+ def zunionstore!(*other_keys)
42
+ redis_client.zunionstore(key, *other_keys)
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,26 @@
1
+ module Sideroo
2
+ class String < Base
3
+ redis_methods %w[
4
+ append
5
+ decr
6
+ decrby
7
+ get
8
+ getbit
9
+ getrange
10
+ getset
11
+ incr
12
+ incrby
13
+ incrbyfloat
14
+ mget
15
+ mset
16
+ msetnx
17
+ psetex
18
+ set
19
+ setbit
20
+ setex
21
+ setnx
22
+ setrange
23
+ strlen
24
+ ]
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module Sideroo
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,31 @@
1
+ require_relative 'lib/sideroo/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "sideroo"
5
+ spec.version = Sideroo::VERSION
6
+ spec.authors = ["Duong Nguyen"]
7
+ spec.email = ["ntd251@users.noreply.github.com"]
8
+
9
+ spec.summary = %q{Declarative and auditable object-oriented library for Redis}
10
+ spec.description = %q{
11
+ Provide a declarative Redis key definition, intuitive key initialization, object-oriented methods for Redis data type, and auditable Redis key management.
12
+ }
13
+ spec.homepage = "https://github.com/ntd251/sideroo"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.0.0")
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/ntd251/sideroo"
21
+ spec.metadata["changelog_uri"] = "https://github.com/ntd251/sideroo"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sideroo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Duong Nguyen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-07-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: "\n Provide a declarative Redis key definition, intuitive key initialization,
14
+ object-oriented methods for Redis data type, and auditable Redis key management.\n
15
+ \ "
16
+ email:
17
+ - ntd251@users.noreply.github.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ".gitignore"
23
+ - ".rspec"
24
+ - ".travis.yml"
25
+ - CODE_OF_CONDUCT.md
26
+ - Gemfile
27
+ - Gemfile.lock
28
+ - LICENSE.txt
29
+ - README.md
30
+ - Rakefile
31
+ - bin/console
32
+ - bin/setup
33
+ - lib/sideroo.rb
34
+ - lib/sideroo/enumerator.rb
35
+ - lib/sideroo/key_builder.rb
36
+ - lib/sideroo/types/base.rb
37
+ - lib/sideroo/types/bitmap.rb
38
+ - lib/sideroo/types/hash.rb
39
+ - lib/sideroo/types/hyper_log_log.rb
40
+ - lib/sideroo/types/list.rb
41
+ - lib/sideroo/types/set.rb
42
+ - lib/sideroo/types/sorted_set.rb
43
+ - lib/sideroo/types/string.rb
44
+ - lib/sideroo/version.rb
45
+ - sideroo.gemspec
46
+ homepage: https://github.com/ntd251/sideroo
47
+ licenses:
48
+ - MIT
49
+ metadata:
50
+ allowed_push_host: https://rubygems.org/
51
+ homepage_uri: https://github.com/ntd251/sideroo
52
+ source_code_uri: https://github.com/ntd251/sideroo
53
+ changelog_uri: https://github.com/ntd251/sideroo
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.0
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 2.7.8
71
+ signing_key:
72
+ specification_version: 4
73
+ summary: Declarative and auditable object-oriented library for Redis
74
+ test_files: []