burner 1.0.0.pre.alpha.1 → 1.0.0.pre.alpha.2

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: 76ba9eda7f18a68f4c24c11d4724e2021c6f1d92ca4878fafb118e6c897c018c
4
- data.tar.gz: 95e35512ece9b5f8acb912305d0609c86354977d3c8bd6e125a18db0584778fc
3
+ metadata.gz: '0499f990d92543479718a805654a9e070b3ea3fe9d8bf85aae170c16bdc47e51'
4
+ data.tar.gz: 4dff77329307b83891fbb92f0a67aabbd4799b8600af14d15aa22c29cfdfc456
5
5
  SHA512:
6
- metadata.gz: 47b53c96680edfd6ca08e637d2ab6fd738684e9c2e7e8d08ca6d52a6361b8cf3cfa55af072cfeeb41a44838e76a4474aa229fc23b86f54558603c9af718f5fa0
7
- data.tar.gz: 804da88a604544877d7b4f34bafcf1079f3282ad0c34da69466b83bfbd37fb30589f1cb38b02aafa4ccfd17f9e24aabf28385d06a8b80c3d2f552d4e71d3fd7d
6
+ metadata.gz: 42655eba14a6397bc815f8b9e989f8485fb25a0981840ea4c6e69c47b565e487eb1a01c03caa952b4685421130711eea2e07a1cf3a62102e80a49a484be34931
7
+ data.tar.gz: a1be281d0e8f136ecbed2e3bb577584f1faeb5b9afc85a7fcf6b88601e86baff2f36077742e79ff03f7e4d41dcc2e2e15c150657774ec17dc0111721851352dd
data/exe/burner CHANGED
@@ -18,4 +18,4 @@ if ARGV.empty?
18
18
  end
19
19
 
20
20
  # This should return exit code of 1 if it raises any hard errors.
21
- Burner::Cli.new(ARGV).invoke
21
+ Burner::Cli.new(ARGV).execute
@@ -9,6 +9,7 @@
9
9
 
10
10
  require 'acts_as_hashable'
11
11
  require 'benchmark'
12
+ require 'forwardable'
12
13
  require 'json'
13
14
  require 'objectable'
14
15
  require 'securerandom'
@@ -12,8 +12,12 @@ require_relative 'pipeline'
12
12
  module Burner
13
13
  # Process a single string as a Pipeline. This is mainly to back the command-line interface.
14
14
  class Cli
15
+ extend Forwardable
16
+
15
17
  attr_reader :params, :pipeline
16
18
 
19
+ def_delegators :pipeline, :execute
20
+
17
21
  def initialize(args)
18
22
  path = args.first
19
23
  cli_params = extract_cli_params(args)
@@ -22,10 +26,6 @@ module Burner
22
26
  @params = (config['params'] || {}).merge(cli_params)
23
27
  end
24
28
 
25
- def invoke
26
- pipeline.execute(params: params)
27
- end
28
-
29
29
  private
30
30
 
31
31
  def read_yaml(path)
@@ -35,7 +35,7 @@ module Burner
35
35
  end
36
36
 
37
37
  # The main entry-point for kicking off a pipeline.
38
- def execute(params: {}, output: Output.new, payload: Payload.new)
38
+ def execute(output: Output.new, params: {}, payload: Payload.new)
39
39
  output.write("Pipeline started with #{steps.length} step(s)")
40
40
 
41
41
  output_params(params, output)
@@ -9,10 +9,11 @@
9
9
 
10
10
  module Burner
11
11
  # Can take in a string and an object and use the object for formatting string interpolations
12
- # using tokens of form: {attribute_name}. It can also understand dot-notation for nested
13
- # objects using the Objectable library. Another benefit of using Objectable for resolution
14
- # is that it can understand almost any type of object: Hash, Struct, OpenStruct, custom
15
- # objects, etc. For more information see underlying libraries:
12
+ # using tokens of form: {attribute_name}. This templating class does not understand nested
13
+ # structures, so input should be a flat object/hash in the form of key-value pairs. A benefit of
14
+ # using Objectable for resolution is that it can understand almost any type of
15
+ # object: Hash, Struct, OpenStruct, custom objects, etc.
16
+ # For more information see underlying libraries:
16
17
  # * Stringento: https://github.com/bluemarblepayroll/stringento
17
18
  # * Objectable: https://github.com/bluemarblepayroll/objectable
18
19
  class StringTemplate
@@ -21,7 +22,7 @@ module Burner
21
22
  attr_reader :resolver
22
23
 
23
24
  def initialize
24
- @resolver = Objectable.resolver
25
+ @resolver = Objectable.resolver(separator: '')
25
26
 
26
27
  freeze
27
28
  end
@@ -8,5 +8,5 @@
8
8
  #
9
9
 
10
10
  module Burner
11
- VERSION = '1.0.0-alpha.1'
11
+ VERSION = '1.0.0-alpha.2'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.1
4
+ version: 1.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acts_as_hashable