Sha256: bef4119f438bd8c627e8379300947a505cbd343a106240fc81e6e215c973ee29

Contents?: true

Size: 596 Bytes

Versions: 17

Compression:

Stored size: 596 Bytes

Contents

BreedGender.class_eval do
  data_miner do
    import "Brighter Planet's list of cat and dog breeds, genders, and weights",
           :url => 'http://static.brighterplanet.com/science/data/consumables/pets/breed_genders.csv',
           :encoding => 'ISO-8859-1',
           :select => proc { |row| row['gender'].present? } do
      key 'name', :synthesize => proc { |row| row['name'] + ' ' + row['gender'] }
      store 'breed_name', :field_name => 'name'
      store 'gender_name', :field_name => 'gender'
      store 'weight', :from_units => :pounds, :to_units => :kilograms
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/pet/breed_gender/data_miner.rb
earth-1.1.2 lib/earth/pet/breed_gender/data_miner.rb
earth-1.1.1 lib/earth/pet/breed_gender/data_miner.rb
earth-1.1.0 lib/earth/pet/breed_gender/data_miner.rb
earth-1.0.3 lib/earth/pet/breed_gender/data_miner.rb
earth-1.0.2 lib/earth/pet/breed_gender/data_miner.rb
earth-1.0.1 lib/earth/pet/breed_gender/data_miner.rb
earth-1.0.0 lib/earth/pet/breed_gender/data_miner.rb
earth-0.12.4 lib/earth/pet/breed_gender/data_miner.rb
earth-0.12.3 lib/earth/pet/breed_gender/data_miner.rb
earth-0.12.2 lib/earth/pet/breed_gender/data_miner.rb
earth-0.12.1 lib/earth/pet/breed_gender/data_miner.rb
earth-0.12.0 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.20 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.19 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.18 lib/earth/pet/breed_gender/data_miner.rb
earth-0.11.17 lib/earth/pet/breed_gender/data_miner.rb