airbrussh 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrussh/rake/context.rb +19 -3
- data/lib/airbrussh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc924d4296d264fce2d2c280deb33c3dee5995537cc9d2d4e0336d842fefe928
|
4
|
+
data.tar.gz: 760f9521a613add5fbe2464fba0486b36491bdf8056f82c2c216846d45cd5a5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
51
|
-
|
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
|
|
data/lib/airbrussh/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|