Sha256: 5ee92107f1ba1b5c4fcb96d441b99c450aa5b045b6474ee12632fd7d00b70264
Contents?: true
Size: 739 Bytes
Versions: 18
Compression:
Stored size: 739 Bytes
Contents
require 'earth/fuel/data_miner' 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 # FIXME TODO verify that for any year the percentages sum to 1 end end
Version data entries
18 entries across 18 versions & 1 rubygems