automobile_trip 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -3,8 +3,27 @@ module BrighterPlanet
3
3
  module Characterization
4
4
  def self.included(base)
5
5
  base.characterize do
6
+ has :date
7
+ has :make
8
+ has :make_year
9
+ has :make_model
10
+ has :make_model_year
11
+ has :make_model_year_variant
12
+ has :size_class
13
+ has :hybridity
14
+ has :urbanity_estimate
15
+ has :hybridity_multiplier
16
+ has :fuel_efficiency
17
+ has :speed
18
+ has :city_speed
19
+ has :highway_speed
20
+ has :duration
21
+ has :origin
22
+ has :destination
23
+ has :distance
6
24
  has :fuel_use
7
- has :fuel_type
25
+ has :automobile_fuel # don't call this fuel b/c then if you specify fuel.name in tests sniff will try to look it up in the fuels fixture, not automobile_fuels
26
+ has :mapquest_api_key, :display => lambda { |key| "secret key" }
8
27
  end
9
28
  end
10
29
  end
@@ -4,11 +4,28 @@ module BrighterPlanet
4
4
  def self.included(base)
5
5
  base.data_miner do
6
6
  schema do
7
- float 'emission_factor'
8
- float 'fuel_use'
9
- string 'fuel_type_name'
7
+ date 'date'
8
+ string 'make_name'
9
+ string 'make_year_name'
10
+ string 'make_model_name'
11
+ string 'make_model_year_name'
12
+ string 'make_model_year_variant_row_hash'
13
+ string 'size_class_name'
14
+ boolean 'hybridity'
15
+ float 'urbanity_estimate'
16
+ float 'hybridity_multiplier'
17
+ float 'fuel_efficiency'
18
+ float 'speed'
19
+ float 'city_speed'
20
+ float 'highway_speed'
21
+ float 'duration'
22
+ string 'origin'
23
+ string 'destination'
24
+ float 'distance'
25
+ float 'fuel_use'
26
+ string 'automobile_fuel_name'
27
+ string 'mapquest_api_key'
10
28
  end
11
-
12
29
  process :run_data_miner_on_belongs_to_associations
13
30
  end
14
31
  end
@@ -2,8 +2,12 @@ module BrighterPlanet
2
2
  module AutomobileTrip
3
3
  module Fallback
4
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
5
+ base.falls_back_on :urbanity_estimate => 0.43,
6
+ :city_speed => 19.9.miles.to(:kilometres),
7
+ :highway_speed => 57.1.miles.to(:kilometres),
8
+ :hybridity_multiplier => 1.0,
9
+ :fuel_efficiency => 20.182.miles_per_gallon.to(:kilometres_per_litre),
10
+ :distance => 10.15.miles.to(:kilometres)
7
11
  end
8
12
  end
9
13
  end
@@ -2,7 +2,13 @@ module BrighterPlanet
2
2
  module AutomobileTrip
3
3
  module Relationships
4
4
  def self.included(target)
5
- target.belongs_to :fuel_type, :foreign_key => 'fuel_type_name'
5
+ target.belongs_to :make, :class_name => 'AutomobileMake', :foreign_key => 'make_name'
6
+ target.belongs_to :make_year, :class_name => 'AutomobileMakeYear', :foreign_key => 'make_year_name'
7
+ target.belongs_to :make_model, :class_name => 'AutomobileMakeModel', :foreign_key => 'make_model_name'
8
+ target.belongs_to :make_model_year, :class_name => 'AutomobileMakeModelYear', :foreign_key => 'make_model_year_name'
9
+ target.belongs_to :make_model_year_variant, :class_name => 'AutomobileMakeModelYearVariant', :foreign_key => 'make_model_year_variant_row_hash'
10
+ target.belongs_to :size_class, :class_name => 'AutomobileSizeClass', :foreign_key => 'size_class_name'
11
+ target.belongs_to :automobile_fuel, :class_name => 'AutomobileFuel', :foreign_key => 'automobile_fuel_name'
6
12
  end
7
13
  end
8
14
  end
@@ -0,0 +1,5 @@
1
+ module BrighterPlanet
2
+ module AutomobileTrip
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ name,code,base_fuel_name,blend_fuel_name,distance_key,ef_key,blend_portion
2
+ regular gasoline,R,Motor Gasoline,,gasoline,gasoline
3
+ diesel,D,Distillate Fuel Oil No. 2,,diesel,diesel
4
+ B20,BP-B20,Distillate Fuel Oil No. 2,Biodiesel,diesel,diesel,0.2
@@ -0,0 +1,2 @@
1
+ row_hash,name,make_name,make_year_name,make_model_name,make_model_year_name,year,fuel_efficiency_city,fuel_efficiency_city_units,fuel_efficiency_highway,fuel_efficiency_highway_units,fuel_code
2
+ xxx1,Prius,Toyota,Toyota 2003,Toyota Prius,Toyota Prius 2003,2003,50,kilometres_per_litre,40,kilometres_per_litre,R
@@ -0,0 +1,2 @@
1
+ name,make_name,make_year_name,make_model_name,year,fuel_efficiency_city,fuel_efficiency_city_units,fuel_efficiency_highway,fuel_efficiency_highway_units
2
+ Toyota Prius 2003,Toyota,Toyota 2003,Toyota Prius,2003,40,kilometres_per_litre,30,kilometres_per_litre
@@ -0,0 +1,2 @@
1
+ name,make_name,fuel_efficiency_city,fuel_efficiency_city_units,fuel_efficiency_highway,fuel_efficiency_highway_units
2
+ Toyota Prius,Toyota,30,kilometres_per_litre,20,kilometres_per_litre
@@ -0,0 +1,2 @@
1
+ name,make_name,year,fuel_efficiency,fuel_efficiency_units
2
+ Toyota 2003,Toyota,2003,15,kilometres_per_litre
@@ -0,0 +1,2 @@
1
+ name,fuel_efficiency,fuel_efficiency_units
2
+ Toyota,10.0,kilometres_per_litre
@@ -0,0 +1,3 @@
1
+ name,fuel_efficiency_city,fuel_efficiency_city_units,fuel_efficiency_highway,fuel_efficiency_highway_units,hybrid_fuel_efficiency_city_multiplier,hybrid_fuel_efficiency_highway_multiplier,conventional_fuel_efficiency_city_multiplier,conventional_fuel_efficiency_highway_multiplier
2
+ Midsize Car,10,kilometres_per_litre,20,kilometres_per_litre,2,1.5,0.75,1
3
+ Midsize Wagon,5,kilometres_per_litre,10,kilometres_per_litre
@@ -0,0 +1,5 @@
1
+ name,fuel_common_name,type_year_name,fuel_consumption,fuel_consumption_units,total_travel,total_travel_units,ch4_emission_factor,ch4_emission_factor_units,n2o_emission_factor,n2o_emission_factor_units
2
+ Light-duty trucks diesel 2008,diesel,Light-duty trucks 2008,987,litres,715,kilometres,0.000004,kilograms_per_litre,0.000007,kilograms_per_litre
3
+ Passenger cars diesel 2008,diesel,Passenger cars 2008,144,litres,126,kilometres,0.000003,kilograms_per_litre,0.000005,kilograms_per_litre
4
+ Light-duty trucks gasoline 2008,gasoline,Light-duty trucks 2008,20763,litres,17091,kilometres,0.00008,kilograms_per_litre,0.00003,kilograms_per_litre
5
+ Passenger cars gasoline 2008,gasoline,Passenger cars 2008,25352,litres,25851,kilometres,0.0001,kilograms_per_litre,0.00002,kilograms_per_litre
@@ -0,0 +1,3 @@
1
+ name,hfc_emission_factor,hfc_emission_factor_units
2
+ Light-duty trucks 2008,0.13,kilograms_per_litre
3
+ Passenger cars 2008,0.09,kilograms_per_litre
@@ -0,0 +1,2 @@
1
+ name,fuel_name,co2_emission_factor,co2_biogenic_emission_factor
2
+ Motor Gasoline 2008,Motor Gasoline,2.3,0
@@ -0,0 +1,4 @@
1
+ name,co2_emission_factor,co2_biogenic_emission_factor
2
+ Motor Gasoline
3
+ Distillate Fuel Oil No. 2,2.7,0
4
+ Biodiesel,0,2.5
@@ -0,0 +1,3 @@
1
+ name,abbreviation,global_warming_potential
2
+ Methane,ch4,25
3
+ Nitrous oxide,n2o,298
@@ -0,0 +1,70 @@
1
+ h2. Usage
2
+
3
+ Get a MapQuest API key, and store in your app under MAPQUEST_KEY
4
+ <pre>MAPQUEST_KEY = 'your_api_key'</pre>
5
+
6
+ <pre>directions = MapQuestDirections.new(origin, destination)</pre>
7
+ where _origin_ and _destination_ are strings of addresses or places that MapQuest can find an address for. Example: "816 Meridian St., 37207"
8
+
9
+ Get drive time or distance of whole trip
10
+ <pre>
11
+ drive_time_in_minutes = directions.drive_time_in_minutes
12
+ distance_in_miles = directions.distance_in_miles
13
+ </pre>
14
+
15
+ Get the XML MapQuest returns with every turn, or the API call URL
16
+ <pre>
17
+ xml = directions.xml
18
+ xml_call = directions.xml_call
19
+ </pre>
20
+
21
+ h3. Error situations
22
+
23
+ <pre>directions.status</pre> shows you the status code returned by MapQuest. 0 means worked. Other codes (500, 403) mean problem.
24
+
25
+ If MapQuest can't recognize your places or gives an error, the distance_in_miles and drive_time_in_minutes will each return 0. You can call <pre>directions.status</pre> and it should tell you a number code for the problem. You can call <pre>directions.xml</pre> to read the full text.
26
+
27
+ h2. Installation
28
+
29
+ h3. gem
30
+
31
+ rails 2.3
32
+ # gem install mapquest_directions
33
+ # add config.gem "mapquest_directions" to your environment.rb file
34
+
35
+ rails 3.0
36
+ # gem 'mapquest_directions' in your Gemfile
37
+ # <pre>bundle install</pre> from command line
38
+
39
+ h3. Rails plugin
40
+
41
+ Rails 2.3
42
+ <pre>script/plugin install git://github.com/joshcrews/mapquest-directions-ruby.git</pre>
43
+
44
+ Rails 3.0
45
+ <pre>rails plugin install git://github.com/joshcrews/mapquest-directions-ruby.git</pre>
46
+
47
+ h3. Compatibility
48
+
49
+ Tested on Rails 2.3.8
50
+
51
+ Not yet tested on Rails 3. It probably is Rails 3 compatible, because it's just a single class with a few methods. It's probably compatible with every ruby project ever.
52
+
53
+ h3. MapQuest maps API key
54
+
55
+ You'll need a MapQuest Map API key
56
+
57
+ http://developer.mapquest.com/
58
+
59
+ Include it as the constant MAPQUEST_KEY in an app configuration file (environment.rb, config/initializers/api_keys.rb)
60
+
61
+ h3. Need turn-by-turn directions?
62
+
63
+ Not yet included in this gem, but you can do it with nokogiri to parse the XML that comes back when you do
64
+ <pre>MapQuestDirections.new(origin, destination).xml</pre>
65
+ And then nokogiri can cycle through each <maneuver> and you can pick out what you need.
66
+
67
+ h2. License
68
+
69
+ Anyone can use this code in any way.
70
+
@@ -0,0 +1,15 @@
1
+ # Rakefile
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'echoe'
5
+
6
+ Echoe.new('mapquest_directions', '0.1.0') do |p|
7
+ p.description = "Ruby-wrapper for MapQuest Directions API. Can return the drive time and driving distance between two places"
8
+ p.url = "http://github.com/joshcrews/MapQuest-Directions-Ruby"
9
+ p.author = "Josh Crews"
10
+ p.email = "josh@joshcrews.com"
11
+ p.ignore_pattern = ["tmp/*", "script/*"]
12
+ p.development_dependencies = ['nokogiri >=1.4.1']
13
+ end
14
+
15
+ Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
@@ -0,0 +1 @@
1
+ require 'mapquest_directions'
@@ -0,0 +1,56 @@
1
+ require 'net/http'
2
+ require 'nokogiri'
3
+ require 'uri'
4
+
5
+ class MapQuestDirections
6
+ class Failure < StandardError; end
7
+
8
+ attr_accessor :location_1, :location_2, :xml_call, :doc
9
+
10
+ def initialize(location_1, location_2, api_key)
11
+ @base_url = "http://www.mapquestapi.com/directions/v1/route?key=#{URI.escape(api_key)}&outFormat=xml&"
12
+ @location_1 = location_1
13
+ @location_2 = location_2
14
+ options = "from=#{transcribe(@location_1)}&to=#{transcribe(@location_2)}"
15
+ @xml_call = @base_url + options
16
+ end
17
+
18
+ def doc
19
+ @doc ||= begin
20
+ xml = get_url(xml_call)
21
+ noko = Nokogiri::XML(xml)
22
+ status = noko.css("statusCode").text
23
+ unless status == '0'
24
+ errors = noko.css("message").map(&:text).join(', ')
25
+ raise Failure, "Could not calculate directions between #{location_1} and #{location_2}: #{errors}"
26
+ end
27
+ noko
28
+ end
29
+ end
30
+
31
+ def drive_time_in_minutes
32
+ drive_time = doc.css("time").first.text
33
+ convert_to_minutes(drive_time)
34
+ end
35
+
36
+ def distance_in_kilometres
37
+ distance_in_miles = doc.css("distance").first.text.to_i
38
+ end
39
+
40
+ def distance_in_kilometres
41
+ distance_in_kilometres = doc.css("distance").first.text.to_f.miles.to(:kilometres)
42
+ end
43
+
44
+ private
45
+ def convert_to_minutes(text)
46
+ (text.to_i / 60).ceil
47
+ end
48
+
49
+ def transcribe(location)
50
+ location.gsub(" ", "+")
51
+ end
52
+
53
+ def get_url(url)
54
+ Net::HTTP.get(::URI.parse(url))
55
+ end
56
+ end
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <response><info><statusCode>0</statusCode><messages/><copyright><imageUrl>http://tile21.mqcdn.com/res/mqlogo.gif</imageUrl><imageAltText>© 2010 MapQuest, Inc.</imageAltText><text>© 2010 MapQuest, Inc.</text></copyright></info><route><sessionId>4c6c8e89-019b-0001-02b7-4979-0024e83e3993</sessionId><options><shapeFormat>raw</shapeFormat><generalize>-1.0</generalize><maxLinkId>0</maxLinkId><narrativeType>text</narrativeType><stateBoundaryDisplay>true</stateBoundaryDisplay><countryBoundaryDisplay>true</countryBoundaryDisplay><sideOfStreetDisplay>true</sideOfStreetDisplay><destinationManeuverDisplay>true</destinationManeuverDisplay><avoidTimedConditions>false</avoidTimedConditions><enhancedNarrative>false</enhancedNarrative><timeType>0</timeType><routeType>FASTEST</routeType><locale>en_US</locale><unit>M</unit><tryAvoidLinkIds></tryAvoidLinkIds><mustAvoidLinkIds></mustAvoidLinkIds><manmaps>true</manmaps></options><boundingBox><ul><lat>36.185138</lat><lng>-86.940116</lng></ul><lr><lat>32.554519</lat><lng>-85.481231</lng></lr></boundingBox><distance>310.2900085449219</distance><time>18209</time><formattedTime>05:03:29</formattedTime><legs><leg><distance>310.29</distance><time>18209</time><formattedTime>05:03:29</formattedTime><index>0</index><maneuvers><maneuver><startPoint><lat>36.185138</lat><lng>-86.768287</lng></startPoint><maneuverNotes/><distance>0.093</distance><time>22</time><formattedTime>00:00:22</formattedTime><attributes>0</attributes><turnType>2</turnType><direction>4</direction><narrative>Start out going SOUTH on MERIDIAN ST toward ARRINGTON ST.</narrative><directionName>South</directionName><index>0</index><streets><street>MERIDIAN ST</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-2,36.185138,-86.768287,0,0|purple-3,36.183811,-86.768478,0,0|&center=36.1844745,-86.7683825&zoom=13&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.183811</lat><lng>-86.768478</lng></startPoint><maneuverNotes/><distance>0.296</distance><time>73</time><formattedTime>00:01:13</formattedTime><attributes>0</attributes><turnType>2</turnType><direction>7</direction><narrative>Turn RIGHT onto HANCOCK ST.</narrative><directionName>West</directionName><index>1</index><streets><street>HANCOCK ST</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-3,36.183811,-86.768478,0,0|purple-4,36.184398,-86.773712,0,0|&center=36.184104500000004,-86.771095&zoom=12&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.184398</lat><lng>-86.773712</lng></startPoint><maneuverNotes/><distance>0.522</distance><time>75</time><formattedTime>00:01:15</formattedTime><attributes>0</attributes><turnType>6</turnType><direction>4</direction><narrative>Turn LEFT onto N 1ST ST/US-31W/US-41/US-431/TN-11. Continue to follow N 1ST ST.</narrative><directionName>South</directionName><index>2</index><streets><street>N 1ST ST</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-4,36.184398,-86.773712,0,0|purple-5,36.17691,-86.774551,0,0|&center=36.180654000000004,-86.77413150000001&zoom=10&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.17691</lat><lng>-86.774551</lng></startPoint><maneuverNotes/><distance>0.03</distance><time>6</time><formattedTime>00:00:06</formattedTime><attributes>0</attributes><turnType>6</turnType><direction>8</direction><narrative>Turn LEFT onto SPRING ST.</narrative><directionName>East</directionName><index>3</index><streets><street>SPRING ST</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-5,36.17691,-86.774551,0,0|purple-6,36.176799,-86.774032,0,0|&center=36.176854500000005,-86.7742915&zoom=15&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.176799</lat><lng>-86.774032</lng></startPoint><maneuverNotes/><distance>1.584</distance><time>134</time><formattedTime>00:02:14</formattedTime><attributes>128</attributes><turnType>10</turnType><direction>8</direction><narrative>Merge onto I-24 E.</narrative><directionName>East</directionName><index>4</index><streets><street>INTERSTATE 24 E</street></streets><signs><sign><type>1</type><direction>8</direction><text>24</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00001CO_SM&n=24&d=EAST]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-6,36.176799,-86.774032,0,0|purple-7,36.157688,-86.760406,0,0|&center=36.1672435,-86.76721900000001&zoom=9&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.157688</lat><lng>-86.760406</lng></startPoint><maneuverNotes/><distance>1.047</distance><time>92</time><formattedTime>00:01:32</formattedTime><attributes>128</attributes><turnType>10</turnType><direction>7</direction><narrative>Merge onto I-40 W via EXIT 50B toward I-65 S/MEMPHIS/HUNTSVILLE.</narrative><directionName>West</directionName><index>5</index><streets><street>INTERSTATE 40 W</street></streets><signs><sign><type>1</type><direction>7</direction><text>40</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00001CO_SM&n=40&d=WEST]]></url></sign><sign><type>1001</type><direction>0</direction><text>50B</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RSEXITRIGHTNUM_SM&n=50B&d=]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-7,36.157688,-86.760406,0,0|purple-8,36.149211,-86.774963,0,0|&center=36.1534495,-86.7676845&zoom=10&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>36.149211</lat><lng>-86.774963</lng></startPoint><maneuverNotes/><distance>188.83301</distance><time>10207</time><formattedTime>02:50:07</formattedTime><attributes>128</attributes><turnType>11</turnType><direction>4</direction><narrative>Merge onto I-65 S via EXIT 210B on the LEFT toward HUNTSVILLE (Crossing into ALABAMA).</narrative><directionName>South</directionName><index>6</index><streets><street>INTERSTATE 65 S</street></streets><signs><sign><type>1</type><direction>4</direction><text>65</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00001CO_SM&n=65&d=SOUTH]]></url></sign><sign><type>1001</type><direction>0</direction><text>210B</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RSEXITLEFTNUM_SM&n=210B&d=]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-8,36.149211,-86.774963,0,0|purple-9,33.523189,-86.826721,0,0|&center=34.836200000000005,-86.852096&zoom=2&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>33.523189</lat><lng>-86.826721</lng></startPoint><maneuverNotes/><distance>1.234</distance><time>94</time><formattedTime>00:01:34</formattedTime><attributes>128</attributes><turnType>11</turnType><direction>8</direction><narrative>Merge onto I-20 E/I-59 N via EXIT 261A on the LEFT toward ATLANTA/GADSDEN.</narrative><directionName>East</directionName><index>7</index><streets><street>INTERSTATE 20 E</street><street>INTERSTATE 59 N</street></streets><signs><sign><type>1</type><direction>8</direction><text>20</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00001CO_SM&n=20&d=EAST]]></url></sign><sign><type>1</type><direction>1</direction><text>59</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00001CO_SM&n=59&d=NORTH]]></url></sign><sign><type>1001</type><direction>0</direction><text>261A</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RSEXITLEFTNUM_SM&n=261A&d=]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-9,33.523189,-86.826721,0,0|purple-10,33.52423,-86.807746,0,0|&center=33.522014,-86.8172335&zoom=10&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1965438145&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>33.52423</lat><lng>-86.807746</lng></startPoint><maneuverNotes/><distance>3.204</distance><time>247</time><formattedTime>00:04:07</formattedTime><attributes>128</attributes><turnType>10</turnType><direction>8</direction><narrative>Merge onto US-280 E/US-31 S/ELTON B STEPHENS EXPY/AL-3 S via EXIT 126A.</narrative><directionName>East</directionName><index>8</index><streets><street>US HIGHWAY 280 E</street><street>US HIGHWAY 31 S</street><street>ELTON B STEPHENS EXPY</street><street>STATE ROUTE 3 S</street></streets><signs><sign><type>2</type><direction>8</direction><text>280</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00002BW_SM&n=280&d=EAST]]></url></sign><sign><type>2</type><direction>4</direction><text>31</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00002BW_SM&n=31&d=SOUTH]]></url></sign><sign><type>3</type><direction>4</direction><text>3</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00003BW_SM&n=3&d=SOUTH]]></url></sign><sign><type>1001</type><direction>0</direction><text>126A</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RSEXITRIGHTNUM_SM&n=126A&d=]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-10,33.52423,-86.807746,0,0|purple-11,33.48822,-86.786872,0,0|&center=33.506994,-86.797309&zoom=8&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>33.48822</lat><lng>-86.786872</lng></startPoint><maneuverNotes/><distance>101.94401</distance><time>6238</time><formattedTime>01:43:58</formattedTime><attributes>0</attributes><turnType>10</turnType><direction>8</direction><narrative>Merge onto US-280 E/AL-38 E toward SYLACAUGA/ZOO-GARDENS.</narrative><directionName>East</directionName><index>9</index><streets><street>US HIGHWAY 280 E</street><street>STATE ROUTE 38 E</street></streets><signs><sign><type>2</type><direction>8</direction><text>280</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00002BW_SM&n=280&d=EAST]]></url></sign><sign><type>3</type><direction>8</direction><text>38</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00003BW_SM&n=38&d=EAST]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_merge_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-11,33.48822,-86.786872,0,0|purple-12,32.6763,-85.486328,0,0|&center=33.08226,-86.1366&zoom=4&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.6763</lat><lng>-85.486328</lng></startPoint><maneuverNotes/><distance>2.857</distance><time>214</time><formattedTime>00:03:34</formattedTime><attributes>0</attributes><turnType>2</turnType><direction>4</direction><narrative>Turn RIGHT onto AL-147.</narrative><directionName>South</directionName><index>10</index><streets><street>STATE ROUTE 147</street></streets><signs><sign><type>3</type><direction>0</direction><text>147</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00003BW_SM&n=147]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-12,32.6763,-85.486328,0,0|purple-13,32.637149,-85.481666,0,0|&center=32.656724499999996,-85.48603750000001&zoom=8&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.637149</lat><lng>-85.481666</lng></startPoint><maneuverNotes/><distance>5.052</distance><time>386</time><formattedTime>00:06:26</formattedTime><attributes>0</attributes><turnType>1</turnType><direction>6</direction><narrative>Turn SLIGHT RIGHT onto AL-267/SHUG JORDAN PKWY.</narrative><directionName>Southwest</directionName><index>11</index><streets><street>STATE ROUTE 267</street><street>SHUG JORDAN PKWY</street></streets><signs><sign><type>3</type><direction>0</direction><text>267</text><extraText></extraText><url><![CDATA[http://api-signs.mqcdn.com/?s=rs&t=RS00003BW_SM&n=267]]></url></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_slight_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-13,32.637149,-85.481666,0,0|purple-14,32.57796,-85.498443,0,0|&center=32.6075545,-85.49468949999999&zoom=7&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.57796</lat><lng>-85.498443</lng></startPoint><maneuverNotes/><distance>1.706</distance><time>155</time><formattedTime>00:02:35</formattedTime><attributes>0</attributes><turnType>1</turnType><direction>6</direction><narrative>Turn SLIGHT RIGHT onto S COLLEGE ST/AL-147. Continue to follow S COLLEGE ST.</narrative><directionName>Southwest</directionName><index>12</index><streets><street>S COLLEGE ST</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_slight_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-14,32.57796,-85.498443,0,0|purple-15,32.55513,-85.508186,0,0|&center=32.566545,-85.503116&zoom=8&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.55513</lat><lng>-85.508186</lng></startPoint><maneuverNotes/><distance>1.021</distance><time>129</time><formattedTime>00:02:09</formattedTime><attributes>0</attributes><turnType>6</turnType><direction>8</direction><narrative>Turn LEFT onto CR-863/SHELL TOOMER PKWY.</narrative><directionName>East</directionName><index>13</index><streets><street>COUNTY ROUTE 863</street><street>SHELL TOOMER PKWY</street></streets><signs><sign><type>4</type><direction>0</direction><text>863</text><extraText></extraText></sign></signs><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-15,32.55513,-85.508186,0,0|purple-16,32.55466,-85.490821,0,0|&center=32.554824499999995,-85.4995035&zoom=10&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.55466</lat><lng>-85.490821</lng></startPoint><maneuverNotes/><distance>0.818</distance><time>130</time><formattedTime>00:02:10</formattedTime><attributes>0</attributes><turnType>6</turnType><direction>1</direction><narrative>Turn LEFT onto CANARY DR.</narrative><directionName>North</directionName><index>14</index><streets><street>CANARY DR</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_left_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-16,32.55466,-85.490821,0,0|purple-17,32.566139,-85.489463,0,0|&center=32.5603995,-85.49039400000001&zoom=9&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint><lat>32.566139</lat><lng>-85.489463</lng></startPoint><maneuverNotes/><distance>0.049</distance><time>7</time><formattedTime>00:00:07</formattedTime><attributes>0</attributes><turnType>2</turnType><direction>3</direction><narrative>Turn RIGHT to stay on CANARY DR.</narrative><directionName>Northeast</directionName><index>15</index><streets><street>CANARY DR</street></streets><signs/><iconUrl><![CDATA[http://content.mapquest.com/mqsite/turnsigns/rs_right_sm.gif]]></iconUrl><linkIds/><mapUrl><![CDATA[http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-17,32.566139,-85.489463,0,0|purple-18,32.566478,-85.488723,0,0|&center=32.5663085,-85.489093&zoom=15&key=Dmjtd|luu725uyn5,2x=o5-5zb0d&rand=1975826365&session=4c6c8e89-019b-0001-02b7-4979-0024e83e3993]]></mapUrl></maneuver><maneuver><startPoint/><maneuverNotes/><distance>0.0</distance><time>0</time><formattedTime>00:00:00</formattedTime><attributes>0</attributes><turnType>-1</turnType><direction>0</direction><narrative>1963 CANARY DR is on the RIGHT.</narrative><directionName></directionName><index>16</index><streets/><signs/><linkIds/><mapUrl><![CDATA[]]></mapUrl></maneuver></maneuvers><hasTollRoad>false</hasTollRoad><hasFerry>false</hasFerry><hasHighway>true</hasHighway><hasSeasonalClosure>false</hasSeasonalClosure><hasUnpaved>false</hasUnpaved><hasCountryCross>false</hasCountryCross></leg></legs><hasTollRoad>false</hasTollRoad><hasFerry>false</hasFerry><hasHighway>true</hasHighway><hasSeasonalClosure>false</hasSeasonalClosure><hasUnpaved>false</hasUnpaved><hasCountryCross>false</hasCountryCross><locations><location><street>816 Meridian St</street><adminArea5 type="City">Nashville</adminArea5><adminArea3 type="State">TN</adminArea3><adminArea4 type="County">Davidson County</adminArea4><postalCode>37207-5850</postalCode><adminArea1 type="Country">US</adminArea1><geocodeQuality>POINT</geocodeQuality><geocodeQualityCode>P1AAA</geocodeQualityCode><dragPoint>false</dragPoint><sideOfStreet>L</sideOfStreet><displayLatLng><latLng><lat>36.185138</lat><lng>-86.76828</lng></latLng></displayLatLng><linkId>31393483</linkId><type>s</type><latLng><lat>36.18514</lat><lng>-86.76828</lng></latLng></location><location><street>1963 Canary Dr</street><adminArea5 type="City">Auburn</adminArea5><adminArea3 type="State">AL</adminArea3><adminArea4 type="County">Lee County</adminArea4><postalCode>36830-6901</postalCode><adminArea1 type="Country">US</adminArea1><geocodeQuality>POINT</geocodeQuality><geocodeQualityCode>P1AAA</geocodeQualityCode><dragPoint>false</dragPoint><sideOfStreet>R</sideOfStreet><displayLatLng><latLng><lat>32.566478</lat><lng>-85.488723</lng></latLng></displayLatLng><linkId>105113616</linkId><type>s</type><latLng><lat>32.56648</lat><lng>-85.48872</lng></latLng></location></locations><locationSequence>0,1</locationSequence></route></response>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <response><info><statusCode>500</statusCode><messages><message>Server is not configured to authorize geocode requests from this client</message></messages><copyright><imageUrl>http://tile21.mqcdn.com/res/mqlogo.gif</imageUrl><imageAltText>© 2010 MapQuest, Inc.</imageAltText><text>© 2010 MapQuest, Inc.</text></copyright></info><collections/></response>
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+
3
+ context "Mapquest API" do
4
+ before(:all) do
5
+ @origin = "816 Meridian St., 37207"
6
+ @destination = "1963 Canary Dr., 36830"
7
+ end
8
+
9
+ context "API working" do
10
+
11
+ describe "directions work" do
12
+
13
+ before(:each) do
14
+ MapQuestDirections.any_instance.stubs(:xml).returns(File.read("spec/lib/mapquest_directions.xml"))
15
+ @directions = MapQuestDirections.new(@origin, @destination)
16
+ end
17
+
18
+ it "should return distance in miles" do
19
+ @directions.distance_in_miles.should == 310
20
+ end
21
+
22
+ it "should return drive time in minutes" do
23
+ @directions.drive_time_in_minutes.should == 303
24
+ end
25
+
26
+ it "should have a status code of 0" do
27
+ @directions.status.should == "0"
28
+ end
29
+
30
+ end #describe
31
+ end # API working
32
+
33
+ context "API not working" do
34
+
35
+ describe "Geocode distance estimation work" do
36
+
37
+ before(:each) do
38
+ MapQuestDirections.any_instance.stubs(:xml).returns(File.read("spec/lib/mapquest_directions_fail.xml"))
39
+ @directions = MapQuestDirections.new(@origin, @destination)
40
+ end
41
+
42
+ it "should return distance in miles" do
43
+ @directions.distance_in_miles.should == 0
44
+ end
45
+
46
+ it "should return drive time in minutes" do
47
+ @directions.drive_time_in_minutes.should == 0
48
+ end
49
+
50
+ it "should have a status code other than 0" do
51
+ @directions.status.should_not == "0"
52
+ end
53
+
54
+ end #describe
55
+ end # API not working
56
+
57
+
58
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+ require 'mocha'
3
+ require 'ruby-debug'
4
+
5
+ $:.unshift File.expand_path('../lib', __FILE__)
6
+ require 'mapquest_directions'
7
+
8
+ MAPQUEST_KEY = "replace_me"
9
+ # http://developer.mapquest.com/
10
+
11
+ Spec::Runner.configure do |config|
12
+ config.mock_with :mocha
13
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automobile_trip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
7
+ - 1
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ version: 0.1.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Andy Rossmeissl
@@ -19,170 +18,106 @@ autorequire:
19
18
  bindir: bin
20
19
  cert_chain: []
21
20
 
22
- date: 2010-12-07 00:00:00 -06:00
21
+ date: 2011-02-14 00:00:00 -05:00
23
22
  default_executable:
24
23
  dependencies:
25
24
  - !ruby/object:Gem::Dependency
26
- name: activerecord
25
+ name: sniff
27
26
  prerelease: false
28
27
  requirement: &id001 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ~>
32
31
  - !ruby/object:Gem::Version
33
- hash: 5
34
32
  segments:
35
- - 3
36
- version: "3"
33
+ - 0
34
+ - 6
35
+ - 0
36
+ version: 0.6.0
37
37
  type: :development
38
38
  version_requirements: *id001
39
39
  - !ruby/object:Gem::Dependency
40
- name: bundler
40
+ name: emitter
41
41
  prerelease: false
42
42
  requirement: &id002 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- hash: 23
48
47
  segments:
49
- - 1
50
- - 0
51
48
  - 0
52
- version: 1.0.0
53
- type: :development
49
+ - 4
50
+ - 1
51
+ version: 0.4.1
52
+ type: :runtime
54
53
  version_requirements: *id002
55
54
  - !ruby/object:Gem::Dependency
56
- name: cucumber
55
+ name: geokit
57
56
  prerelease: false
58
57
  requirement: &id003 !ruby/object:Gem::Requirement
59
- none: false
60
- requirements:
61
- - - ~>
62
- - !ruby/object:Gem::Version
63
- hash: 57
64
- segments:
65
- - 0
66
- - 8
67
- - 3
68
- version: 0.8.3
69
- type: :development
70
- version_requirements: *id003
71
- - !ruby/object:Gem::Dependency
72
- name: jeweler
73
- prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
77
- - - ~>
78
- - !ruby/object:Gem::Version
79
- hash: 7
80
- segments:
81
- - 1
82
- - 4
83
- - 0
84
- version: 1.4.0
85
- type: :development
86
- version_requirements: *id004
87
- - !ruby/object:Gem::Dependency
88
- name: rake
89
- prerelease: false
90
- requirement: &id005 !ruby/object:Gem::Requirement
91
58
  none: false
92
59
  requirements:
93
60
  - - ">="
94
61
  - !ruby/object:Gem::Version
95
- hash: 3
96
62
  segments:
97
63
  - 0
98
64
  version: "0"
99
- type: :development
100
- version_requirements: *id005
101
- - !ruby/object:Gem::Dependency
102
- name: rdoc
103
- prerelease: false
104
- requirement: &id006 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 0
112
- version: "0"
113
- type: :development
114
- version_requirements: *id006
115
- - !ruby/object:Gem::Dependency
116
- name: rspec
117
- prerelease: false
118
- requirement: &id007 !ruby/object:Gem::Requirement
119
- none: false
120
- requirements:
121
- - - ~>
122
- - !ruby/object:Gem::Version
123
- hash: 62196417
124
- segments:
125
- - 2
126
- - 0
127
- - 0
128
- - beta
129
- - 17
130
- version: 2.0.0.beta.17
131
- type: :development
132
- version_requirements: *id007
133
- - !ruby/object:Gem::Dependency
134
- name: sniff
135
- prerelease: false
136
- requirement: &id008 !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- hash: 3
142
- segments:
143
- - 0
144
- version: "0"
145
- type: :development
146
- version_requirements: *id008
147
- - !ruby/object:Gem::Dependency
148
- name: emitter
149
- prerelease: false
150
- requirement: &id009 !ruby/object:Gem::Requirement
151
- none: false
152
- requirements:
153
- - - ~>
154
- - !ruby/object:Gem::Version
155
- hash: 13
156
- segments:
157
- - 0
158
- - 3
159
- version: "0.3"
160
65
  type: :runtime
161
- version_requirements: *id009
66
+ version_requirements: *id003
162
67
  description: A software model in Ruby for the greenhouse gas emissions of an automobile trip
163
68
  email: andy@rossmeissl.net
164
69
  executables: []
165
70
 
166
71
  extensions: []
167
72
 
168
- extra_rdoc_files:
169
- - LICENSE
170
- - README.rdoc
73
+ extra_rdoc_files: []
74
+
171
75
  files:
76
+ - .document
77
+ - .gitignore
78
+ - Gemfile
79
+ - Gemfile.lock
172
80
  - LICENSE
81
+ - LICENSE-PREAMBLE
173
82
  - README.rdoc
83
+ - Rakefile
84
+ - VERSION
85
+ - automobile_trip.gemspec
86
+ - dot.rvmrc
87
+ - features/automobile_trip_committees.feature
88
+ - features/automobile_trip_emissions.feature
89
+ - features/step_definitions/automobile_trip_steps.rb
90
+ - features/step_definitions/mapquest_steps.rb
91
+ - features/support/env.rb
174
92
  - lib/automobile_trip.rb
175
93
  - lib/automobile_trip/carbon_model.rb
176
94
  - lib/automobile_trip/characterization.rb
177
- - lib/automobile_trip/committee_structure.rb
178
95
  - lib/automobile_trip/data.rb
179
96
  - lib/automobile_trip/fallback.rb
180
97
  - lib/automobile_trip/relationships.rb
181
98
  - lib/automobile_trip/summarization.rb
99
+ - lib/automobile_trip/version.rb
182
100
  - lib/test_support/automobile_trip_record.rb
183
- - features/support/env.rb
184
- - features/automobile_trip_committees.feature
185
- - features/automobile_trip_emissions.feature
101
+ - lib/test_support/db/fixtures/automobile_fuels.csv
102
+ - lib/test_support/db/fixtures/automobile_make_model_year_variants.csv
103
+ - lib/test_support/db/fixtures/automobile_make_model_years.csv
104
+ - lib/test_support/db/fixtures/automobile_make_models.csv
105
+ - lib/test_support/db/fixtures/automobile_make_years.csv
106
+ - lib/test_support/db/fixtures/automobile_makes.csv
107
+ - lib/test_support/db/fixtures/automobile_size_classes.csv
108
+ - lib/test_support/db/fixtures/automobile_type_fuel_years.csv
109
+ - lib/test_support/db/fixtures/automobile_type_years.csv
110
+ - lib/test_support/db/fixtures/fuel_years.csv
111
+ - lib/test_support/db/fixtures/fuels.csv
112
+ - lib/test_support/db/fixtures/greenhouse_gases.csv
113
+ - vendor/plugin/mapquest/README.textile
114
+ - vendor/plugin/mapquest/Rakefile
115
+ - vendor/plugin/mapquest/init.rb
116
+ - vendor/plugin/mapquest/lib/mapquest_directions.rb
117
+ - vendor/plugin/mapquest/spec/lib/mapquest_directions.xml
118
+ - vendor/plugin/mapquest/spec/lib/mapquest_directions_fail.xml
119
+ - vendor/plugin/mapquest/spec/lib/mapquest_directions_spec.rb
120
+ - vendor/plugin/mapquest/spec/spec_helper.rb
186
121
  has_rdoc: true
187
122
  homepage: http://github.com/brighterplanet/automobile_trip
188
123
  licenses: []
@@ -197,7 +132,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
197
132
  requirements:
198
133
  - - ">="
199
134
  - !ruby/object:Gem::Version
200
- hash: 3
201
135
  segments:
202
136
  - 0
203
137
  version: "0"
@@ -206,7 +140,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
140
  requirements:
207
141
  - - ">="
208
142
  - !ruby/object:Gem::Version
209
- hash: 3
210
143
  segments:
211
144
  - 0
212
145
  version: "0"
@@ -218,7 +151,8 @@ signing_key:
218
151
  specification_version: 3
219
152
  summary: A carbon model
220
153
  test_files:
221
- - features/support/env.rb
222
154
  - features/automobile_trip_committees.feature
223
155
  - features/automobile_trip_emissions.feature
224
- - lib/test_support/automobile_trip_record.rb
156
+ - features/step_definitions/automobile_trip_steps.rb
157
+ - features/step_definitions/mapquest_steps.rb
158
+ - features/support/env.rb