selective-ruby-core 0.1.2-arm64-darwin → 0.1.3-arm64-darwin

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: fd2f641485ecb6675d7c6700eed1b77586a156ccc0c254e915f1f3fdca305120
4
- data.tar.gz: fa0762a5b475c8c29b4bcd36e6f6daf1fd8ff59859dde705e7c60f8c44da6512
3
+ metadata.gz: 118cff5d299b401144a3813ee39d638a594ebfa985c2be9cd67d9a659224f9a1
4
+ data.tar.gz: 0541f558c3b705031bfd824ca4e5549518ddfc51f0fc9572d36350fb1ec1c908
5
5
  SHA512:
6
- metadata.gz: 54bbddc47043d539af6dd2cd17fce44e497af4b843b03cb6072f0d8bf952bde6efcc8040c51a6f7d0e83223aa11f01dfa30a0dbf80d131053da793424f5cc344
7
- data.tar.gz: 1ac666a5ae47115034febb659cbf1fec6f22a45f7621a15275d36dbcc37b0e2f25861db4d8498fa9a37947866c6794d7c328bb443e43de41501bc8f005313949
6
+ metadata.gz: f36eb6cdd508b8dd4152224d472025a0933fdf57bf1ab250fbcdc06539138300474346fff50eaa7ae771223912e2341c904fb9957e17fa53fe4d8413f61b80d6
7
+ data.tar.gz: d1430b790d2356671632eb764856f7d3a56bd05b32f891f78c2047b5d01bca9eb0cc55508ee9798344f3f0b6e2b6b393937eda3ec93c1f5b1a8d960349257feb
data/lib/bin/build_env.sh CHANGED
@@ -9,6 +9,8 @@ if [ -n "$GITHUB_ACTIONS" ]; then
9
9
  target_branch=${GITHUB_BASE_REF}
10
10
  actor=$GITHUB_ACTOR
11
11
  sha=$GITHUB_SHA
12
+ run_id=$GITHUB_RUN_ID
13
+ run_attempt=$GITHUB_RUN_ATTEMPT
12
14
  commit_message=$(git log --format=%s -n 1 $sha)
13
15
  else
14
16
  platform=$SELECTIVE_PLATFORM
@@ -17,6 +19,8 @@ else
17
19
  target_branch=$SELECTIVE_TARGET_BRANCH
18
20
  actor=$SELECTIVE_ACTOR
19
21
  sha=$SELECTIVE_SHA
22
+ run_id=$SELECTIVE_RUN_ID
23
+ run_attempt=$SELECTIVE_RUN_ATTEMPT
20
24
  commit_message=$(git log --format=%s -n 1 $sha)
21
25
  fi
22
26
 
@@ -29,6 +33,8 @@ cat <<EOF
29
33
  "target_branch": "$target_branch",
30
34
  "actor": "$actor",
31
35
  "sha": "$sha",
36
+ "run_id": "$run_id",
37
+ "run_attempt": "$run_attempt",
32
38
  "commit_message": "$commit_message"
33
39
  }
34
40
  EOF
data/lib/bin/transport CHANGED
Binary file
@@ -101,13 +101,15 @@ module Selective
101
101
  def transport_url
102
102
  @transport_url ||= begin
103
103
  api_key = ENV.fetch("SELECTIVE_API_KEY")
104
- run_id = ENV.fetch("SELECTIVE_RUN_ID")
105
- run_attempt = ENV.fetch("SELECTIVE_RUN_ATTEMPT", SecureRandom.uuid)
106
104
  host = ENV.fetch("SELECTIVE_HOST", "wss://app.selective.ci")
107
105
 
108
106
  # Validate that host is a valid websocket url(starts with ws:// or wss://)
109
107
  raise "Invalid host: #{host}" unless host.match?(/^wss?:\/\//)
110
108
 
109
+ run_id = build_env.delete("run_id")
110
+ run_attempt = build_env.delete("run_attempt")
111
+ run_attempt = SecureRandom.uuid if run_attempt.nil? || run_attempt.empty?
112
+
111
113
  params = {
112
114
  "run_id" => run_id,
113
115
  "run_attempt" => run_attempt,
@@ -3,7 +3,7 @@
3
3
  module Selective
4
4
  module Ruby
5
5
  module Core
6
- VERSION = "0.1.2"
6
+ VERSION = "0.1.3"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selective-ruby-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Benjamin Wood
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-11-14 00:00:00.000000000 Z
12
+ date: 2023-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zeitwerk