evt-entity_cache 2.0.1.2 → 2.0.1.4

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: 0a65dee7e03fdffdece4718fe1d50e5cdf3f5e59466dfb224068b84c8356b6fc
4
- data.tar.gz: b5f966733c02ad8280f954d10226ae99656788514d522e66e3b7750b1670ed62
3
+ metadata.gz: 86856e094159cd5b2437c95d6e4b1bdf7da2ce86245e0a828b9891a40c211d17
4
+ data.tar.gz: 36e530378643381976bba5a5b36ea6b1fe98988c7c4dde6732a5d5fe10b91ed3
5
5
  SHA512:
6
- metadata.gz: bad5d326c349c724b90b47fc8e4c5bfbf9c6558be071d9a61b1363266284a084b4a4ff2e5cde5eeb9596570252927e7cbb8038e610f3d9d5d4229e4232384072
7
- data.tar.gz: fc18bafad76966151ff5029c4af0996e1b763113efc50a47e7f740f2c94b5030fc58bbe0fac5e8a73617e4014f20ea65bcba755e754d9762e26302541c02b827
6
+ metadata.gz: 2a60df5b74810d7cd76e90bea871dbe86ef9312f82b563e1fb8fd21f337d8f40f52fecfd6e1fce4fcd05416106abd5338df359eb3676fd5994928d572a5a8d7b
7
+ data.tar.gz: fdf851830671126a4f743936b2e41f4c3076f9d539f98fa10ea47177cb4784cb985cc5770d0203bd3c643abba7f8579b823dc1b212b8a2379890e79d058a1a89
@@ -42,6 +42,8 @@ class EntityCache
42
42
 
43
43
  text = JSON.generate(data)
44
44
 
45
+ FileUtils.mkdir_p(External.file_dump_directory)
46
+
45
47
  File.write(path, text)
46
48
  end
47
49
 
@@ -55,13 +57,13 @@ class EntityCache
55
57
 
56
58
  filename = "#{subject.to_s.gsub('/', '-')}-#{id}.yaml"
57
59
 
58
- full_name = File.join(tmpdir, filename)
60
+ full_name = File.join(file_dump_directory, filename)
59
61
 
60
62
  full_name
61
63
  end
62
64
 
63
- def self.tmpdir
64
- @tmpdir ||= Dir.tmpdir
65
+ def self.file_dump_directory
66
+ "tmp"
65
67
  end
66
68
  end
67
69
  end
@@ -1,5 +1,5 @@
1
1
  require 'json'
2
- require 'tmpdir'
2
+ require 'fileutils'
3
3
 
4
4
  require 'clock/controls'
5
5
  require 'identifier/uuid/controls'
@@ -8,7 +8,7 @@ class EntityCache
8
8
  include ::Configure
9
9
  include Dependency
10
10
  include Initializer
11
- include Virtual
11
+ include TemplateMethod
12
12
  include Log::Dependency
13
13
 
14
14
  extend Build
@@ -20,9 +20,9 @@ class EntityCache
20
20
 
21
21
  initializer :subject
22
22
 
23
- virtual :configure
24
- abstract :get
25
- abstract :put
23
+ template_method :configure
24
+ template_method! :get
25
+ template_method! :put
26
26
 
27
27
  prepend Configure
28
28
  prepend Get
@@ -1,7 +1,7 @@
1
1
  class EntityCache
2
2
  module Store
3
3
  class Internal
4
- include Virtual
4
+ include TemplateMethod
5
5
  include Log::Dependency
6
6
 
7
7
  attr_accessor :subject
@@ -20,7 +20,7 @@ class EntityCache
20
20
  instance
21
21
  end
22
22
 
23
- abstract :records
23
+ template_method! :records
24
24
 
25
25
  def get(id)
26
26
  logger.trace { "Getting Entity (ID: #{id.inspect})" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-entity_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1.2
4
+ version: 2.0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2024-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-configure
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.3.4
144
+ rubygems_version: 3.4.10
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Cache of entities retrieved by an entity-store, with in-memory temporary