residence 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,3 +9,11 @@ Feature: Residence Committee Calculations
9
9
  Examples:
10
10
  | full_baths | half_baths | bathrooms |
11
11
  | 2 | 0.5 | 2.5 |
12
+
13
+ Scenario Outline: Predicted annual electricity use committee
14
+ Given a residence has "lighting_efficiency" of "<lighting_efficiency>"
15
+ When emissions are calculated
16
+ Then the predicted_annual_electricity_use committee should be exactly <predicted_annual_electricity_use>
17
+ Examples:
18
+ | lighting_efficiency | predicted_annual_electricity_use |
19
+ | 0.5 | 14409.3456880943 |
@@ -544,6 +544,15 @@ module BrighterPlanet
544
544
  end
545
545
  end
546
546
  end
547
+
548
+ def self.research(key)
549
+ case key
550
+ when :efficient_lightbulb_power
551
+ 17.5 # watts https://brighterplanet.sifterapp.com/projects/30/issues/433
552
+ when :standard_lightbulb_power
553
+ 67.5 # watts https://brighterplanet.sifterapp.com/projects/30/issues/433
554
+ end
555
+ end
547
556
  end
548
557
  end
549
558
  end
@@ -22,17 +22,6 @@ class ResidenceRecord < ActiveRecord::Base
22
22
  :occupation => 0.937, # https://brighterplanet.sifterapp.com/projects/30/issues/434
23
23
  :green_electricity => 0.0 # crap placeholder for now
24
24
 
25
- class << self
26
- def research(key)
27
- case key
28
- when :efficient_lightbulb_power
29
- 17.5 # watts https://brighterplanet.sifterapp.com/projects/30/issues/433
30
- when :standard_lightbulb_power
31
- 67.5 # watts https://brighterplanet.sifterapp.com/projects/30/issues/433
32
- end
33
- end
34
- end
35
-
36
25
  def zip_code_name=(value)
37
26
  self.zip_code = ZipCode.find_by_name(value)
38
27
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: residence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Rossmeissl