Skip to content

Commit b226cc8

Browse files
committed
[#V1] Fixup stringo dep version
1 parent 8c7e194 commit b226cc8

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PATH
33
specs:
44
familia (1.1.0.pre.rc1)
55
redis (>= 4.8.1, < 6.0)
6-
stringio (~> 3.1.2)
6+
stringio (~> 3.1.1)
77
uri-redis (~> 1.3)
88

99
GEM
@@ -56,7 +56,7 @@ GEM
5656
rubocop (>= 0.90.0)
5757
ruby-progressbar (1.13.0)
5858
storable (0.10.0)
59-
stringio (3.1.2)
59+
stringio (3.1.1)
6060
strscan (3.1.0)
6161
sysinfo (0.10.0)
6262
drydock (< 1.0)

familia.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
2020
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.8')
2121

2222
spec.add_dependency 'redis', '>= 4.8.1', '< 6.0'
23+
spec.add_dependency 'stringio', '~> 3.1.1'
2324
spec.add_dependency 'uri-redis', '~> 1.3'
24-
spec.add_dependency 'stringio', '~> 3.1.2'
2525

2626
spec.metadata['rubygems_mfa_required'] = 'true'
2727
end

lib/familia/horreum/commands.rb

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ def exists?
3636
true_or_false
3737
end
3838

39+
# Returns the number of fields in the main object hash
40+
# @return [Integer] number of fields
41+
def field_count
42+
redis.hlen rediskey
43+
end
44+
alias size field_count
45+
3946
# Sets a timeout on key. After the timeout has expired, the key will
4047
# automatically be deleted. Returns 1 if the timeout was set, 0 if key
4148
# does not exist or the timeout could not be set.
@@ -66,6 +73,7 @@ def remove_field(field)
6673
Familia.trace :HDEL, redis, field, caller(1..1) if Familia.debug?
6774
redis.hdel rediskey, field
6875
end
76+
alias remove remove_field # deprecated
6977

7078
def redistype
7179
Familia.trace :REDISTYPE, redis, redisuri, caller(1..1) if Familia.debug?

0 commit comments

Comments
 (0)