async-redis 0.4.2 → 0.4.3
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/Gemfile +2 -0
- data/Rakefile +2 -0
- data/async-redis.gemspec +1 -1
- data/lib/async/redis.rb +2 -0
- data/lib/async/redis/client.rb +4 -2
- data/lib/async/redis/context/generic.rb +7 -5
- data/lib/async/redis/context/pipeline.rb +6 -4
- data/lib/async/redis/context/subscribe.rb +2 -0
- data/lib/async/redis/context/transaction.rb +3 -1
- data/lib/async/redis/key.rb +2 -0
- data/lib/async/redis/protocol/resp2.rb +2 -0
- data/lib/async/redis/version.rb +3 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 846a8f4d10913acf2d43343efb35a4ca9306db6a5fda6d9794774181939e6535
|
4
|
+
data.tar.gz: 0d25f58941fc326a9500e50a63ead3ac017d734f8292e4ebcf63f1cad3ff6280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8881dfb830d61c74b55415d693f2eda5a5caf04daf789400df7d8e7229468c929300264d305b5182a706b44cca1677ae930ea757ca139dcfe2b7b639f0bc6c0
|
7
|
+
data.tar.gz: b51195073ead610e2b95e67b9280c1b13472d51156985624782de72e9b3e57764ba2ad53b5758cedd9617e3ffc11a0668f89d6ee476e118f3300a600051c5973
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/async-redis.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency("async-io", "~> 1.10")
|
22
22
|
spec.add_dependency("async-pool", "~> 0.2")
|
23
23
|
|
24
|
-
spec.add_dependency("protocol-redis", "~> 0.
|
24
|
+
spec.add_dependency("protocol-redis", "~> 0.4.0")
|
25
25
|
|
26
26
|
spec.add_development_dependency "async-rspec", "~> 1.1"
|
27
27
|
spec.add_development_dependency "redis"
|
data/lib/async/redis.rb
CHANGED
data/lib/async/redis/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -54,8 +56,8 @@ module Async
|
|
54
56
|
|
55
57
|
# @return [client] if no block provided.
|
56
58
|
# @yield [client, task] yield the client in an async task.
|
57
|
-
def self.open(*
|
58
|
-
client = self.new(*
|
59
|
+
def self.open(*arguments, &block)
|
60
|
+
client = self.new(*arguments)
|
59
61
|
|
60
62
|
return client unless block_given?
|
61
63
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
# Copyright, 2018, by Huba Nagy.
|
3
5
|
#
|
@@ -25,7 +27,7 @@ module Async
|
|
25
27
|
module Redis
|
26
28
|
module Context
|
27
29
|
class Generic
|
28
|
-
def initialize(pool, *
|
30
|
+
def initialize(pool, *arguments)
|
29
31
|
@pool = pool
|
30
32
|
@connection = pool.acquire
|
31
33
|
end
|
@@ -37,8 +39,8 @@ module Async
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
|
-
def write_request(command, *
|
41
|
-
@connection.write_request([command, *
|
42
|
+
def write_request(command, *arguments)
|
43
|
+
@connection.write_request([command, *arguments])
|
42
44
|
end
|
43
45
|
|
44
46
|
def read_response
|
@@ -47,8 +49,8 @@ module Async
|
|
47
49
|
return @connection.read_response
|
48
50
|
end
|
49
51
|
|
50
|
-
def call(command, *
|
51
|
-
write_request(command, *
|
52
|
+
def call(command, *arguments)
|
53
|
+
write_request(command, *arguments)
|
52
54
|
|
53
55
|
return read_response
|
54
56
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
# Copyright, 2019, by Huba Nagy.
|
3
5
|
#
|
@@ -36,8 +38,8 @@ module Async
|
|
36
38
|
end
|
37
39
|
|
38
40
|
# This method just accumulates the commands and their params.
|
39
|
-
def call(command, *
|
40
|
-
@pipeline.call(command, *
|
41
|
+
def call(command, *arguments)
|
42
|
+
@pipeline.call(command, *arguments)
|
41
43
|
|
42
44
|
@pipeline.flush(1)
|
43
45
|
|
@@ -72,8 +74,8 @@ module Async
|
|
72
74
|
end
|
73
75
|
|
74
76
|
# This method just accumulates the commands and their params.
|
75
|
-
def call(command, *
|
76
|
-
write_request(command, *
|
77
|
+
def call(command, *arguments)
|
78
|
+
write_request(command, *arguments)
|
77
79
|
|
78
80
|
return nil
|
79
81
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
# Copyright, 2018, by Huba Nagy.
|
3
5
|
#
|
@@ -25,7 +27,7 @@ module Async
|
|
25
27
|
module Redis
|
26
28
|
module Context
|
27
29
|
class Transaction < Pipeline
|
28
|
-
def initialize(pool, *
|
30
|
+
def initialize(pool, *arguments)
|
29
31
|
super(pool)
|
30
32
|
end
|
31
33
|
|
data/lib/async/redis/key.rb
CHANGED
data/lib/async/redis/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
4
|
#
|
3
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -20,6 +22,6 @@
|
|
20
22
|
|
21
23
|
module Async
|
22
24
|
module Redis
|
23
|
-
VERSION = "0.4.
|
25
|
+
VERSION = "0.4.3"
|
24
26
|
end
|
25
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-02-
|
12
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: async
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 0.4.0
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.4.0
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: async-rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|