findr 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -88,7 +88,13 @@ module Findr
88
88
  linenumber = 0
89
89
  tempfile = Tempfile.new( 'current_file.basename' ) if options[:replace] && options[:force]
90
90
  current_file.each_line do |l|
91
- l = coding_to_utf8.iconv(l)
91
+ begin
92
+ l = coding_to_utf8.iconv(l)
93
+ rescue Iconv::IllegalSequence
94
+ stdout.puts "Skipping file #{current_file} because of error on line #{linenumber}: #{$!.class} #{$!.message}"
95
+ tempfile.unlink if tempfile
96
+ break
97
+ end
92
98
  linenumber += 1
93
99
  if l=~ options[:find]
94
100
  stats[:local_hits] += 1
@@ -1,3 +1,3 @@
1
1
  module Findr
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: findr
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:
@@ -21,6 +21,7 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - bin/findr
24
+ - findr-0.0.1.gem
24
25
  - findr.gemspec
25
26
  - lib/findr/cli.rb
26
27
  - lib/findr/version.rb