hyperdock 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/hyperdock-api +1 -0
- data/lib/hyperdock/resource/root.rb +2 -1
- data/lib/hyperdock/resource/volumes.rb +22 -0
- data/lib/hyperdock/resources.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5f73a7f73c8d3f0c07ed74ff994c019d154c880
|
4
|
+
data.tar.gz: b10ae9ce250ab37a1aabec1a08e6092a4323e2a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4daa5340379d8adf09b8869edb031f2000c9a107838a93fa34b1c21dff1bd3bdeabbc6179ebc4ff96b60a5a0134302f62abff8d5ac84419ffcda98b03da8efb
|
7
|
+
data.tar.gz: d12d164a42736eac0214750f0a7b82a159d7bd3110bb3153ed93a52d91900f7326ab38917a0e032f2b67cabdf1c227f24ef929c712affa5c034d2c46b89baa0e
|
data/bin/hyperdock-api
CHANGED
@@ -14,6 +14,7 @@ Webmachine.application.routes do
|
|
14
14
|
add ['container', :container, 'ports'], HyperDock::Resource::ContainerPorts
|
15
15
|
add ['networks'], HyperDock::Resource::Networks
|
16
16
|
add ['network', :network], HyperDock::Resource::Network
|
17
|
+
add ['volumes'], HyperDock::Resource::Volumes
|
17
18
|
end
|
18
19
|
|
19
20
|
Webmachine.application.run
|
@@ -18,7 +18,8 @@ module HyperDock
|
|
18
18
|
container: { href: '/container/{container}', templated: true },
|
19
19
|
'container:ports' => { href: '/container/{container}/ports', templated: true },
|
20
20
|
networks: { href: '/networks' },
|
21
|
-
network: { href: '/network/{network}', templated: true }
|
21
|
+
network: { href: '/network/{network}', templated: true },
|
22
|
+
volumes: { href: '/volumes' }
|
22
23
|
}
|
23
24
|
end
|
24
25
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'docker-api'
|
2
|
+
require_relative 'core'
|
3
|
+
|
4
|
+
module HyperDock
|
5
|
+
module Resource
|
6
|
+
class Volumes < Core
|
7
|
+
def volumes
|
8
|
+
@volumes ||= ::Docker::Volume.all.map(&:id)
|
9
|
+
end
|
10
|
+
|
11
|
+
def links
|
12
|
+
@links ||= volumes.map do |volume|
|
13
|
+
{ "volume:#{volume}" => { href: "/volume/#{volume}" } }
|
14
|
+
end.reduce(&:merge)
|
15
|
+
end
|
16
|
+
|
17
|
+
def attributes
|
18
|
+
{ volumes: volumes }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/hyperdock/resources.rb
CHANGED
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.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- lib/hyperdock/resource/project_services.rb
|
95
95
|
- lib/hyperdock/resource/projects.rb
|
96
96
|
- lib/hyperdock/resource/root.rb
|
97
|
+
- lib/hyperdock/resource/volumes.rb
|
97
98
|
- lib/hyperdock/resources.rb
|
98
99
|
homepage: https://github.com/colstrom/hyperdock
|
99
100
|
licenses:
|