buildkite-builder 3.7.0 → 3.8.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0e8b5cc37e9923412be2b266a5e53d49291215d5c72deb9a4e71386557ec63c
|
4
|
+
data.tar.gz: f31cb6a1afca390b10a4867aada59b206b33581bed82ebe591b3b6e6a83c828c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7f31586bca0d90aae646cba983f9d80cd05baa04cc64aefce9068766310a84a1bc3f47f59b505c1c7a8ad5981041941b75b597cb8bb13f0a1a3fbe3ac0e4f4f
|
7
|
+
data.tar.gz: 3a66afa04881cb65068a13fc2ba116770f396f3df949a45d6a0c46077fb909ea3f027180cbd16b3b973dcdcdf92dbaf05d0916875b6d81a8e2d0dbac9131aa77
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.8.1
|
@@ -14,10 +14,12 @@ module Buildkite
|
|
14
14
|
|
15
15
|
attr_reader :context
|
16
16
|
attr_reader :options
|
17
|
+
attr_reader :option_block
|
17
18
|
|
18
|
-
def initialize(context, **options)
|
19
|
+
def initialize(context, **options, &block)
|
19
20
|
@context = context
|
20
21
|
@options = options
|
22
|
+
@option_block = block
|
21
23
|
|
22
24
|
prepare
|
23
25
|
end
|
@@ -6,26 +6,34 @@ module Buildkite
|
|
6
6
|
|
7
7
|
def initialize(context)
|
8
8
|
@context = context
|
9
|
-
@extensions =
|
9
|
+
@extensions = {}
|
10
10
|
|
11
11
|
@loader = Loaders::Extensions.load(@context.root)
|
12
12
|
end
|
13
13
|
|
14
|
-
def use(extension, native: false, **args)
|
14
|
+
def use(extension, native: false, **args, &block)
|
15
15
|
unless extension < Buildkite::Builder::Extension
|
16
|
-
raise "#{extension} must subclass Buildkite::Builder::Extension"
|
16
|
+
raise "#{extension.name} must subclass Buildkite::Builder::Extension"
|
17
17
|
end
|
18
18
|
|
19
|
-
@extensions
|
19
|
+
if @extensions[extension]
|
20
|
+
raise "#{extension.name} already registered"
|
21
|
+
end
|
22
|
+
|
23
|
+
@extensions[extension] = extension.new(@context, **args, &block)
|
20
24
|
@context.dsl.extend(extension)
|
21
25
|
end
|
22
26
|
|
23
27
|
def build
|
24
|
-
@extensions.each do |extension|
|
25
|
-
log_build(
|
28
|
+
@extensions.each do |extension_class, extension|
|
29
|
+
log_build(extension_class.name) { extension.build }
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
33
|
+
def find(klass)
|
34
|
+
@extensions.fetch(klass)
|
35
|
+
end
|
36
|
+
|
29
37
|
private
|
30
38
|
|
31
39
|
def log
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildkite-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ngan Pham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-11-
|
12
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|