arc-furnace 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arc-furnace/null_sink.rb +12 -0
- data/lib/arc-furnace/pipeline.rb +5 -11
- data/lib/arc-furnace/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1205226cf5fe45f7525dd6d690e2ae8d07bab716
|
4
|
+
data.tar.gz: 15d4d0c2b54119a385893a89a91df1d44418e29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acb8f99017c98ec54321bd37357693e964e28a11a02202438770dee5fd5ab6c91bffd87f5caaf583f68db53865cb4aa0c98d8201e46c00dd6d03efba51c895c6
|
7
|
+
data.tar.gz: 785065af27031e11f505a3593342be406c1035a8b05efdd0872a4d62d5af14515fe49c42e1918eb98d8c8b74bd74bc4bb65e57b0fbc3588f116c0284cf559045
|
data/lib/arc-furnace/pipeline.rb
CHANGED
@@ -108,7 +108,7 @@ module ArcFurnace
|
|
108
108
|
ALLOWABLE_PARAM_TYPES.include?(param.first)
|
109
109
|
end.map(&:second)
|
110
110
|
# Allow params to be passed that are not in the initializer
|
111
|
-
instance = type
|
111
|
+
instance = create_instance_with_error_handling(type, resolved_params, key_parameters)
|
112
112
|
instance.params = resolved_params
|
113
113
|
instance
|
114
114
|
end
|
@@ -153,7 +153,7 @@ module ArcFurnace
|
|
153
153
|
dsl_class.intermediates_map.each do |key, instance|
|
154
154
|
intermediates_map[key] = instance_exec(&instance) if instance
|
155
155
|
end
|
156
|
-
@sink_node =
|
156
|
+
@sink_node = instance_exec(&dsl_class.sink_node)
|
157
157
|
@sink_source = intermediates_map[dsl_class.sink_source]
|
158
158
|
end
|
159
159
|
|
@@ -175,16 +175,10 @@ module ArcFurnace
|
|
175
175
|
self.params[key] || self.intermediates_map[key] || (raise "When processing node #{node_id}: Unknown key #{key}!")
|
176
176
|
end
|
177
177
|
|
178
|
-
def
|
179
|
-
|
178
|
+
def create_instance_with_error_handling(type, resolved_params, key_parameters)
|
179
|
+
type.new(resolved_params.slice(*key_parameters))
|
180
180
|
rescue CSV::MalformedCSVError
|
181
|
-
|
182
|
-
raise "File #{find_root_source(params).file.path} cannot be processed."
|
183
|
-
end
|
184
|
-
|
185
|
-
def find_root_source(params)
|
186
|
-
source = params[:source]
|
187
|
-
source = params[:source] while source.params[:source]
|
181
|
+
raise "File #{resolved_params[:filename]} cannot be processed."
|
188
182
|
end
|
189
183
|
end
|
190
184
|
end
|
data/lib/arc-furnace/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arc-furnace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Spangenberger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/arc-furnace/multi_csv_source.rb
|
149
149
|
- lib/arc-furnace/node.rb
|
150
150
|
- lib/arc-furnace/nodes.rb
|
151
|
+
- lib/arc-furnace/null_sink.rb
|
151
152
|
- lib/arc-furnace/outer_join.rb
|
152
153
|
- lib/arc-furnace/pipeline.rb
|
153
154
|
- lib/arc-furnace/private_attr.rb
|