orochi 0.0.4 → 0.0.5

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.
@@ -40,6 +40,10 @@ p. Now you're set up and ready to go!
40
40
 
41
41
  h2. ghetto usage
42
42
 
43
- pre. your_model_instance.router.start = "a_start_address"
44
- your_model_instance.router.stop = "a_stop_address"
45
- your_model_instance.route!
43
+ pre. your_model_instance.set_endpoints!("start_address", "stop_address")
44
+ your_model_instance.route!
45
+
46
+ p. Now you can do some of the following:
47
+
48
+ pre.# Get the polyline of your route
49
+ your_model_instance.polyline
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -57,7 +57,7 @@ module Orochi
57
57
  polyline.push([point[0], point[1]])
58
58
  end
59
59
 
60
- s.polyline_json = polyline
60
+ s.polyline_json = polyline.inspect
61
61
  s.directions_json = leg_step["html_instructions"]
62
62
  s.save!
63
63
  end
@@ -76,10 +76,11 @@ module Orochi
76
76
  end
77
77
 
78
78
  def polyline
79
+ polyline = []
79
80
  routes.first.each_step do |step|
80
- puts step.polyline_json
81
- puts
81
+ polyline.push(step.polyline_json.to_a)
82
82
  end
83
+ polyline.flatten
83
84
  end
84
85
 
85
86
  def directions_to
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{orochi}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["kellydunn"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orochi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - kellydunn