swissmatch-location 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/swissmatch/location/datafiles.rb +7 -1
- data/lib/swissmatch/location/version.rb +1 -1
- data/swissmatch-location.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1741e30aebd09caf256eae314c4db888b0d72ea8
|
4
|
+
data.tar.gz: f6d3cf03b9b67d468f94afacdd56c75da9684eb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ab659cbcbdfca23423c5e7493d75972b95eca4149718ae413c0e0eb0cea36e9d649334e4178a2164aa3c8f9d3ddf5e31996a40c66f792a2cf5c956ec79e64e6
|
7
|
+
data.tar.gz: 7582cf6928c153379ad1566cde405d1b82a0cb4a94dcf3fabad410fb7f4ccc1b10a50c8503c2ba66b55ae570c67e9a7989b09dc56a71d62cc7ef3d15c9f07756
|
@@ -146,7 +146,13 @@ module SwissMatch
|
|
146
146
|
|
147
147
|
file ||= latest_binary_file
|
148
148
|
|
149
|
-
|
149
|
+
unless file && File.readable?(file)
|
150
|
+
if ENV['SWISSMATCH_DATA']
|
151
|
+
raise LoadError.new("File #{file.inspect} not found or not readable (used SWISSMATCH_DATA, data_directory=#{@data_directory}) - see https://github.com/apeiros/swissmatch-location#installation", nil)
|
152
|
+
else
|
153
|
+
raise LoadError.new("File #{file.inspect} not found or not readable (used ~/.swissmatch, data_directory=#{@data_directory}) - see https://github.com/apeiros/swissmatch-location#installation", nil)
|
154
|
+
end
|
155
|
+
end
|
150
156
|
|
151
157
|
data = File.read(file, encoding: Encoding::BINARY)
|
152
158
|
date, random_code, zip1_count, zip2_count, com1_count, com2_count, district_count = *data[0,18].unpack("NNn*")
|
data/swissmatch-location.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swissmatch-location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Rusterholz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: 1.3.1
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.4.
|
105
|
+
rubygems_version: 2.4.5.1
|
106
106
|
signing_key:
|
107
107
|
specification_version: 3
|
108
108
|
summary: Deal with swiss zip codes, communities, districts and cantons, using the
|