argy 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/build.yml +22 -0
- data/.github/workflows/publish.yml +38 -0
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/README.md +9 -1
- data/Rakefile +5 -2
- data/argy.gemspec +1 -1
- data/lib/argy/parser.rb +4 -4
- data/lib/argy/version.rb +1 -1
- metadata +7 -8
- data/.travis.yml +0 -7
- data/Gemfile.lock +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ae166d0ed1cc579a736680296758078e8c8899ca0010fd716ef5860c45d803be
|
4
|
+
data.tar.gz: 040decb262a0eb304410266601dd07d4b18a8542a40028be12da0248d5d49ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8665a0d1fd4bdb979082195515750a4cf7ab08de330d1830065ffb0b16f0e865db75abbab91af43aff2a4dc238b2bf090619146356aa80073fac366d639be46c
|
7
|
+
data.tar.gz: 7eb9b2093b69fc18b979e862f9c0fd893a88fc4dde8bbd9694e67c391da3850d0895de302b829ca8d4026efda0f6c70cb18cdd7e2544bf171719a8742b6d1542
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Build
|
2
|
+
on: [push]
|
3
|
+
jobs:
|
4
|
+
build:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
steps:
|
7
|
+
- name: Checkout
|
8
|
+
uses: actions/checkout@v2
|
9
|
+
|
10
|
+
- name: Setup Ruby
|
11
|
+
uses: actions/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.7.x
|
14
|
+
|
15
|
+
- name: Install bundler
|
16
|
+
run: gem install bundler
|
17
|
+
|
18
|
+
- name: Install dependencies
|
19
|
+
run: bundle install
|
20
|
+
|
21
|
+
- name: Test
|
22
|
+
run: bundle exec rspec
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: Publish
|
2
|
+
on:
|
3
|
+
release:
|
4
|
+
types: [published]
|
5
|
+
jobs:
|
6
|
+
publish:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- name: Checkout
|
10
|
+
uses: actions/checkout@v2
|
11
|
+
|
12
|
+
- name: Setup Ruby
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.7.x
|
16
|
+
|
17
|
+
- name: Install bundler
|
18
|
+
run: gem install bundler
|
19
|
+
|
20
|
+
- name: Install dependencies
|
21
|
+
run: bundle install
|
22
|
+
|
23
|
+
- name: Test
|
24
|
+
run: bundle exec rspec
|
25
|
+
|
26
|
+
- name: Set version
|
27
|
+
run: perl -pi -e "s/0\.0\.0/${GITHUB_REF:11}/" lib/argy/version.rb
|
28
|
+
|
29
|
+
- name: Publish
|
30
|
+
run: |
|
31
|
+
mkdir -p $HOME/.gem
|
32
|
+
touch $HOME/.gem/credentials
|
33
|
+
chmod 0600 $HOME/.gem/credentials
|
34
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_TOKEN}\n" > $HOME/.gem/credentials
|
35
|
+
gem build *.gemspec
|
36
|
+
gem push *.gem
|
37
|
+
env:
|
38
|
+
RUBYGEMS_TOKEN: ${{ secrets.RUBYGEMS_TOKEN }}
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
|
1
|
+
<h1 align="center">Argy</h1>
|
2
|
+
|
3
|
+
<div align="center">
|
4
|
+
|
5
|
+
![Build](https://github.com/rzane/argy/workflows/Build/badge.svg)
|
6
|
+
![Version](https://img.shields.io/gem/v/argy)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/github/rzane/argy/badge.svg?branch=master)](https://coveralls.io/github/rzane/argy?branch=master)
|
8
|
+
|
9
|
+
</div>
|
2
10
|
|
3
11
|
Yet another command-line option parser.
|
4
12
|
|
data/Rakefile
CHANGED
data/argy.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 2.0"
|
27
|
-
spec.add_development_dependency "rake", "~>
|
27
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
end
|
data/lib/argy/parser.rb
CHANGED
@@ -75,8 +75,8 @@ module Argy
|
|
75
75
|
# Argy.new do |o|
|
76
76
|
# o.argument :input
|
77
77
|
# end
|
78
|
-
def argument(*args)
|
79
|
-
@arguments << Argument.new(*args)
|
78
|
+
def argument(*args, **opts)
|
79
|
+
@arguments << Argument.new(*args, **opts)
|
80
80
|
end
|
81
81
|
|
82
82
|
# Adds an option
|
@@ -85,8 +85,8 @@ module Argy
|
|
85
85
|
# Argy.new do |o|
|
86
86
|
# o.option :verbose, type: :boolean
|
87
87
|
# end
|
88
|
-
def option(*args)
|
89
|
-
@options << Option.new(*args)
|
88
|
+
def option(*args, **opts)
|
89
|
+
@options << Option.new(*args, **opts)
|
90
90
|
end
|
91
91
|
|
92
92
|
# Adds a flag
|
data/lib/argy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: argy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ray Zane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,13 +59,13 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".github/workflows/build.yml"
|
63
|
+
- ".github/workflows/publish.yml"
|
62
64
|
- ".gitignore"
|
63
65
|
- ".rspec"
|
64
|
-
- ".travis.yml"
|
65
66
|
- ".yardopts"
|
66
67
|
- CODE_OF_CONDUCT.md
|
67
68
|
- Gemfile
|
68
|
-
- Gemfile.lock
|
69
69
|
- LICENSE.txt
|
70
70
|
- README.md
|
71
71
|
- Rakefile
|
@@ -102,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
|
106
|
-
rubygems_version: 2.6.14
|
105
|
+
rubygems_version: 3.1.2
|
107
106
|
signing_key:
|
108
107
|
specification_version: 4
|
109
108
|
summary: Yet another command-line option parser.
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
argy (0.2.2)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
coderay (1.1.2)
|
10
|
-
diff-lcs (1.3)
|
11
|
-
method_source (0.9.2)
|
12
|
-
pry (0.12.2)
|
13
|
-
coderay (~> 1.1.0)
|
14
|
-
method_source (~> 0.9.0)
|
15
|
-
rake (10.5.0)
|
16
|
-
rspec (3.9.0)
|
17
|
-
rspec-core (~> 3.9.0)
|
18
|
-
rspec-expectations (~> 3.9.0)
|
19
|
-
rspec-mocks (~> 3.9.0)
|
20
|
-
rspec-core (3.9.0)
|
21
|
-
rspec-support (~> 3.9.0)
|
22
|
-
rspec-expectations (3.9.0)
|
23
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.9.0)
|
25
|
-
rspec-mocks (3.9.0)
|
26
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
-
rspec-support (~> 3.9.0)
|
28
|
-
rspec-support (3.9.0)
|
29
|
-
|
30
|
-
PLATFORMS
|
31
|
-
ruby
|
32
|
-
|
33
|
-
DEPENDENCIES
|
34
|
-
argy!
|
35
|
-
bundler (~> 2.0)
|
36
|
-
pry
|
37
|
-
rake (~> 10.0)
|
38
|
-
rspec (~> 3.0)
|
39
|
-
|
40
|
-
BUNDLED WITH
|
41
|
-
2.0.2
|