aspelllint 0.13 → 0.14

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aspelllint.rb +15 -7
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a16d4d81e4c5531ccb781951bbdd71723fc6abc0
4
- data.tar.gz: 6f7a0e906693a0ca63abac127649eb795adfb754
3
+ metadata.gz: 6d4391425ac42b958fc34cb74fce694be7668c66
4
+ data.tar.gz: 4bcde5922fbadf85c5a3df269c359a8ebc1d2f71
5
5
  SHA512:
6
- metadata.gz: fc743aa0747bc4db0389e1e52a62880cbd58459daf4912c5d54ae2e766ad63c5a3fcd9fa8eb9e65fae504479f7ede124944a7885dd806627fd01e3f966a6f71b
7
- data.tar.gz: 8b60a55f02e8d67c19597c7d3eb6378098213a49918927e08ef0550590878365118a269e08019bd3d9cf08c55a4b5643f3d18aad82f67da53413b8561f7bede7
6
+ metadata.gz: f57f7656808c869cfd38bdeb23bb0de61decf00002e62bc338d905bb4d04d2da09a5e6e711bab49883f50130f237592a0f0ee3fb245af908dd98a8097d7a123d
7
+ data.tar.gz: d278b6109abdbc0ec8db7bdfc5c1b0431fb478619b181f07c700add7818d5332815e592d53f3dc654f26ce112d6445fa1aacddfe80e497630e23ccdf8e78a041
@@ -90,21 +90,29 @@ def self.check_stdin
90
90
 
91
91
  output = `sed 's/#/ /g' "#{filename}" 2>&1 | aspell -a -c 2>&1`
92
92
 
93
- lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
93
+ if output =~ /aspell\: command not found/m
94
+ puts 'aspell: command not found'
95
+ else
96
+ lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
94
97
 
95
- misspellings = lines.map { |line| Misspelling.parse('stdin', line) }
98
+ misspellings = lines.map { |line| Misspelling.parse('stdin', line) }
96
99
 
97
- misspellings.each { |m| puts m }
100
+ misspellings.each { |m| puts m }
98
101
 
99
- t.delete
102
+ t.delete
103
+ end
100
104
  end
101
105
 
102
106
  def self.check(filename)
103
107
  output = `sed 's/#/ /g' "#{filename}" 2>&1 | aspell -a -c 2>&1`
104
108
 
105
- lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
109
+ if output =~ /aspell\: command not found/m
110
+ puts 'aspell: command not found'
111
+ else
112
+ lines = output.split("\n").select { |line| line =~ /^\&\s.+$/ }
106
113
 
107
- misspellings = lines.map { |line| Misspelling.parse(filename, line) }
114
+ misspellings = lines.map { |line| Misspelling.parse(filename, line) }
108
115
 
109
- misspellings.each { |m| puts m }
116
+ misspellings.each { |m| puts m }
117
+ end
110
118
  end
@@ -2,5 +2,5 @@
2
2
  # Aspelllint
3
3
  #
4
4
  module Aspelllint
5
- VERSION = '0.13'
5
+ VERSION = '0.14'
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.13'
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Pennebaker