Skip to content

Commit

Permalink
Interpolate also node variables, not just vars map
Browse files Browse the repository at this point in the history
Fixes #583
  • Loading branch information
ytti committed Oct 12, 2016
1 parent 201b68d commit 6612535
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/oxidized/source/csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def load
# map node parameters
keys = {}
@cfg.map.each do |key, position|
keys[key.to_sym] = data[position]
keys[key.to_sym] = node_var_interpolate data[position]
end
keys[:model] = map_model keys[:model] if keys.key? :model

Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/source/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def load
# map node parameters
keys = {}
@cfg.map.each do |key, position|
keys[key.to_sym] = line[position]
keys[key.to_sym] = node_var_interpolate line[position]
end
keys[:model] = map_model keys[:model] if keys.key? :model

Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/source/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def load
query.each do |node|
# map node parameters
keys = {}
@cfg.map.each { |key, sql_column| keys[key.to_sym] = node[sql_column.to_sym] }
@cfg.map.each { |key, sql_column| keys[key.to_sym] = node_var_interpolate node[sql_column.to_sym] }
keys[:model] = map_model keys[:model] if keys.key? :model

# map node specific vars
Expand Down

0 comments on commit 6612535

Please sign in to comment.