hyperdock 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hyperdock/resource/projects.rb +18 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63871912a12abea8df840ea5747142414eb862bb
|
4
|
+
data.tar.gz: db21f72589316c54a6561faee46f38d4a5ee7397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0273ce7bca9f7e48c82a28eec8a952e3a7f81ae5ef2d25cdce82cb519a5fb1b520872da40d6a76f54b312fd76c133336a6d80d7d8ee2170bb79954979f26007d
|
7
|
+
data.tar.gz: a70acebd9544318667c372436026b4f184de1cbc2247e4db518a2882327cfd5f92d57123ba61a433cba2290b2639dfc026f755462dbe1320b497d443aed64dd9
|
@@ -11,15 +11,28 @@ module HyperDock
|
|
11
11
|
end.uniq
|
12
12
|
end
|
13
13
|
|
14
|
-
Contract None =>
|
15
|
-
def
|
16
|
-
@
|
17
|
-
{
|
14
|
+
Contract None => ArrayOf[Hash]
|
15
|
+
def project_links
|
16
|
+
@project_links ||= projects.map do |project|
|
17
|
+
{ name: project, href: "/project/#{project}" }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
Contract None => Hash
|
22
|
+
def named_links
|
23
|
+
@named_links ||= project_links.map do |project|
|
24
|
+
{ "project:#{project[:name]}" => project }
|
18
25
|
end.reduce(&:merge)
|
19
26
|
end
|
20
27
|
|
28
|
+
def links
|
29
|
+
@links ||= {
|
30
|
+
projects: project_links
|
31
|
+
}.merge(named_links)
|
32
|
+
end
|
33
|
+
|
21
34
|
def attributes
|
22
|
-
{
|
35
|
+
{ names: projects }
|
23
36
|
end
|
24
37
|
end
|
25
38
|
end
|