hydra-keycloak-client 0.1.9 → 0.1.10

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: 84abeff9bb6fc129c0f1735211b5b519ca9d5570bad6d240c196a7eab5187e17
4
- data.tar.gz: 39ba322f013e055547490e6661d6b3f37fb658eaa2a7a582c0c17e42f028afc5
3
+ metadata.gz: 516229617ccd659620dd11a197eadbb3d5f2085bd59afdc44371af351b013009
4
+ data.tar.gz: be901750b274b69fec1544e6268c0a0016d9b8ba254afec831215da440260de1
5
5
  SHA512:
6
- metadata.gz: 4b26d5274c9b28d2a8d8b93fbdb0d0277ddfd783f613228963277f8b562bcbe751156aa0fbf2599853266f28724a0d2230345311814f839b2a64200bce1c9a86
7
- data.tar.gz: 352f55a4a3a39886aa9446a56edfa63c618760b2d34c0da43f470ad2eb59356e84c4ed027a6d74d917c7aa610c08ce6a1cba4fffddc6b8fc03fdda9aa6676cc0
6
+ metadata.gz: 01df11417b5231dc9651568b84c2c08f63580bfa1a7fcc951b169eddfeb4849ec833115416cb807f19ed6457445b7927e4d554cae6201811d4021d57616e2c19
7
+ data.tar.gz: 0f7af8f307e65ff7eae75bb5d9a5367c2af56a69f96b2d5723b6bb3e7ac54da5042ec499f84b2a741c55785a0cad2acef5c3e3b1d4d10939ccd0c48696d2ceea
data/Gemfile.lock CHANGED
@@ -2,14 +2,12 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  hydra-keycloak-client (0.1.9)
5
- dalli
6
5
  dry-auto_inject
7
6
  dry-container
8
7
  dry-monads
9
8
  dry-schema
10
9
  dry-struct
11
10
  jwt
12
- redis
13
11
 
14
12
  GEM
15
13
  remote: https://rubygems.org/
@@ -17,7 +15,6 @@ GEM
17
15
  ast (2.4.2)
18
16
  coderay (1.1.3)
19
17
  concurrent-ruby (1.1.9)
20
- dalli (3.2.1)
21
18
  diff-lcs (1.4.4)
22
19
  dry-auto_inject (0.9.0)
23
20
  dry-container (>= 0.3.4)
@@ -65,7 +62,6 @@ GEM
65
62
  method_source (~> 1.0)
66
63
  rainbow (3.1.1)
67
64
  rake (12.3.3)
68
- redis (4.6.0)
69
65
  regexp_parser (2.2.1)
70
66
  rexml (3.2.5)
71
67
  rspec (3.10.0)
data/README.md CHANGED
@@ -40,7 +40,7 @@ or for memcached:
40
40
 
41
41
  ```
42
42
  ...
43
- store_client: 'redis',
43
+ store_client: 'memcached',
44
44
  store_client_options: {
45
45
  memcached_host: "localhost",
46
46
  memcached_port: "11211",
@@ -28,9 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.bindir = 'bin'
29
29
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
30
 
31
- spec.add_dependency('dalli')
32
31
  spec.add_dependency('jwt')
33
- spec.add_dependency('redis')
34
32
 
35
33
  spec.add_dependency('dry-auto_inject')
36
34
  spec.add_dependency('dry-container')
@@ -89,9 +89,9 @@ module Hydra
89
89
  def register_store_client(config)
90
90
  case config[:store_client]
91
91
  when 'redis'
92
- container.register :redis do
93
- require 'redis'
92
+ require 'hydra/keycloak/store/adapters/redis'
94
93
 
94
+ container.register :redis do
95
95
  ::Redis.new(host: config[:redis_host], port: config[:redis_port])
96
96
  end
97
97
 
@@ -101,9 +101,8 @@ module Hydra
101
101
  ::Hydra::Keycloak::Store::RedisClient.new
102
102
  end
103
103
  when 'memcached'
104
+ require 'hydra/keycloak/store/adapters/memcached'
104
105
  container.register :dalli do
105
- require 'dalli'
106
-
107
106
  ::Dalli::Client.new(
108
107
  "#{config[:store_client_options][:memcached_host]}:#{config[:store_client_options][:memcached_port]}",
109
108
  namespace: config[:store_client_options][:memcached_namespace]
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'dalli'
5
+ rescue LoadError
6
+ raise LoadError, 'You must add `dalli` into your project`s Gemfile and launch bundle install'
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'redis'
5
+ rescue LoadError
6
+ raise LoadError, 'You must add `redis` into your project`s Gemfile and launch bundle install'
7
+ end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dalli'
4
3
  require 'dry/monads'
5
4
  require 'dry/auto_inject'
6
5
 
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'redis'
4
3
  require 'dry/monads'
5
4
  require 'dry/auto_inject'
6
5
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hydra
4
4
  module Keycloak
5
- VERSION = '0.1.9'
5
+ VERSION = '0.1.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-keycloak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fedor Kosolapov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: dalli
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: jwt
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +24,6 @@ dependencies:
38
24
  - - ">="
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: redis
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: dry-auto_inject
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -146,6 +118,8 @@ files:
146
118
  - lib/hydra/keycloak/container.rb
147
119
  - lib/hydra/keycloak/queries/gateway.rb
148
120
  - lib/hydra/keycloak/queries/http_client.rb
121
+ - lib/hydra/keycloak/store/adapters/memcached.rb
122
+ - lib/hydra/keycloak/store/adapters/redis.rb
149
123
  - lib/hydra/keycloak/store/gateway.rb
150
124
  - lib/hydra/keycloak/store/memcached_client.rb
151
125
  - lib/hydra/keycloak/store/redis_client.rb