earth 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,6 @@
1
1
  class AutomobileFuelType < ActiveRecord::Base
2
2
  set_primary_key :code
3
3
 
4
- has_many :automobiles, :foreign_key => 'fuel_type_code'
5
-
6
4
  scope :ordered, :order => 'name'
7
5
 
8
6
  falls_back_on :emission_factor => 20.781.pounds_per_gallon.to(:kilograms_per_litre) # https://brighterplanet.sifterapp.com/projects/30/issues/428
@@ -3,7 +3,6 @@ class AutomobileMakeModelYear < ActiveRecord::Base
3
3
 
4
4
  belongs_to :make_year, :class_name => 'AutomobileMakeYear', :foreign_key => 'make_year_name'
5
5
  has_many :make_model_year_variants, :class_name => 'AutomobileMakeModelYearVariant', :foreign_key => 'make_model_year_name'
6
- has_many :automobiles, :foreign_key => 'make_model_year_name'
7
6
 
8
7
  data_miner do
9
8
  tap "Brighter Planet's model year data", Earth.taps_server
@@ -5,7 +5,6 @@ class AutomobileMakeModelYearVariant < ActiveRecord::Base
5
5
  belongs_to :make_model, :class_name => 'AutomobileMakeModel', :foreign_key => 'make_model_name'
6
6
  belongs_to :make_model_year, :class_name => 'AutomobileMakeModelYear', :foreign_key => 'make_model_year_name'
7
7
  belongs_to :fuel_type, :class_name => 'AutomobileFuelType', :foreign_key => 'fuel_type_code'
8
- has_many :automobiles, :foreign_key => 'make_model_year_variant_row_hash'
9
8
 
10
9
  data_miner do
11
10
  tap "Brighter Planet's sanitized automobile make model year variant data", Earth.taps_server
@@ -1,8 +1,6 @@
1
1
  class AutomobileSizeClass < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :automobiles, :foreign_key => 'size_class_name'
5
-
6
4
  falls_back_on :hybrid_fuel_efficiency_city_multiplier => 1.651, # https://brighterplanet.sifterapp.com/issue/667
7
5
  :hybrid_fuel_efficiency_highway_multiplier => 1.213,
8
6
  :conventional_fuel_efficiency_city_multiplier => 0.987,
@@ -1,8 +1,6 @@
1
1
  class BusClass < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :bus_trips
5
-
6
4
  # https://brighterplanet.sifterapp.com/projects/30/issues/454
7
5
  falls_back_on :distance => 5.45.miles.to(:kilometres),
8
6
  :passengers => 8.25,
@@ -1,8 +1,6 @@
1
1
  class DietClass < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :diets
5
-
6
4
  data_miner do
7
5
  tap "Brighter Planet's diet class data", Earth.taps_server
8
6
  end
@@ -3,8 +3,6 @@ class LodgingClass < ActiveRecord::Base
3
3
 
4
4
  set_primary_key :name
5
5
 
6
- has_many :lodgings
7
-
8
6
  def self.schema_definition
9
7
  lambda do
10
8
  string 'name'
@@ -1,7 +1,6 @@
1
1
  class Urbanity < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :residences
5
4
  has_many :residential_energy_consumption_survey_responses
6
5
 
7
6
  data_miner do
@@ -6,8 +6,6 @@ class ZipCode < ActiveRecord::Base
6
6
  belongs_to :state, :foreign_key => 'state_postal_abbreviation'
7
7
  # has_one :census_division, :through => :state
8
8
  # has_one :census_region, :through => :state
9
- has_many :residences
10
-
11
9
 
12
10
  acts_as_mappable :default_units => :miles, # FIXME imperial
13
11
  :lat_column_name => :latitude,
@@ -1,7 +1,6 @@
1
1
  class Breed < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :pets, :foreign_key => 'breed_id'
5
4
  has_many :breed_genders, :foreign_key => 'breed_name'
6
5
  belongs_to :species, :foreign_key => 'species_name'
7
6
 
@@ -1,7 +1,6 @@
1
1
  class Gender < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :pets
5
4
  has_many :breed_genders, :foreign_key => 'gender_name'
6
5
 
7
6
  data_miner do
@@ -1,8 +1,6 @@
1
1
  class Species < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :pets
5
-
6
4
  scope :thoroughly_researched, :conditions => 'marginal_dietary_requirement IS NOT NULL'
7
5
 
8
6
  falls_back_on :diet_emission_intensity => lambda { weighted_average :diet_emission_intensity, :weighted_by => :population }, # kg CO2 / joule
@@ -1,8 +1,6 @@
1
1
  class RailClass < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :rail_trips
5
-
6
4
  data_miner do
7
5
  tap "Brighter Planet's rail class data", Earth.taps_server
8
6
  end
@@ -1,7 +1,6 @@
1
1
  class AirConditionerUse < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :residences
5
4
  has_many :residential_energy_consumption_survey_responses
6
5
 
7
6
  falls_back_on :fugitive_emission => 0.102295.pounds_per_square_foot.to(:kilograms_per_square_metre), # https://brighterplanet.sifterapp.com/projects/30/issues/430
@@ -1,7 +1,6 @@
1
1
  class ClothesMachineUse < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :residences
5
4
  has_many :residential_energy_consumption_survey_responses
6
5
 
7
6
  data_miner do
@@ -1,7 +1,6 @@
1
1
  class DishwasherUse < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :residences
5
4
  has_many :residential_energy_consumption_survey_responses
6
5
 
7
6
  data_miner do
@@ -1,7 +1,6 @@
1
1
  class ResidenceClass < ActiveRecord::Base
2
2
  set_primary_key :name
3
3
 
4
- has_many :residences
5
4
  has_many :residential_energy_consumption_survey_responses
6
5
 
7
6
  CLASSIFICATIONS = ['mobile home', 'house', 'apartment']
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: earth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere