automobile_trip 0.0.9 → 0.1.0

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.
Files changed (43) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +8 -0
  4. data/Gemfile.lock +200 -0
  5. data/LICENSE-PREAMBLE +52 -0
  6. data/Rakefile +71 -0
  7. data/VERSION +1 -0
  8. data/automobile_trip.gemspec +27 -0
  9. data/dot.rvmrc +9 -0
  10. data/features/automobile_trip_committees.feature +415 -16
  11. data/features/automobile_trip_emissions.feature +142 -12
  12. data/features/step_definitions/automobile_trip_steps.rb +15 -0
  13. data/features/step_definitions/mapquest_steps.rb +5 -0
  14. data/features/support/env.rb +7 -1
  15. data/lib/automobile_trip.rb +1 -0
  16. data/lib/automobile_trip/carbon_model.rb +570 -13
  17. data/lib/automobile_trip/characterization.rb +20 -1
  18. data/lib/automobile_trip/data.rb +21 -4
  19. data/lib/automobile_trip/fallback.rb +6 -2
  20. data/lib/automobile_trip/relationships.rb +7 -1
  21. data/lib/automobile_trip/version.rb +5 -0
  22. data/lib/test_support/db/fixtures/automobile_fuels.csv +4 -0
  23. data/lib/test_support/db/fixtures/automobile_make_model_year_variants.csv +2 -0
  24. data/lib/test_support/db/fixtures/automobile_make_model_years.csv +2 -0
  25. data/lib/test_support/db/fixtures/automobile_make_models.csv +2 -0
  26. data/lib/test_support/db/fixtures/automobile_make_years.csv +2 -0
  27. data/lib/test_support/db/fixtures/automobile_makes.csv +2 -0
  28. data/lib/test_support/db/fixtures/automobile_size_classes.csv +3 -0
  29. data/lib/test_support/db/fixtures/automobile_type_fuel_years.csv +5 -0
  30. data/lib/test_support/db/fixtures/automobile_type_years.csv +3 -0
  31. data/lib/test_support/db/fixtures/fuel_years.csv +2 -0
  32. data/lib/test_support/db/fixtures/fuels.csv +4 -0
  33. data/lib/test_support/db/fixtures/greenhouse_gases.csv +3 -0
  34. data/vendor/plugin/mapquest/README.textile +70 -0
  35. data/vendor/plugin/mapquest/Rakefile +15 -0
  36. data/vendor/plugin/mapquest/init.rb +1 -0
  37. data/vendor/plugin/mapquest/lib/mapquest_directions.rb +56 -0
  38. data/vendor/plugin/mapquest/spec/lib/mapquest_directions.xml +2 -0
  39. data/vendor/plugin/mapquest/spec/lib/mapquest_directions_fail.xml +2 -0
  40. data/vendor/plugin/mapquest/spec/lib/mapquest_directions_spec.rb +58 -0
  41. data/vendor/plugin/mapquest/spec/spec_helper.rb +13 -0
  42. metadata +55 -121
  43. data/lib/automobile_trip/committee_structure.rb +0 -65
@@ -1,65 +0,0 @@
1
- committee :emission_factor do
2
- quorum 'from fuel type', :needs => :fuel_type do |characteristics|
3
- # characteristics[:fuel_type].emission_factor
4
- end
5
-
6
- quorum 'default' do
7
- # AutomobileTrip.fallback.emission_factor
8
- end
9
- end
10
-
11
- committee :fuel_consumed do
12
- quorum 'from fuel cost and fuel price' do
13
- # fuel_cost / fuel_price
14
- end
15
-
16
- quorum 'from distance and fuel efficiency', :needs => [:distance, :average_fuel_efficiency] do |characteristics|
17
- # characteristics[:distance] / characteristics[:average_fuel_efficiency]
18
- end
19
- end
20
-
21
- committee :fuel_price do
22
- # quorum 'from location'
23
- #
24
- # end
25
-
26
- quorum 'from fuel type' do
27
-
28
- end
29
- end
30
-
31
- committee :distance do
32
- quorum 'from duration and speed' do
33
- # duration * speed
34
- end
35
- end
36
-
37
- committee :average_fuel_efficiency do
38
- quorum 'from variant' do # variant includes make, year, and model
39
- end
40
-
41
- quorum 'from model' do # model includes make and year
42
- end
43
-
44
- quorum 'from year' do # year includes make
45
- end
46
-
47
- quorum 'from make' do
48
- end
49
- end
50
-
51
- committee :fuel_type do
52
- quorum 'from variant' do
53
- end
54
-
55
- quorum 'from model' do
56
- end
57
-
58
- quorum 'from make' do
59
- end
60
-
61
- quorum 'default' do
62
- # AutomobileTrip.fallback.fuel_type
63
- end
64
- end
65
-