thor-hollaback 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/main.yml +34 -0
- data/.gitignore +0 -1
- data/.rubocop.yml +26 -2
- data/CHANGELOG.md +9 -2
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +55 -0
- data/LICENSE +1 -1
- data/README.md +6 -6
- data/lib/thor/hollaback/version.rb +1 -1
- data/lib/thor/hollaback.rb +7 -1
- data/thor-hollaback.gemspec +17 -9
- metadata +22 -17
- data/.mergify.yml +0 -10
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 338c44ce042cbb8701014c7d39ccce6c77850763218fbf7562a416615edcfd3b
|
4
|
+
data.tar.gz: 295e2804635360642b1338995126a6dc0d8c39560968cc7c51a38e6fb6b49c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 170b29be0dacbbdadd050c0e075816440867fa9ff4c341e942b5be330ca4d46a69aad29bb1e25e067559b78790e0533569f2b934fb9eb1d066148011524721d9
|
7
|
+
data.tar.gz: 8fee574ea16ca8427ea76c43f38268aa9fef44eacb9f2e27f1ad723ba018b95e694f28975ec33be645a6d5085af1cd5729dcc904daa59b7ffd51902b4428cfd3
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Main
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
- pull_request_target
|
5
|
+
jobs:
|
6
|
+
ci:
|
7
|
+
name: CI
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
env:
|
10
|
+
CI: true
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@master
|
13
|
+
- uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 3.0
|
16
|
+
bundler-cache: true
|
17
|
+
- name: Lint and test
|
18
|
+
run: |
|
19
|
+
bundle exec rubocop --parallel
|
20
|
+
bundle exec rake test
|
21
|
+
automerge:
|
22
|
+
name: AutoMerge
|
23
|
+
needs: ci
|
24
|
+
runs-on: ubuntu-latest
|
25
|
+
if: github.event_name == 'pull_request_target' && (github.actor == github.repository_owner || github.actor == 'dependabot[bot]')
|
26
|
+
steps:
|
27
|
+
- uses: actions/github-script@v3
|
28
|
+
with:
|
29
|
+
script: |
|
30
|
+
github.pulls.merge({
|
31
|
+
owner: context.payload.repository.owner.login,
|
32
|
+
repo: context.payload.repository.name,
|
33
|
+
pull_number: context.payload.pull_request.number
|
34
|
+
})
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
AllCops:
|
2
2
|
DisplayCopNames: true
|
3
3
|
DisplayStyleGuide: true
|
4
|
-
TargetRubyVersion: 2.
|
4
|
+
TargetRubyVersion: 2.7
|
5
5
|
Exclude:
|
6
|
-
- 'vendor/**/*'
|
6
|
+
- '{tmp,vendor,yard}/**/*'
|
7
|
+
|
8
|
+
Gemspec/RequiredRubyVersion:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Layout/LineLength:
|
12
|
+
Max: 80
|
13
|
+
|
14
|
+
Lint/AmbiguousBlockAssociation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Naming/RescuedExceptionsVariableName:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Style/Documentation:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Style/FormatString:
|
24
|
+
EnforcedStyle: percent
|
25
|
+
|
26
|
+
Style/FormatStringToken:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/PerlBackrefs:
|
30
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -6,11 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.2.1] - 2021-11-17
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Require MFA for releasing.
|
14
|
+
|
9
15
|
## [0.2.0] - 2019-12-18
|
10
16
|
|
11
17
|
### Changed
|
12
18
|
|
13
19
|
- Relaxed the version requirement on `thor` to allow the newer versions.
|
14
20
|
|
15
|
-
[unreleased]: https://github.com/
|
16
|
-
[0.2.
|
21
|
+
[unreleased]: https://github.com/kddnewton/thor-hollaback/compare/v0.2.1...HEAD
|
22
|
+
[0.2.1]: https://github.com/kddnewton/thor-hollaback/compare/v0.2.0...v0.2.1
|
23
|
+
[0.2.0]: https://github.com/kddnewton/thor-hollaback/compare/7c2c70...v0.2.0
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at kddnewton@gmail.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
thor-hollaback (0.2.1)
|
5
|
+
hollaback (~> 0.1)
|
6
|
+
thor (>= 0.19.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.2)
|
12
|
+
docile (1.4.0)
|
13
|
+
hollaback (0.1.1)
|
14
|
+
minitest (5.14.4)
|
15
|
+
parallel (1.21.0)
|
16
|
+
parser (3.0.2.0)
|
17
|
+
ast (~> 2.4.1)
|
18
|
+
rainbow (3.0.0)
|
19
|
+
rake (13.0.6)
|
20
|
+
regexp_parser (2.1.1)
|
21
|
+
rexml (3.2.5)
|
22
|
+
rubocop (1.23.0)
|
23
|
+
parallel (~> 1.10)
|
24
|
+
parser (>= 3.0.0.0)
|
25
|
+
rainbow (>= 2.2.2, < 4.0)
|
26
|
+
regexp_parser (>= 1.8, < 3.0)
|
27
|
+
rexml
|
28
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
29
|
+
ruby-progressbar (~> 1.7)
|
30
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
31
|
+
rubocop-ast (1.13.0)
|
32
|
+
parser (>= 3.0.1.1)
|
33
|
+
ruby-progressbar (1.11.0)
|
34
|
+
simplecov (0.21.2)
|
35
|
+
docile (~> 1.1)
|
36
|
+
simplecov-html (~> 0.11)
|
37
|
+
simplecov_json_formatter (~> 0.1)
|
38
|
+
simplecov-html (0.12.3)
|
39
|
+
simplecov_json_formatter (0.1.3)
|
40
|
+
thor (1.1.0)
|
41
|
+
unicode-display_width (2.1.0)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
bundler (~> 2.0)
|
48
|
+
minitest (~> 5.11)
|
49
|
+
rake (~> 13.0)
|
50
|
+
rubocop (~> 1.12)
|
51
|
+
simplecov (~> 0.15)
|
52
|
+
thor-hollaback!
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
2.2.15
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Thor::Hollaback
|
2
2
|
|
3
|
-
[![Build Status](https://
|
4
|
-
[![Gem Version](https://img.shields.io/gem/v/thor-hollaback.svg
|
3
|
+
[![Build Status](https://github.com/kddnewton/thor-hollaback/workflows/Main/badge.svg)](https://github.com/kddnewton/thor-hollaback/actions)
|
4
|
+
[![Gem Version](https://img.shields.io/gem/v/thor-hollaback.svg)](https://rubygems.org/gems/thor-hollaback)
|
5
5
|
|
6
6
|
Adds callbacks to thor commands.
|
7
7
|
|
@@ -23,12 +23,12 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
Uses the [`hollaback`](https://github.com/
|
26
|
+
Uses the [`hollaback`](https://github.com/kddnewton/hollaback) gem to add callbacks to [`thor`](https://github.com/erikhuda/thor) commands. You can set CLI-level callbacks with the macros `class_before`, `class_after`, and `class_around`. You can set command-level callbacks with `before`, `after`, and `around`. Example below.
|
27
27
|
|
28
28
|
```ruby
|
29
29
|
class CLI < Thor
|
30
|
-
|
31
|
-
|
30
|
+
class_before :say_hello
|
31
|
+
class_after :say_goodbye
|
32
32
|
|
33
33
|
desc 'first_test', 'First test command'
|
34
34
|
around :say
|
@@ -89,7 +89,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
89
89
|
|
90
90
|
## Contributing
|
91
91
|
|
92
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
92
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kddnewton/thor-hollaback.
|
93
93
|
|
94
94
|
## License
|
95
95
|
|
data/lib/thor/hollaback.rb
CHANGED
@@ -44,7 +44,13 @@ class Thor
|
|
44
44
|
|
45
45
|
def create_command(meth)
|
46
46
|
super
|
47
|
-
|
47
|
+
|
48
|
+
# The following condition will fail if the user attempts to add a
|
49
|
+
# command without a description or something like method_missing. For
|
50
|
+
# more details, see Thor::create_command.
|
51
|
+
return unless commands[meth]
|
52
|
+
|
53
|
+
commands[meth].callback_chain = callback_chain
|
48
54
|
@callback_chain = nil
|
49
55
|
end
|
50
56
|
end
|
data/thor-hollaback.gemspec
CHANGED
@@ -1,31 +1,39 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require_relative 'lib/thor/hollaback/version'
|
4
|
+
|
5
|
+
version = Thor::Hollaback::VERSION
|
6
|
+
repository = 'https://github.com/kddnewton/thor-hollaback'
|
6
7
|
|
7
8
|
Gem::Specification.new do |spec|
|
8
9
|
spec.name = 'thor-hollaback'
|
9
|
-
spec.version =
|
10
|
-
spec.authors = ['Kevin
|
11
|
-
spec.email = ['
|
10
|
+
spec.version = version
|
11
|
+
spec.authors = ['Kevin Newton']
|
12
|
+
spec.email = ['kddnewton@gmail.com']
|
12
13
|
|
13
14
|
spec.summary = 'Adds callbacks to thor commands'
|
14
|
-
spec.homepage =
|
15
|
+
spec.homepage = repository
|
15
16
|
spec.license = 'MIT'
|
16
17
|
|
18
|
+
spec.metadata = {
|
19
|
+
'bug_tracker_uri' => "#{repository}/issues",
|
20
|
+
'changelog_uri' => "#{repository}/blob/v#{version}/CHANGELOG.md",
|
21
|
+
'source_code_uri' => repository,
|
22
|
+
'rubygems_mfa_required' => 'true'
|
23
|
+
}
|
24
|
+
|
17
25
|
files = `git ls-files -z`.split("\x0")
|
18
26
|
spec.files = files.reject { |f| f.match(%r{^test/}) }
|
19
27
|
spec.bindir = 'exe'
|
20
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
29
|
spec.require_paths = ['lib']
|
22
30
|
|
23
|
-
spec.add_dependency 'hollaback', '~> 0.1
|
31
|
+
spec.add_dependency 'hollaback', '~> 0.1'
|
24
32
|
spec.add_dependency 'thor', '>= 0.19.1'
|
25
33
|
|
26
34
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
27
35
|
spec.add_development_dependency 'minitest', '~> 5.11'
|
28
36
|
spec.add_development_dependency 'rake', '~> 13.0'
|
29
|
-
spec.add_development_dependency 'rubocop', '~>
|
37
|
+
spec.add_development_dependency 'rubocop', '~> 1.12'
|
30
38
|
spec.add_development_dependency 'simplecov', '~> 0.15'
|
31
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor-hollaback
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Kevin
|
8
|
-
autorequire:
|
7
|
+
- Kevin Newton
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hollaback
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1
|
19
|
+
version: '0.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1
|
26
|
+
version: '0.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '1.12'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.12'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +108,21 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.15'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
|
-
-
|
113
|
+
- kddnewton@gmail.com
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/dependabot.yml"
|
119
|
+
- ".github/workflows/main.yml"
|
118
120
|
- ".gitignore"
|
119
|
-
- ".mergify.yml"
|
120
121
|
- ".rubocop.yml"
|
121
|
-
- ".travis.yml"
|
122
122
|
- CHANGELOG.md
|
123
123
|
- CODE_OF_CONDUCT.md
|
124
124
|
- Gemfile
|
125
|
+
- Gemfile.lock
|
125
126
|
- LICENSE
|
126
127
|
- README.md
|
127
128
|
- Rakefile
|
@@ -130,11 +131,15 @@ files:
|
|
130
131
|
- lib/thor/hollaback.rb
|
131
132
|
- lib/thor/hollaback/version.rb
|
132
133
|
- thor-hollaback.gemspec
|
133
|
-
homepage: https://github.com/
|
134
|
+
homepage: https://github.com/kddnewton/thor-hollaback
|
134
135
|
licenses:
|
135
136
|
- MIT
|
136
|
-
metadata:
|
137
|
-
|
137
|
+
metadata:
|
138
|
+
bug_tracker_uri: https://github.com/kddnewton/thor-hollaback/issues
|
139
|
+
changelog_uri: https://github.com/kddnewton/thor-hollaback/blob/v0.2.1/CHANGELOG.md
|
140
|
+
source_code_uri: https://github.com/kddnewton/thor-hollaback
|
141
|
+
rubygems_mfa_required: 'true'
|
142
|
+
post_install_message:
|
138
143
|
rdoc_options: []
|
139
144
|
require_paths:
|
140
145
|
- lib
|
@@ -149,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
154
|
- !ruby/object:Gem::Version
|
150
155
|
version: '0'
|
151
156
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
153
|
-
signing_key:
|
157
|
+
rubygems_version: 3.2.3
|
158
|
+
signing_key:
|
154
159
|
specification_version: 4
|
155
160
|
summary: Adds callbacks to thor commands
|
156
161
|
test_files: []
|
data/.mergify.yml
DELETED