samovar 2.1.4 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -0
- data/lib/samovar/command.rb +18 -21
- data/lib/samovar/error.rb +4 -19
- data/lib/samovar/failure.rb +4 -19
- data/lib/samovar/flags.rb +73 -39
- data/lib/samovar/many.rb +4 -19
- data/lib/samovar/nested.rb +4 -19
- data/lib/samovar/one.rb +4 -19
- data/lib/samovar/option.rb +6 -20
- data/lib/samovar/options.rb +7 -20
- data/lib/samovar/output/columns.rb +4 -19
- data/lib/samovar/output/header.rb +4 -19
- data/lib/samovar/output/row.rb +4 -19
- data/lib/samovar/output/rows.rb +4 -19
- data/lib/samovar/output/usage_formatter.rb +4 -19
- data/lib/samovar/output.rb +4 -19
- data/lib/samovar/split.rb +4 -19
- data/lib/samovar/table.rb +7 -21
- data/lib/samovar/version.rb +6 -20
- data/lib/samovar.rb +4 -19
- data/license.md +22 -0
- data/{README.md → readme.md} +37 -53
- data.tar.gz.sig +0 -0
- metadata +46 -96
- metadata.gz.sig +0 -0
- data/.gitignore +0 -11
- data/.rspec +0 -4
- data/.travis.yml +0 -20
- data/Gemfile +0 -8
- data/Rakefile +0 -9
- data/samovar.gemspec +0 -28
- data/spec/samovar/coerce_spec.rb +0 -45
- data/spec/samovar/command_spec.rb +0 -91
- data/spec/samovar/many_spec.rb +0 -49
- data/spec/samovar/nested_spec.rb +0 -111
- data/spec/samovar/one_spec.rb +0 -49
- data/spec/samovar/options_spec.rb +0 -50
- data/spec/samovar/split_spec.rb +0 -49
- data/spec/samovar/table_spec.rb +0 -39
- data/spec/spec_helper.rb +0 -32
- data/teapot.png +0 -0
data/lib/samovar/split.rb
CHANGED
@@ -1,22 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2016-2023, by Samuel Williams.
|
20
5
|
|
21
6
|
module Samovar
|
22
7
|
class Split
|
data/lib/samovar/table.rb
CHANGED
@@ -1,22 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2016-2024, by Samuel Williams.
|
20
5
|
|
21
6
|
module Samovar
|
22
7
|
class Table
|
@@ -91,8 +76,9 @@ module Samovar
|
|
91
76
|
|
92
77
|
current = parent.send(key)
|
93
78
|
|
94
|
-
|
95
|
-
|
79
|
+
result = row.parse(input, parent, current)
|
80
|
+
if result != nil
|
81
|
+
parent.public_send("#{row.key}=", result)
|
96
82
|
end
|
97
83
|
end
|
98
84
|
end
|
data/lib/samovar/version.rb
CHANGED
@@ -1,23 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2016-2023, by Samuel Williams.
|
5
|
+
# Copyright, 2018, by Gabriel Mazetto.
|
20
6
|
|
21
7
|
module Samovar
|
22
|
-
VERSION = "2.
|
8
|
+
VERSION = "2.3.0"
|
23
9
|
end
|
data/lib/samovar.rb
CHANGED
@@ -1,22 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2016-2023, by Samuel Williams.
|
20
5
|
|
21
6
|
require_relative 'samovar/version'
|
22
7
|
require_relative 'samovar/command'
|
data/license.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2016-2024, by Samuel Williams.
|
4
|
+
Copyright, 2018, by Gabriel Mazetto.
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
14
|
+
copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
SOFTWARE.
|
data/{README.md → readme.md}
RENAMED
@@ -4,41 +4,39 @@
|
|
4
4
|
|
5
5
|
Samovar is a modern framework for building command-line tools and applications. It provides a declarative class-based DSL for building command-line parsers that include automatic documentation generation. It helps you keep your functionality clean and isolated where possible.
|
6
6
|
|
7
|
-
[![
|
8
|
-
[![Code Climate](https://codeclimate.com/github/ioquatix/samovar.svg)](https://codeclimate.com/github/ioquatix/samovar)
|
9
|
-
[![Coverage Status](https://coveralls.io/repos/ioquatix/samovar/badge.svg)](https://coveralls.io/r/ioquatix/samovar)
|
7
|
+
[![Development Status](https://github.com/ioquatix/samovar/workflows/Test/badge.svg)](https://github.com/ioquatix/samovar/actions?workflow=Test)
|
10
8
|
|
11
9
|
## Motivation
|
12
10
|
|
13
|
-
I've been using [
|
11
|
+
I've been using [Optimist](https://github.com/ManageIQ/optimist) and while it's not bad, it's hard to use for sub-commands in a way that generates nice documentation. It also has pretty limited support for complex command lines (e.g. nested commands, splits, matching tokens, etc). Samovar is a high level bridge between the command line and your code: it generates decent documentation, maps nicely between the command line syntax and your functions, and supports sub-commands using classes which are easy to compose.
|
14
12
|
|
15
13
|
One of the other issues I had with existing frameworks is testability. Most frameworks expect to have some pretty heavy logic directly in the binary executable, or at least don't structure your code in a way which makes testing easy. Samovar structures your command processing logic into classes which can be easily tested in isolation, which means that you can mock up and [spec your command-line executables easily](https://github.com/ioquatix/teapot/blob/master/spec/teapot/command_spec.rb).
|
16
14
|
|
17
15
|
## Examples
|
18
16
|
|
19
|
-
- [Teapot](https://github.com/ioquatix/teapot/blob/master/lib/teapot/command.rb) is a build system and uses multiple top-level commands.
|
20
|
-
- [Utopia](https://github.com/ioquatix/utopia/blob/master/lib/utopia/command.rb) is a web application platform and uses nested commands.
|
21
|
-
- [Synco](https://github.com/ioquatix/synco/blob/master/lib/synco/command.rb) is a backup tool and sends commands across the network and has lots of options with default values.
|
17
|
+
- [Teapot](https://github.com/ioquatix/teapot/blob/master/lib/teapot/command.rb) is a build system and uses multiple top-level commands.
|
18
|
+
- [Utopia](https://github.com/ioquatix/utopia/blob/master/lib/utopia/command.rb) is a web application platform and uses nested commands.
|
19
|
+
- [Synco](https://github.com/ioquatix/synco/blob/master/lib/synco/command.rb) is a backup tool and sends commands across the network and has lots of options with default values.
|
22
20
|
|
23
21
|
## Installation
|
24
22
|
|
25
23
|
Add this line to your application's Gemfile:
|
26
24
|
|
27
|
-
|
25
|
+
gem 'samovar'
|
28
26
|
|
29
27
|
And then execute:
|
30
28
|
|
31
|
-
|
29
|
+
$ bundle
|
32
30
|
|
33
31
|
Or install it yourself as:
|
34
32
|
|
35
|
-
|
33
|
+
$ gem install samovar
|
36
34
|
|
37
35
|
## Usage
|
38
36
|
|
39
37
|
Generally speaking, you should create `Command` classes that represent specific functions in your program. The top level command might look something like this:
|
40
38
|
|
41
|
-
```ruby
|
39
|
+
``` ruby
|
42
40
|
require 'samovar'
|
43
41
|
|
44
42
|
class List < Samovar::Command
|
@@ -72,7 +70,7 @@ Application.call # Defaults to ARGV.
|
|
72
70
|
|
73
71
|
### Basic Options
|
74
72
|
|
75
|
-
```ruby
|
73
|
+
``` ruby
|
76
74
|
require 'samovar'
|
77
75
|
|
78
76
|
class Application < Samovar::Command
|
@@ -101,7 +99,7 @@ application.options[:things] # ['x', 'y', 'z']
|
|
101
99
|
|
102
100
|
### Nested Commands
|
103
101
|
|
104
|
-
```ruby
|
102
|
+
``` ruby
|
105
103
|
require 'samovar'
|
106
104
|
|
107
105
|
class Create < Samovar::Command
|
@@ -128,7 +126,7 @@ Application.new(['create']).invoke
|
|
128
126
|
|
129
127
|
### ARGV Splits
|
130
128
|
|
131
|
-
```ruby
|
129
|
+
``` ruby
|
132
130
|
require 'samovar'
|
133
131
|
|
134
132
|
class Application < Samovar::Command
|
@@ -143,7 +141,7 @@ application.argv # ['apples', 'oranges', 'feijoas']
|
|
143
141
|
|
144
142
|
### Parsing Tokens
|
145
143
|
|
146
|
-
```ruby
|
144
|
+
``` ruby
|
147
145
|
require 'samovar'
|
148
146
|
|
149
147
|
class Application < Samovar::Command
|
@@ -162,13 +160,13 @@ application.cakes # ['chocolate cake', 'fruit cake']
|
|
162
160
|
|
163
161
|
Given a custom `Samovar::Command` subclass, you can instantiate it with options:
|
164
162
|
|
165
|
-
```ruby
|
163
|
+
``` ruby
|
166
164
|
application = Application['--root', path]
|
167
165
|
```
|
168
166
|
|
169
167
|
You can also duplicate an existing command instance with additions/changes:
|
170
168
|
|
171
|
-
```ruby
|
169
|
+
``` ruby
|
172
170
|
concurrent_application = application['--threads', 12]
|
173
171
|
```
|
174
172
|
|
@@ -176,64 +174,50 @@ These forms can be useful when invoking one command from another, or in unit tes
|
|
176
174
|
|
177
175
|
## Contributing
|
178
176
|
|
179
|
-
|
180
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
181
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
182
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
183
|
-
5. Create new Pull Request
|
177
|
+
We welcome contributions to this project.
|
184
178
|
|
185
|
-
|
179
|
+
1. Fork it.
|
180
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
181
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
182
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
183
|
+
5. Create new Pull Request.
|
186
184
|
|
187
|
-
|
185
|
+
### Developer Certificate of Origin
|
186
|
+
|
187
|
+
This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
|
188
|
+
|
189
|
+
### Contributor Covenant
|
190
|
+
|
191
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
192
|
+
|
193
|
+
## Future Work
|
194
|
+
|
195
|
+
### Multi-value Options
|
188
196
|
|
189
197
|
Right now, options can take a single argument, e.g. `--count <int>`. Ideally, we support a specific sub-parser defined by the option, e.g. `--count <int...>` or `--tag <section> <tags...>`. These would map to specific parsers using `Samovar::One` and `Samovar::Many` internally.
|
190
198
|
|
191
|
-
|
199
|
+
### Global Options
|
192
200
|
|
193
201
|
Options can only be parsed at the place they are explicitly mentioned, e.g. a command with sub-commands won't parse an option added to the end of the command:
|
194
202
|
|
195
|
-
```ruby
|
203
|
+
``` ruby
|
196
204
|
command list --help
|
197
205
|
```
|
198
206
|
|
199
207
|
One might reasonably expect this to parse but it isn't so easy to generalize this:
|
200
208
|
|
201
|
-
```ruby
|
209
|
+
``` ruby
|
202
210
|
command list -- --help
|
203
211
|
```
|
204
212
|
|
205
213
|
In this case, do we show help? Some effort is required to disambiguate this. Initially, it makes sense to keep things as simple as possible. But, it might make sense for some options to be declared in a global scope, which are extracted before parsing begins. I'm not sure if this is really a good idea. It might just be better to give good error output in this case (you specified an option but it was in the wrong place).
|
206
214
|
|
207
|
-
|
215
|
+
### Shell Auto-completion
|
208
216
|
|
209
217
|
Because of the structure of the Samovar command parser, it should be possible to generate a list of all possible tokens at each point. Therefore, semantically correct tab completion should be possible.
|
210
218
|
|
211
219
|
As a secondary to this, it would be nice if `Samovar::One` and `Samovar::Many` could take a list of potential tokens so that auto-completion could give meaningful suggestions, and possibly improved validation.
|
212
220
|
|
213
|
-
|
221
|
+
### Short/Long Help
|
214
222
|
|
215
223
|
It might be interesting to explore whether it's possible to have `-h` and `--help` do different things. This could include command specific help output, more detailed help output (similar to a man page), and other useful help related tasks.
|
216
|
-
|
217
|
-
## License
|
218
|
-
|
219
|
-
Released under the MIT license.
|
220
|
-
|
221
|
-
Copyright, 2016, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
222
|
-
|
223
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
224
|
-
of this software and associated documentation files (the "Software"), to deal
|
225
|
-
in the Software without restriction, including without limitation the rights
|
226
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
227
|
-
copies of the Software, and to permit persons to whom the Software is
|
228
|
-
furnished to do so, subject to the following conditions:
|
229
|
-
|
230
|
-
The above copyright notice and this permission notice shall be included in
|
231
|
-
all copies or substantial portions of the Software.
|
232
|
-
|
233
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
234
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
235
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
236
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
237
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
238
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
239
|
-
THE SOFTWARE.
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,17 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samovar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
|
8
|
+
- Gabriel Mazetto
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
15
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
16
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
17
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
18
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
19
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
20
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
21
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
22
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
23
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
24
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
25
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
26
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
27
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
28
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
29
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
30
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
31
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
32
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
33
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
34
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
35
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
36
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
37
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
38
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
|
+
-----END CERTIFICATE-----
|
41
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
42
|
dependencies:
|
13
43
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
44
|
+
name: console
|
15
45
|
requirement: !ruby/object:Gem::Requirement
|
16
46
|
requirements:
|
17
47
|
- - "~>"
|
@@ -25,7 +55,7 @@ dependencies:
|
|
25
55
|
- !ruby/object:Gem::Version
|
26
56
|
version: '1.0'
|
27
57
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
58
|
+
name: mapping
|
29
59
|
requirement: !ruby/object:Gem::Requirement
|
30
60
|
requirements:
|
31
61
|
- - "~>"
|
@@ -38,75 +68,12 @@ dependencies:
|
|
38
68
|
- - "~>"
|
39
69
|
- !ruby/object:Gem::Version
|
40
70
|
version: '1.0'
|
41
|
-
|
42
|
-
name: covered
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '10.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '10.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.6'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.6'
|
97
|
-
description:
|
71
|
+
description:
|
98
72
|
email:
|
99
|
-
- samuel.williams@oriontransfer.co.nz
|
100
73
|
executables: []
|
101
74
|
extensions: []
|
102
75
|
extra_rdoc_files: []
|
103
76
|
files:
|
104
|
-
- ".gitignore"
|
105
|
-
- ".rspec"
|
106
|
-
- ".travis.yml"
|
107
|
-
- Gemfile
|
108
|
-
- README.md
|
109
|
-
- Rakefile
|
110
77
|
- lib/samovar.rb
|
111
78
|
- lib/samovar/command.rb
|
112
79
|
- lib/samovar/error.rb
|
@@ -126,22 +93,14 @@ files:
|
|
126
93
|
- lib/samovar/split.rb
|
127
94
|
- lib/samovar/table.rb
|
128
95
|
- lib/samovar/version.rb
|
129
|
-
-
|
130
|
-
-
|
131
|
-
- spec/samovar/command_spec.rb
|
132
|
-
- spec/samovar/many_spec.rb
|
133
|
-
- spec/samovar/nested_spec.rb
|
134
|
-
- spec/samovar/one_spec.rb
|
135
|
-
- spec/samovar/options_spec.rb
|
136
|
-
- spec/samovar/split_spec.rb
|
137
|
-
- spec/samovar/table_spec.rb
|
138
|
-
- spec/spec_helper.rb
|
139
|
-
- teapot.png
|
96
|
+
- license.md
|
97
|
+
- readme.md
|
140
98
|
homepage: https://github.com/ioquatix/samovar
|
141
99
|
licenses:
|
142
100
|
- MIT
|
143
|
-
metadata:
|
144
|
-
|
101
|
+
metadata:
|
102
|
+
funding_uri: https://github.com/sponsors/ioquatix/
|
103
|
+
post_install_message:
|
145
104
|
rdoc_options: []
|
146
105
|
require_paths:
|
147
106
|
- lib
|
@@ -149,25 +108,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
108
|
requirements:
|
150
109
|
- - ">="
|
151
110
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
111
|
+
version: '3.0'
|
153
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
113
|
requirements:
|
155
114
|
- - ">="
|
156
115
|
- !ruby/object:Gem::Version
|
157
116
|
version: '0'
|
158
117
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
160
|
-
signing_key:
|
118
|
+
rubygems_version: 3.5.3
|
119
|
+
signing_key:
|
161
120
|
specification_version: 4
|
162
121
|
summary: Samovar is a flexible option parser excellent support for sub-commands and
|
163
122
|
help documentation.
|
164
|
-
test_files:
|
165
|
-
- spec/samovar/coerce_spec.rb
|
166
|
-
- spec/samovar/command_spec.rb
|
167
|
-
- spec/samovar/many_spec.rb
|
168
|
-
- spec/samovar/nested_spec.rb
|
169
|
-
- spec/samovar/one_spec.rb
|
170
|
-
- spec/samovar/options_spec.rb
|
171
|
-
- spec/samovar/split_spec.rb
|
172
|
-
- spec/samovar/table_spec.rb
|
173
|
-
- spec/spec_helper.rb
|
123
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
dist: xenial
|
3
|
-
cache: bundler
|
4
|
-
|
5
|
-
matrix:
|
6
|
-
include:
|
7
|
-
- rvm: 2.3
|
8
|
-
- rvm: 2.4
|
9
|
-
- rvm: 2.5
|
10
|
-
- rvm: 2.6
|
11
|
-
- rvm: 2.6
|
12
|
-
env: COVERAGE=BriefSummary,Coveralls
|
13
|
-
- rvm: truffleruby
|
14
|
-
- rvm: jruby-head
|
15
|
-
env: JRUBY_OPTS="--debug -X+O"
|
16
|
-
- rvm: ruby-head
|
17
|
-
allow_failures:
|
18
|
-
- rvm: ruby-head
|
19
|
-
- rvm: truffleruby
|
20
|
-
- rvm: jruby-head
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/samovar.gemspec
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'samovar/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "samovar"
|
8
|
-
spec.version = Samovar::VERSION
|
9
|
-
spec.authors = ["Samuel Williams"]
|
10
|
-
spec.email = ["samuel.williams@oriontransfer.co.nz"]
|
11
|
-
|
12
|
-
spec.summary = %q{Samovar is a flexible option parser excellent support for sub-commands and help documentation.}
|
13
|
-
spec.homepage = "https://github.com/ioquatix/samovar"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_dependency "mapping", "~> 1.0"
|
22
|
-
spec.add_dependency "console", "~> 1.0"
|
23
|
-
|
24
|
-
spec.add_development_dependency "covered"
|
25
|
-
spec.add_development_dependency "bundler"
|
26
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
-
spec.add_development_dependency "rspec", "~> 3.6"
|
28
|
-
end
|