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: 951fca4c6238d773ec8bc2b9ea474a0cffdabf0c2f5d0c925f78b91b35836224
4
- data.tar.gz: 908a7f01fb215cca9936f072b71315c3b62e0d00b3c8f7ffd938682a4cabe42c
3
+ metadata.gz: 2e9f565004fce3539bdcfec9b98f64e33d8d4f1dde532f573adf54bfb61eadfa
4
+ data.tar.gz: 81da054f627ae084d45b4fe53480d5ef26fadf9cfd3ad4eb53d908741d8214e4
5
5
  SHA512:
6
- metadata.gz: 28fc97935e5bd9538877a2057f3201170fdb1eb574385ae6d94901b21abfa5f923618d5fb2caf94395503ec70c0052b607a939b363f27630aaca26df6ca93722
7
- data.tar.gz: 0b8e4dedb79e6cbd23487e2c4482d9a8ad9d1653e015593e6b83cac854d94a6cd4702862eebb11ec9f41e63b774eb6f41db929a1ceb12055af6cb08209a6b8eb
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 == $stdout
13
- @output = @config.output
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
@@ -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.info(tty_log_transformation(transformer))
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?
@@ -1,5 +1,5 @@
1
1
  module Chronicle
2
2
  module ETL
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
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.5.0
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-24 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport