airbrussh 1.4.2 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55fc294193f64fff819d6fd61aa25cb2ae77ed3bb6e11e9b169c6b5a8b48c377
4
- data.tar.gz: cda1c291c971329be31c3fa0d5695ba0511c4afc6340cf96c09d157a5c565f4c
3
+ metadata.gz: cc924d4296d264fce2d2c280deb33c3dee5995537cc9d2d4e0336d842fefe928
4
+ data.tar.gz: 760f9521a613add5fbe2464fba0486b36491bdf8056f82c2c216846d45cd5a5a
5
5
  SHA512:
6
- metadata.gz: e08e903fec21622038b99666116f62bf08f030a7c0d2e42f71b7184a41e87669ddbb894c7180668cc6e0beefa50deabdf91f6a28565bc1208762e668cb7db3ef
7
- data.tar.gz: 558cc51bf180d31d8fcf1a9e38f33030f0bff56688826d0b14ae0b295a44c3d0984d7aebb61edaf59455d74ed7398674019ec79b976cf5bff12edb900fcc7c3f
6
+ metadata.gz: a3fdd013c5de8112098827d1e339153070c5680aab02c691b6c2590d042e0bdd0b29a26a13f5aac9b0d929aad75a507ed01646f1237a33190ece35eab4bd309b
7
+ data.tar.gz: e053040901b947f721e1c0e6e90a4d24226f0a8818a25cb23e89a960c7003dc2cfe1e1405d9298d55fc9044e51beedad662c4fdc2097f45b65cb9ac014cb658b
@@ -13,6 +13,10 @@ module Airbrussh
13
13
  # for the `position` of a command.
14
14
  #
15
15
  class Context
16
+ class << self
17
+ attr_accessor :current_task_name
18
+ end
19
+
16
20
  def initialize(config=Airbrussh.configuration)
17
21
  @history = []
18
22
  @enabled = config.monkey_patch_rake
@@ -47,10 +51,22 @@ module Airbrussh
47
51
  history.index(command.to_s)
48
52
  end
49
53
 
50
- class << self
51
- attr_accessor :current_task_name
54
+ if Object.respond_to?(:prepend)
55
+ module Patch
56
+ def execute(args=nil)
57
+ ::Airbrussh::Rake::Context.current_task_name = name.to_s
58
+ super
59
+ end
60
+ end
52
61
 
53
- def install_monkey_patch
62
+ def self.install_monkey_patch
63
+ require "rake"
64
+ return if ::Rake::Task.include?(::Airbrussh::Rake::Context::Patch)
65
+
66
+ ::Rake::Task.prepend(::Airbrussh::Rake::Context::Patch)
67
+ end
68
+ else
69
+ def self.install_monkey_patch
54
70
  require "rake"
55
71
  return if ::Rake::Task.instance_methods.include?(:_airbrussh_execute)
56
72
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Airbrussh
4
- VERSION = "1.4.2".freeze
4
+ VERSION = "1.5.0".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrussh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-08 00:00:00.000000000 Z
11
+ date: 2023-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sshkit