ductr 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/ductr/configuration.rb +6 -2
- data/lib/ductr/version.rb +1 -1
- data/lib/ductr.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2d5c7ce2296b1c9640bb6b5e11707d6d60a2409622715da8649b31028ff7013
|
4
|
+
data.tar.gz: 1961c232e613e98f3f6630b44ed6b497a50220c8f6808da426d41fdb0c61c6ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a851b1b742d2557ab82561d5b560bec771b564b6dabe98280ddf2b5a683dfe0993bb397a9e0e7f5ae788eaa0e8112343030fd16b971a1cde8cac601db9882b62
|
7
|
+
data.tar.gz: '05719e09e026fcdf59927b46f7dac7699a24fd3a3c3b34473862355bd13bcd36ba0b92831623179ff2df22e98452f08eeacb68e4a295bbef41314f3b91f71a79'
|
data/Gemfile.lock
CHANGED
data/lib/ductr/configuration.rb
CHANGED
@@ -26,9 +26,12 @@ module Ductr
|
|
26
26
|
# @see https://edgeapi.rubyonrails.org/classes/ActiveSupport/Cache.html#method-c-lookup_store
|
27
27
|
attr_reader :store_adapter
|
28
28
|
|
29
|
-
# @return [Array] The store adapter config
|
29
|
+
# @return [Array] The store adapter config args
|
30
30
|
attr_reader :store_parameters
|
31
31
|
|
32
|
+
# @return [Hash<Symbol, Object>] The store adapter config options
|
33
|
+
attr_reader :store_options
|
34
|
+
|
32
35
|
# @return [Hash] The parsed YML configuration
|
33
36
|
attr_reader :yml
|
34
37
|
|
@@ -56,9 +59,10 @@ module Ductr
|
|
56
59
|
#
|
57
60
|
# @return [void]
|
58
61
|
#
|
59
|
-
def store(adapter, *parameters)
|
62
|
+
def store(adapter, *parameters, **options)
|
60
63
|
@store_adapter = adapter
|
61
64
|
@store_parameters = parameters
|
65
|
+
@store_options = options
|
62
66
|
end
|
63
67
|
|
64
68
|
#
|
data/lib/ductr/version.rb
CHANGED
data/lib/ductr.rb
CHANGED
@@ -98,11 +98,15 @@ module Ductr
|
|
98
98
|
# @return [ActiveSupport::Cache::Store] The store instance
|
99
99
|
#
|
100
100
|
def store
|
101
|
+
adapter = config.store_adapter
|
102
|
+
params = config.store_parameters
|
103
|
+
options = config.store_options
|
104
|
+
|
101
105
|
@store ||= \
|
102
|
-
if
|
103
|
-
|
106
|
+
if adapter.is_a? Class
|
107
|
+
adapter.new(*params, **options)
|
104
108
|
else
|
105
|
-
ActiveSupport::Cache.lookup_store(
|
109
|
+
ActiveSupport::Cache.lookup_store(adapter, *params, **options)
|
106
110
|
end
|
107
111
|
end
|
108
112
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ductr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathieu Morel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
- !ruby/object:Gem::Version
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
|
-
rubygems_version: 3.4.
|
298
|
+
rubygems_version: 3.4.15
|
299
299
|
signing_key:
|
300
300
|
specification_version: 4
|
301
301
|
summary: Data pipeline and ETL framework.
|