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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/thor.rb +9 -0
  3. data/lib/thor/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58295881823689f3350e642f849fb6ad397b95fe
4
- data.tar.gz: 248bd3a87c889ac1f43b5e99db1765d84435389d
3
+ metadata.gz: 6bccf06c78fb0210b28c02ad2101a821f93c42e5
4
+ data.tar.gz: 07d4a601adb931e3b8da9a6b611241e1a3a6db97
5
5
  SHA512:
6
- metadata.gz: 24b141e2f026d2317beef2852775840d593163e84310ece4e50301c5d4e0440477aca6943f46a57eacc8db884fb777dfff04e50d6f33cf0c6eb958ff5d43438e
7
- data.tar.gz: 697de57d139368376a2701e68c2d4e3be36fa48135858873d9cc51a3089974c59b3efe56c9a3f835603adfd27d5472f79e7ab0ab47d51314058c58d9c2f92f9f
6
+ metadata.gz: 5de338f9e4fd0e1312d184c868de5fcd4b8d36d788dc1536bea92d823919fc72a4cd5d92b0d95207e6524bb4c47808f54bae296527f4e534dd4c3867cc4693f1
7
+ data.tar.gz: ba2f2d7418ff266a578273ba36fa3fc704678acea50929c0be1f801027b68f61ccbc6986b4a6964048ae146b5906c817ec9cec22b6a67e36f102a32a50a99fc5
@@ -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
@@ -1,3 +1,3 @@
1
1
  class Thor
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz