aqila-mapas 0.4.8 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/aqila/mapas/version.rb +1 -1
- data/lib/map/download_tiles_service.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c9e1d8e70be51bb5f48d4fb73140edd93cb22a4112d2b59071b1698896ceb85
|
4
|
+
data.tar.gz: e8e651ab10791e46223cfc6b139a504a61ebddfb646f1a1bc694df9ebadbb884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9efc2b843eaff4d8ea84096ba665e99f594828aaaebb9adfcd72b94642961852fa2d90f29b6b94e06c32ce6774c7bab878d5c83b20e6f2eef6408196c5351924
|
7
|
+
data.tar.gz: f3b9c08c8b6efe7e66d6978fca20b5ab61efce0ccd921f7daf5b32af4d1e88cfb46344dd20f82c244b9e7d6302673d05832f902dbf895a2a7d7ae03acdcdcd41
|
data/Gemfile.lock
CHANGED
data/lib/aqila/mapas/version.rb
CHANGED
@@ -49,8 +49,10 @@ class Map::DownloadTilesService
|
|
49
49
|
private
|
50
50
|
|
51
51
|
def valid_file?(file_name)
|
52
|
-
|
53
|
-
|
52
|
+
File.exist?(file_name) && File.size(file_name) > MIN_FILE_SIZE
|
53
|
+
rescue StandardError => error
|
54
|
+
Rails.logger.error "Erro ao verificar arquivo: #{file_name} - #{error.message}"
|
55
|
+
false
|
54
56
|
end
|
55
57
|
|
56
58
|
def get_tile(points, zoom)
|
@@ -58,7 +60,8 @@ class Map::DownloadTilesService
|
|
58
60
|
file_name = "#{dir}/#{points.second}.jpg"
|
59
61
|
Rails.logger.info "Baixando tile: #{file_name}"
|
60
62
|
|
61
|
-
|
63
|
+
# file_name.match(/-/) - retorna o nome do arquivo caso tenha algum "-" no nome
|
64
|
+
return file_name if file_name.match?(/-/) || valid_file?(file_name)
|
62
65
|
|
63
66
|
FileUtils.mkdir_p(dir)
|
64
67
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aqila-mapas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lucasferronato
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|