swissmatch-location 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 561e487d2ba8a0c726877e72e89c26bef87931a1
4
- data.tar.gz: 22332920078c7e433fd68f34c7716eea73e7f9fe
3
+ metadata.gz: 1741e30aebd09caf256eae314c4db888b0d72ea8
4
+ data.tar.gz: f6d3cf03b9b67d468f94afacdd56c75da9684eb4
5
5
  SHA512:
6
- metadata.gz: b2a72500cce5454dcb9731c68647af586f0e44def5b8fece74db640be777825fa72682782f57e6a0873416d12bf35af6b4e03283805d3b1d49f5a36bd685348d
7
- data.tar.gz: fe23fbc5b3d87ba1160931d6cee52abd7cf9479c7e4f64701df8dce15e2511eca9c1ac7655c6068415bc7e059dc8f375e100f51b43a9cdace7df5e19054bcc8d
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
- raise LoadError.new("File #{file.inspect} not found or not readable", nil) unless file && File.readable?(file)
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*")
@@ -6,6 +6,6 @@ module SwissMatch
6
6
  module Location
7
7
 
8
8
  # The version of the swissmatch-location gem.
9
- Version = Gem::Version.new("1.0.0")
9
+ Version = Gem::Version.new("1.0.1")
10
10
  end
11
11
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "swissmatch-location"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
  s.authors = "Stefan Rusterholz"
7
7
  s.email = "stefan.rusterholz@gmail.com"
8
8
  s.homepage = "http://github.com/apeiros/swissmatch-location"
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.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-10-24 00:00:00.000000000 Z
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.6
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