Class: Lemans::Store
- Inherits:
-
Object
- Object
- Lemans::Store
- Defined in:
- lib/lemans/store.rb
Overview
Store is responsible for storing trial results and querying them later.
Direct Known Subclasses
Instance Method Summary collapse
-
#delete(result) ⇒ Object
Deletes the result with everything it stored (artifacts included).
-
#fetch ⇒ Object
Returns all run records.
-
#query(**filters) ⇒ Object
Returns the run records matching the filters.
-
#save(result) ⇒ Object
Persist the result.
-
#save_artifact(result, contents, path:) ⇒ Object
Persist the result's file artifact (contents could be eiher IO (file) or text).
-
#setup ⇒ Object
Prepares the store.
-
#unreadable ⇒ Object
Returns stub records for results that exist but cannot be read.
Instance Method Details
#delete(result) ⇒ Object
Deletes the result with everything it stored (artifacts included). Returns something truthy on success, nil otherwise
29 30 31 |
# File 'lib/lemans/store.rb', line 29 def delete(result) raise NotImplementedError end |
#fetch ⇒ Object
Returns all run records
13 14 15 |
# File 'lib/lemans/store.rb', line 13 def fetch raise NotImplementedError end |
#query(**filters) ⇒ Object
Returns the run records matching the filters
18 19 20 |
# File 'lib/lemans/store.rb', line 18 def query(**filters) raise NotImplementedError end |
#save(result) ⇒ Object
Persist the result
34 35 36 |
# File 'lib/lemans/store.rb', line 34 def save(result) raise NotImplementedError end |
#save_artifact(result, contents, path:) ⇒ Object
Persist the result's file artifact (contents could be eiher IO (file) or text).
40 41 42 |
# File 'lib/lemans/store.rb', line 40 def save_artifact(result, contents, path:) raise NotImplementedError end |
#setup ⇒ Object
Prepares the store
8 9 10 |
# File 'lib/lemans/store.rb', line 8 def setup # no-op end |
#unreadable ⇒ Object
Returns stub records for results that exist but cannot be read
23 24 25 |
# File 'lib/lemans/store.rb', line 23 def unreadable [] end |