selective-ruby-core 0.2.1-x86_64-linux → 0.2.2-x86_64-linux

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: 3969f6b0bc7930dd6f6f5e9230bd24029b9270c50ab50147f6f8fdfb87404dca
4
- data.tar.gz: 2c7cfb0a0f02382e3e04cdac8192260693b69b969c9c35091b3981c2ec1c6c47
3
+ metadata.gz: 0b4696012125323f44de397fe520cd5f37770a7182ad3df3a69f0cf10d4cbbf0
4
+ data.tar.gz: 2c1ea6d1eb4d118ec556b1989f298a350c583789c6d5cf85e901605e7487e622
5
5
  SHA512:
6
- metadata.gz: c60f23fededf736c3dca05cdff52e006d9b62657c4eb8fad0241ae3cc4e68af3c34e4f1c700a7acd1427db4c3f10f21e500f3c5fdfe49e85b658ea4d72c02d62
7
- data.tar.gz: 32a4e74a9563d4d4fa48dafc65b35a97d09c2b6ccfe33475a6476ce8904c4cfd5ce893555b453ee4fc0ddba3c71030cfbbb83515580464b6c4f7063a38d6f3ab
6
+ metadata.gz: e3382682940c2c4293c88e5b3cfaad302245bcb8f6505686d199a742d5bf12bfda3c983e8d8a8922ad0662c209050f8024dc09ce92cc3a8a6a2c3ad6f031e87a
7
+ data.tar.gz: 674a0719f90878cffdfad02c630369991a53bc84c4794754af5edbaad3a2f30f42210e1946b5b6e0b108563b5a5cd91b735e76664db4c667272c48e950775aab
@@ -14,12 +14,13 @@ module Selective
14
14
  "api_key" => "SELECTIVE_API_KEY",
15
15
  "platform" => "SELECTIVE_PLATFORM",
16
16
  "run_id" => "SELECTIVE_RUN_ID",
17
+ "run_attempt" => "SELECTIVE_RUN_ATTEMPT",
17
18
  "branch" => "SELECTIVE_BRANCH"
18
19
  }.freeze
19
20
 
20
- def initialize(runner, debug: false, log: false)
21
+ def initialize(runner_class, runner_args, debug: false, log: false)
21
22
  @debug = debug
22
- @runner = runner
23
+ @runner = runner_class.new(runner_args, method(:test_case_callback))
23
24
  @retries = 0
24
25
  @runner_id = safe_filename(get_runner_id)
25
26
  @logger = init_logger(log)
@@ -113,7 +114,6 @@ module Selective
113
114
  host = build_env.delete("host")
114
115
  run_id = build_env.delete("run_id")
115
116
  run_attempt = build_env.delete("run_attempt")
116
- run_attempt = SecureRandom.uuid if run_attempt.nil? || run_attempt.empty?
117
117
 
118
118
  params = {
119
119
  "run_id" => run_id,
@@ -267,7 +267,7 @@ module Selective
267
267
  end
268
268
 
269
269
  def handle_run_test_cases(data)
270
- runner.run_test_cases(data[:test_case_ids], method(:test_case_callback))
270
+ runner.run_test_cases(data[:test_case_ids])
271
271
  end
272
272
 
273
273
  def handle_remove_failed_test_case_result(data)
@@ -3,7 +3,7 @@
3
3
  module Selective
4
4
  module Ruby
5
5
  module Core
6
- VERSION = "0.2.1"
6
+ VERSION = "0.2.2"
7
7
  end
8
8
  end
9
9
  end
@@ -44,7 +44,7 @@ module Selective
44
44
  attr_reader :debug, :log, :runner_name, :args, :command
45
45
 
46
46
  def run
47
- Selective::Ruby::Core::Controller.new(runner, debug: debug, log: log).send(command)
47
+ Selective::Ruby::Core::Controller.new(runner_class, args, debug: debug, log: log).send(command)
48
48
  end
49
49
 
50
50
  def parse_args(args)
@@ -56,8 +56,8 @@ module Selective
56
56
  end
57
57
  end
58
58
 
59
- def runner
60
- Selective::Ruby::Core.runner_for(runner_name).new(args)
59
+ def runner_class
60
+ Selective::Ruby::Core.runner_for(runner_name)
61
61
  end
62
62
 
63
63
  def require_runner
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.2.1
4
+ version: 0.2.2
5
5
  platform: x86_64-linux
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: 2024-01-19 00:00:00.000000000 Z
12
+ date: 2024-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: zeitwerk