bitfab 0.64.9 → 0.64.10

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: b270eed8dc307a13b2a5e98e723abb2a5433b0617eef2228c4a6c3e560cfc1c9
4
- data.tar.gz: cb3d9ce6dfca20c7bfff8b36f9577cf23fda6a8eeaf1e4fdd811c3fd375a30b1
3
+ metadata.gz: 695e945332f1eacd1d33b085bd44c83d585b22d53d93b1a51c197b8196956a38
4
+ data.tar.gz: 12a2f0eb5193b336faa19cefea2b6d3e947de60925f3014fa5626665360403ce
5
5
  SHA512:
6
- metadata.gz: 90d48fd92f1fd3eb0a913ea4b3070e677ac40fa0e5ec18b928fda31fa7e5e1158eaca47736d305eaee3a850800558cc2890d501596c3a37216ae8682f31acae7
7
- data.tar.gz: 493ca207e1e61d5737f1ec8efb6126e8e2f0f118090f797ddf5d5d709349632ebd1c6de7673c67ec99142e5226b16e459f1c9e3addfa05504db72a1238e44868
6
+ metadata.gz: 66d420f41c8da030c87b6ca7aa6ec3c8bbb04c18362b51792f34288802486238f8dad71ef50888394024ee2b7c5651f352b90a0055f39d985fbaa4ed42824a75
7
+ data.tar.gz: 0fc406caf9c0c37c89690fe711fe90299ff6b4bc7f1d89a47fc20e5b2052258ef2aa269015d0fcbf5b4254aecbfd55d07367d0cc8c57a346f3e202a5693b9da2
@@ -83,6 +83,10 @@ module Bitfab
83
83
  end
84
84
 
85
85
  def get_simulation_plan
86
+ # Without a key the server answers 401, so skip the request entirely.
87
+ key = @api_key.respond_to?(:call) ? @api_key.call : @api_key
88
+ raise ArgumentError, SimulationPlan::NO_API_KEY if key.to_s.strip.empty?
89
+
86
90
  get("/api/sdk/sim-plan", timeout: SimulationPlan::READ_TIMEOUT)
87
91
  end
88
92
 
@@ -8,6 +8,7 @@ module Bitfab
8
8
  REFRESH_SECONDS = 60.0
9
9
  RETRY_SECONDS = 10.0
10
10
  MAX_HELD = 1000
11
+ NO_API_KEY = "no API key is set"
11
12
  @plans = ObjectSpace::WeakMap.new
12
13
  @plans_mutex = Mutex.new
13
14
  @plans_pid = Process.pid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bitfab
4
- VERSION = "0.64.9"
4
+ VERSION = "0.64.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitfab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.64.9
4
+ version: 0.64.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harvest Team