Sha256: abec8c9024a233eae620a55d629395e4eb72e54a43700a2ed71c8aa81e32e9e9

Contents?: true

Size: 673 Bytes

Versions: 7

Compression:

Stored size: 673 Bytes

Contents

require 'earth/bus/bus_fuel_control'

BusFuelYearControl.class_eval do
  data_miner do
    process "Ensure BusFuelControl is populated" do
      BusFuelControl.run_data_miner!
    end
    
    import "a list of bus fuel year controls",
           :url => 'https://spreadsheets.google.com/pub?key=0AoQJbWqPrREqdGhHQkZPZW4zbXYzZ3NkYThBWnQ2QXc&gid=0&output=csv' do
      key   'name'
      store 'bus_fuel_name'
      store 'year'
      store 'control'
      store 'total_travel_percent'
    end
    
    process "Derive bus fuel control name for association with BusFuelControl" do
      update_all "bus_fuel_control_name = bus_fuel_name || ' ' || control"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.1.2 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.1.1 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.1.0 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.0.3 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.0.2 lib/earth/bus/bus_fuel_year_control/data_miner.rb
earth-1.0.1 lib/earth/bus/bus_fuel_year_control/data_miner.rb