nearest_time_zone 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/Rakefile +13 -11
- data/lib/nearest_time_zone/version.rb +1 -1
- metadata +49 -25
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -19,7 +19,7 @@ The [https://github.com/gurgeous/kdtree](Kdtree) gem is used to make the search
|
|
19
19
|
|
20
20
|
### Load Time
|
21
21
|
|
22
|
-
The kdtree and the cities are loaded into memory when the gem is loaded. If you'd like to make that faster, run `rake dump` and the load time should drop significantly. The cities, time zones and kdtree will all be persisted to the file system when run that rake task.
|
22
|
+
The kdtree and the cities are loaded into memory when the gem is loaded. If you'd like to make that faster, run `rake nearest_time_zone:dump` and the load time should drop significantly. The cities, time zones and kdtree will all be persisted to the file system when run that rake task.
|
23
23
|
|
24
24
|
## Installation
|
25
25
|
|
data/Rakefile
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "./lib/nearest_time_zone"
|
3
3
|
|
4
|
-
task :dump do
|
5
|
-
File.open(File.expand_path("../data/cities.dump", __FILE__),"w") do |f|
|
6
|
-
f.write Marshal.dump(NearestTimeZone::City.all)
|
7
|
-
end
|
8
4
|
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
namespace :nearest_time_zone do
|
6
|
+
task :dump do
|
7
|
+
File.open(File.expand_path("../data/cities.dump", __FILE__),"w") do |f|
|
8
|
+
f.write Marshal.dump(NearestTimeZone::City.all)
|
9
|
+
end
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
File.open(File.expand_path("../data/time_zones.dump", __FILE__),"w") do |f|
|
12
|
+
f.write Marshal.dump(NearestTimeZone::TimeZone.all)
|
13
|
+
end
|
16
14
|
|
17
|
-
|
15
|
+
File.open(File.expand_path("../data/kdtree.dump", __FILE__),"w") do |f|
|
16
|
+
NearestTimeZone::City.kdtree.persist(f)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nearest_time_zone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Sean Devine
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,76 +30,87 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rspec
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- - '>='
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- - '>='
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: guard
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- - '>='
|
67
|
+
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: '0'
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- - '>='
|
75
|
+
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: '0'
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: guard-rspec
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- - '>='
|
83
|
+
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '0'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- - '>='
|
91
|
+
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '0'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: terminal-notifier-guard
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- - '>='
|
99
|
+
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: '0'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- - '>='
|
107
|
+
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: rb-fsevent
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
115
|
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
@@ -104,6 +118,7 @@ dependencies:
|
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
123
|
- - ~>
|
109
124
|
- !ruby/object:Gem::Version
|
@@ -111,57 +126,65 @@ dependencies:
|
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: debugger
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- - '>='
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- - '>='
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: require_all
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- - '>='
|
147
|
+
- - ! '>='
|
130
148
|
- !ruby/object:Gem::Version
|
131
149
|
version: '0'
|
132
150
|
type: :runtime
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- - '>='
|
155
|
+
- - ! '>='
|
137
156
|
- !ruby/object:Gem::Version
|
138
157
|
version: '0'
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: kdtree
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- - '>='
|
163
|
+
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: '0'
|
146
166
|
type: :runtime
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- - '>='
|
171
|
+
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: '0'
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: andand
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
|
-
- - '>='
|
179
|
+
- - ! '>='
|
158
180
|
- !ruby/object:Gem::Version
|
159
181
|
version: '0'
|
160
182
|
type: :runtime
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
|
-
- - '>='
|
187
|
+
- - ! '>='
|
165
188
|
- !ruby/object:Gem::Version
|
166
189
|
version: '0'
|
167
190
|
description: Quickly find the name of a time zone for a latitude and longitude without
|
@@ -193,26 +216,27 @@ files:
|
|
193
216
|
homepage: ''
|
194
217
|
licenses:
|
195
218
|
- MIT
|
196
|
-
metadata: {}
|
197
219
|
post_install_message:
|
198
220
|
rdoc_options: []
|
199
221
|
require_paths:
|
200
222
|
- lib
|
201
223
|
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
202
225
|
requirements:
|
203
|
-
- - '>='
|
226
|
+
- - ! '>='
|
204
227
|
- !ruby/object:Gem::Version
|
205
228
|
version: '0'
|
206
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
|
+
none: false
|
207
231
|
requirements:
|
208
|
-
- - '>='
|
232
|
+
- - ! '>='
|
209
233
|
- !ruby/object:Gem::Version
|
210
234
|
version: '0'
|
211
235
|
requirements: []
|
212
236
|
rubyforge_project:
|
213
|
-
rubygems_version:
|
237
|
+
rubygems_version: 1.8.23
|
214
238
|
signing_key:
|
215
|
-
specification_version:
|
239
|
+
specification_version: 3
|
216
240
|
summary: Quickly find the name of a time zone for a latitude and longitude without
|
217
241
|
relying on a web service.
|
218
242
|
test_files:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 1ada7e4a0bcb6870bb469ff5d4a3bb87b86db5af
|
4
|
-
data.tar.gz: 820f66a753a61c8b63d4d4156bb7ed8ddacb5153
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 10c2cfb0ee245c1cebc22318ec1e0e2cfbe745388097acd55a1712504ab5f7cf37ad31e43794645ad624ef376ce2db4890375e8c8acbbfc72cdbbd85dbaac4e2
|
7
|
-
data.tar.gz: aad48fd35ca735193cf82da181e9f7901725af9a5b2e1c9113f91e1a44a78878ae4a8c39b71da951ef6e6a17e8c9dc190c12b90e52dc93f404c0d1a1417919f8
|