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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 195947a21489357032bdda69dcce85f3589d586a133f34b8388a5623109aa9ba
4
- data.tar.gz: eae196a62276018043441bc936c5f6455392336896ad1c5cdd1d8ad0de73233d
3
+ metadata.gz: 277864cd05d29253f20b3d996d20f85d929dcfd22bda8e0253ca08e05db48f92
4
+ data.tar.gz: 257b083a2a6a0f77dbce61c502633a25f2c4f42a7a300a29d6d97705826c6171
5
5
  SHA512:
6
- metadata.gz: aed8437861d8bb0728f14ae68d29f7e220e4b2f5b3e0855e154cd2eeca1765d0d88c367a7c5f3b80befd488bc108f4ad3ad97f22b112f95ce9e2d11d9b677984
7
- data.tar.gz: c4bea1a658994d21a102dc052203f5bd6d6de44f9533078d33190d18834edf10d187504e290b44b379b84ecee50105294cb21a1a1ef53d87b892fb64ef5f75a5
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GPS2Map
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
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.1
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 00:00:00.000000000 Z
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.4.0
111
+ version: 2.5.0
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="