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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 646a7caf8951033b0e62f408e8d990d38b231ee6
4
- data.tar.gz: b5afa9088d49fcf0baef64b9dc19b39da0ab4dd9
3
+ metadata.gz: f5f73a7f73c8d3f0c07ed74ff994c019d154c880
4
+ data.tar.gz: b10ae9ce250ab37a1aabec1a08e6092a4323e2a6
5
5
  SHA512:
6
- metadata.gz: b4117f994c5d05ea4817da7558d93f05ca5f0bb538fbc46c123c4d08f145ae874e741925deb99daf73879e3c41b2588b191f621989c9faed1645f368d5200a09
7
- data.tar.gz: 7ff0e714fa10b73fe158ab58b7be96316aa5aeb5caf83d74dd3533ac56d7f1ce7db11e1f7d5d454dce69530386afdcf939bf27c74b0c09eaa3fa008d1a693f52
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
@@ -8,3 +8,4 @@ require_relative 'resource/project_service'
8
8
  require_relative 'resource/project_services'
9
9
  require_relative 'resource/projects'
10
10
  require_relative 'resource/root'
11
+ require_relative 'resource/volumes'
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.14.1
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: