automobile_trip 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,10 @@
|
|
1
|
+
module BrighterPlanet
|
2
|
+
module AutomobileTrip
|
3
|
+
module Fallback
|
4
|
+
def self.included(base)
|
5
|
+
base.falls_back_on :emission_factor => 20.556.pounds_per_gallon.to(:kilograms_per_litre), # from footprint model gasoline car CO2e / gallon
|
6
|
+
:fuel_use => 57.0 # based on wikianswers average tank size of 15 gallons
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -6,9 +6,4 @@ require 'sniff'
|
|
6
6
|
class AutomobileTripRecord < ActiveRecord::Base
|
7
7
|
include Sniff::Emitter
|
8
8
|
include BrighterPlanet::AutomobileTrip
|
9
|
-
|
10
|
-
belongs_to :fuel_type, :foreign_key => 'fuel_type_name'
|
11
|
-
|
12
|
-
falls_back_on :emission_factor => 20.556.pounds_per_gallon.to(:kilograms_per_litre), # from footprint model gasoline car CO2e / gallon
|
13
|
-
:fuel_use => 57.0 # based on wikianswers average tank size of 15 gallons
|
14
9
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: automobile_trip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
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-12-
|
22
|
+
date: 2010-12-07 00:00:00 -06:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
@@ -176,6 +176,8 @@ files:
|
|
176
176
|
- lib/automobile_trip/characterization.rb
|
177
177
|
- lib/automobile_trip/committee_structure.rb
|
178
178
|
- lib/automobile_trip/data.rb
|
179
|
+
- lib/automobile_trip/fallback.rb
|
180
|
+
- lib/automobile_trip/relationships.rb
|
179
181
|
- lib/automobile_trip/summarization.rb
|
180
182
|
- lib/test_support/automobile_trip_record.rb
|
181
183
|
- features/support/env.rb
|