trollop 2.1.3 → 2.9.10
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 +5 -5
- data/.travis.yml +1 -1
- data/History.txt +7 -0
- data/README.md +1 -58
- data/lib/trollop.rb +3 -1
- data/trollop.gemspec +14 -10
- metadata +14 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 314b910a9f43d13913211b3e39f60b89dc5f50868d2525281f59733fc21a198f
|
|
4
|
+
data.tar.gz: 8071583bb1cd186e2d9683913112373e1fae53224e6da185836caad6a4c2fe35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b36e96caf58656addb2c3edd3c4e973833ff14b53ff28109d69387a7f5f83f52ef35e8afee29ffd74e1898bcfebf056b7abc3fd69ef3905e954d85b37ef647e3
|
|
7
|
+
data.tar.gz: 2bd01ba3d0ec85eb2e607a4a40898243b43d63d22980d594e5f0a7816fa89a1a54310a07c5b6152db8311396961267c050c3565032279d0c2ffb8dc062ae78e2
|
data/.travis.yml
CHANGED
data/History.txt
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
== [2.9.10] / 2019-11-25
|
|
2
|
+
* Improved deprecation messge to include this gem's name (thanks @henrik)
|
|
3
|
+
|
|
4
|
+
== [2.9.9] / 2018-08-24
|
|
5
|
+
|
|
6
|
+
* [DEPRECATION] This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
|
|
7
|
+
|
|
1
8
|
== [2.1.3] / 2018-07-05
|
|
2
9
|
|
|
3
10
|
* Refactor each option type into subclasses of Option. Define a registry for the registration of each option. This makes the code more modular and facilitates extension by allowing additional Option subclasses. (thanks @clxy)
|
data/README.md
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
# trollop
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](http://badge.fury.io/rb/trollop)
|
|
6
|
-
[](https://travis-ci.org/ManageIQ/trollop)
|
|
7
|
-
[](https://codeclimate.com/github/ManageIQ/trollop)
|
|
8
|
-
[](https://coveralls.io/r/ManageIQ/trollop)
|
|
9
|
-
[](https://gemnasium.com/ManageIQ/trollop)
|
|
10
|
-
|
|
11
|
-
## Documentation
|
|
12
|
-
|
|
13
|
-
- Quickstart: See `Trollop.options` and then `Trollop::Parser#opt`.
|
|
14
|
-
- Examples: http://manageiq.github.io/trollop/.
|
|
15
|
-
- Wiki: http://github.com/ManageIQ/trollop/wiki
|
|
16
|
-
|
|
17
|
-
## Description
|
|
18
|
-
|
|
19
|
-
Trollop is a commandline option parser for Ruby that just gets out of your way.
|
|
20
|
-
One line of code per option is all you need to write. For that, you get a nice
|
|
21
|
-
automatically-generated help page, robust option parsing, and sensible defaults
|
|
22
|
-
for everything you don't specify.
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
- Dirt-simple usage.
|
|
27
|
-
- Single file. Throw it in lib/ if you don't want to make it a Rubygem dependency.
|
|
28
|
-
- Sensible defaults. No tweaking necessary, much tweaking possible.
|
|
29
|
-
- Support for long options, short options, subcommands, and automatic type validation and
|
|
30
|
-
conversion.
|
|
31
|
-
- Automatic help message generation, wrapped to current screen width.
|
|
32
|
-
|
|
33
|
-
## Requirements
|
|
34
|
-
|
|
35
|
-
* A burning desire to write less code.
|
|
36
|
-
|
|
37
|
-
## Install
|
|
38
|
-
|
|
39
|
-
* gem install trollop
|
|
40
|
-
|
|
41
|
-
## Synopsis
|
|
42
|
-
|
|
43
|
-
```ruby
|
|
44
|
-
require 'trollop'
|
|
45
|
-
opts = Trollop::options do
|
|
46
|
-
opt :monkey, "Use monkey mode" # flag --monkey, default false
|
|
47
|
-
opt :name, "Monkey name", :type => :string # string --name <s>, default nil
|
|
48
|
-
opt :num_limbs, "Number of limbs", :default => 4 # integer --num-limbs <i>, default to 4
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
p opts # a hash: { :monkey=>false, :name=>nil, :num_limbs=>4, :help=>false }
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## License
|
|
55
|
-
|
|
56
|
-
Copyright © 2008-2014 [William Morgan](http://masanjin.net/).
|
|
57
|
-
|
|
58
|
-
Copyright © 2014 Red Hat, Inc.
|
|
59
|
-
|
|
60
|
-
Trollop is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
|
3
|
+
**DEPRECATION** This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
|
data/lib/trollop.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
warn "[DEPRECATION] The trollop gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible."
|
|
2
|
+
|
|
1
3
|
# lib/trollop.rb -- trollop command-line processing library
|
|
2
4
|
# Copyright (c) 2008-2014 William Morgan.
|
|
3
5
|
# Copyright (c) 2014 Red Hat, Inc.
|
|
@@ -8,7 +10,7 @@ require 'date'
|
|
|
8
10
|
module Trollop
|
|
9
11
|
# note: this is duplicated in gemspec
|
|
10
12
|
# please change over there too
|
|
11
|
-
VERSION = "2.
|
|
13
|
+
VERSION = "2.9.10"
|
|
12
14
|
|
|
13
15
|
## Thrown by Parser in the event of a commandline error. Not needed if
|
|
14
16
|
## you're using the Trollop::options entry.
|
data/trollop.gemspec
CHANGED
|
@@ -4,25 +4,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "trollop"
|
|
7
|
-
spec.version = "2.
|
|
7
|
+
spec.version = "2.9.10"
|
|
8
8
|
spec.authors = ["William Morgan", "Keenan Brock"]
|
|
9
9
|
spec.email = "keenan@thebrocks.net"
|
|
10
10
|
spec.summary = "Trollop is a commandline option parser for Ruby that just gets out of your way."
|
|
11
|
-
spec.description = "Trollop is a commandline option parser for Ruby that just
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
specify."
|
|
16
|
-
spec.homepage = "http://manageiq.github.io/trollop/"
|
|
11
|
+
spec.description = "Trollop is a commandline option parser for Ruby that just gets out of your way.
|
|
12
|
+
|
|
13
|
+
**DEPRECATION** This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible."
|
|
14
|
+
spec.homepage = "http://manageiq.github.io/optimist/"
|
|
17
15
|
spec.license = "MIT"
|
|
18
16
|
|
|
19
17
|
spec.files = `git ls-files -z`.split("\x0")
|
|
20
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
21
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
22
20
|
spec.metadata = {
|
|
23
|
-
"changelog_uri" => "https://github.com/ManageIQ/
|
|
24
|
-
"source_code_uri" => "https://github.com/ManageIQ/
|
|
25
|
-
"bug_tracker_uri" => "https://github.com/ManageIQ/
|
|
21
|
+
"changelog_uri" => "https://github.com/ManageIQ/optimist/blob/master/History.txt",
|
|
22
|
+
"source_code_uri" => "https://github.com/ManageIQ/optimist/",
|
|
23
|
+
"bug_tracker_uri" => "https://github.com/ManageIQ/optimist/issues",
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
spec.require_paths = ["lib"]
|
|
@@ -30,4 +28,10 @@ specify."
|
|
|
30
28
|
spec.add_development_dependency "minitest", "~> 5.4.3"
|
|
31
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
32
30
|
spec.add_development_dependency "chronic"
|
|
31
|
+
|
|
32
|
+
spec.post_install_message = <<-MESSAGE
|
|
33
|
+
! The 'trollop' gem has been deprecated and has been replaced by 'optimist'.
|
|
34
|
+
! See: https://rubygems.org/gems/optimist
|
|
35
|
+
! And: https://github.com/ManageIQ/optimist
|
|
36
|
+
MESSAGE
|
|
33
37
|
end
|
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.
|
|
4
|
+
version: 2.9.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Morgan
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: minitest
|
|
@@ -54,11 +54,9 @@ dependencies:
|
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
55
|
version: '0'
|
|
56
56
|
description: |-
|
|
57
|
-
Trollop is a commandline option parser for Ruby that just
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
parsing, command subcompletion, and sensible defaults for everything you don't
|
|
61
|
-
specify.
|
|
57
|
+
Trollop is a commandline option parser for Ruby that just gets out of your way.
|
|
58
|
+
|
|
59
|
+
**DEPRECATION** This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
|
|
62
60
|
email: keenan@thebrocks.net
|
|
63
61
|
executables: []
|
|
64
62
|
extensions: []
|
|
@@ -85,14 +83,17 @@ files:
|
|
|
85
83
|
- test/trollop/version_needed_test.rb
|
|
86
84
|
- test/trollop_test.rb
|
|
87
85
|
- trollop.gemspec
|
|
88
|
-
homepage: http://manageiq.github.io/
|
|
86
|
+
homepage: http://manageiq.github.io/optimist/
|
|
89
87
|
licenses:
|
|
90
88
|
- MIT
|
|
91
89
|
metadata:
|
|
92
|
-
changelog_uri: https://github.com/ManageIQ/
|
|
93
|
-
source_code_uri: https://github.com/ManageIQ/
|
|
94
|
-
bug_tracker_uri: https://github.com/ManageIQ/
|
|
95
|
-
post_install_message:
|
|
90
|
+
changelog_uri: https://github.com/ManageIQ/optimist/blob/master/History.txt
|
|
91
|
+
source_code_uri: https://github.com/ManageIQ/optimist/
|
|
92
|
+
bug_tracker_uri: https://github.com/ManageIQ/optimist/issues
|
|
93
|
+
post_install_message: |
|
|
94
|
+
! The 'trollop' gem has been deprecated and has been replaced by 'optimist'.
|
|
95
|
+
! See: https://rubygems.org/gems/optimist
|
|
96
|
+
! And: https://github.com/ManageIQ/optimist
|
|
96
97
|
rdoc_options: []
|
|
97
98
|
require_paths:
|
|
98
99
|
- lib
|
|
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
109
|
version: '0'
|
|
109
110
|
requirements: []
|
|
110
111
|
rubyforge_project:
|
|
111
|
-
rubygems_version: 2.6.
|
|
112
|
+
rubygems_version: 2.7.6.2
|
|
112
113
|
signing_key:
|
|
113
114
|
specification_version: 4
|
|
114
115
|
summary: Trollop is a commandline option parser for Ruby that just gets out of your
|