datafy 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datafy/BaseDatafier.rb +7 -2
- data/lib/resources/Proto.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 320cc715a3d47996fe4bea5b4318e3e424044dd8871101c81359a0794597f614
|
4
|
+
data.tar.gz: 7abb830654ee3a45b8cb58b774f6c8518b3e6dc7d726261417c882a108502d51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdd27e05d9085670fddf74c04e5dff800b1393cf33bcf1f4df44e0edecc1fe963c93ec4841c01273aeae26dc84a9fb5651a2aacf288aa8291faef16fdbbfe59
|
7
|
+
data.tar.gz: 556da67854784253598b1d49dcf236eb777a89bc84a1126695c98a24da85d45f43b14660ae81c22c0234f369a9f5a7a3cad5f0da670f19f9690746ad2410d2e4
|
data/lib/datafy/BaseDatafier.rb
CHANGED
@@ -8,8 +8,6 @@ module BaseDatafier
|
|
8
8
|
|
9
9
|
include FileProvider
|
10
10
|
|
11
|
-
# attr_accessor :errorMessage, :logFile, :logFileName, :showLog
|
12
|
-
|
13
11
|
class HarvestError < StandardError
|
14
12
|
attr_reader :message, :source
|
15
13
|
def initialize(msg="default message", thing="BaseDatafier")
|
@@ -22,6 +20,9 @@ module BaseDatafier
|
|
22
20
|
# ================== Data Fields Section ==================
|
23
21
|
|
24
22
|
v, $VERBOSE = $VERBOSE, nil
|
23
|
+
##
|
24
|
+
# Metadata properties used to track the timing and success of the 'normal' properties.
|
25
|
+
# Optional for use in implementing classes, i.e. not required to be used, but will be present in the property sets
|
25
26
|
BASE_HARVEST_DATA_FIELDS = {
|
26
27
|
'Harvest When' => { property: :harvestWhen, comment: 'Date/Time of data harvesting' },
|
27
28
|
'Harvest Successful?' => { property: :harvestSuccessful, comment: 'Boolean - was harvesting successful?' },
|
@@ -29,6 +30,10 @@ module BaseDatafier
|
|
29
30
|
'Persist When' => { property: :persistWhen, comment: 'Date/Time of data persistence to CSV file' },
|
30
31
|
}
|
31
32
|
# --
|
33
|
+
##
|
34
|
+
# Properties used to implement the key-value representation of the implementing classes' properties.
|
35
|
+
# Employed when the implementing class invokes the record method to, well, record an individual property and its value.
|
36
|
+
# Optional for use in implementing classes, i.e. not required to be used, but will be present in the Details record sets.
|
32
37
|
DETAILS_PROPERTY_FIELDS = {
|
33
38
|
'Class' => { property: :klass, comment: 'The class the details are being recorded for. (Base)' },
|
34
39
|
'Detail' => { property: :detail, comment: 'The name of the field being recorded.' },
|
data/lib/resources/Proto.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'datafy'
|
2
|
+
|
2
3
|
class Proto
|
3
4
|
include CSVifier
|
4
5
|
v, $VERBOSE = $VERBOSE, nil
|
@@ -14,7 +15,7 @@ class Proto
|
|
14
15
|
$VERBOSE = v
|
15
16
|
prop_accessor PROPERTY_FIELDS # establish the class properties based upon the declared constants
|
16
17
|
# note: these property assignments will be included:
|
17
|
-
# KEY_FIELDS
|
18
|
+
# KEY_FIELDS - declared above
|
18
19
|
# BaseDatafier::BASE_HARVEST_DATA_FIELDS - harvesting & persisting metadata
|
19
20
|
# BaseDatafier::DETAILS_PROPERTY_FIELDS - key-value details fields
|
20
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datafy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Gerrard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Represent, record, and persist Ruby classes' attributes as CSV fields
|
14
14
|
and persist them as data fields into CSV files. Each attribute has an internal class
|