Sha256: 08a3a369b6d52dca4395921a5d7b6d56619b4deaf5114a0add75b741cb924888
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
class Cartoset::FeaturesDataImporter DATA_FILE_PATH = Rails.root.join('tmp/features_data.csv').freeze def self.start(data_stream) table = {} File.open(DATA_FILE_PATH, 'w+') do |file| file.write(data_stream.read.force_encoding("UTF-8")) @tables = CartoDB::Connection.tables || nil CartoDB::Connection.drop_table('cartoset_features') if @tables && @tables.tables && @tables.tables.map{|t| t.name}.include?('cartoset_features') require 'ruby-debug'; debugger table = CartoDB::Connection.create_table 'cartoset_features', file table = CartoDB::Connection.table table.name end table end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cartoset-0.0.2 | lib/cartoset/features_data_importer.rb |
cartoset-0.0.1 | lib/cartoset/features_data_importer.rb |