fdc 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/fdc CHANGED
@@ -93,7 +93,7 @@ ARGV.each do |file|
93
93
 
94
94
  begin
95
95
  @converter.parse(file, encoding=options[:utf])
96
- rescue Fdc::FileReadError => e
96
+ rescue Fdc::FileReadError, Fdc::FileFormatError => e
97
97
  STDERR.puts e.message
98
98
  next
99
99
  end
@@ -36,7 +36,6 @@ class Fdc::Converter
36
36
 
37
37
  path = Pathname.new(file)
38
38
  load(path, encoding)
39
- raise Fdc::FileReadError, "Invalid file extension: #{path.to_s}" unless path.extname == ".igc"
40
39
  @parser.parse @file
41
40
 
42
41
  end
@@ -53,9 +53,13 @@ module Fdc
53
53
  # @raise [Fdc::FileReadError] If file could not be loaded
54
54
  def load(path, encoding)
55
55
 
56
+ # The path of the file
56
57
  @path = path
58
+
59
+ # The file encoding
57
60
  @encoding = encoding
58
61
 
62
+ # Load file
59
63
  begin
60
64
  f = File.new(@path, "r", :encoding => @encoding)
61
65
  @file = f.read
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-21 00:00:00.000000000 Z
12
+ date: 2012-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -70,12 +70,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
+ segments:
74
+ - 0
75
+ hash: 3174214199651078789
73
76
  required_rubygems_version: !ruby/object:Gem::Requirement
74
77
  none: false
75
78
  requirements:
76
79
  - - ! '>='
77
80
  - !ruby/object:Gem::Version
78
81
  version: '0'
82
+ segments:
83
+ - 0
84
+ hash: 3174214199651078789
79
85
  requirements: []
80
86
  rubyforge_project:
81
87
  rubygems_version: 1.8.24
@@ -83,4 +89,3 @@ signing_key:
83
89
  specification_version: 3
84
90
  summary: Convert flight data format files (IGC) to keyhole markup language (KML)
85
91
  test_files: []
86
- has_rdoc: