thor-plus 0.5.0 → 0.6.0
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/lib/thor.rb +9 -0
- data/lib/thor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bccf06c78fb0210b28c02ad2101a821f93c42e5
|
4
|
+
data.tar.gz: 07d4a601adb931e3b8da9a6b611241e1a3a6db97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de338f9e4fd0e1312d184c868de5fcd4b8d36d788dc1536bea92d823919fc72a4cd5d92b0d95207e6524bb4c47808f54bae296527f4e534dd4c3867cc4693f1
|
7
|
+
data.tar.gz: ba2f2d7418ff266a578273ba36fa3fc704678acea50929c0be1f801027b68f61ccbc6986b4a6964048ae146b5906c817ec9cec22b6a67e36f102a32a50a99fc5
|
data/lib/thor.rb
CHANGED
@@ -54,6 +54,15 @@ class Thor # rubocop:disable ClassLength
|
|
54
54
|
end
|
55
55
|
alias_method :after_task, :after_command
|
56
56
|
|
57
|
+
# Adds a callback method that should be executed around an executing task.
|
58
|
+
#
|
59
|
+
# ==== Parameters
|
60
|
+
# methods<*String|Symbol>:: Callbacks to execute after command runs.
|
61
|
+
def around_command(*arguments)
|
62
|
+
set_callback :invoke, :around, *arguments
|
63
|
+
end
|
64
|
+
alias_method :around_task, :around_command
|
65
|
+
|
57
66
|
# Registers another Thor subclass as a command.
|
58
67
|
#
|
59
68
|
# ==== Parameters
|
data/lib/thor/version.rb
CHANGED