ci_toolkit 1.2.6 → 1.2.7

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: 7ea8b1d9d2121152ff2f48ecb1265130b549f3a88233711b6b741bc7f49e2405
4
- data.tar.gz: 8e167d886d553a374a2b1e26a76a6fcd0bda777b295f685d98c944cd7305e704
3
+ metadata.gz: f96e323d23cc03dde2298212e7a7366059bf64a3169d31d33f271ad5f161eb35
4
+ data.tar.gz: d605aa63620d7612983d89ba762ad85edd43b50bbcb54912863284c1fa853891
5
5
  SHA512:
6
- metadata.gz: 5241d883ecd2701c0b56e433934093bce2c095800376c0dc9deb0e88f65054b4db84f487a8280ee9a333f5185f79960a224a6052a60dadc6414ef562c569aa05
7
- data.tar.gz: 05b5d77bb2699c5c811604e7b99ce96f1dd8506f767b4a77051bc37da6fcb0febe7b8f7568acfb869c05de2364f30c4088b15a0f312cdf4699ef3f12709488bb
6
+ metadata.gz: '0890d105a52a863159d3a0476ac8a16f71c306639e2c0b99aefb5ce5023679322783d3201529d9ff8dd085872d2c19a462cbcfb81b0496e79616642797f4549f'
7
+ data.tar.gz: 2830123e7b171af70395c37b427f36fdfa33fac1f2d3d32bfee30d54a6ecc780671b6df5a38bc50d04f943da0f83f1f2d8e9536a68eea49ce69a56fc381d6001
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ci_toolkit (1.2.6)
4
+ ci_toolkit (1.2.7)
5
5
  faraday
6
6
  faraday_middleware
7
7
  jwt
@@ -9,13 +9,16 @@ module CiToolkit
9
9
  API_VERSION = "v0.1"
10
10
  attr_reader :connection
11
11
 
12
- def initialize(
13
- token = ENV["BITRISE_TOKEN"],
14
- app_slug = ENV["BITRISE_APP_SLUG"],
15
- faraday = nil
16
- )
17
- @token = token
18
- @app_slug = app_slug
12
+ # noinspection Metrics/ParameterLists
13
+ def initialize(options = {
14
+ build_number: ENV["BITRISE_BUILD_NUMBER"],
15
+ token: ENV["BITRISE_TOKEN"],
16
+ app_slug: ENV["BITRISE_APP_SLUG"]
17
+ },
18
+ faraday = nil)
19
+ @build_number = options[:build_number].to_i
20
+ @token = options[:token]
21
+ @app_slug = options[:app_slug]
19
22
  @connection = faraday
20
23
  configure_connection
21
24
  @connection&.use Faraday::Response::Logger, nil, { headers: true, bodies: true }
@@ -72,7 +75,7 @@ module CiToolkit
72
75
  def filter_builds_by_commit(builds, commit)
73
76
  puts "Builds:\n"
74
77
  puts builds.inspect
75
- builds&.select! { |build| build["commit_hash"] == commit }
78
+ builds&.select! { |build| build["commit_hash"] == commit || build["build_number"] == @build_number }
76
79
  builds || []
77
80
  end
78
81
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CiToolkit
4
- VERSION = "1.2.6"
4
+ VERSION = "1.2.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gero Keller