redis_web_manager 0.3.2 → 0.3.8

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: e2598089292ddad510fe9e4fc7ce98696706079da9f89562a86b4d7faa56a380
4
- data.tar.gz: 9be35dac04006cb73b2cf4e8175096a76bcfc7d3df7f198b1bd8928c04ba56e6
3
+ metadata.gz: 428aa9f1970ae3e2eeab18c4387ba04d5b7abf89e1b4748c8af169eec1e6a5f0
4
+ data.tar.gz: 7436df93d55f63b257f1ffc3005df146700de3bb25cb3bca5a5996431ceb69c6
5
5
  SHA512:
6
- metadata.gz: d2395861c6c3de485c9b1182cabe552258d7cdf012a996ce60c5116a7ac4aec87e30567fba7527b8603e5fb2b2fb22d8d814b27ff23257615e3dbad29c837572
7
- data.tar.gz: 538fbfa57d47d91d0b099faf560ae2faf7ebea5b60425a27674794bbe238ccd82833e2e7b2f9b14c30438851eb9b5a8a7e5bcb47abb419804c42da1c7218ab5f
6
+ metadata.gz: 27c014c1b2574c867d0ac66c60b2ce4cae64ec9a778e833f70038c1acb5e18806df7c404e74c2e5d15e13fcb680297245327f970380615379ca8a7b43a45ebfe
7
+ data.tar.gz: 0a2c89e42be5e2232647738c8f8ef8acd75f1f978de0f5564ff11c799575341377f3bbdac42c3d8ce2de8aa27baac974569016842fe3f21b0e24f032b82f0634
@@ -2,6 +2,7 @@
2
2
 
3
3
  RedisWebManager::Engine.routes.draw do
4
4
  redises_keys = RedisWebManager.redises.keys
5
+
5
6
  scope ':instance', instance: /#{redises_keys.join('|')}/ do
6
7
  # Configuration
7
8
  get :configuration, to: 'configuration#index'
@@ -6,10 +6,11 @@ require 'redis_web_manager/action'
6
6
  require 'redis_web_manager/connection'
7
7
  require 'redis_web_manager/info'
8
8
  require 'redis_web_manager/data'
9
+ require 'active_support/time'
9
10
  require 'redis'
10
11
 
11
12
  module RedisWebManager
12
- mattr_accessor :redises, default: { default: ::Redis.new }
13
+ mattr_accessor :redises, default: { default: Redis.new }
13
14
  mattr_accessor :lifespan, default: 15.days
14
15
  mattr_accessor :authenticate, default: nil
15
16
 
@@ -26,7 +27,7 @@ module RedisWebManager
26
27
  raise(ArgumentError, 'Invalid redises hash, use like that { test: Redis.new }')
27
28
  end
28
29
  redises.each do |k, v|
29
- unless v.is_a?(::Redis)
30
+ unless v.is_a?(Redis)
30
31
  raise(ArgumentError, "Invalid Redis instance for #{k}, use like that Redis.new")
31
32
  end
32
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedisWebManager
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.8'
5
5
  end
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency 'rspec-rails', '~> 4.0.0'
39
39
  spec.add_development_dependency 'simplecov', '~> 0.16'
40
40
 
41
- spec.add_dependency 'pagy', '~> 3.7'
41
+ spec.add_dependency 'pagy', '~> 3.8'
42
42
  spec.add_dependency 'rails', '>= 5.2', '< 7'
43
- spec.add_dependency 'redis', '~> 4.1.0'
43
+ spec.add_dependency 'redis', '>= 4.1.0', '< 5'
44
44
  end
@@ -5,7 +5,7 @@ require 'rails_helper'
5
5
  RSpec.describe RedisWebManager::KeysController, type: :controller do
6
6
  routes { RedisWebManager::Engine.routes }
7
7
  let(:redis) do
8
- ::Redis.new
8
+ Redis.new
9
9
  end
10
10
 
11
11
  let(:default) do
@@ -8,7 +8,7 @@ RSpec.describe RedisWebManager::Action do
8
8
  end
9
9
 
10
10
  let(:redis) do
11
- ::Redis.new
11
+ Redis.new
12
12
  end
13
13
 
14
14
  describe 'action' do
@@ -8,7 +8,6 @@ RSpec.describe RedisWebManager::Connection do
8
8
  end
9
9
 
10
10
  describe 'connection' do
11
-
12
11
  it 'returns a host' do
13
12
  expect(connection.host).to eql('127.0.0.1')
14
13
  end
@@ -28,6 +27,5 @@ RSpec.describe RedisWebManager::Connection do
28
27
  it 'returns a location' do
29
28
  expect(connection.location).to eql('127.0.0.1:6379')
30
29
  end
31
-
32
30
  end
33
31
  end
@@ -8,7 +8,7 @@ RSpec.describe RedisWebManager::Info do
8
8
  end
9
9
 
10
10
  let(:redis) do
11
- ::Redis.new
11
+ Redis.new
12
12
  end
13
13
 
14
14
  describe 'info' do
@@ -40,7 +40,7 @@ RSpec.describe RedisWebManager do
40
40
  expect do
41
41
  RedisWebManager.configure do |c|
42
42
  c.redises = {
43
- default: ::Redis.new
43
+ default: Redis.new
44
44
  }
45
45
  c.lifespan = 1
46
46
  end
@@ -51,12 +51,24 @@ RSpec.describe RedisWebManager do
51
51
  expect do
52
52
  RedisWebManager.configure do |c|
53
53
  c.redises = {
54
- default: ::Redis.new
54
+ default: Redis.new
55
55
  }
56
56
  c.lifespan = -1.days
57
57
  end
58
58
  end.to raise_error(ArgumentError, 'Invalid lifespan, value must be greater than 0')
59
59
  end
60
60
 
61
+ it 'returns instances' do
62
+ RedisWebManager.configure do |c|
63
+ c.redises = {
64
+ foo: Redis.new,
65
+ bar: Redis.new
66
+ }
67
+ c.lifespan = 12.days
68
+ end
69
+
70
+ expect(RedisWebManager.redises.keys).to eql(%i[foo bar])
71
+ expect(RedisWebManager.redises.values.map(&:class)).to eql([Redis, Redis])
72
+ end
61
73
  end
62
74
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_web_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris BRESCIANI
8
8
  - Benjamin DARCET
9
9
  - Olivier DUMAS
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-03-26 00:00:00.000000000 Z
13
+ date: 2021-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coveralls
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '3.7'
63
+ version: '3.8'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '3.7'
70
+ version: '3.8'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rails
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -92,16 +92,22 @@ dependencies:
92
92
  name: redis
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: 4.1.0
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: '5'
98
101
  type: :runtime
99
102
  prerelease: false
100
103
  version_requirements: !ruby/object:Gem::Requirement
101
104
  requirements:
102
- - - "~>"
105
+ - - ">="
103
106
  - !ruby/object:Gem::Version
104
107
  version: 4.1.0
108
+ - - "<"
109
+ - !ruby/object:Gem::Version
110
+ version: '5'
105
111
  description: Manage your Redis instance (See keys, memory used, connected client,
106
112
  configuration, information)
107
113
  email:
@@ -118,7 +124,6 @@ files:
118
124
  - ".rubocop.yml"
119
125
  - ".travis.yml"
120
126
  - Gemfile
121
- - Gemfile.lock
122
127
  - MIT-LICENSE
123
128
  - README.md
124
129
  - Rakefile
@@ -364,7 +369,7 @@ licenses:
364
369
  metadata:
365
370
  homepage_uri: https://github.com/OpenGems/redis_web_manager
366
371
  source_code_uri: https://github.com/OpenGems/redis_web_manager
367
- post_install_message:
372
+ post_install_message:
368
373
  rdoc_options: []
369
374
  require_paths:
370
375
  - lib
@@ -380,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
385
  version: '0'
381
386
  requirements: []
382
387
  rubygems_version: 3.1.2
383
- signing_key:
388
+ signing_key:
384
389
  specification_version: 4
385
390
  summary: Manage your Redis instance (See keys, memory used, connected client, etc...)
386
391
  test_files:
@@ -1,184 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- redis_web_manager (0.3.2)
5
- pagy (~> 3.7)
6
- rails (>= 5.2, < 7)
7
- redis (~> 4.1.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (6.0.2.2)
13
- actionpack (= 6.0.2.2)
14
- nio4r (~> 2.0)
15
- websocket-driver (>= 0.6.1)
16
- actionmailbox (6.0.2.2)
17
- actionpack (= 6.0.2.2)
18
- activejob (= 6.0.2.2)
19
- activerecord (= 6.0.2.2)
20
- activestorage (= 6.0.2.2)
21
- activesupport (= 6.0.2.2)
22
- mail (>= 2.7.1)
23
- actionmailer (6.0.2.2)
24
- actionpack (= 6.0.2.2)
25
- actionview (= 6.0.2.2)
26
- activejob (= 6.0.2.2)
27
- mail (~> 2.5, >= 2.5.4)
28
- rails-dom-testing (~> 2.0)
29
- actionpack (6.0.2.2)
30
- actionview (= 6.0.2.2)
31
- activesupport (= 6.0.2.2)
32
- rack (~> 2.0, >= 2.0.8)
33
- rack-test (>= 0.6.3)
34
- rails-dom-testing (~> 2.0)
35
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
36
- actiontext (6.0.2.2)
37
- actionpack (= 6.0.2.2)
38
- activerecord (= 6.0.2.2)
39
- activestorage (= 6.0.2.2)
40
- activesupport (= 6.0.2.2)
41
- nokogiri (>= 1.8.5)
42
- actionview (6.0.2.2)
43
- activesupport (= 6.0.2.2)
44
- builder (~> 3.1)
45
- erubi (~> 1.4)
46
- rails-dom-testing (~> 2.0)
47
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
48
- activejob (6.0.2.2)
49
- activesupport (= 6.0.2.2)
50
- globalid (>= 0.3.6)
51
- activemodel (6.0.2.2)
52
- activesupport (= 6.0.2.2)
53
- activerecord (6.0.2.2)
54
- activemodel (= 6.0.2.2)
55
- activesupport (= 6.0.2.2)
56
- activestorage (6.0.2.2)
57
- actionpack (= 6.0.2.2)
58
- activejob (= 6.0.2.2)
59
- activerecord (= 6.0.2.2)
60
- marcel (~> 0.3.1)
61
- activesupport (6.0.2.2)
62
- concurrent-ruby (~> 1.0, >= 1.0.2)
63
- i18n (>= 0.7, < 2)
64
- minitest (~> 5.1)
65
- tzinfo (~> 1.1)
66
- zeitwerk (~> 2.2)
67
- builder (3.2.4)
68
- concurrent-ruby (1.1.6)
69
- coveralls (0.8.23)
70
- json (>= 1.8, < 3)
71
- simplecov (~> 0.16.1)
72
- term-ansicolor (~> 1.3)
73
- thor (>= 0.19.4, < 2.0)
74
- tins (~> 1.6)
75
- crass (1.0.6)
76
- diff-lcs (1.3)
77
- docile (1.3.2)
78
- erubi (1.9.0)
79
- globalid (0.4.2)
80
- activesupport (>= 4.2.0)
81
- i18n (1.8.2)
82
- concurrent-ruby (~> 1.0)
83
- json (2.3.0)
84
- loofah (2.4.0)
85
- crass (~> 1.0.2)
86
- nokogiri (>= 1.5.9)
87
- mail (2.7.1)
88
- mini_mime (>= 0.1.1)
89
- marcel (0.3.3)
90
- mimemagic (~> 0.3.2)
91
- method_source (1.0.0)
92
- mimemagic (0.3.4)
93
- mini_mime (1.0.2)
94
- mini_portile2 (2.4.0)
95
- minitest (5.14.0)
96
- nio4r (2.5.2)
97
- nokogiri (1.10.9)
98
- mini_portile2 (~> 2.4.0)
99
- pagy (3.7.4)
100
- rack (2.2.2)
101
- rack-test (1.1.0)
102
- rack (>= 1.0, < 3)
103
- rails (6.0.2.2)
104
- actioncable (= 6.0.2.2)
105
- actionmailbox (= 6.0.2.2)
106
- actionmailer (= 6.0.2.2)
107
- actionpack (= 6.0.2.2)
108
- actiontext (= 6.0.2.2)
109
- actionview (= 6.0.2.2)
110
- activejob (= 6.0.2.2)
111
- activemodel (= 6.0.2.2)
112
- activerecord (= 6.0.2.2)
113
- activestorage (= 6.0.2.2)
114
- activesupport (= 6.0.2.2)
115
- bundler (>= 1.3.0)
116
- railties (= 6.0.2.2)
117
- sprockets-rails (>= 2.0.0)
118
- rails-dom-testing (2.0.3)
119
- activesupport (>= 4.2.0)
120
- nokogiri (>= 1.6)
121
- rails-html-sanitizer (1.3.0)
122
- loofah (~> 2.3)
123
- railties (6.0.2.2)
124
- actionpack (= 6.0.2.2)
125
- activesupport (= 6.0.2.2)
126
- method_source
127
- rake (>= 0.8.7)
128
- thor (>= 0.20.3, < 2.0)
129
- rake (13.0.1)
130
- redis (4.1.3)
131
- rspec-core (3.9.1)
132
- rspec-support (~> 3.9.1)
133
- rspec-expectations (3.9.1)
134
- diff-lcs (>= 1.2.0, < 2.0)
135
- rspec-support (~> 3.9.0)
136
- rspec-mocks (3.9.1)
137
- diff-lcs (>= 1.2.0, < 2.0)
138
- rspec-support (~> 3.9.0)
139
- rspec-rails (4.0.0)
140
- actionpack (>= 4.2)
141
- activesupport (>= 4.2)
142
- railties (>= 4.2)
143
- rspec-core (~> 3.9)
144
- rspec-expectations (~> 3.9)
145
- rspec-mocks (~> 3.9)
146
- rspec-support (~> 3.9)
147
- rspec-support (3.9.2)
148
- simplecov (0.16.1)
149
- docile (~> 1.1)
150
- json (>= 1.8, < 3)
151
- simplecov-html (~> 0.10.0)
152
- simplecov-html (0.10.2)
153
- sprockets (4.0.0)
154
- concurrent-ruby (~> 1.0)
155
- rack (> 1, < 3)
156
- sprockets-rails (3.2.1)
157
- actionpack (>= 4.0)
158
- activesupport (>= 4.0)
159
- sprockets (>= 3.0.0)
160
- sync (0.5.0)
161
- term-ansicolor (1.7.1)
162
- tins (~> 1.0)
163
- thor (1.0.1)
164
- thread_safe (0.3.6)
165
- tins (1.24.1)
166
- sync
167
- tzinfo (1.2.6)
168
- thread_safe (~> 0.1)
169
- websocket-driver (0.7.1)
170
- websocket-extensions (>= 0.1.0)
171
- websocket-extensions (0.1.4)
172
- zeitwerk (2.3.0)
173
-
174
- PLATFORMS
175
- ruby
176
-
177
- DEPENDENCIES
178
- coveralls (~> 0.8)
179
- redis_web_manager!
180
- rspec-rails (~> 4.0.0)
181
- simplecov (~> 0.16)
182
-
183
- BUNDLED WITH
184
- 2.1.4