claide 1.0.0.beta.2 → 1.0.0.beta.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 +4 -4
 - data/.rubocop.yml +2 -1
 - data/.rubocop_cocoapods.yml +19 -2
 - data/.rubocop_todo.yml +70 -0
 - data/CHANGELOG.md +13 -0
 - data/Gemfile +1 -1
 - data/Gemfile.lock +9 -10
 - data/lib/claide.rb +1 -1
 - data/lib/claide/command.rb +22 -0
 - data/lib/claide/command/argument_suggester.rb +2 -5
 - metadata +12 -11
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 06e20928eea4eabc6a9ab3b7e13cb151e56e87f5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4fdc3e561bc02cbe10c9d0abc2625589bd5c02fc
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: d46a4e9260a1d06fab489db3a2ef5e985127dd12eb2345d7d5cd490238414f5564d5178cba91104e20a7f8d2b87e36d8c8c3df7abbeaedb5c88f843259258242
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b79d6085ba8db4351c710a883cb77e5c956a193e6b7bfc3ea005931f7b47d3b64f35807540c44003401e6d635689aad6f2190577639789a7c05936e0e4afcf80
         
     | 
    
        data/.rubocop.yml
    CHANGED
    
    
    
        data/.rubocop_cocoapods.yml
    CHANGED
    
    | 
         @@ -5,6 +5,7 @@ AllCops: 
     | 
|
| 
       5 
5 
     | 
    
         
             
                - ./*.gemspec
         
     | 
| 
       6 
6 
     | 
    
         
             
              Exclude:
         
     | 
| 
       7 
7 
     | 
    
         
             
                - ./spec/fixtures/**/*
         
     | 
| 
      
 8 
     | 
    
         
            +
                - ./vendor/bundle/**/*
         
     | 
| 
       8 
9 
     | 
    
         | 
| 
       9 
10 
     | 
    
         
             
            # At the moment not ready to be used
         
     | 
| 
       10 
11 
     | 
    
         
             
            # https://github.com/bbatsov/rubocop/issues/947
         
     | 
| 
         @@ -39,7 +40,10 @@ Encoding: 
     | 
|
| 
       39 
40 
     | 
    
         | 
| 
       40 
41 
     | 
    
         
             
            # Having these make it easier to *not* forget to add one when adding a new
         
     | 
| 
       41 
42 
     | 
    
         
             
            # value and you can simply copy the previous line.
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
      
 43 
     | 
    
         
            +
            Style/TrailingCommaInArguments:
         
     | 
| 
      
 44 
     | 
    
         
            +
              EnforcedStyleForMultiline: comma
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            Style/TrailingCommaInLiteral:
         
     | 
| 
       43 
47 
     | 
    
         
             
              EnforcedStyleForMultiline: comma
         
     | 
| 
       44 
48 
     | 
    
         | 
| 
       45 
49 
     | 
    
         
             
            Style/MultilineOperationIndentation:
         
     | 
| 
         @@ -58,6 +62,11 @@ Next: 
     | 
|
| 
       58 
62 
     | 
    
         
             
            Metrics/ClassLength:
         
     | 
| 
       59 
63 
     | 
    
         
             
              Enabled: false
         
     | 
| 
       60 
64 
     | 
    
         | 
| 
      
 65 
     | 
    
         
            +
            # Arbitrary max lengths for modules simply do not work and enabling this will
         
     | 
| 
      
 66 
     | 
    
         
            +
            # lead to a never ending stream of annoyance and changes.
         
     | 
| 
      
 67 
     | 
    
         
            +
            Metrics/ModuleLength:
         
     | 
| 
      
 68 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
       61 
70 
     | 
    
         
             
            # Arbitrary max lengths for methods simply do not work and enabling this will
         
     | 
| 
       62 
71 
     | 
    
         
             
            # lead to a never ending stream of annoyance and changes.
         
     | 
| 
       63 
72 
     | 
    
         
             
            Metrics/MethodLength:
         
     | 
| 
         @@ -77,6 +86,11 @@ Metrics/AbcSize: 
     | 
|
| 
       77 
86 
     | 
    
         
             
            Metrics/CyclomaticComplexity:
         
     | 
| 
       78 
87 
     | 
    
         
             
              Enabled: false
         
     | 
| 
       79 
88 
     | 
    
         | 
| 
      
 89 
     | 
    
         
            +
            # It will be obvious which code is complex, Rubocop should only lint simple
         
     | 
| 
      
 90 
     | 
    
         
            +
            # rules for us.
         
     | 
| 
      
 91 
     | 
    
         
            +
            Metrics/PerceivedComplexity:
         
     | 
| 
      
 92 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
       80 
94 
     | 
    
         
             
            #- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
         
     | 
| 
       81 
95 
     | 
    
         | 
| 
       82 
96 
     | 
    
         
             
            HashSyntax:
         
     | 
| 
         @@ -101,6 +115,10 @@ AmbiguousRegexpLiteral: 
     | 
|
| 
       101 
115 
     | 
    
         
             
              Exclude:
         
     | 
| 
       102 
116 
     | 
    
         
             
                - spec/**/*
         
     | 
| 
       103 
117 
     | 
    
         | 
| 
      
 118 
     | 
    
         
            +
            Performance/RedundantMatch:
         
     | 
| 
      
 119 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 120 
     | 
    
         
            +
                - spec/**/*
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
       104 
122 
     | 
    
         
             
            # Allow `object.should == object` syntax.
         
     | 
| 
       105 
123 
     | 
    
         
             
            Void:
         
     | 
| 
       106 
124 
     | 
    
         
             
              Exclude:
         
     | 
| 
         @@ -113,4 +131,3 @@ ClassAndModuleChildren: 
     | 
|
| 
       113 
131 
     | 
    
         
             
            UselessComparison:
         
     | 
| 
       114 
132 
     | 
    
         
             
              Exclude:
         
     | 
| 
       115 
133 
     | 
    
         
             
                - spec/**/*
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
    
        data/.rubocop_todo.yml
    ADDED
    
    | 
         @@ -0,0 +1,70 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This configuration was generated by
         
     | 
| 
      
 2 
     | 
    
         
            +
            # `rubocop --auto-gen-config`
         
     | 
| 
      
 3 
     | 
    
         
            +
            # on 2016-03-09 18:40:14 -0600 using RuboCop version 0.38.0.
         
     | 
| 
      
 4 
     | 
    
         
            +
            # The point is for the user to remove these configuration records
         
     | 
| 
      
 5 
     | 
    
         
            +
            # one by one as the offenses are removed from the code base.
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Note that changes in the inspected code, or installation of new
         
     | 
| 
      
 7 
     | 
    
         
            +
            # versions of RuboCop, may require this file to be generated again.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            # Offense count: 3
         
     | 
| 
      
 10 
     | 
    
         
            +
            Lint/IneffectiveAccessModifier:
         
     | 
| 
      
 11 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 12 
     | 
    
         
            +
                - 'lib/claide/command.rb'
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 15 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 16 
     | 
    
         
            +
            Lint/UnneededDisable:
         
     | 
| 
      
 17 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 18 
     | 
    
         
            +
                - 'spec/command/banner_spec.rb'
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 21 
     | 
    
         
            +
            Performance/FixedSize:
         
     | 
| 
      
 22 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 23 
     | 
    
         
            +
                - 'lib/claide/command/banner.rb'
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 26 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 27 
     | 
    
         
            +
            Performance/StringReplacement:
         
     | 
| 
      
 28 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 29 
     | 
    
         
            +
                - 'lib/claide/command/banner.rb'
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            # Offense count: 8
         
     | 
| 
      
 32 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 33 
     | 
    
         
            +
            # Configuration parameters: EnforcedStyle, SupportedStyles.
         
     | 
| 
      
 34 
     | 
    
         
            +
            # SupportedStyles: prefer_alias, prefer_alias_method
         
     | 
| 
      
 35 
     | 
    
         
            +
            Style/Alias:
         
     | 
| 
      
 36 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 37 
     | 
    
         
            +
                - 'lib/claide/argument.rb'
         
     | 
| 
      
 38 
     | 
    
         
            +
                - 'lib/claide/command.rb'
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 41 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 42 
     | 
    
         
            +
            # Configuration parameters: SingleLineConditionsOnly.
         
     | 
| 
      
 43 
     | 
    
         
            +
            Style/ConditionalAssignment:
         
     | 
| 
      
 44 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - 'lib/claide/command/banner.rb'
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 48 
     | 
    
         
            +
            Style/IfInsideElse:
         
     | 
| 
      
 49 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 50 
     | 
    
         
            +
                - 'lib/claide/command.rb'
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            # Offense count: 9
         
     | 
| 
      
 53 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 54 
     | 
    
         
            +
            Style/MutableConstant:
         
     | 
| 
      
 55 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 56 
     | 
    
         
            +
                - 'lib/claide/ansi.rb'
         
     | 
| 
      
 57 
     | 
    
         
            +
                - 'lib/claide/argument.rb'
         
     | 
| 
      
 58 
     | 
    
         
            +
                - 'lib/claide/command.rb'
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 61 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 62 
     | 
    
         
            +
            Style/ParallelAssignment:
         
     | 
| 
      
 63 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 64 
     | 
    
         
            +
                - 'lib/claide/command/argument_suggester.rb'
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
            # Offense count: 1
         
     | 
| 
      
 67 
     | 
    
         
            +
            # Cop supports --auto-correct.
         
     | 
| 
      
 68 
     | 
    
         
            +
            Style/UnneededInterpolation:
         
     | 
| 
      
 69 
     | 
    
         
            +
              Exclude:
         
     | 
| 
      
 70 
     | 
    
         
            +
                - 'lib/claide/command/argument_suggester.rb'
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,18 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # CLAide Changelog
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 1.0.0.beta.3 (2016-03-15)
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ##### Enhancements
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            * Added `Command.option` to easily add a single option to a command class.  
         
     | 
| 
      
 8 
     | 
    
         
            +
              [Samuel Giddins](https://github.com/segiddins)
         
     | 
| 
      
 9 
     | 
    
         
            +
              [#64](https://github.com/CocoaPods/CLAide/issues/64)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ##### Bug Fixes
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            * None.  
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       3 
16 
     | 
    
         
             
            ## 1.0.0.beta.2 (2016-03-08)
         
     | 
| 
       4 
17 
     | 
    
         | 
| 
       5 
18 
     | 
    
         
             
            ##### Bug Fixes
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,14 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                claide (1.0.0.beta. 
     | 
| 
      
 4 
     | 
    
         
            +
                claide (1.0.0.beta.3)
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            GEM
         
     | 
| 
       7 
7 
     | 
    
         
             
              remote: https://rubygems.org/
         
     | 
| 
       8 
8 
     | 
    
         
             
              specs:
         
     | 
| 
       9 
9 
     | 
    
         
             
                ast (2.2.0)
         
     | 
| 
       10 
     | 
    
         
            -
                astrolabe (1.3.0)
         
     | 
| 
       11 
     | 
    
         
            -
                  parser (>= 2.2.0.pre.3, < 3.0)
         
     | 
| 
       12 
10 
     | 
    
         
             
                bacon (1.2.0)
         
     | 
| 
       13 
11 
     | 
    
         
             
                codeclimate-test-reporter (0.4.1)
         
     | 
| 
       14 
12 
     | 
    
         
             
                  simplecov (>= 0.7.1, < 1.0.0)
         
     | 
| 
         @@ -32,28 +30,29 @@ GEM 
     | 
|
| 
       32 
30 
     | 
    
         
             
                notify (0.5.2)
         
     | 
| 
       33 
31 
     | 
    
         
             
                parser (2.3.0.6)
         
     | 
| 
       34 
32 
     | 
    
         
             
                  ast (~> 2.2)
         
     | 
| 
       35 
     | 
    
         
            -
                powerpack (0.1. 
     | 
| 
      
 33 
     | 
    
         
            +
                powerpack (0.1.1)
         
     | 
| 
       36 
34 
     | 
    
         
             
                prettybacon (0.0.2)
         
     | 
| 
       37 
35 
     | 
    
         
             
                  bacon (~> 1.2)
         
     | 
| 
       38 
     | 
    
         
            -
                rainbow (2. 
     | 
| 
      
 36 
     | 
    
         
            +
                rainbow (2.1.0)
         
     | 
| 
       39 
37 
     | 
    
         
             
                rake (10.3.2)
         
     | 
| 
       40 
38 
     | 
    
         
             
                rb-fsevent (0.9.4)
         
     | 
| 
       41 
39 
     | 
    
         
             
                rb-inotify (0.9.5)
         
     | 
| 
       42 
40 
     | 
    
         
             
                  ffi (>= 0.5.0)
         
     | 
| 
       43 
41 
     | 
    
         
             
                rb-kqueue (0.2.3)
         
     | 
| 
       44 
42 
     | 
    
         
             
                  ffi (>= 0.5.0)
         
     | 
| 
       45 
     | 
    
         
            -
                rubocop (0. 
     | 
| 
       46 
     | 
    
         
            -
                   
     | 
| 
       47 
     | 
    
         
            -
                  parser (>= 2.2.0.1, < 3.0)
         
     | 
| 
      
 43 
     | 
    
         
            +
                rubocop (0.38.0)
         
     | 
| 
      
 44 
     | 
    
         
            +
                  parser (>= 2.3.0.6, < 3.0)
         
     | 
| 
       48 
45 
     | 
    
         
             
                  powerpack (~> 0.1)
         
     | 
| 
       49 
46 
     | 
    
         
             
                  rainbow (>= 1.99.1, < 3.0)
         
     | 
| 
       50 
     | 
    
         
            -
                  ruby-progressbar (~> 1. 
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
      
 47 
     | 
    
         
            +
                  ruby-progressbar (~> 1.7)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  unicode-display_width (~> 1.0, >= 1.0.1)
         
     | 
| 
      
 49 
     | 
    
         
            +
                ruby-progressbar (1.7.5)
         
     | 
| 
       52 
50 
     | 
    
         
             
                simplecov (0.9.1)
         
     | 
| 
       53 
51 
     | 
    
         
             
                  docile (~> 1.1.0)
         
     | 
| 
       54 
52 
     | 
    
         
             
                  multi_json (~> 1.0)
         
     | 
| 
       55 
53 
     | 
    
         
             
                  simplecov-html (~> 0.8.0)
         
     | 
| 
       56 
54 
     | 
    
         
             
                simplecov-html (0.8.0)
         
     | 
| 
      
 55 
     | 
    
         
            +
                unicode-display_width (1.0.1)
         
     | 
| 
       57 
56 
     | 
    
         | 
| 
       58 
57 
     | 
    
         
             
            PLATFORMS
         
     | 
| 
       59 
58 
     | 
    
         
             
              ruby
         
     | 
    
        data/lib/claide.rb
    CHANGED
    
    
    
        data/lib/claide/command.rb
    CHANGED
    
    | 
         @@ -256,6 +256,28 @@ module CLAide 
     | 
|
| 
       256 
256 
     | 
    
         
             
                  end
         
     | 
| 
       257 
257 
     | 
    
         
             
                end
         
     | 
| 
       258 
258 
     | 
    
         | 
| 
      
 259 
     | 
    
         
            +
                # Adds a new option for the current command.
         
     | 
| 
      
 260 
     | 
    
         
            +
                #
         
     | 
| 
      
 261 
     | 
    
         
            +
                # This method can be used in conjunction with overriding `options`.
         
     | 
| 
      
 262 
     | 
    
         
            +
                #
         
     | 
| 
      
 263 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 264 
     | 
    
         
            +
                #
         
     | 
| 
      
 265 
     | 
    
         
            +
                # @example
         
     | 
| 
      
 266 
     | 
    
         
            +
                #
         
     | 
| 
      
 267 
     | 
    
         
            +
                #   option '--help', 'Print help banner '
         
     | 
| 
      
 268 
     | 
    
         
            +
                #
         
     | 
| 
      
 269 
     | 
    
         
            +
                def self.option(name, description)
         
     | 
| 
      
 270 
     | 
    
         
            +
                  mod = Module.new do
         
     | 
| 
      
 271 
     | 
    
         
            +
                    define_method(:options) do
         
     | 
| 
      
 272 
     | 
    
         
            +
                      [
         
     | 
| 
      
 273 
     | 
    
         
            +
                        [name, description],
         
     | 
| 
      
 274 
     | 
    
         
            +
                      ].concat(super())
         
     | 
| 
      
 275 
     | 
    
         
            +
                    end
         
     | 
| 
      
 276 
     | 
    
         
            +
                  end
         
     | 
| 
      
 277 
     | 
    
         
            +
                  extend(mod)
         
     | 
| 
      
 278 
     | 
    
         
            +
                end
         
     | 
| 
      
 279 
     | 
    
         
            +
                private_class_method :option
         
     | 
| 
      
 280 
     | 
    
         
            +
             
     | 
| 
       259 
281 
     | 
    
         
             
                # Handles root commands options if appropriate.
         
     | 
| 
       260 
282 
     | 
    
         
             
                #
         
     | 
| 
       261 
283 
     | 
    
         
             
                # @param  [ARGV] argv
         
     | 
| 
         @@ -45,7 +45,7 @@ module CLAide 
     | 
|
| 
       45 
45 
     | 
    
         
             
                      pretty_suggestion = self.class.prettify_suggestion(suggestion,
         
     | 
| 
       46 
46 
     | 
    
         
             
                                                                         @argument_type)
         
     | 
| 
       47 
47 
     | 
    
         
             
                      "Unknown #{argument_description}: `#{@argument}`\n" \
         
     | 
| 
       48 
     | 
    
         
            -
                        "Did you mean: #{pretty_suggestion}"
         
     | 
| 
      
 48 
     | 
    
         
            +
                        "Did you mean: #{pretty_suggestion}?"
         
     | 
| 
       49 
49 
     | 
    
         
             
                    else
         
     | 
| 
       50 
50 
     | 
    
         
             
                      "Unknown #{argument_description}: `#{@argument}`"
         
     | 
| 
       51 
51 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -64,7 +64,7 @@ module CLAide 
     | 
|
| 
       64 
64 
     | 
    
         
             
                  def self.prettify_suggestion(suggestion, argument_type)
         
     | 
| 
       65 
65 
     | 
    
         
             
                    case argument_type
         
     | 
| 
       66 
66 
     | 
    
         
             
                    when :option, :flag
         
     | 
| 
       67 
     | 
    
         
            -
                      suggestion =  
     | 
| 
      
 67 
     | 
    
         
            +
                      suggestion = suggestion.to_s
         
     | 
| 
       68 
68 
     | 
    
         
             
                      suggestion.ansi.blue
         
     | 
| 
       69 
69 
     | 
    
         
             
                    when :arg
         
     | 
| 
       70 
70 
     | 
    
         
             
                      suggestion.ansi.green
         
     | 
| 
         @@ -81,8 +81,6 @@ module CLAide 
     | 
|
| 
       81 
81 
     | 
    
         
             
                  #         The second string to compare.
         
     | 
| 
       82 
82 
     | 
    
         
             
                  #
         
     | 
| 
       83 
83 
     | 
    
         
             
                  # @return [Fixnum] The distance between the strings.
         
     | 
| 
       84 
     | 
    
         
            -
                  #
         
     | 
| 
       85 
     | 
    
         
            -
                  # rubocop:disable all
         
     | 
| 
       86 
84 
     | 
    
         
             
                  def self.levenshtein_distance(a, b)
         
     | 
| 
       87 
85 
     | 
    
         
             
                    a, b = a.downcase, b.downcase
         
     | 
| 
       88 
86 
     | 
    
         
             
                    costs = Array(0..b.length)
         
     | 
| 
         @@ -96,7 +94,6 @@ module CLAide 
     | 
|
| 
       96 
94 
     | 
    
         
             
                    end
         
     | 
| 
       97 
95 
     | 
    
         
             
                    costs[b.length]
         
     | 
| 
       98 
96 
     | 
    
         
             
                  end
         
     | 
| 
       99 
     | 
    
         
            -
                  # rubocop:enable all
         
     | 
| 
       100 
97 
     | 
    
         
             
                end
         
     | 
| 
       101 
98 
     | 
    
         
             
              end
         
     | 
| 
       102 
99 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: claide
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0.0.beta. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0.beta.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Eloy Duran
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2016-03- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2016-03-15 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       14 
14 
     | 
    
         
             
            description: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -19,12 +19,13 @@ executables: [] 
     | 
|
| 
       19 
19 
     | 
    
         
             
            extensions: []
         
     | 
| 
       20 
20 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       21 
21 
     | 
    
         
             
            files:
         
     | 
| 
       22 
     | 
    
         
            -
            -  
     | 
| 
       23 
     | 
    
         
            -
            -  
     | 
| 
       24 
     | 
    
         
            -
            -  
     | 
| 
       25 
     | 
    
         
            -
            -  
     | 
| 
       26 
     | 
    
         
            -
            -  
     | 
| 
       27 
     | 
    
         
            -
            -  
     | 
| 
      
 22 
     | 
    
         
            +
            - .gitignore
         
     | 
| 
      
 23 
     | 
    
         
            +
            - .kick
         
     | 
| 
      
 24 
     | 
    
         
            +
            - .rubocop.yml
         
     | 
| 
      
 25 
     | 
    
         
            +
            - .rubocop_cocoapods.yml
         
     | 
| 
      
 26 
     | 
    
         
            +
            - .rubocop_todo.yml
         
     | 
| 
      
 27 
     | 
    
         
            +
            - .travis.yml
         
     | 
| 
      
 28 
     | 
    
         
            +
            - .yardopts
         
     | 
| 
       28 
29 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       29 
30 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       30 
31 
     | 
    
         
             
            - Gemfile.lock
         
     | 
| 
         @@ -55,17 +56,17 @@ require_paths: 
     | 
|
| 
       55 
56 
     | 
    
         
             
            - lib
         
     | 
| 
       56 
57 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       57 
58 
     | 
    
         
             
              requirements:
         
     | 
| 
       58 
     | 
    
         
            -
              - -  
     | 
| 
      
 59 
     | 
    
         
            +
              - - '>='
         
     | 
| 
       59 
60 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       60 
61 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       61 
62 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       62 
63 
     | 
    
         
             
              requirements:
         
     | 
| 
       63 
     | 
    
         
            -
              - -  
     | 
| 
      
 64 
     | 
    
         
            +
              - - '>='
         
     | 
| 
       64 
65 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       65 
66 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       66 
67 
     | 
    
         
             
            requirements: []
         
     | 
| 
       67 
68 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       68 
     | 
    
         
            -
            rubygems_version: 2.6. 
     | 
| 
      
 69 
     | 
    
         
            +
            rubygems_version: 2.6.2
         
     | 
| 
       69 
70 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       70 
71 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       71 
72 
     | 
    
         
             
            summary: A small command-line interface framework.
         
     |