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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eadebb2c8c8687e53e78bcfea870323b5f439816
4
- data.tar.gz: d7d9a58cac8f941cc409c62ebebc02800ee77be2
3
+ metadata.gz: 63871912a12abea8df840ea5747142414eb862bb
4
+ data.tar.gz: db21f72589316c54a6561faee46f38d4a5ee7397
5
5
  SHA512:
6
- metadata.gz: 66fdfab3468bf520587f966e878eb10fd55c879a0508a312546c2067a2a2b6881fe562a0961379750191f67c68f372ca149d0d8458d937d175f7241e307833e0
7
- data.tar.gz: c6b360a7e348a953efd79df830993152ebfb7384ca6eb42529ead6c4af994ab24a0aca5ea46dcf31e5dfe5bea6bf959646e3586cd0a806351c47ea2cf3e869f9
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 => HashOf[RespondTo[:to_s], Hash]
15
- def links
16
- @links ||= projects.map do |project|
17
- { "project:#{project}" => { href: "/project/#{project}" } }
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
- { projects: projects }
35
+ { names: projects }
23
36
  end
24
37
  end
25
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperdock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Olstrom