business_flow 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 358d1c9f044cb27c403f3f09dca2ff62306a43a86b89cbdbd0a5bd2f1052384b
4
- data.tar.gz: 9ace3fc7d47f1f383dbe5a5dcee90891b790bc5dfe602530c3230f5ae2b11db9
3
+ metadata.gz: b3cbbc4f9a0eba68f3056378a62625b0b855957945fb45392fe3101455aa3df3
4
+ data.tar.gz: 4b47a1c7479257c75814abdaaa023e9cc58c01e169eacfd95276c26441c64203
5
5
  SHA512:
6
- metadata.gz: 12300927b4b0ed87c5961d86709d030059fb3734c54680b17c450a1e3f64d6e28fe2c22c158e9578f24ce137c0a24952bc3c14a501c24332fb7baf292ffedff8
7
- data.tar.gz: b53b551074f8edb4fddc50791e1f6a64682205f49af85b1cbf6915f57677b9ab6f762c4c1e100eee658477f78b9c9abfc7199b5594490524144bf0653e5825a5
6
+ metadata.gz: 15aa3e482853c9f9022729f3e44e4f4e566695b23393339c3fb11915127c0003992de7fb04e4515725e99fbb2dddfe6bd8c1d9dcbb8dc7ee82c523a956181b3b
7
+ data.tar.gz: 947c46bdd62b88e8a5d588d3258a8df4f0820b0dd8ba408329fd6b4dc3acf16019465e242bbb1a0ebb0806af1f367813fc1c5735e66c52e15ca4a330e9b0cf49
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- business_flow (0.19.0)
4
+ business_flow (0.19.1)
5
5
  activemodel (>= 4.2, < 8)
6
6
  activesupport (>= 4.2, < 8)
7
7
 
@@ -66,6 +66,27 @@ module BusinessFlow
66
66
  Callable.new(:_business_flow_dsl_parameters)
67
67
  end
68
68
 
69
+ def clear_cache(parameter_object = {})
70
+ clear_cache!(parameter_object)
71
+ rescue FlowFailedException => exc
72
+ exc.flow
73
+ end
74
+
75
+ def clear_cache!(parameter_object = {})
76
+ flow = build(parameter_object)
77
+ raise FlowFailedException, result_from(flow) if flow.errors?
78
+ ClassMethods.clear_cache(flow)
79
+ end
80
+
81
+ def self.clear_cache(flow)
82
+ klass = flow.class
83
+ klass.instrument(:clear_cache, flow) do |payload|
84
+ ret = klass.cache_store.delete(flow.cache_key)
85
+ payload[:cache_clear] = ret if payload
86
+ ret
87
+ end
88
+ end
89
+
69
90
  def execute(flow)
70
91
  with_cache(flow) do
71
92
  super(flow)._business_flow_cacheable_finalize(flow.cache_key)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BusinessFlow
4
- VERSION = '0.19.0'.freeze
4
+ VERSION = '0.19.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: business_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Scarborough
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-09 00:00:00.000000000 Z
11
+ date: 2023-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel