shipment 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +24 -0
- data/Gemfile +7 -0
- data/Rakefile +6 -0
- data/VERSION +1 -0
- data/features/support/env.rb +3 -0
- data/lib/shipment/carbon_model.rb +4 -4
- data/lib/shipment/characterization.rb +1 -1
- data/lib/shipment/version.rb +5 -0
- data/lib/test_support/db/fixtures/carrier_modes.csv +4 -0
- data/lib/test_support/db/fixtures/carriers.csv +2 -0
- data/lib/test_support/db/fixtures/shipment_modes.csv +4 -0
- data/shipment.gemspec +29 -0
- data/vendor/plugin/mapquest/README.textile +70 -0
- data/vendor/plugin/mapquest/Rakefile +15 -0
- data/vendor/plugin/mapquest/spec/lib/mapquest_directions.xml +2 -0
- data/vendor/plugin/mapquest/spec/lib/mapquest_directions_fail.xml +2 -0
- metadata +37 -119
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## PROJECT::GENERAL
|
17
|
+
coverage
|
18
|
+
rdoc
|
19
|
+
pkg
|
20
|
+
data_miner.log
|
21
|
+
|
22
|
+
## PROJECT::SPECIFIC
|
23
|
+
data_miner.log
|
24
|
+
Gemfile.lock
|
data/Gemfile
ADDED
data/Rakefile
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.8
|
data/features/support/env.rb
CHANGED
@@ -7,5 +7,8 @@ require 'rspec'
|
|
7
7
|
require 'rspec/expectations'
|
8
8
|
require 'cucumber/rspec/doubles'
|
9
9
|
|
10
|
+
require 'data_miner'
|
11
|
+
DataMiner.logger = Logger.new nil
|
12
|
+
|
10
13
|
require 'sniff'
|
11
14
|
Sniff.init File.join(File.dirname(__FILE__), '..', '..'), :cucumber => true, :earth => [:shipping]
|
@@ -116,8 +116,8 @@ module BrighterPlanet
|
|
116
116
|
committee :distance do
|
117
117
|
quorum 'by road', :needs => [:origin_location, :destination_location, :mode, :mapquest_api_key] do |characteristics|
|
118
118
|
unless characteristics[:mode].name == 'air'
|
119
|
-
mapquest = MapQuestDirections.new characteristics[:origin_location],
|
120
|
-
characteristics[:destination_location],
|
119
|
+
mapquest = MapQuestDirections.new characteristics[:origin_location].to_s,
|
120
|
+
characteristics[:destination_location].to_s,
|
121
121
|
characteristics[:mapquest_api_key]
|
122
122
|
begin
|
123
123
|
mapquest.distance_in_kilometres
|
@@ -129,8 +129,8 @@ module BrighterPlanet
|
|
129
129
|
|
130
130
|
quorum 'as the crow flies', :needs => [:origin_location, :destination_location] do |characteristics|
|
131
131
|
Mapper.distance_between(
|
132
|
-
characteristics[:origin_location],
|
133
|
-
characteristics[:destination_location],
|
132
|
+
characteristics[:origin_location].to_s,
|
133
|
+
characteristics[:destination_location].to_s,
|
134
134
|
:units => :kms)
|
135
135
|
end
|
136
136
|
end
|
@@ -13,7 +13,7 @@ module BrighterPlanet
|
|
13
13
|
has :origin_zip_code # for backwards compatability - note that this is a string, not a ZipCode
|
14
14
|
has :destination_zip_code # for backwards compatability - note that this is a string, not a ZipCode
|
15
15
|
has :distance
|
16
|
-
has
|
16
|
+
has(:mapquest_api_key) { 'secret key' }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
name,carrier_name,mode_name,route_inefficiency_factor,transport_emission_factor,transport_emission_factor_units
|
2
|
+
FedEx courier,FedEx,courier,1.0,2.0,kilograms_per_stop
|
3
|
+
FedEx ground,FedEx,ground,1.0,0.0001,kilograms_per_kilogram_kilometre
|
4
|
+
FedEx air,FedEx,air,1.1,0.001,kilograms_per_kilogram_kilometre
|
data/shipment.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "shipment/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = %q{shipment}
|
7
|
+
s.version = BrighterPlanet::Shipment::VERSION
|
8
|
+
|
9
|
+
s.authors = ["Andy Rossmeissl", "Seamus Abshere", "Ian Hough", "Matt Kling", "Derek Kastner"]
|
10
|
+
s.date = "2011-06-02"
|
11
|
+
s.summary = %q{A carbon model for a shipment}
|
12
|
+
s.description = %q{A software model in Ruby for the greenhouse gas emissions of a shipment}
|
13
|
+
s.email = %q{andy@rossmeissl.net}
|
14
|
+
s.homepage = %q{http://brighterplanet.github.com/shipment}
|
15
|
+
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE",
|
18
|
+
"LICENSE-PREAMBLE",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
|
26
|
+
s.add_runtime_dependency 'emitter', '>=0.5.0'
|
27
|
+
s.add_development_dependency 'sniff', '>=0.8.0'
|
28
|
+
end
|
29
|
+
|
@@ -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,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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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|¢er=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>
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 8
|
10
|
-
version: 0.0.8
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Andy Rossmeissl
|
@@ -19,117 +14,31 @@ autorequire:
|
|
19
14
|
bindir: bin
|
20
15
|
cert_chain: []
|
21
16
|
|
22
|
-
date: 2011-
|
17
|
+
date: 2011-06-02 00:00:00 -05:00
|
23
18
|
default_executable:
|
24
19
|
dependencies:
|
25
20
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
prerelease: false
|
21
|
+
name: emitter
|
28
22
|
requirement: &id001 !ruby/object:Gem::Requirement
|
29
23
|
none: false
|
30
24
|
requirements:
|
31
|
-
- -
|
25
|
+
- - ">="
|
32
26
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
- 0
|
37
|
-
- 1
|
38
|
-
version: 3.0.1
|
39
|
-
type: :development
|
27
|
+
version: 0.5.0
|
28
|
+
type: :runtime
|
29
|
+
prerelease: false
|
40
30
|
version_requirements: *id001
|
41
31
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
43
|
-
prerelease: false
|
32
|
+
name: sniff
|
44
33
|
requirement: &id002 !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
|
-
requirements:
|
47
|
-
- - ~>
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
hash: 23
|
50
|
-
segments:
|
51
|
-
- 1
|
52
|
-
- 0
|
53
|
-
- 0
|
54
|
-
version: 1.0.0
|
55
|
-
type: :development
|
56
|
-
version_requirements: *id002
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: rake
|
59
|
-
prerelease: false
|
60
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
61
34
|
none: false
|
62
35
|
requirements:
|
63
36
|
- - ">="
|
64
37
|
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
segments:
|
67
|
-
- 0
|
68
|
-
version: "0"
|
38
|
+
version: 0.8.0
|
69
39
|
type: :development
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: sniff
|
73
|
-
prerelease: false
|
74
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
|
-
requirements:
|
77
|
-
- - ~>
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
hash: 1
|
80
|
-
segments:
|
81
|
-
- 0
|
82
|
-
- 4
|
83
|
-
- 7
|
84
|
-
version: 0.4.7
|
85
|
-
type: :development
|
86
|
-
version_requirements: *id004
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: emitter
|
89
|
-
prerelease: false
|
90
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
|
-
requirements:
|
93
|
-
- - ~>
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
hash: 19
|
96
|
-
segments:
|
97
|
-
- 0
|
98
|
-
- 3
|
99
|
-
- 0
|
100
|
-
version: 0.3.0
|
101
|
-
type: :runtime
|
102
|
-
version_requirements: *id005
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: earth
|
105
40
|
prerelease: false
|
106
|
-
|
107
|
-
none: false
|
108
|
-
requirements:
|
109
|
-
- - ~>
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
hash: 1
|
112
|
-
segments:
|
113
|
-
- 0
|
114
|
-
- 3
|
115
|
-
- 9
|
116
|
-
version: 0.3.9
|
117
|
-
type: :runtime
|
118
|
-
version_requirements: *id006
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
name: geokit
|
121
|
-
prerelease: false
|
122
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
|
-
requirements:
|
125
|
-
- - ">="
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
hash: 3
|
128
|
-
segments:
|
129
|
-
- 0
|
130
|
-
version: "0"
|
131
|
-
type: :runtime
|
132
|
-
version_requirements: *id007
|
41
|
+
version_requirements: *id002
|
133
42
|
description: A software model in Ruby for the greenhouse gas emissions of a shipment
|
134
43
|
email: andy@rossmeissl.net
|
135
44
|
executables: []
|
@@ -141,8 +50,18 @@ extra_rdoc_files:
|
|
141
50
|
- LICENSE-PREAMBLE
|
142
51
|
- README.rdoc
|
143
52
|
files:
|
53
|
+
- .document
|
54
|
+
- .gitignore
|
55
|
+
- Gemfile
|
144
56
|
- LICENSE
|
57
|
+
- LICENSE-PREAMBLE
|
145
58
|
- README.rdoc
|
59
|
+
- Rakefile
|
60
|
+
- VERSION
|
61
|
+
- features/shipment_committees.feature
|
62
|
+
- features/shipment_emissions.feature
|
63
|
+
- features/step_definitions/shipment_steps.rb
|
64
|
+
- features/support/env.rb
|
146
65
|
- lib/shipment.rb
|
147
66
|
- lib/shipment/carbon_model.rb
|
148
67
|
- lib/shipment/characterization.rb
|
@@ -150,14 +69,18 @@ files:
|
|
150
69
|
- lib/shipment/fallback.rb
|
151
70
|
- lib/shipment/relationships.rb
|
152
71
|
- lib/shipment/summarization.rb
|
72
|
+
- lib/shipment/version.rb
|
73
|
+
- lib/test_support/db/fixtures/carrier_modes.csv
|
74
|
+
- lib/test_support/db/fixtures/carriers.csv
|
75
|
+
- lib/test_support/db/fixtures/shipment_modes.csv
|
153
76
|
- lib/test_support/shipment_record.rb
|
154
|
-
-
|
155
|
-
-
|
156
|
-
-
|
157
|
-
- features/shipment_committees.feature
|
158
|
-
- features/shipment_emissions.feature
|
77
|
+
- shipment.gemspec
|
78
|
+
- vendor/plugin/mapquest/README.textile
|
79
|
+
- vendor/plugin/mapquest/Rakefile
|
159
80
|
- vendor/plugin/mapquest/init.rb
|
160
81
|
- vendor/plugin/mapquest/lib/mapquest_directions.rb
|
82
|
+
- vendor/plugin/mapquest/spec/lib/mapquest_directions.xml
|
83
|
+
- vendor/plugin/mapquest/spec/lib/mapquest_directions_fail.xml
|
161
84
|
- vendor/plugin/mapquest/spec/lib/mapquest_directions_spec.rb
|
162
85
|
- vendor/plugin/mapquest/spec/spec_helper.rb
|
163
86
|
has_rdoc: true
|
@@ -165,8 +88,8 @@ homepage: http://brighterplanet.github.com/shipment
|
|
165
88
|
licenses: []
|
166
89
|
|
167
90
|
post_install_message:
|
168
|
-
rdoc_options:
|
169
|
-
|
91
|
+
rdoc_options: []
|
92
|
+
|
170
93
|
require_paths:
|
171
94
|
- lib
|
172
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -174,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
97
|
requirements:
|
175
98
|
- - ">="
|
176
99
|
- !ruby/object:Gem::Version
|
177
|
-
hash:
|
100
|
+
hash: -902257843682887731
|
178
101
|
segments:
|
179
102
|
- 0
|
180
103
|
version: "0"
|
@@ -183,24 +106,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
106
|
requirements:
|
184
107
|
- - ">="
|
185
108
|
- !ruby/object:Gem::Version
|
186
|
-
hash:
|
109
|
+
hash: -902257843682887731
|
187
110
|
segments:
|
188
111
|
- 0
|
189
112
|
version: "0"
|
190
113
|
requirements: []
|
191
114
|
|
192
115
|
rubyforge_project:
|
193
|
-
rubygems_version: 1.
|
116
|
+
rubygems_version: 1.6.2
|
194
117
|
signing_key:
|
195
118
|
specification_version: 3
|
196
119
|
summary: A carbon model for a shipment
|
197
120
|
test_files:
|
198
|
-
- features/step_definitions/shipment_steps.rb
|
199
|
-
- features/support/env.rb
|
200
121
|
- features/shipment_committees.feature
|
201
122
|
- features/shipment_emissions.feature
|
202
|
-
-
|
203
|
-
-
|
204
|
-
- vendor/plugin/mapquest/lib/mapquest_directions.rb
|
205
|
-
- vendor/plugin/mapquest/spec/lib/mapquest_directions_spec.rb
|
206
|
-
- vendor/plugin/mapquest/spec/spec_helper.rb
|
123
|
+
- features/step_definitions/shipment_steps.rb
|
124
|
+
- features/support/env.rb
|