shipment 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/shipment/data.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'nokogiri'
|
3
|
+
require 'uri'
|
3
4
|
|
4
5
|
class MapQuestDirections
|
5
6
|
class Failure < StandardError; end
|
@@ -7,7 +8,7 @@ class MapQuestDirections
|
|
7
8
|
attr_accessor :location_1, :location_2, :xml_call, :doc
|
8
9
|
|
9
10
|
def initialize(location_1, location_2, api_key)
|
10
|
-
@base_url = "http://www.mapquestapi.com/directions/v1/route?key=#{api_key}&outFormat=xml&"
|
11
|
+
@base_url = "http://www.mapquestapi.com/directions/v1/route?key=#{URI.escape(api_key)}&outFormat=xml&"
|
11
12
|
@location_1 = location_1
|
12
13
|
@location_2 = location_2
|
13
14
|
options = "from=#{transcribe(@location_1)}&to=#{transcribe(@location_2)}"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andy Rossmeissl
|
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
requirements:
|
152
152
|
- - ">="
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
hash:
|
154
|
+
hash: 682105265
|
155
155
|
segments:
|
156
156
|
- 0
|
157
157
|
version: "0"
|