push
circleci
4 of 18 branches covered (22.22%)
0 of 1 new or added line in 1 file covered. (0.0%)
222 existing lines in 24 files now uncovered.2722 of 4101 relevant lines covered (66.37%)
295.38 hits per line
| 1 |
# frozen_string_literal: true
|
|
|
UNCOV
2
|
class Store |
× |
|
UNCOV
3
|
attr_accessor :id, :type, :name, :tag |
× |
| 4 |
|
|
|
UNCOV
5
|
def initialize(id, type, name, tag) |
× |
|
UNCOV
6
|
@id = id
|
× |
|
UNCOV
7
|
@type = type
|
× |
|
UNCOV
8
|
@name = name
|
× |
|
UNCOV
9
|
@tag = tag
|
× |
|
UNCOV
10
|
end
|
× |
| 11 |
|
|
|
UNCOV
12
|
def self.all(session_id:) |
× |
|
UNCOV
13
|
@all ||= begin |
× |
|
UNCOV
14
|
stores_request = Mediaflux::StoreListRequest.new(session_token: session_id) |
× |
|
UNCOV
15
|
data = stores_request.stores |
× |
|
UNCOV
16
|
stores = data.map do |mf_store|
|
× |
|
UNCOV
17
|
Store.new(mf_store[:id], mf_store[:type], mf_store[:name], mf_store[:tag]) |
× |
|
UNCOV
18
|
end
|
× |
|
UNCOV
19
|
stores |
× |
|
UNCOV
20
|
end
|
× |
|
UNCOV
21
|
end
|
× |
| 22 |
|
|
|
UNCOV
23
|
def self.get_by_name(name, session_id:) |
× |
| 24 |
all(session_id: session_id).find { |store| store.name == name }
|
× |
|
UNCOV
25
|
end
|
× |
| 26 |
|
|
|
UNCOV
27
|
def self.default(session_id:) |
× |
|
UNCOV
28
|
all(session_id: session_id).first
|
× |
|
UNCOV
29
|
end
|
× |
|
UNCOV
30
|
end
|
× |