lib/spout/tasks/engine.rake in spout-0.1.0.rc vs lib/spout/tasks/engine.rake in spout-0.1.0.rc2
- old
+ new
@@ -52,10 +52,10 @@
puts ENV['CSV'].inspect
if File.exists?(ENV['CSV'].to_s)
CSV.parse( File.open(ENV['CSV'].to_s, 'r:iso-8859-1:utf-8'){|f| f.read}, headers: true ) do |line|
row = line.to_hash
next if row['id'] == ''
- folder = File.join('variables', row['folder'])
+ folder = File.join('variables', row.delete('folder').to_s.gsub(':', '/'))
FileUtils.mkpath folder
hash = {}
id = row.delete('id')
hash['id'] = id
hash['display_name'] = row.delete('display_name')