selective-ruby-core 0.2.1-arm64-darwin → 0.2.2-arm64-darwin

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: 8126e9b36b7fa8536ef480c391018765cfc8f50c651edd3e09bd45d7b4e0c0f4
4
- data.tar.gz: e0639c048e0af1b2c02788efd7e371eb8e0b080bb03cc2dcbb87b015b102f056
3
+ metadata.gz: ba838f033885b51cf4b81bf1afa5927309bcedecc4515da20bddd4846b47b50f
4
+ data.tar.gz: '0538f47a08feda07e5bb093be6a6ba67079bd9a275a8f0a103bfc3761b41580e'
5
5
  SHA512:
6
- metadata.gz: 2798ec33a52c77f737b369af74e013586539a561a5311ac4a434144fbf60f5047bca61a3f40fbd9aeca78059be9cf33b360582d3bb5562cd317259594b66c355
7
- data.tar.gz: 9e79e6d91184a94716aa7824a388e924b4dac885ba6ab66b4c1dca281ae08c0844d8f6315b5efaf9e599560d05cf57d837c7b0df49a874dc3b147170be2e16f5
6
+ metadata.gz: fa4075a64900caf106a6249759607e04db3e4b501eff896c219c97acc43d221832e361069962a89411d6a199cd6ac2fbb47e48a5438767fbf000b6163870c924
7
+ data.tar.gz: a014af993dc61153f6a41c76a68b47987a88d6ba972e78ffd376ad6264c1136ba12d7912342affad0ec21ddb3b80e305f3e2830487d28ae14b2ecf341258a9da
@@ -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: 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: 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