bitfab 0.64.20 → 0.64.21

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: 74c6c0ac432a8fb315a5ee0fe520a115f0eb49a69a0dc2fdb3fcc26fa82fb163
4
- data.tar.gz: 7b7e66e3be766f46b22699a03896d09e25a3201decefeea40010706fb4f66e13
3
+ metadata.gz: 01e0c3dff10bb4315c2d7501e397c6e466679dd8a26ae99c98f682f7f91d0584
4
+ data.tar.gz: 9135b87f009d87e024b567bbf795fb78f3ca2da88560eca0c8f4a81ca9054223
5
5
  SHA512:
6
- metadata.gz: 284fc64fd1f74394e6bbcdcd3403fa0936a2b24769eac35975c29bc1f46dade520a142d4b32ef6ec0a205c9f67b4984b7d17fd318dceeae9a7e0cf5ae14ddc37
7
- data.tar.gz: 8f977a4b90730b6bdf376d287d057ba7b8624988d8763769db829fdd6b5b15cdd889a684241da842905fc2db855c8710939442bdcbfca4e28cbc1db8da073dd8
6
+ metadata.gz: 8cf6468e184bcc18a6de04a739f55fcc4f35e31c8e95664ab5f054e6a260933ceaf6f3f8aea3478b0ac91756b16e84d69b6971b76549ce1152403ff3f37b6f5c
7
+ data.tar.gz: 4fa5a6541e6f234ae28637aba7371c40a1dd80a1800e2d4113d4fda5a507d0652fe12650458a02557661d67d1161225f66ce483daee4d6ce988d068d5494429b
@@ -58,6 +58,21 @@ module Bitfab
58
58
  @http_client.get(dataset_path(dataset_id))["dataset"]
59
59
  end
60
60
 
61
+ # Rename the dataset or change its description, and return the updated
62
+ # dataset. It keeps its id, traces, and graders. A nil argument leaves that
63
+ # field untouched, and an empty description clears it. Raises ArgumentError
64
+ # when both are nil. A blank name, or one another dataset under the same
65
+ # trace function already uses, raises Net::HTTPError with a 400. A dataset
66
+ # outside this organization raises Net::HTTPError with a 404.
67
+ def update(dataset_id, name: nil, description: nil)
68
+ raise ArgumentError, "Provide name and/or description to update." if name.nil? && description.nil?
69
+
70
+ payload = {}
71
+ payload["name"] = name unless name.nil?
72
+ payload["description"] = description unless description.nil?
73
+ @http_client.request(dataset_path(dataset_id), payload, method: "PATCH")["dataset"]
74
+ end
75
+
61
76
  # The ids of every trace in the dataset, the same membership a replay with
62
77
  # dataset_id: selects. Fetches all pages automatically.
63
78
  def list_traces(dataset_id)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bitfab
4
- VERSION = "0.64.20"
4
+ VERSION = "0.64.21"
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.20
4
+ version: 0.64.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harvest Team