Sha256: 9953d0d36b100be5ecbc77bdecb03f5c15a67b2f207b09959f7f2203c419b73c

Contents?: true

Size: 880 Bytes

Versions: 3

Compression:

Stored size: 880 Bytes

Contents

ComputationPlatform.class_eval do
  data_miner do
    schema Earth.database_options do
      string 'name'
      string 'data_center_company_name'
    end
    
    import "a list of computation platforms and the data center company they use",
           :url => 'https://spreadsheets.google.com/pub?key=0AkCJNpm9Ks6JdG5zVER5THhXRlE4N0RXTklVaS03Ymc&single=true&gid=0&output=csv' do
      key   'name'
      store 'data_center_company_name'
    end
    
    verify "Data center company name should never be missing" do
      ComputationPlatform.all.each do |platform|
        if platform.data_center_company_name.nil?
          raise "Invalid data center company name for DataCenterCompany #{platform.name}: #{platform.data_center_company_name}"
        end
      end
    end
    
    # FIXME TODO verify that all data center company names appear in data_center_companies
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-0.3.15 lib/earth/computation/computation_platform/data_miner.rb
earth-0.3.14 lib/earth/computation/computation_platform/data_miner.rb
earth-0.3.13 lib/earth/computation/computation_platform/data_miner.rb