chronicle-etl 0.4.3 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f035ef95ebae675973ce505c71345c0c2da640b20a3e88050f4c88c76caf656
|
4
|
+
data.tar.gz: '0486e4ce5bfdb85ad6ccb5a792ac7aa5a897afecf839c759bb78a2f33136d34e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9a1ba3cb4a9abd3bc8a499012b3456b1a2b4cf1f55bed1213f0b1baa6ea96d0ad6e54a470425fa5aa4961061630095218a31f64ef4a39bea15c547219f9a7a8
|
7
|
+
data.tar.gz: d82ff59fd2875d55b079b7814b6a028f98f80f17d3ae2bb3291e5ae6cfb7e1b06f571e16fc73c83dea41d7682f24eb9b7ee3fa6ae7cc709ede57e12011e6a0be
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
![chronicle-etl-banner](https://user-images.githubusercontent.com/6291/157330518-0f934c9a-9ec4-43d9-9cc2-12f156d09b37.png)
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/chronicle-etl.svg)](https://badge.fury.io/rb/chronicle-etl) [![Ruby](https://github.com/chronicle-app/chronicle-etl/actions/workflows/ruby.yml/badge.svg)](https://github.com/chronicle-app/chronicle-etl/actions/workflows/ruby.yml)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/chronicle-etl.svg)](https://badge.fury.io/rb/chronicle-etl) [![Ruby](https://github.com/chronicle-app/chronicle-etl/actions/workflows/ruby.yml/badge.svg)](https://github.com/chronicle-app/chronicle-etl/actions/workflows/ruby.yml) [![Docs](https://img.shields.io/badge/docs-rubydoc.info-blue)](https://www.rubydoc.info/gems/chronicle-etl/)
|
6
6
|
|
7
7
|
Are you trying to archive your digital history or incorporate it into your own projects? You’ve probably discovered how frustrating it is to get machine-readable access to your own data. While [building a memex](https://hyfen.net/memex/), I learned first-hand what great efforts must be made before you can begin using the data in interesting ways.
|
8
8
|
|
@@ -45,14 +45,7 @@ module Chronicle
|
|
45
45
|
|
46
46
|
class SerializationError < Error; end
|
47
47
|
|
48
|
-
class TransformationError < Error
|
49
|
-
attr_reader :transformation
|
50
|
-
|
51
|
-
def initialize(message=nil, transformation:)
|
52
|
-
super(message)
|
53
|
-
@transformation = transformation
|
54
|
-
end
|
55
|
-
end
|
48
|
+
class TransformationError < Error; end
|
56
49
|
|
57
50
|
class UntransformableRecordError < TransformationError; end
|
58
51
|
end
|
data/lib/chronicle/etl/runner.rb
CHANGED
@@ -55,7 +55,7 @@ class Chronicle::ETL::Runner
|
|
55
55
|
|
56
56
|
@loader.load(record) unless @job.dry_run?
|
57
57
|
rescue Chronicle::ETL::TransformationError => e
|
58
|
-
Chronicle::ETL::Logger.error(tty_log_transformation_failure(e))
|
58
|
+
Chronicle::ETL::Logger.error(tty_log_transformation_failure(e, transformer))
|
59
59
|
ensure
|
60
60
|
@progress_bar.increment
|
61
61
|
end
|
@@ -83,14 +83,14 @@ class Chronicle::ETL::Runner
|
|
83
83
|
output
|
84
84
|
end
|
85
85
|
|
86
|
-
def tty_log_transformation
|
86
|
+
def tty_log_transformation(transformer)
|
87
87
|
output = " ✓".green
|
88
88
|
output += " #{transformer}"
|
89
89
|
end
|
90
90
|
|
91
|
-
def tty_log_transformation_failure
|
91
|
+
def tty_log_transformation_failure(exception, transformer)
|
92
92
|
output = " ✖".red
|
93
|
-
output += " Failed to build #{
|
93
|
+
output += " Failed to build #{transformer}. #{exception.message}"
|
94
94
|
end
|
95
95
|
|
96
96
|
def tty_log_completion
|
@@ -43,7 +43,7 @@ module Chronicle
|
|
43
43
|
def id
|
44
44
|
@id ||= begin
|
45
45
|
id = build_with_strategy(field: :id, strategy: @config.id_strategy)
|
46
|
-
raise
|
46
|
+
raise(UntransformableRecordError, "Could not build id") unless id
|
47
47
|
|
48
48
|
id
|
49
49
|
end
|
@@ -52,7 +52,7 @@ module Chronicle
|
|
52
52
|
def timestamp
|
53
53
|
@timestamp ||= begin
|
54
54
|
ts = build_with_strategy(field: :timestamp, strategy: @config.timestamp_strategy)
|
55
|
-
raise
|
55
|
+
raise(UntransformableRecordError, "Could not build timestamp") unless ts
|
56
56
|
|
57
57
|
ts
|
58
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chronicle-etl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Louis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -415,7 +415,7 @@ metadata:
|
|
415
415
|
homepage_uri: https://github.com/chronicle-app
|
416
416
|
source_code_uri: https://github.com/chronicle-app/chronicle-etl
|
417
417
|
changelog_uri: https://github.com/chronicle-app/chronicle-etl/releases
|
418
|
-
post_install_message:
|
418
|
+
post_install_message:
|
419
419
|
rdoc_options: []
|
420
420
|
require_paths:
|
421
421
|
- lib
|
@@ -430,8 +430,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
430
430
|
- !ruby/object:Gem::Version
|
431
431
|
version: '0'
|
432
432
|
requirements: []
|
433
|
-
rubygems_version: 3.3.
|
434
|
-
signing_key:
|
433
|
+
rubygems_version: 3.3.3
|
434
|
+
signing_key:
|
435
435
|
specification_version: 4
|
436
436
|
summary: ETL tool for personal data
|
437
437
|
test_files: []
|