arturo 2.6.0 → 2.7.0

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: f254071a4bbfd2f21be2f98d0312c109f032dd18367f09d72da778990a051d84
4
- data.tar.gz: b3b0683fc7c11411247bec4cd9e0779c7d03c1026ac8c8768eea2ee193968502
3
+ metadata.gz: 43ea277890e8d8b263fb57f7208854a0381f07cd2fa2337654a51a8e57f197da
4
+ data.tar.gz: 8c7e1982c057130e4c3355b800544509950b9b59d9999a4e074def5090258149
5
5
  SHA512:
6
- metadata.gz: 6afb98e8e40dbc338d39f554348950797d9edb66cc9c7ac7ce3782a854b590606a289993e47c7763c8aad8defc8745ad74656f1c1f2b16af835402728e188540
7
- data.tar.gz: e410b3bda222befbfd54de38060547bf1746059eadf01bcd7ec7d00b1524e7c2f66e109fa14b67970260c8772dda853f01672f5377b6d448837d1421d94303e0
6
+ metadata.gz: b4d9610fdb2f0d77c64242554efc5677966b3a8e5fa190a3aec1de71505a3ec139b66279bcce0afea0213600a985437111df374624fd1ac9efd9201a70395dc3
7
+ data.tar.gz: 95105335029a0af725059b8f0528e42e02737cf4f728b439e7ef1d35051fad6270d4053583d3919a5e29877633975a3cb9019f3f5c028f377054a8ee652287fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## v2.7.0
4
+
5
+ Adds ability to register cache update listeners with Arturo::FeatureCaching::AllStrategy that are called when the cache is updated
6
+
3
7
  ## v2.6.0
4
8
 
5
9
  Add support for Rails 7.0
@@ -85,8 +85,16 @@ module Arturo
85
85
  cache.delete("arturo.all")
86
86
  end
87
87
 
88
+ def register_cache_update_listener(&block)
89
+ cache_update_listeners << block
90
+ end
91
+
88
92
  private
89
93
 
94
+ def cache_update_listeners
95
+ @cache_update_listeners ||= []
96
+ end
97
+
90
98
  ##
91
99
  # @param fallback [Hash] features to use on database failure
92
100
  # @return [Hash] updated features from origin or fallback
@@ -166,6 +174,7 @@ module Arturo
166
174
  def update_and_extend_cache!(cache, features)
167
175
  mark_as_current!(cache)
168
176
  cache.write("arturo.all", features, expires_in: Arturo::Feature.cache_ttl * 10)
177
+ cache_update_listeners.each(&:call)
169
178
  end
170
179
  end
171
180
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Arturo
3
- VERSION = '2.6.0'
3
+ VERSION = '2.7.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arturo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James A. Rosen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-18 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -169,7 +169,7 @@ homepage: http://github.com/zendesk/arturo
169
169
  licenses:
170
170
  - APLv2
171
171
  metadata: {}
172
- post_install_message:
172
+ post_install_message:
173
173
  rdoc_options: []
174
174
  require_paths:
175
175
  - lib
@@ -184,8 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  requirements: []
187
- rubygems_version: 3.1.6
188
- signing_key:
187
+ rubygems_version: 3.0.3.1
188
+ signing_key:
189
189
  specification_version: 4
190
190
  summary: Feature sliders, wrapped up in an engine
191
191
  test_files: []