ipgeobase_local 0.0.1 → 0.0.2

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.
@@ -52,7 +52,9 @@ module IpgeobaseLocal
52
52
 
53
53
  cidr_file = "#{IpgeobaseLocal.base_directory}cidr_optim.txt"
54
54
  cities_file = "#{IpgeobaseLocal.base_directory}cities.txt"
55
-
55
+ unless File.exists?(cidr_file) && File.exists?(cities_file)
56
+ raise "Not exist ipgeobase files, pls run 'rake ipgeobase_local:update'"
57
+ end
56
58
  CSV.foreach(cities_file, col_sep: "\t", quote_char:"'", encoding: "windows-1251:utf-8") do |line|
57
59
  city_base[line[0]] = line[1..5]
58
60
  end
@@ -1,3 +1,3 @@
1
1
  module IpgeobaseLocal
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipgeobase_local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: