buildkit 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -3
- data/buildkit.gemspec +1 -0
- data/lib/buildkit/client.rb +1 -1
- data/lib/buildkit/client/jobs.rb +14 -0
- data/lib/buildkit/error.rb +1 -1
- data/lib/buildkit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c6dff3c82bb149b2cdc144fd406166383677156
|
4
|
+
data.tar.gz: 546b10638c5c057c039938453c91f950c39762a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc285edc5ef194f29f87ffbe771fcd624d1f629d651c90f119a077d22a3fbf4b6393a1c2bb8d3e16a5ab0876be5ac3f35490fcb856d8d24e78ad6ccbf18ca8d8
|
7
|
+
data.tar.gz: 91d612ddcc59751858f38788fd8e882847ff03863149aaa00534cdeebb85b07635ce0f040a87526cf817d7bc9f6db1812cefff92d6ffb5c83eb1c99798a3694a
|
data/Rakefile
CHANGED
@@ -7,13 +7,13 @@ require 'rubocop/rake_task'
|
|
7
7
|
RuboCop::RakeTask.new
|
8
8
|
|
9
9
|
task test: :spec
|
10
|
-
task default: [
|
10
|
+
task default: %i[spec rubocop]
|
11
11
|
|
12
12
|
namespace :doc do
|
13
13
|
require 'yard'
|
14
14
|
YARD::Rake::YardocTask.new do |task|
|
15
|
-
task.files = %w
|
16
|
-
task.options = %w
|
15
|
+
task.files = %w[LICENSE.md lib/**/*.rb]
|
16
|
+
task.options = %w[--output-dir doc/yard --markup markdown]
|
17
17
|
end
|
18
18
|
task default: :yard
|
19
19
|
end
|
data/buildkit.gemspec
CHANGED
data/lib/buildkit/client.rb
CHANGED
@@ -19,7 +19,7 @@ module Buildkit
|
|
19
19
|
DEFAULT_ENDPOINT = 'https://api.buildkite.com/v2/'.freeze
|
20
20
|
|
21
21
|
# Header keys that can be passed in options hash to {#get},{#head}
|
22
|
-
CONVENIENCE_HEADERS = Set.new([
|
22
|
+
CONVENIENCE_HEADERS = Set.new(%i[accept content_type])
|
23
23
|
|
24
24
|
# In Faraday 0.9, Faraday::Builder was renamed to Faraday::RackBuilder
|
25
25
|
RACK_BUILDER_CLASS = defined?(Faraday::RackBuilder) ? Faraday::RackBuilder : Faraday::Builder
|
data/lib/buildkit/client/jobs.rb
CHANGED
@@ -31,6 +31,20 @@ module Buildkit
|
|
31
31
|
def job_env(org, pipeline, build, job, options = {})
|
32
32
|
get("/v2/organizations/#{org}/pipelines/#{pipeline}/builds/#{build}/jobs/#{job}/env", options)
|
33
33
|
end
|
34
|
+
|
35
|
+
# Get a job's log output
|
36
|
+
#
|
37
|
+
# @param org [String] Organization slug.
|
38
|
+
# @param pipeline [String] Pipeline slug.
|
39
|
+
# @param build [Integer] Build number.
|
40
|
+
# @param job [String] Job id.
|
41
|
+
# @return [Sawyer::Resource] Hash representing the Buildkit job log output.
|
42
|
+
# @see https://buildkite.com/docs/rest-api/jobs#get-a-jobs-log-output
|
43
|
+
# @example
|
44
|
+
# Buildkit.job_log('my-great-org', 'great-pipeline', 123, 'my-job-id')
|
45
|
+
def job_log(org, pipeline, build, job, options = {})
|
46
|
+
get("/v2/organizations/#{org}/pipelines/#{pipeline}/builds/#{build}/jobs/#{job}/log", options)
|
47
|
+
end
|
34
48
|
end
|
35
49
|
end
|
36
50
|
end
|
data/lib/buildkit/error.rb
CHANGED
@@ -105,7 +105,7 @@ module Buildkit
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def redact_url(url_string)
|
108
|
-
%w
|
108
|
+
%w[client_secret access_token].each do |token|
|
109
109
|
url_string.gsub!(/#{token}=\S+/, "#{token}=(redacted)") if url_string.include? token
|
110
110
|
end
|
111
111
|
url_string
|
data/lib/buildkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sawyer
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.6.14
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Ruby toolkit for working with the Buildkite API
|