purchase 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/purchase/carbon_model.rb +1 -5
- metadata +4 -4
@@ -16,7 +16,7 @@ module BrighterPlanet
|
|
16
16
|
base.decide :emission, :with => :characteristics do
|
17
17
|
committee :emission do
|
18
18
|
quorum 'from emissions factor and adjusted cost', :needs => :sector_emissions do |characteristics|
|
19
|
-
characteristics[:sector_emissions].
|
19
|
+
characteristics[:sector_emissions].sum
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -31,10 +31,6 @@ module BrighterPlanet
|
|
31
31
|
committee :emission_factors do
|
32
32
|
quorum 'from sector shares', :needs => [:sector_shares] do |characteristics|
|
33
33
|
characteristics[:sector_shares].inject([]) do |list, sector_share|
|
34
|
-
if sector_share.emission_factor.nil?
|
35
|
-
raise MissingEmissionFactor,
|
36
|
-
"Missing emission factor for sector #{sector_share.io_code}"
|
37
|
-
end
|
38
34
|
factor = sector_share.emission_factor * sector_share.share
|
39
35
|
list << EmissionFactor.new(sector_share.io_code, factor)
|
40
36
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purchase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andy Rossmeissl
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2010-08-
|
22
|
+
date: 2010-08-17 00:00:00 -04:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|