trollop 2.1.3 → 2.9.9
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 +1 -1
- data/History.txt +4 -0
- data/README.md +1 -58
- data/lib/trollop.rb +3 -1
- data/trollop.gemspec +14 -10
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a587709d3c4100adc33b5edccb8a8f87cca5fdc
|
4
|
+
data.tar.gz: 4f0aec9b59949e64dff6d65584fe2c8b0324deba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 902490f2c0bd55672b5e3b5c37586b8ffc07377cf20047369f162ae6045ce272a2274edbaff9047d262853cdd2c859b73042a835ce90f1fbf486db9404c3e255
|
7
|
+
data.tar.gz: 1bebf3eae50c0ccfdbb4715469c2249fbd19f2d078511bffbd3449ae488da7afbdd41b9e097ac95783b9e0d49c1a27cd200a56e61e107109c716e9d6ef9faba7
|
data/.travis.yml
CHANGED
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== [2.9.9] / 2018-08-49
|
2
|
+
|
3
|
+
* [DEPRECATION] This gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
|
4
|
+
|
1
5
|
== [2.1.3] / 2018-07-05
|
2
6
|
|
3
7
|
* 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] This 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.9"
|
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.9"
|
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.9
|
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: 2018-
|
12
|
+
date: 2018-08-24 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
|