brpoplpush-redis_script 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4bac1842f6d81e11d231b6a234c46fc1ba94ede62e5b1d494aac87d04e02022
4
- data.tar.gz: e6190a51d0ca178ddc85bbae1ec3fcf5f2a14f7ac5d68f90224a9c3951640089
3
+ metadata.gz: 700c428f39509841b1b57649080eb10d4e39d3a9307841185244474f2f2f6b46
4
+ data.tar.gz: 7eba093ab9a513c0693f3dedd1e65f07c6a38d717f5f9521d90adc9a842e8d3b
5
5
  SHA512:
6
- metadata.gz: 75fad960fd02fad8c309bc061b758430a27326f9fda39e993c5a45e77a74a2ef62bb5ff66c61651917e673246938787311c87683de2cf5803eabeba50a62b018
7
- data.tar.gz: 4ddbe7e9ae77e297e7aa6267005fcfaaa48702c8358c180650f4af6337bad2e74bdb04eb5617dbd0539f8b98d749a806f5acf45ebbe4f1fd12a70942d89ccbee
6
+ metadata.gz: 39ed7c606fa733e6f936439a80b6ab0609886d35d22f6f24fb5e54ac7429c157310ce178dc89cf9b6e745ab521993b9bc74de16cc135acb8cf8b49bc33e17e87
7
+ data.tar.gz: a28466e28c6f937811d887a5b71aced052d01aa8f6957d9c453a3d754ac0466849bae7c96cd9def50b827f3e8ea855fba7ccb1c10386a65e7836180eb6c12ac2
data/CHANGELOG.md CHANGED
@@ -1,14 +1,33 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
- ## [Unreleased](https://github.com/brpoplpush/brpoplpush-redis_script/tree/HEAD)
3
+ ## [v0.1.1](https://github.com/brpoplpush/brpoplpush-redis_script/tree/v0.1.1) (2020-02-10)
4
4
 
5
- [Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/v0.1.0...HEAD)
5
+ [Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/v0.1.0...v0.1.1)
6
6
 
7
7
  **Implemented enhancements:**
8
8
 
9
9
  - Improve gem configuration [\#5](https://github.com/brpoplpush/brpoplpush-redis_script/issues/5)
10
+ - Add CodeClimate [\#3](https://github.com/brpoplpush/brpoplpush-redis_script/issues/3)
11
+
12
+ **Fixed bugs:**
13
+
14
+ - Minor bugfixes [\#17](https://github.com/brpoplpush/brpoplpush-redis_script/pull/17) ([mberlanda](https://github.com/mberlanda))
15
+ - Fix the build after 0.1.1 bump [\#16](https://github.com/brpoplpush/brpoplpush-redis_script/pull/16) ([mberlanda](https://github.com/mberlanda))
16
+
17
+ **Closed issues:**
18
+
19
+ - Update README.md [\#4](https://github.com/brpoplpush/brpoplpush-redis_script/issues/4)
20
+
21
+ **Merged pull requests:**
22
+
23
+ - Minor README and gitignore update [\#15](https://github.com/brpoplpush/brpoplpush-redis_script/pull/15) ([mberlanda](https://github.com/mberlanda))
24
+ - Make explicit what the name of the parameter is [\#13](https://github.com/brpoplpush/brpoplpush-redis_script/pull/13) ([mhenrixon](https://github.com/mhenrixon))
25
+ - Create FUNDING.yml [\#2](https://github.com/brpoplpush/brpoplpush-redis_script/pull/2) ([mhenrixon](https://github.com/mhenrixon))
10
26
 
11
27
  ## [v0.1.0](https://github.com/brpoplpush/brpoplpush-redis_script/tree/v0.1.0) (2019-10-13)
28
+
29
+ [Full Changelog](https://github.com/brpoplpush/brpoplpush-redis_script/compare/af03994108e3a29627a9fdf350c28e1143f33c38...v0.1.0)
30
+
12
31
  **Implemented enhancements:**
13
32
 
14
33
  - 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 +46,4 @@
27
46
 
28
47
 
29
48
 
30
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
49
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -22,7 +22,7 @@ module Brpoplpush
22
22
  #
23
23
  def initialize
24
24
  @conn = Redis.new
25
- @logger = Logger.new(STDOUT)
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(ArgumentError, "#{obj} does not exist") unless Dir.exist?(obj.to_s)
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
- raise ArgumentError, "#{obj} should be a Pathname or String"
48
+ obj
50
49
  end
51
50
  end
52
51
 
@@ -66,7 +66,12 @@ module Brpoplpush
66
66
  end
67
67
 
68
68
  def load(conn)
69
- @sha = conn.script(:load, source)
69
+ @sha =
70
+ if conn.respond_to?(:namespace)
71
+ conn.redis.script(:load, source)
72
+ else
73
+ conn.script(:load, source)
74
+ end
70
75
 
71
76
  self
72
77
  end
@@ -90,7 +90,11 @@ module Brpoplpush
90
90
  end
91
91
 
92
92
  def kill(conn)
93
- conn.script(:kill)
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
  #
@@ -1,7 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :nocov:
3
4
  module Brpoplpush
5
+ # :nocov:
4
6
  module RedisScript
5
- VERSION = "0.1.1"
7
+ # :nocov:
8
+ VERSION = "0.1.2"
6
9
  end
7
10
  end
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.1
4
+ version: 0.1.2
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: 2020-02-11 00:00:00.000000000 Z
12
+ date: 2021-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -94,33 +94,33 @@ dependencies:
94
94
  - !ruby/object:Gem::Version
95
95
  version: '3.7'
96
96
  - !ruby/object:Gem::Dependency
97
- name: github-markup
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: '3.0'
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: '3.0'
109
+ version: '1.14'
110
110
  - !ruby/object:Gem::Dependency
111
- name: github_changelog_generator
111
+ name: github-markup
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.14'
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: '1.14'
123
+ version: '3.0'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: yard
126
126
  requirement: !ruby/object:Gem::Requirement
@@ -180,7 +180,7 @@ 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
- post_install_message:
183
+ post_install_message:
184
184
  rdoc_options: []
185
185
  require_paths:
186
186
  - lib
@@ -195,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.0.3
199
- signing_key:
198
+ rubygems_version: 3.2.6
199
+ signing_key:
200
200
  specification_version: 4
201
201
  summary: Bring your own LUA scripts into redis.
202
202
  test_files: []