foobara-local-files-crud-driver 0.0.8 → 0.0.10
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/src/foobara/local_files_crud_driver.rb +5 -4
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3609ce9a6f080dfe18c204a3f3ea11651638d54f8085a4478ebe6f73077ce465
|
4
|
+
data.tar.gz: c5d8a6c059af7083c223566d35719c52de538adda4fe41515893e6ac22c0c789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b10ddcd459356362d100e70f20b0a1d84e6934c99ac9d5e9b765f4180733a77d7e70298910642bb10906369aabd8e6db54e3ce64cadec9e6606ac933541eed4
|
7
|
+
data.tar.gz: 32be85a9a1820ff8fb138abdf61a798d342d6b239e007d152ceb347de51028cad5c444f47ab34e765e611d5f5a029d98b10e489fe200d11f1f9d7b8d8b4a776a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [0.0.10] - 2025-06-16
|
2
|
+
|
3
|
+
- Move crud-driver-specific specs to foobara-crud-driver-spec-helpers gem
|
4
|
+
- Delete some project cruft
|
5
|
+
|
6
|
+
## [0.0.9] - 2025-04-15
|
7
|
+
|
8
|
+
- Remove unused #fsync
|
9
|
+
- Make sure we flush files to disk
|
10
|
+
|
1
11
|
## [0.0.8] - 2025-03-29
|
2
12
|
|
3
13
|
- Fix bug where writing out one table erases another
|
@@ -4,12 +4,11 @@ require "yaml"
|
|
4
4
|
module Foobara
|
5
5
|
# TODO: lots of duplication in this file. Need to DRY this up a bit.
|
6
6
|
class LocalFilesCrudDriver < Persistence::EntityAttributesCrudDriver
|
7
|
-
attr_accessor :data_path, :format, :
|
7
|
+
attr_accessor :data_path, :format, :multi_process, :raw_data
|
8
8
|
|
9
|
-
def initialize(data_path: "#{Dir.pwd}/local_data/records.yml", format: :yaml,
|
9
|
+
def initialize(data_path: "#{Dir.pwd}/local_data/records.yml", format: :yaml, multi_process: false)
|
10
10
|
self.data_path = data_path
|
11
11
|
self.format = format
|
12
|
-
self.fsync = fsync
|
13
12
|
self.multi_process = multi_process
|
14
13
|
|
15
14
|
unless format == :yaml
|
@@ -32,7 +31,7 @@ module Foobara
|
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
|
-
def all
|
34
|
+
def all(page_size: nil)
|
36
35
|
with_readable_raw_data do |raw_data|
|
37
36
|
raw_data[table_name]&.[]("records")&.values || []
|
38
37
|
end
|
@@ -201,6 +200,7 @@ module Foobara
|
|
201
200
|
f.truncate(0)
|
202
201
|
f.rewind
|
203
202
|
f.write(file_contents)
|
203
|
+
f.flush
|
204
204
|
else
|
205
205
|
FileUtils.mkdir_p File.dirname(data_path)
|
206
206
|
|
@@ -212,6 +212,7 @@ module Foobara
|
|
212
212
|
file.truncate(0)
|
213
213
|
file.rewind
|
214
214
|
file.write(file_contents)
|
215
|
+
file.flush
|
215
216
|
end
|
216
217
|
end
|
217
218
|
|
metadata
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-local-files-crud-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version:
|
18
|
+
version: 0.0.102
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
|
-
- - "
|
23
|
+
- - "~>"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
25
|
+
version: 0.0.102
|
26
26
|
email:
|
27
27
|
- azimux@gmail.com
|
28
28
|
executables: []
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
|
-
rubygems_version: 3.6.
|
60
|
+
rubygems_version: 3.6.9
|
61
61
|
specification_version: 4
|
62
62
|
summary: Stores all record data in a yaml file in a local directory
|
63
63
|
test_files: []
|