From eff861dc81aed658cbccfcc2ea86b3d7f02d975d Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 6 May 2014 12:28:43 +0300 Subject: require config/vars earlier - we need config/vars before model - some whitespace changes Bump up gemspec --- lib/oxidized/source/csv.rb | 2 +- lib/oxidized/source/sql.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/source') diff --git a/lib/oxidized/source/csv.rb b/lib/oxidized/source/csv.rb index 113c272..484a186 100644 --- a/lib/oxidized/source/csv.rb +++ b/lib/oxidized/source/csv.rb @@ -26,7 +26,7 @@ class CSV < Source keys[key.to_sym] = data[position] end keys[:model] = map_model keys[:model] if keys.key? :model - + # map node specific vars, empty value is considered as nil vars = {} @cfg.vars_map.each { |key, position| vars[key.to_sym] = data[position].to_s.empty? ? nil : data[position] } diff --git a/lib/oxidized/source/sql.rb b/lib/oxidized/source/sql.rb index a115da8..c744e31 100644 --- a/lib/oxidized/source/sql.rb +++ b/lib/oxidized/source/sql.rb @@ -39,7 +39,7 @@ class SQL < Source keys = {} @cfg.map.each { |key, sql_column| keys[key.to_sym] = node[sql_column.to_sym] } keys[:model] = map_model keys[:model] if keys.key? :model - + # map node specific vars vars = {} @cfg.vars_map.each { |key, sql_column| vars[key.to_sym] = node[sql_column.to_sym] } -- cgit v1.2.1