foobara-local-files-crud-driver 0.0.8 → 0.0.9
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 +5 -0
- data/src/foobara/local_files_crud_driver.rb +4 -3
- 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: ccd447447e2efe06faae51c0854796cd84087bd1c57e3e911c99bf02c3cc6f11
|
4
|
+
data.tar.gz: 8b1df78e975cbfca0f4bb5e863321e80dc2d0f28436e4ccf21cadf7ed54af769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69cc3b74e0d6b8f4e0a846953785882034e87ba689ca4ada6c1801ee6cdf7318a3326006d3a7ca42f1bbb74b96e5434288e4192f5b4a19910307aef10d0e5404
|
7
|
+
data.tar.gz: f27c45f31e7994ee436edd6692b0ce299144f9c1bb0bd2d9b4db605061be16c03ba04c2a1be31f491c66c699eb7364959c435b30f3c529b1a44ae3d25673a4eb
|
data/CHANGELOG.md
CHANGED
@@ -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
|
@@ -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.9
|
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.7
|
61
61
|
specification_version: 4
|
62
62
|
summary: Stores all record data in a yaml file in a local directory
|
63
63
|
test_files: []
|