thor 0.20.1 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbcaa89ae8040cc061b9243fce97dbe6345e775ec5916d45d37ed9989bd14d79
4
- data.tar.gz: b78c5c55482372cb805ac15c7326fe598c0483640b80e089e23ad5a58c574422
3
+ metadata.gz: 20c14f63247ba230f58e65b5ec5f5a88168d07d165279bef09d69c29056c9f0f
4
+ data.tar.gz: d54f3dbe3c1fe7ae4ad41b11af4744de090be3090b0c80926f2bf2e221444d97
5
5
  SHA512:
6
- metadata.gz: dfe4f6047443f79cdd7974ad556f39897e97c83dcbd4803a95bc26770e9f0b9f8225e310391863600779ae11c570543d8d97411ede4c77465435c9a24b82d32d
7
- data.tar.gz: 40ba578626f442737b917a6ffd97fbea548bb512d105f6c35f6e99b91be368e862c1fea1803117659ac6f426b22cf5a4ec26614cdc4c619202144cb03eb58105
6
+ metadata.gz: 14e7a0814d7ae8a31a10c481e42120fba4a64dc977026cd5aa81508f5acc44c4482d02cd5969898f8593c18e378209443c8e5622d8298f085137dc5267621bae
7
+ data.tar.gz: cb1b294f8e9e460c46d122be4c3fed8355470178724f43b9881aefc1e550d28c47dd6a3e154b15a18735004362142feeb984bca804253875403c29297e636503
@@ -1,6 +1,10 @@
1
+ # 0.20.2
2
+ * Fix `did_you_mean` support.
3
+
1
4
  # 0.20.1
2
5
  * Support new versions fo ERB.
3
6
  * Fix `check_unknown_options!` to not check the content that was not parsed, i.e. after a `--` or after the first unknown with `stop_on_unknown_option!`
7
+ * Add `did_you_mean` support.
4
8
 
5
9
  ## 0.20.0
6
10
  * Add `check_default_type!` to check if the default value of an option matches the defined type.
@@ -3,16 +3,14 @@ class Thor
3
3
  begin
4
4
  require 'did_you_mean'
5
5
 
6
- module DidYouMean
7
- # In order to support versions of Ruby that don't have keyword
8
- # arguments, we need our own spell checker class that doesn't take key
9
- # words. Even though this code wouldn't be hit because of the check
10
- # above, it's still necessary because the interpreter would otherwise be
11
- # unable to parse the file.
12
- class NoKwargSpellChecker < SpellChecker
13
- def initialize(dictionary)
14
- @dictionary = dictionary
15
- end
6
+ # In order to support versions of Ruby that don't have keyword
7
+ # arguments, we need our own spell checker class that doesn't take key
8
+ # words. Even though this code wouldn't be hit because of the check
9
+ # above, it's still necessary because the interpreter would otherwise be
10
+ # unable to parse the file.
11
+ class NoKwargSpellChecker < DidYouMean::SpellChecker # :nodoc:
12
+ def initialize(dictionary)
13
+ @dictionary = dictionary
16
14
  end
17
15
  end
18
16
 
@@ -43,7 +41,7 @@ class Thor
43
41
  end
44
42
 
45
43
  def spell_checker
46
- DidYouMean::NoKwargSpellChecker.new(error.all_commands)
44
+ NoKwargSpellChecker.new(error.all_commands)
47
45
  end
48
46
  end
49
47
 
@@ -85,8 +83,7 @@ class Thor
85
83
  end
86
84
 
87
85
  def spell_checker
88
- @spell_checker ||=
89
- DidYouMean::NoKwargSpellChecker.new(error.switches)
86
+ @spell_checker ||= NoKwargSpellChecker.new(error.switches)
90
87
  end
91
88
  end
92
89
 
@@ -1,3 +1,3 @@
1
1
  class Thor
2
- VERSION = "0.20.1"
2
+ VERSION = "0.20.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-09 00:00:00.000000000 Z
12
+ date: 2018-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler