gps2map 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gps2map.rb +8 -0
- data/lib/gps2map/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 277864cd05d29253f20b3d996d20f85d929dcfd22bda8e0253ca08e05db48f92
|
4
|
+
data.tar.gz: 257b083a2a6a0f77dbce61c502633a25f2c4f42a7a300a29d6d97705826c6171
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91e24b0fde9f80fc68180ea7c12a8ad3157307c7ff9eea29125f341d5f4d49d079b7ce34a2380a50af1813d48e9e0496e12561007eb07b1c8c492f279f356c39
|
7
|
+
data.tar.gz: '09fd7cd2306854b534903ccd81a89a9a56fc08b3e09459f6436367e3c7af3b4030a5a3def38823b4df617dd59e99460ef2989430308baa30b9fa60b8df60dfd6'
|
data/lib/gps2map.rb
CHANGED
@@ -79,6 +79,10 @@ module GPS2Map
|
|
79
79
|
doc = Nokogiri::XML(fi)
|
80
80
|
doc.css(selector).each { |el| yield(el) }
|
81
81
|
end
|
82
|
+
rescue Errno::EACCES
|
83
|
+
abort("Permission denied when attemping to read input file '#{input_file}'")
|
84
|
+
rescue Errno::ENOENT
|
85
|
+
abort("Input file '#{input_file}' doesn't exist.")
|
82
86
|
end
|
83
87
|
|
84
88
|
def parse_gpx(input_file)
|
@@ -115,6 +119,10 @@ module GPS2Map
|
|
115
119
|
|
116
120
|
def write_output_file(output_file, data)
|
117
121
|
File.open(output_file, 'w') { |fi| fi.write(data) }
|
122
|
+
rescue Errno::EACCES
|
123
|
+
abort("Permission denied when attemping to write output file '#{output_file}'")
|
124
|
+
rescue Errno::ENOENT
|
125
|
+
abort("Output file path '#{output_file}' doesn't exist.")
|
118
126
|
end
|
119
127
|
end
|
120
128
|
end
|
data/lib/gps2map/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gps2map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Topley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 2.
|
111
|
+
version: 2.5.0
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - ">="
|