chronicle-etl 0.5.0 → 0.5.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e9f565004fce3539bdcfec9b98f64e33d8d4f1dde532f573adf54bfb61eadfa
|
4
|
+
data.tar.gz: 81da054f627ae084d45b4fe53480d5ef26fadf9cfd3ad4eb53d908741d8214e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffe35b9c55a442610b9832b7f918f16dff0ccad3245248f76c52afbd88c43d671e8724f72a8d181a13e3cafffae6bc97f5963f65eb5c2a0ddb7080d9b6f1d145
|
7
|
+
data.tar.gz: c063698040b906f99e57cc3f9e829ff8b8ca1d4e5314a3a4179dc965c17ba70da04155d01b0b1fadf573e6a110a69862e9651435bdcdb1160bfe84cb8a55a10a
|
@@ -59,7 +59,7 @@ LONG_DESC
|
|
59
59
|
rescue Chronicle::ETL::JobDefinitionError => e
|
60
60
|
message = ""
|
61
61
|
job_definition.errors.each_pair do |category, errors|
|
62
|
-
message << "Problem with #{category}:\n - #{errors.map(&:to_s).join("\n -")}"
|
62
|
+
message << "Problem with #{category}:\n - #{errors.map(&:to_s).join("\n - ")}"
|
63
63
|
end
|
64
64
|
cli_fail(message: "Error running job.\n#{message}", exception: e)
|
65
65
|
end
|
@@ -112,6 +112,8 @@ LONG_DESC
|
|
112
112
|
private
|
113
113
|
|
114
114
|
def run_job(job_definition)
|
115
|
+
# FIXME: have to validate here so next method can work. This is clumsy
|
116
|
+
job_definition.validate!
|
115
117
|
# FIXME: clumsy to make CLI responsible for setting secrets here. Think about a better way to do this
|
116
118
|
job_definition.apply_default_secrets
|
117
119
|
|
@@ -9,10 +9,13 @@ module Chronicle
|
|
9
9
|
setting :output, default: $stdout
|
10
10
|
|
11
11
|
def start
|
12
|
-
if @config.output
|
13
|
-
|
12
|
+
if @config.output.is_a?(IO)
|
13
|
+
# This might seem like a duplication of the default value ($stdout)
|
14
|
+
# but it's because rspec overwrites $stdout (in helper #capture) to
|
15
|
+
# capture output.
|
16
|
+
@output = $stdout.dup
|
14
17
|
else
|
15
|
-
@output = File.open(@config.output, "w")
|
18
|
+
@output = File.open(@config.output, "w+")
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
@@ -31,7 +34,7 @@ module Chronicle
|
|
31
34
|
end
|
32
35
|
|
33
36
|
def finish
|
34
|
-
@output.close
|
37
|
+
@output.close if @output.is_a?(IO)
|
35
38
|
end
|
36
39
|
|
37
40
|
private
|
data/lib/chronicle/etl/runner.rb
CHANGED
@@ -50,7 +50,7 @@ class Chronicle::ETL::Runner
|
|
50
50
|
transformer = @job.instantiate_transformer(extraction)
|
51
51
|
record = transformer.transform
|
52
52
|
|
53
|
-
Chronicle::ETL::Logger.
|
53
|
+
Chronicle::ETL::Logger.debug(tty_log_transformation(transformer))
|
54
54
|
@job_logger.log_transformation(transformer)
|
55
55
|
|
56
56
|
@loader.load(record) unless @job.dry_run?
|
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.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Louis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|