brpoplpush-redis_script 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -4
- data/README.md +1 -1
- data/lib/brpoplpush/redis_script/config.rb +4 -5
- data/lib/brpoplpush/redis_script/lua_error.rb +1 -0
- data/lib/brpoplpush/redis_script/script.rb +6 -1
- data/lib/brpoplpush/redis_script/scripts.rb +6 -2
- data/lib/brpoplpush/redis_script/version.rb +4 -1
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d46e9d8ae7b62fd2865761754939ff04fb7367c06e923c4d361172317c8877e
|
4
|
+
data.tar.gz: f1f9faffd30fad2e31abdac271e1fbad4d122fa2112e6089256bbde8c2cbc9a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20d98ddb4c7fc491f0999190ac2676e7f2a8652a1bf3badaaf5c01e6f737e8d581049201058a4d5bc95120d4195536faf5e60585cd99d184093d7b1867af36bb
|
7
|
+
data.tar.gz: 1d7e7213940be21e4f9a792a52ad91fab2d2faf9b64c311fe5fa36b8f3b1f5f1e97aa99dc3ccdb507952ba8f0338e579db0e534cd0216140950e71e1ac024ef1
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,50 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v0.1.2](https://github.com/brpoplpush/brpoplpush-redis_script/tree/v0.1.2) (2021-03-18)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/v0.1.
|
5
|
+
[Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/v0.1.1...v0.1.2)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Various updates [\#21](https://github.com/brpoplpush/brpoplpush-redis_script/pull/21) ([mhenrixon](https://github.com/mhenrixon))
|
10
|
+
|
11
|
+
**Fixed bugs:**
|
12
|
+
|
13
|
+
- Improve compatibility with redis-namespace \#19 [\#20](https://github.com/brpoplpush/brpoplpush-redis_script/pull/20) ([Wolfer](https://github.com/Wolfer))
|
14
|
+
- lint: pin rubocop related gems [\#18](https://github.com/brpoplpush/brpoplpush-redis_script/pull/18) ([mberlanda](https://github.com/mberlanda))
|
15
|
+
|
16
|
+
**Closed issues:**
|
17
|
+
|
18
|
+
- redis-namespace asks to use admistrative commands directly [\#19](https://github.com/brpoplpush/brpoplpush-redis_script/issues/19)
|
19
|
+
|
20
|
+
## [v0.1.1](https://github.com/brpoplpush/brpoplpush-redis_script/tree/v0.1.1) (2020-02-10)
|
21
|
+
|
22
|
+
[Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/v0.1.0...v0.1.1)
|
6
23
|
|
7
24
|
**Implemented enhancements:**
|
8
25
|
|
9
26
|
- Improve gem configuration [\#5](https://github.com/brpoplpush/brpoplpush-redis_script/issues/5)
|
27
|
+
- Add CodeClimate [\#3](https://github.com/brpoplpush/brpoplpush-redis_script/issues/3)
|
28
|
+
|
29
|
+
**Fixed bugs:**
|
30
|
+
|
31
|
+
- Minor bugfixes [\#17](https://github.com/brpoplpush/brpoplpush-redis_script/pull/17) ([mberlanda](https://github.com/mberlanda))
|
32
|
+
- Fix the build after 0.1.1 bump [\#16](https://github.com/brpoplpush/brpoplpush-redis_script/pull/16) ([mberlanda](https://github.com/mberlanda))
|
33
|
+
|
34
|
+
**Closed issues:**
|
35
|
+
|
36
|
+
- Update README.md [\#4](https://github.com/brpoplpush/brpoplpush-redis_script/issues/4)
|
37
|
+
|
38
|
+
**Merged pull requests:**
|
39
|
+
|
40
|
+
- Minor README and gitignore update [\#15](https://github.com/brpoplpush/brpoplpush-redis_script/pull/15) ([mberlanda](https://github.com/mberlanda))
|
41
|
+
- Make explicit what the name of the parameter is [\#13](https://github.com/brpoplpush/brpoplpush-redis_script/pull/13) ([mhenrixon](https://github.com/mhenrixon))
|
42
|
+
- Create FUNDING.yml [\#2](https://github.com/brpoplpush/brpoplpush-redis_script/pull/2) ([mhenrixon](https://github.com/mhenrixon))
|
10
43
|
|
11
44
|
## [v0.1.0](https://github.com/brpoplpush/brpoplpush-redis_script/tree/v0.1.0) (2019-10-13)
|
45
|
+
|
46
|
+
[Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/af03994108e3a29627a9fdf350c28e1143f33c38...v0.1.0)
|
47
|
+
|
12
48
|
**Implemented enhancements:**
|
13
49
|
|
14
50
|
- Prepare for using code climate \(for fun and profit\) [\#9](https://github.com/brpoplpush/brpoplpush-redis_script/pull/9) ([mhenrixon](https://github.com/mhenrixon))
|
@@ -27,4 +63,4 @@
|
|
27
63
|
|
28
64
|
|
29
65
|
|
30
|
-
\* *This
|
66
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Bring your own LUA scripts into redis
|
4
4
|
|
5
|
-
|
5
|
+
![RSpec Status](https://github.com/brpoplpush/brpoplpush-redis_script/actions/workflows/rspec.yml/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/3770a079b380d50c3d50/maintainability)](https://codeclimate.com/github/brpoplpush/brpoplpush-redis_script/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/3770a079b380d50c3d50/test_coverage)](https://codeclimate.com/github/brpoplpush/brpoplpush-redis_script/test_coverage) [![Gem Version](https://badge.fury.io/rb/brpoplpush-redis_script.svg)](https://badge.fury.io/rb/brpoplpush-redis_script)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,7 @@ module Brpoplpush
|
|
22
22
|
#
|
23
23
|
def initialize
|
24
24
|
@conn = Redis.new
|
25
|
-
@logger = Logger.new(
|
25
|
+
@logger = Logger.new($stdout)
|
26
26
|
@scripts_path = nil
|
27
27
|
end
|
28
28
|
|
@@ -37,16 +37,15 @@ module Brpoplpush
|
|
37
37
|
# @return [Pathname]
|
38
38
|
#
|
39
39
|
def scripts_path=(obj)
|
40
|
-
raise
|
40
|
+
raise ArgumentError, "#{obj} should be a Pathname or String" unless obj.is_a?(Pathname) || obj.is_a?(String)
|
41
|
+
raise ArgumentError, "#{obj} does not exist" unless Dir.exist?(obj.to_s)
|
41
42
|
|
42
43
|
@scripts_path =
|
43
44
|
case obj
|
44
45
|
when String
|
45
46
|
Pathname.new(obj)
|
46
|
-
when Pathname
|
47
|
-
obj
|
48
47
|
else
|
49
|
-
|
48
|
+
obj
|
50
49
|
end
|
51
50
|
end
|
52
51
|
|
@@ -90,7 +90,11 @@ module Brpoplpush
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def kill(conn)
|
93
|
-
conn.
|
93
|
+
if conn.respond_to?(:namespace)
|
94
|
+
conn.redis.script(:kill)
|
95
|
+
else
|
96
|
+
conn.script(:kill)
|
97
|
+
end
|
94
98
|
end
|
95
99
|
|
96
100
|
#
|
@@ -108,7 +112,7 @@ module Brpoplpush
|
|
108
112
|
#
|
109
113
|
def execute(name, conn, keys: [], argv: [])
|
110
114
|
script = fetch(name, conn)
|
111
|
-
conn.evalsha(script.sha, keys
|
115
|
+
conn.evalsha(script.sha, keys, argv)
|
112
116
|
end
|
113
117
|
|
114
118
|
def count
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brpoplpush-redis_script
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
8
8
|
- Mauro Berlanda
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|
@@ -38,9 +38,9 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
|
-
- - "
|
41
|
+
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '6'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -48,9 +48,9 @@ dependencies:
|
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '1.0'
|
51
|
-
- - "
|
51
|
+
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '6'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: bundler
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,33 +94,33 @@ dependencies:
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '3.7'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
|
-
name:
|
97
|
+
name: github_changelog_generator
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '1.14'
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '1.14'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
111
|
+
name: github-markup
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '3.0'
|
117
117
|
type: :development
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '3.0'
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: yard
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +180,8 @@ metadata:
|
|
180
180
|
homepage_uri: https://github.com/brpoplpush/brpoplpush-redis_script
|
181
181
|
source_code_uri: https://github.com/brpoplpush/brpoplpush-redis_script
|
182
182
|
changelog_uri: https://github.com/brpoplpush/brpoplpush-redis_script/CHANGELOG.md
|
183
|
-
|
183
|
+
rubygems_mfa_required: 'true'
|
184
|
+
post_install_message:
|
184
185
|
rdoc_options: []
|
185
186
|
require_paths:
|
186
187
|
- lib
|
@@ -195,8 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
196
|
- !ruby/object:Gem::Version
|
196
197
|
version: '0'
|
197
198
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
199
|
-
signing_key:
|
199
|
+
rubygems_version: 3.3.25
|
200
|
+
signing_key:
|
200
201
|
specification_version: 4
|
201
202
|
summary: Bring your own LUA scripts into redis.
|
202
203
|
test_files: []
|