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: f2b6fdca3723ec52287c070a0dd08d0cfaf825f5e8f46da0d5a34172c0008573
4
- data.tar.gz: e15181ba7edc1698404af8ff8c05d5367786ea809360393e825ca5ee5eef6c75
3
+ metadata.gz: 2f035ef95ebae675973ce505c71345c0c2da640b20a3e88050f4c88c76caf656
4
+ data.tar.gz: '0486e4ce5bfdb85ad6ccb5a792ac7aa5a897afecf839c759bb78a2f33136d34e'
5
5
  SHA512:
6
- metadata.gz: c5508dcfc5e1367122ebbc191dc60a76cc7b1f088ae9ebd52bae41e07420f54ea7977a35f2b25839933b06d4673e2a120feecbd958efee07e0d313eaa7a5d167
7
- data.tar.gz: adcb90549af364189c5ae3b0811c039277aba7dc6fbf2fbd6de8b89c572948d0dc00ba8da59db03252f4770737423e62c3a1175ef018742ef8bd7aee14837f63
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
@@ -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 transformer
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 exception
91
+ def tty_log_transformation_failure(exception, transformer)
92
92
  output = " ✖".red
93
- output += " Failed to build #{exception.transformation}. #{exception.message}"
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 UntransformableRecordError.new("Could not build id", transformation: self) unless id
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 UntransformableRecordError.new("Could not build timestamp", transformation: self) unless ts
55
+ raise(UntransformableRecordError, "Could not build timestamp") unless ts
56
56
 
57
57
  ts
58
58
  end
@@ -1,5 +1,5 @@
1
1
  module Chronicle
2
2
  module ETL
3
- VERSION = "0.4.3"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  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.3
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-14 00:00:00.000000000 Z
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.9
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: []