trollop 2.1.0 → 2.1.1
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/.travis.yml +3 -0
 - data/History.txt +5 -1
 - data/lib/trollop.rb +5 -10
 - data/trollop.gemspec +0 -1
 - metadata +2 -16
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 7652739adf1d95b0325d061a1f6c3601ea9c2ad2
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d85880211b235bcbc661981dba6b1f3cd1843cbb
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ffc0188f1cf4e0c6295d6bd24f280ae9a09b74860e9b99023217613a156c52634a192a2522bdade449439832cc2d3d98613899b45da61e633a0fd056970cf7ea
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e16e4a250eb2e29c3d905945cd3b2121ee71aaa3289b01ad5f3971512e729095ea745740ce29a59ef390ca0473b99d9f80ddd363b95c98aa1efcbd641a0475a1
         
     | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/History.txt
    CHANGED
    
    | 
         @@ -1,4 +1,8 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            == 2.1. 
     | 
| 
      
 1 
     | 
    
         
            +
            == 2.1.1 / 2015-01-03
         
     | 
| 
      
 2 
     | 
    
         
            +
            * Remove curses as a hard dependency. It is optional. This can leverage the gem if it is present.
         
     | 
| 
      
 3 
     | 
    
         
            +
            * Fix ruby -w warnings
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            == 2.1.0 / 2015-01-02
         
     | 
| 
       2 
6 
     | 
    
         
             
            * Integer parser now supports underscore separator.
         
     | 
| 
       3 
7 
     | 
    
         
             
            * Add Parser#usage and Parser#synopsis commands for creating a standard banner
         
     | 
| 
       4 
8 
     | 
    
         
             
              message. Using Parser#banner directly will override both of those.
         
     | 
    
        data/lib/trollop.rb
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            require 'date'
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            module Trollop
         
     | 
| 
       9 
     | 
    
         
            -
            VERSION = "2.1. 
     | 
| 
      
 9 
     | 
    
         
            +
            VERSION = "2.1.1"
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            ## Thrown by Parser in the event of a commandline error. Not needed if
         
     | 
| 
       12 
12 
     | 
    
         
             
            ## you're using the Trollop::options entry.
         
     | 
| 
         @@ -235,21 +235,16 @@ class Parser 
     | 
|
| 
       235 
235 
     | 
    
         
             
              ## Sets the version string. If set, the user can request the version
         
     | 
| 
       236 
236 
     | 
    
         
             
              ## on the commandline. Should probably be of the form "<program name>
         
     | 
| 
       237 
237 
     | 
    
         
             
              ## <version number>".
         
     | 
| 
       238 
     | 
    
         
            -
              def version  
     | 
| 
      
 238 
     | 
    
         
            +
              def version(s = nil); @version = s if s; @version end
         
     | 
| 
       239 
239 
     | 
    
         | 
| 
       240 
240 
     | 
    
         
             
              ## Sets the usage string. If set the message will be printed as the
         
     | 
| 
       241 
241 
     | 
    
         
             
              ## first line in the help (educate) output and ending in two new
         
     | 
| 
       242 
242 
     | 
    
         
             
              ## lines.
         
     | 
| 
       243 
     | 
    
         
            -
              def usage  
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
              ## Sets the usage string. If set the message will be printed as the
         
     | 
| 
       246 
     | 
    
         
            -
              ## first line in the help (educate) output and ending in two new
         
     | 
| 
       247 
     | 
    
         
            -
              ## lines.
         
     | 
| 
       248 
     | 
    
         
            -
              def usage s=nil; @usage = s if s; @usage end
         
     | 
| 
      
 243 
     | 
    
         
            +
              def usage(s = nil) ; @usage = s if s; @usage end
         
     | 
| 
       249 
244 
     | 
    
         | 
| 
       250 
245 
     | 
    
         
             
              ## Adds a synopsis (command summary description) right below the
         
     | 
| 
       251 
246 
     | 
    
         
             
              ## usage line, or as the first line if usage isn't specified.
         
     | 
| 
       252 
     | 
    
         
            -
              def synopsis  
     | 
| 
      
 247 
     | 
    
         
            +
              def synopsis(s = nil) ; @synopsis = s if s; @synopsis end
         
     | 
| 
       253 
248 
     | 
    
         | 
| 
       254 
249 
     | 
    
         
             
              ## Adds text to the help display. Can be interspersed with calls to
         
     | 
| 
       255 
250 
     | 
    
         
             
              ## #opt to build a multi-section help page.
         
     | 
| 
         @@ -477,7 +472,7 @@ class Parser 
     | 
|
| 
       477 
472 
     | 
    
         
             
                rightcol_start = leftcol_width + 6 # spaces
         
     | 
| 
       478 
473 
     | 
    
         | 
| 
       479 
474 
     | 
    
         
             
                unless @order.size > 0 && @order.first.first == :text
         
     | 
| 
       480 
     | 
    
         
            -
                  command_name = File.basename($0).gsub 
     | 
| 
      
 475 
     | 
    
         
            +
                  command_name = File.basename($0).gsub(/\.[^.]+$/, '')
         
     | 
| 
       481 
476 
     | 
    
         
             
                  stream.puts "Usage: #{command_name} #@usage\n" if @usage
         
     | 
| 
       482 
477 
     | 
    
         
             
                  stream.puts "#@synopsis\n" if @synopsis
         
     | 
| 
       483 
478 
     | 
    
         
             
                  stream.puts if @usage or @synopsis
         
     | 
    
        data/trollop.gemspec
    CHANGED
    
    | 
         @@ -21,7 +21,6 @@ specify." 
     | 
|
| 
       21 
21 
     | 
    
         
             
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         
     | 
| 
       22 
22 
     | 
    
         
             
              spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
     | 
    
         
            -
              spec.add_runtime_dependency 'curses'
         
     | 
| 
       25 
24 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       26 
25 
     | 
    
         | 
| 
       27 
26 
     | 
    
         
             
              spec.add_development_dependency "minitest", "~> 4.7.3"
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: trollop
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - William Morgan
         
     | 
| 
         @@ -9,22 +9,8 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2015-01- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2015-01-05 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
     | 
    
         
            -
              name: curses
         
     | 
| 
       16 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       17 
     | 
    
         
            -
                requirements:
         
     | 
| 
       18 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       19 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       20 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       21 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       22 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       23 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       24 
     | 
    
         
            -
                requirements:
         
     | 
| 
       25 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       26 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       27 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       28 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       29 
15 
     | 
    
         
             
              name: minitest
         
     | 
| 
       30 
16 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |