From 8f8a09a9081eb0991fa4e21eab47cff1487b14a1 Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Mon, 22 Mar 2021 03:23:37 +0100 Subject: [PATCH 1/4] Fix readme because It only works with yml --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e13b361..b5b1369 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ You'll need to install Aspell: ## Configuration -In order to change configuration, you need to create `.pronto_spell.yaml` file in your project root directory. Awailable options are: +In order to change configuration, you need to create `.pronto_spell.yml` file in your project root directory. Awailable options are: ```YAML suggestion_mode: 'fast' # default From 6ac8bc5d1993e1d31cc844409cd7b75252a6c46a Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Fri, 23 Apr 2021 17:18:43 +0200 Subject: [PATCH 2/4] Allow for more a bit more complex yaml structure --- lib/pronto/spell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pronto/spell.rb b/lib/pronto/spell.rb index 79829cd..5fee086 100644 --- a/lib/pronto/spell.rb +++ b/lib/pronto/spell.rb @@ -9,13 +9,13 @@ class Spell < Runner def ignored_words @ignored_words ||= begin - Set.new(spelling_config['ignored_words'].to_a.map(&:downcase)) + Set.new(spelling_config['ignored_words'].to_a.flatten.map(&:downcase)) end end def keywords @keywords ||= begin - Set.new(spelling_config['only_lines_matching'].to_a.map(&:downcase)) + Set.new(spelling_config['only_lines_matching'].to_a.flatten.map(&:downcase)) end end From b5e8e78491b8a66e2ebef2f95ab249885683f597 Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Thu, 5 Aug 2021 01:26:57 +0200 Subject: [PATCH 3/4] Patch up tests with what aspell returns currently --- spec/pronto/spell_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/pronto/spell_spec.rb b/spec/pronto/spell_spec.rb index d9d669e..142879d 100644 --- a/spec/pronto/spell_spec.rb +++ b/spec/pronto/spell_spec.rb @@ -50,10 +50,10 @@ module Pronto end context 'with misspelled words' do - it 'returns list of misspeled words' do + fit 'returns list of misspeled words' do expect(lint_messages).to eq [ '"helllo" might not be spelled correctly. ' \ - 'Spelling suggestions: hell lo, hell-lo, hello', + "Spelling suggestions: hello, hell, he'll", '"woorld" might not be spelled correctly. ' \ 'Spelling suggestions: world, wold, whorled' @@ -67,7 +67,7 @@ module Pronto it 'validates each word separately' do expect(lint_messages).to eq [ '"Withh" might not be spelled correctly. ' \ - 'Spelling suggestions: With, Withe, Wither', + 'Spelling suggestions: With, Withe, Witch', '"Wrrrong" might not be spelled correctly. ' \ 'Spelling suggestions: Wrong, Wrung, Wring' @@ -81,10 +81,10 @@ module Pronto it 'validates each word separately' do expect(lint_messages).to eq [ '"LOOOK" might not be spelled correctly. ' \ - 'Spelling suggestions: LOO OK, LOO-OK, LOOK', + 'Spelling suggestions: LOOK, LOGO, LOCK', '"SHOWTING" might not be spelled correctly. ' \ - 'Spelling suggestions: SHOW TING, SHOW-TING, SHOOTING' + 'Spelling suggestions: SHOWING, SHOOTING, SHORTING' ] end end @@ -98,7 +98,7 @@ module Pronto 'Spelling suggestions: cool, Colo, coil', '"skool" might not be spelled correctly. '\ - 'Spelling suggestions: skoal, school, skill' + 'Spelling suggestions: skoal, spool, stool' ] end end @@ -126,7 +126,7 @@ module Pronto it 'returns the list of misspeled words' do expect(lint_messages).to eq [ '"helllo" might not be spelled correctly. ' \ - 'Spelling suggestions: hell lo, hell-lo, hello', + "Spelling suggestions: hello, hell, he'll", '"tsetir" might not be spelled correctly. ' \ 'Spelling suggestions: testier, tester, taster' From 65df2e8affed08e695e4b6b6b0f674db5935ee12 Mon Sep 17 00:00:00 2001 From: Khalil Gharbaoui Date: Thu, 5 Aug 2021 01:39:24 +0200 Subject: [PATCH 4/4] Bump version to 0.11.1 --- lib/pronto/spell/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pronto/spell/version.rb b/lib/pronto/spell/version.rb index 8b9453b..0c315c7 100644 --- a/lib/pronto/spell/version.rb +++ b/lib/pronto/spell/version.rb @@ -2,6 +2,6 @@ module Pronto module SpellVersion - VERSION = '0.11.0' + VERSION = '0.11.1' end end