aspelllint 0.2 → 0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e41915bcb577b2004b10fde5bf595b93b6421d1b
4
- data.tar.gz: 4075ce9b09d6a1cfe7325d685c2006c5c40abf83
3
+ metadata.gz: e2124c61cdbf10aa42731e5b53b0971c8c07fedd
4
+ data.tar.gz: 3782d104cbd84886357832e7fe8cfdb30e3b18ed
5
5
  SHA512:
6
- metadata.gz: fd2cac56dd12c13ad7456a8a04f2837bbd29b183ea1ce5b1c3efe13202f106da6ce6300db16fbebe77a531768deefc381a6b69b09ff2d9a5697326c849ed28b2
7
- data.tar.gz: ac19c9cc6f40a2bfc9a812d87142545285b8ffa866cefad3b216b7222506eed78bb4ce1fd125e74d3e8b041e5183343e4720a49b15cc82565814e0a1cda0e3e0
6
+ metadata.gz: 7c1668da98679e4ebc8e015015d6b023de40fb7793651170a2d6c49dfed04c9e25f2525e6e4d6fec86369ab71c40c20e8882578116d0191eeb31d8ffabb9c456
7
+ data.tar.gz: af4d7ff407b0b2405127fd3068edece461e16fd2031e4de7c3439692524a48238e2f0727399946aaf9655293aaa0826b541e20986e19287d668f3bd0b1a99788
@@ -48,6 +48,23 @@ end
48
48
 
49
49
  begin
50
50
  main
51
+
52
+ #
53
+ # User quits aspelllint before completion.
54
+ #
55
+
51
56
  rescue Interrupt
52
57
  nil
58
+ #
59
+ # Invalid byte sequence in UTF-8 file.
60
+ # Likely a false positive text file.
61
+ #
62
+ rescue ArgumentError
63
+ nil
64
+ #
65
+ # aspelllint piped to another program (e.g. `less`),
66
+ # which is quit before aspelllint completes.
67
+ #
68
+ rescue Errno::EPIPE, Errno::EMFILE
69
+ nil
53
70
  end
@@ -48,27 +48,11 @@ def self.recursive_list(directory, ignores = DEFAULT_IGNORES)
48
48
  end
49
49
 
50
50
  def self.check(filename)
51
- begin
52
- output = `sed 's/#/ /g' #{filename} | aspell -a -c 2>&1`
51
+ output = `sed 's/#/ /g' #{filename} 2>&1 | aspell -a -c 2>&1`
53
52
 
54
- lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
53
+ lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
55
54
 
56
- misspellings = lines.map { |line| Misspelling.parse(filename, line) }
55
+ misspellings = lines.map { |line| Misspelling.parse(filename, line) }
57
56
 
58
- misspellings.each { |m| puts m }
59
-
60
- #
61
- # Invalid byte sequence in UTF-8 file.
62
- # Likely a false positive text file.
63
- #
64
- rescue ArgumentError
65
- nil
66
-
67
- #
68
- # aspelllint piped to another program (e.g. `less`),
69
- # which is quit before aspelllint completes.
70
- #
71
- rescue Errno::EPIPE, Errno::EMFILE
72
- nil
73
- end
57
+ misspellings.each { |m| puts m }
74
58
  end
@@ -2,5 +2,5 @@
2
2
  # Aspelllint
3
3
  #
4
4
  module Aspelllint
5
- VERSION = '0.2'
5
+ VERSION = '0.3'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspelllint
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Pennebaker