redis-ick 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a8ee23db87a5631567762296b5acb79897623ffd
4
- data.tar.gz: 7e90497774b30eda375d0e0f28ed9b4782c74c64
2
+ SHA256:
3
+ metadata.gz: d85cffa0f5d199bf4f2eb09b8704240ab2dcdbb15807418204b08c9cd8a7f2d2
4
+ data.tar.gz: f70e1bd03a4a28dab7d663df2b041c425253fba5869d75c7df8d9ba2104ab42a
5
5
  SHA512:
6
- metadata.gz: 52c216162ffc916b83a89dfcf6bdd77103d9e6999dbecadce83d55af53beca49cf0bf7aa83bc24c2b10ae40346de385f0049b6522ffc9ce2926988ce7011090c
7
- data.tar.gz: ab4f0601d1516bdb9c9e25f341b8e30837df58899f5a647ebfdf8576590ab12d1f805d4deacb7ff7de38b4d77be6925f6ff73a5487149ec0fe292bf6ce22da92
6
+ metadata.gz: 688e4568ddbca4a5b55fc8b2853845176947f35306de5ed88ecce91845e68f720ba15ace22ee87cdd47a858b48cb9c85f9d60aa01fff3e9a71bfce6aaf6890fe
7
+ data.tar.gz: 3e7f41a26f4836658775494abc93f8bf12b501e817b5f7a39feffe43179c05d50299dfdd2feb930c9084358eb0ad4591defa62b4fc4556f434e62eb3b17ba3fb
data/.travis.yml CHANGED
@@ -19,8 +19,9 @@ services:
19
19
  rvm:
20
20
  - 2.1.6
21
21
  - 2.2.9
22
- - 2.4.3
23
- - 2.5.0
22
+ - 2.3.7
23
+ - 2.4.4
24
+ - 2.5.1
24
25
  gemfile:
25
26
  - gemfiles/redis_3.0.gemfile
26
27
  - gemfiles/redis_3.1.gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.1.2 (2019-02-27)
2
+
3
+ - Expanded .travis.yml to cover more ruby versions.
4
+ - Change Lua scripts so all Redis keys are passed as explicit args.
5
+ - The pset and cset keys are now computed from the main key in Ruby.
6
+ - This supports certain forms of Redis cluster syncing.
7
+
1
8
  ## 0.1.1 (2018-06-18)
2
9
 
3
10
  - Fix bug in `backwash`: cset scores not converted to number
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- redis-ick (0.1.1)
4
+ redis-ick (0.1.2)
5
5
  redis-script_manager (~> 0.0.2)
6
6
 
7
7
  GEM
@@ -51,4 +51,4 @@ DEPENDENCIES
51
51
  rubocop (~> 0.54.0)
52
52
 
53
53
  BUNDLED WITH
54
- 1.16.1
54
+ 1.16.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- redis-ick (0.1.1)
4
+ redis-ick (0.1.2)
5
5
  redis-script_manager (~> 0.0.2)
6
6
 
7
7
  GEM
@@ -51,4 +51,4 @@ DEPENDENCIES
51
51
  rubocop (~> 0.54.0)
52
52
 
53
53
  BUNDLED WITH
54
- 1.16.1
54
+ 1.16.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- redis-ick (0.1.1)
4
+ redis-ick (0.1.2)
5
5
  redis-script_manager (~> 0.0.2)
6
6
 
7
7
  GEM
@@ -51,4 +51,4 @@ DEPENDENCIES
51
51
  rubocop (~> 0.54.0)
52
52
 
53
53
  BUNDLED WITH
54
- 1.16.1
54
+ 1.16.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- redis-ick (0.1.1)
4
+ redis-ick (0.1.2)
5
5
  redis-script_manager (~> 0.0.2)
6
6
 
7
7
  GEM
@@ -51,4 +51,4 @@ DEPENDENCIES
51
51
  rubocop (~> 0.54.0)
52
52
 
53
53
  BUNDLED WITH
54
- 1.16.1
54
+ 1.16.5
data/lib/redis/ick.rb CHANGED
@@ -465,7 +465,14 @@ class Redis
465
465
  if !ick_key.is_a?(String)
466
466
  raise ArgumentError, "bogus non-String ick_key #{ick_key}"
467
467
  end
468
- Redis::ScriptManager.eval_gently(redis,lua,[ick_key],args)
468
+ ick_pset_key = "#{ick_key}/ick/{#{ick_key}}/pset"
469
+ ick_cset_key = "#{ick_key}/ick/{#{ick_key}}/cset"
470
+ Redis::ScriptManager.eval_gently(
471
+ redis,
472
+ lua,
473
+ [ick_key,ick_pset_key,ick_cset_key],
474
+ args
475
+ )
469
476
  end
470
477
 
471
478
  #######################################################################
@@ -535,8 +542,8 @@ class Redis
535
542
  LUA_ICK_PREFIX = %{
536
543
  local ick_key = KEYS[1]
537
544
  local ick_ver = redis.call('GET',ick_key)
538
- local ick_pset_key = ick_key .. '/ick/{' .. ick_key .. '}/pset'
539
- local ick_cset_key = ick_key .. '/ick/{' .. ick_key .. '}/cset'
545
+ local ick_pset_key = KEYS[2]
546
+ local ick_cset_key = KEYS[3]
540
547
  local ick_ver_type = redis.call('TYPE',ick_key).ok
541
548
  local ick_pset_type = redis.call('TYPE',ick_pset_key).ok
542
549
  local ick_cset_type = redis.call('TYPE',ick_cset_key).ok
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  class Ick
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.1.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-ick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jhwillett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-19 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-script_manager
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.4.8
78
+ rubygems_version: 2.7.8
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Redis queues with two-phase commit and write-folding.