earth 0.11.6 → 0.11.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ require "earth/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "earth"
7
7
  s.version = Earth::VERSION
8
- s.date = "2011-12-20"
8
+ s.date = "2011-12-22"
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Seamus Abshere", "Derek Kastner", "Andy Rossmeissl"]
11
11
  s.email = %q{andy@rossmeissl.net}
@@ -2,3 +2,4 @@ require 'earth/hospitality/census_region_lodging_class'
2
2
  require 'earth/hospitality/commercial_building_energy_consumption_survey_response'
3
3
  require 'earth/hospitality/country_lodging_class'
4
4
  require 'earth/hospitality/lodging_class'
5
+ require 'earth/hospitality/lodging_property'
@@ -0,0 +1,28 @@
1
+ # Copyright 2011 Brighter Planet, Inc.
2
+ class LodgingProperty < ActiveRecord::Base
3
+ set_primary_key :northstar_id
4
+
5
+ # So Lodging can look up LodgingClass from LodgingProperty
6
+ belongs_to :lodging_class, :foreign_key => 'lodging_class_name'
7
+
8
+ col :northstar_id
9
+ col :name
10
+ col :city
11
+ col :locality # state / province / etc.
12
+ col :postcode # zip code / postal code / etc.
13
+ col :country_iso_3166_alpha_3_code
14
+ col :chain_name
15
+ col :lodging_rooms, :type => :integer
16
+ col :floors, :type => :integer
17
+ col :construction_year, :type => :integer
18
+ col :renovation_year, :type => :integer
19
+ col :lodging_class_name
20
+ col :restaurant
21
+ col :air_conditioning
22
+ col :mini_bar
23
+ col :refrigerator
24
+ col :hot_tub
25
+ col :pools_indoor, :type => :integer
26
+ col :pools_outdoor, :type => :integer
27
+ col :update_date
28
+ end
@@ -1,3 +1,3 @@
1
1
  module Earth
2
- VERSION = "0.11.6"
2
+ VERSION = "0.11.7"
3
3
  end
@@ -23,7 +23,7 @@ describe Earth do
23
23
  describe '.resource_map' do
24
24
  it 'should get a list of resource_map' do
25
25
  resource_map = Earth.resource_map
26
- resource_map.keys.count.should == 95
26
+ resource_map.keys.count.should == 96
27
27
  resource_map['FuelType'].should == 'fuel'
28
28
  end
29
29
  it 'should exclude data_miner files' do
@@ -33,7 +33,7 @@ describe Earth do
33
33
 
34
34
  describe '.search' do
35
35
  it 'should get a list of all resource names' do
36
- Earth.search.length.should == 95
36
+ Earth.search.length.should == 96
37
37
  Earth.search.should include('Aircraft')
38
38
  Earth.search.should include('Industry')
39
39
  end
@@ -44,7 +44,7 @@ describe Earth do
44
44
  Earth.search('computation').length.should == 3
45
45
  Earth.search('diet').length.should == 2
46
46
  Earth.search('fuel').length.should == 5
47
- Earth.search('hospitality').length.should == 4
47
+ Earth.search('hospitality').length.should == 5
48
48
  Earth.search('industry').length.should == 13
49
49
  Earth.search('locality').length.should == 10
50
50
  Earth.search('pet').length.should == 4
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: earth
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.11.6
5
+ version: 0.11.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Seamus Abshere
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2011-12-20 00:00:00 -05:00
15
+ date: 2011-12-22 00:00:00 -05:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -467,6 +467,7 @@ files:
467
467
  - lib/earth/hospitality/data_miner.rb
468
468
  - lib/earth/hospitality/lodging_class.rb
469
469
  - lib/earth/hospitality/lodging_class/data_miner.rb
470
+ - lib/earth/hospitality/lodging_property.rb
470
471
  - lib/earth/industry.rb
471
472
  - lib/earth/industry/cbecs_energy_intensity.rb
472
473
  - lib/earth/industry/cbecs_energy_intensity/data_miner.rb
@@ -644,7 +645,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
644
645
  requirements:
645
646
  - - ">="
646
647
  - !ruby/object:Gem::Version
647
- hash: -222319721383199393
648
+ hash: 4346878839567813019
648
649
  segments:
649
650
  - 0
650
651
  version: "0"
@@ -653,7 +654,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
653
654
  requirements:
654
655
  - - ">="
655
656
  - !ruby/object:Gem::Version
656
- hash: -222319721383199393
657
+ hash: 4346878839567813019
657
658
  segments:
658
659
  - 0
659
660
  version: "0"