redis 4.1.1 → 4.2.1

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.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Redis
2
4
  class SubscribedClient
3
5
  def initialize(client)
@@ -32,24 +34,21 @@ class Redis
32
34
  call([:punsubscribe, *channels])
33
35
  end
34
36
 
35
- protected
37
+ protected
36
38
 
37
39
  def subscription(start, stop, channels, block, timeout = 0)
38
40
  sub = Subscription.new(&block)
39
41
 
40
42
  unsubscribed = false
41
43
 
42
- begin
43
- @client.call_loop([start, *channels], timeout) do |line|
44
- type, *rest = line
45
- sub.callbacks[type].call(*rest)
46
- unsubscribed = type == stop && rest.last == 0
47
- break if unsubscribed
48
- end
49
- ensure
50
- # No need to unsubscribe here. The real client closes the connection
51
- # whenever an exception is raised (see #ensure_connected).
44
+ @client.call_loop([start, *channels], timeout) do |line|
45
+ type, *rest = line
46
+ sub.callbacks[type].call(*rest)
47
+ unsubscribed = type == stop && rest.last == 0
48
+ break if unsubscribed
52
49
  end
50
+ # No need to unsubscribe here. The real client closes the connection
51
+ # whenever an exception is raised (see #ensure_connected).
53
52
  end
54
53
  end
55
54
 
@@ -58,7 +57,7 @@ class Redis
58
57
 
59
58
  def initialize
60
59
  @callbacks = Hash.new do |hash, key|
61
- hash[key] = lambda { |*_| }
60
+ hash[key] = ->(*_) {}
62
61
  end
63
62
 
64
63
  yield(self)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Redis
2
- VERSION = '4.1.1'
4
+ VERSION = '4.2.1'
3
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz
@@ -16,24 +16,10 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2019-05-06 00:00:00.000000000 Z
19
+ date: 2020-06-11 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: test-unit
23
- requirement: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: 3.1.5
28
- type: :development
29
- prerelease: false
30
- version_requirements: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 3.1.5
35
- - !ruby/object:Gem::Dependency
36
- name: mocha
22
+ name: em-synchrony
37
23
  requirement: !ruby/object:Gem::Requirement
38
24
  requirements:
39
25
  - - ">="
@@ -61,7 +47,7 @@ dependencies:
61
47
  - !ruby/object:Gem::Version
62
48
  version: '0'
63
49
  - !ruby/object:Gem::Dependency
64
- name: em-synchrony
50
+ name: mocha
65
51
  requirement: !ruby/object:Gem::Requirement
66
52
  requirements:
67
53
  - - ">="
@@ -113,7 +99,12 @@ files:
113
99
  homepage: https://github.com/redis/redis-rb
114
100
  licenses:
115
101
  - MIT
116
- metadata: {}
102
+ metadata:
103
+ bug_tracker_uri: https://github.com/redis/redis-rb/issues
104
+ changelog_uri: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md
105
+ documentation_uri: https://www.rubydoc.info/gems/redis/4.2.1
106
+ homepage_uri: https://github.com/redis/redis-rb
107
+ source_code_uri: https://github.com/redis/redis-rb/tree/v4.2.1
117
108
  post_install_message:
118
109
  rdoc_options: []
119
110
  require_paths:
@@ -122,15 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
113
  requirements:
123
114
  - - ">="
124
115
  - !ruby/object:Gem::Version
125
- version: 2.2.2
116
+ version: 2.3.0
126
117
  required_rubygems_version: !ruby/object:Gem::Requirement
127
118
  requirements:
128
119
  - - ">="
129
120
  - !ruby/object:Gem::Version
130
121
  version: '0'
131
122
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 2.5.1
123
+ rubygems_version: 3.0.4
134
124
  signing_key:
135
125
  specification_version: 4
136
126
  summary: A Ruby client library for Redis