gmaps_directions 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -12
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/gmaps_directions.gemspec +14 -14
- data/spec/gmaps_directions_spec.rb +9 -9
- metadata +88 -57
data/Gemfile
CHANGED
@@ -1,14 +1,3 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
gem "activesupport", "~> 3.0.4"
|
5
|
-
gem "yajl-ruby", "~> 0.8.1", :require => "yajl"
|
6
2
|
|
7
|
-
|
8
|
-
# Include everything needed to run rake, tests, features, etc.
|
9
|
-
group :development do
|
10
|
-
gem "rspec", "~> 2.5.0"
|
11
|
-
gem "bundler", "~> 1.0.0"
|
12
|
-
gem "jeweler", "~> 1.5.2"
|
13
|
-
gem "rcov", ">= 0"
|
14
|
-
end
|
3
|
+
gemspec
|
data/Rakefile
CHANGED
@@ -27,8 +27,9 @@ Jeweler::Tasks.new do |gem|
|
|
27
27
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
28
28
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
29
29
|
gem.add_runtime_dependency 'yajl-ruby', '~> 0.8.1'
|
30
|
-
gem.add_runtime_dependency 'activesupport', '
|
31
|
-
gem.add_development_dependency 'rspec', '~> 2.5'
|
30
|
+
gem.add_runtime_dependency 'activesupport', '>= 3.0.4'
|
31
|
+
gem.add_development_dependency 'rspec', '~> 2.5.0'
|
32
|
+
gem.add_development_dependency 'jeweler', '~> 1.5.2'
|
32
33
|
end
|
33
34
|
Jeweler::RubygemsDotOrgTasks.new
|
34
35
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/gmaps_directions.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gmaps_directions}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dirk Breuer"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-09-11}
|
13
13
|
s.description = %q{
|
14
14
|
Sometimes you need to calculate the directions between two different points
|
15
15
|
via Google Maps on your server-side and not on the client. The Google Maps
|
@@ -48,36 +48,36 @@ Gem::Specification.new do |s|
|
|
48
48
|
s.specification_version = 3
|
49
49
|
|
50
50
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
-
s.add_runtime_dependency(%q<
|
52
|
-
s.add_runtime_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
51
|
+
s.add_runtime_dependency(%q<gmaps_directions>, [">= 0"])
|
53
52
|
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
54
53
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
54
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
56
55
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
57
56
|
s.add_runtime_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
58
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
59
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.5"])
|
57
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.4"])
|
58
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
59
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
60
60
|
else
|
61
|
-
s.add_dependency(%q<
|
62
|
-
s.add_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
61
|
+
s.add_dependency(%q<gmaps_directions>, [">= 0"])
|
63
62
|
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
64
63
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
65
64
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
66
65
|
s.add_dependency(%q<rcov>, [">= 0"])
|
67
66
|
s.add_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
68
|
-
s.add_dependency(%q<activesupport>, ["
|
69
|
-
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
67
|
+
s.add_dependency(%q<activesupport>, [">= 3.0.4"])
|
68
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
69
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
70
70
|
end
|
71
71
|
else
|
72
|
-
s.add_dependency(%q<
|
73
|
-
s.add_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
72
|
+
s.add_dependency(%q<gmaps_directions>, [">= 0"])
|
74
73
|
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
75
74
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
76
75
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
77
76
|
s.add_dependency(%q<rcov>, [">= 0"])
|
78
77
|
s.add_dependency(%q<yajl-ruby>, ["~> 0.8.1"])
|
79
|
-
s.add_dependency(%q<activesupport>, ["
|
80
|
-
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
78
|
+
s.add_dependency(%q<activesupport>, [">= 3.0.4"])
|
79
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
80
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -139,14 +139,14 @@ describe "GmapsDirections" do
|
|
139
139
|
|
140
140
|
route = routes.first
|
141
141
|
|
142
|
-
(route.duration / 60).should
|
143
|
-
route.formatted_duration.should
|
144
|
-
(route.distance / 1000).should
|
145
|
-
route.formatted_distance.should
|
146
|
-
route.start_address.should
|
147
|
-
route.end_address.should
|
148
|
-
route.start_location.should
|
149
|
-
route.end_location.should
|
150
|
-
route.status.should
|
142
|
+
(route.duration / 60).should == 58
|
143
|
+
route.formatted_duration.should == "58 mins"
|
144
|
+
(route.distance / 1000.0).ceil.should == 85
|
145
|
+
route.formatted_distance.should == "84.9 km"
|
146
|
+
route.start_address.should == "1 Infinite Loop, Cupertino, CA 95014, USA"
|
147
|
+
route.end_address.should == "1200 Park Ave, Emeryville, CA 94608, USA"
|
148
|
+
route.start_location.should == { "lng" => -122.0307500, "lat" => 37.3316800 }
|
149
|
+
route.end_location.should == { "lat" => 37.8317100, "lng" => -122.2833000 }
|
150
|
+
route.status.should == "OK"
|
151
151
|
end
|
152
152
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmaps_directions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dirk Breuer
|
@@ -15,46 +15,25 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-12 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: activesupport
|
23
|
-
prerelease: false
|
24
|
-
type: :runtime
|
25
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
23
|
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
27
|
+
hash: 3
|
31
28
|
segments:
|
32
|
-
- 3
|
33
29
|
- 0
|
34
|
-
|
35
|
-
|
36
|
-
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: yajl-ruby
|
30
|
+
version: "0"
|
31
|
+
name: gmaps_directions
|
39
32
|
prerelease: false
|
40
33
|
type: :runtime
|
41
|
-
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
hash: 61
|
47
|
-
segments:
|
48
|
-
- 0
|
49
|
-
- 8
|
50
|
-
- 1
|
51
|
-
version: 0.8.1
|
52
|
-
requirement: *id002
|
34
|
+
requirement: *id001
|
53
35
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
55
|
-
prerelease: false
|
56
|
-
type: :development
|
57
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
58
37
|
none: false
|
59
38
|
requirements:
|
60
39
|
- - ~>
|
@@ -65,12 +44,12 @@ dependencies:
|
|
65
44
|
- 5
|
66
45
|
- 0
|
67
46
|
version: 2.5.0
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
47
|
+
name: rspec
|
71
48
|
prerelease: false
|
72
49
|
type: :development
|
73
|
-
|
50
|
+
requirement: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
74
53
|
none: false
|
75
54
|
requirements:
|
76
55
|
- - ~>
|
@@ -81,12 +60,12 @@ dependencies:
|
|
81
60
|
- 0
|
82
61
|
- 0
|
83
62
|
version: 1.0.0
|
84
|
-
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: jeweler
|
63
|
+
name: bundler
|
87
64
|
prerelease: false
|
88
65
|
type: :development
|
89
|
-
|
66
|
+
requirement: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
90
69
|
none: false
|
91
70
|
requirements:
|
92
71
|
- - ~>
|
@@ -97,12 +76,12 @@ dependencies:
|
|
97
76
|
- 5
|
98
77
|
- 2
|
99
78
|
version: 1.5.2
|
100
|
-
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: rcov
|
79
|
+
name: jeweler
|
103
80
|
prerelease: false
|
104
81
|
type: :development
|
105
|
-
|
82
|
+
requirement: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
106
85
|
none: false
|
107
86
|
requirements:
|
108
87
|
- - ">="
|
@@ -111,12 +90,44 @@ dependencies:
|
|
111
90
|
segments:
|
112
91
|
- 0
|
113
92
|
version: "0"
|
114
|
-
|
93
|
+
name: rcov
|
94
|
+
prerelease: false
|
95
|
+
type: :development
|
96
|
+
requirement: *id005
|
115
97
|
- !ruby/object:Gem::Dependency
|
116
|
-
|
98
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 27
|
104
|
+
segments:
|
105
|
+
- 2
|
106
|
+
- 5
|
107
|
+
- 0
|
108
|
+
version: 2.5.0
|
109
|
+
name: rspec
|
117
110
|
prerelease: false
|
118
|
-
type: :
|
111
|
+
type: :development
|
112
|
+
requirement: *id006
|
113
|
+
- !ruby/object:Gem::Dependency
|
119
114
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ~>
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
hash: 7
|
120
|
+
segments:
|
121
|
+
- 1
|
122
|
+
- 5
|
123
|
+
- 2
|
124
|
+
version: 1.5.2
|
125
|
+
name: jeweler
|
126
|
+
prerelease: false
|
127
|
+
type: :development
|
128
|
+
requirement: *id007
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
120
131
|
none: false
|
121
132
|
requirements:
|
122
133
|
- - ~>
|
@@ -127,15 +138,15 @@ dependencies:
|
|
127
138
|
- 8
|
128
139
|
- 1
|
129
140
|
version: 0.8.1
|
130
|
-
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: activesupport
|
141
|
+
name: yajl-ruby
|
133
142
|
prerelease: false
|
134
143
|
type: :runtime
|
135
|
-
|
144
|
+
requirement: *id008
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
136
147
|
none: false
|
137
148
|
requirements:
|
138
|
-
- -
|
149
|
+
- - ">="
|
139
150
|
- !ruby/object:Gem::Version
|
140
151
|
hash: 15
|
141
152
|
segments:
|
@@ -143,22 +154,42 @@ dependencies:
|
|
143
154
|
- 0
|
144
155
|
- 4
|
145
156
|
version: 3.0.4
|
146
|
-
|
157
|
+
name: activesupport
|
158
|
+
prerelease: false
|
159
|
+
type: :runtime
|
160
|
+
requirement: *id009
|
147
161
|
- !ruby/object:Gem::Dependency
|
162
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ~>
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 27
|
168
|
+
segments:
|
169
|
+
- 2
|
170
|
+
- 5
|
171
|
+
- 0
|
172
|
+
version: 2.5.0
|
148
173
|
name: rspec
|
149
174
|
prerelease: false
|
150
175
|
type: :development
|
151
|
-
|
176
|
+
requirement: *id010
|
177
|
+
- !ruby/object:Gem::Dependency
|
178
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
152
179
|
none: false
|
153
180
|
requirements:
|
154
181
|
- - ~>
|
155
182
|
- !ruby/object:Gem::Version
|
156
|
-
hash:
|
183
|
+
hash: 7
|
157
184
|
segments:
|
158
|
-
-
|
185
|
+
- 1
|
159
186
|
- 5
|
160
|
-
|
161
|
-
|
187
|
+
- 2
|
188
|
+
version: 1.5.2
|
189
|
+
name: jeweler
|
190
|
+
prerelease: false
|
191
|
+
type: :development
|
192
|
+
requirement: *id011
|
162
193
|
description: "\n Sometimes you need to calculate the directions between two different points\n via Google Maps on your server-side and not on the client. The Google Maps\n API for that is dead simple and due to this I wrapped calling the API in\n this little gem.\n "
|
163
194
|
email: dirk.breuer@gmail.com
|
164
195
|
executables: []
|