pygmy 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6418c4829b69ff752c350469fd65bcca3a4a1a8
4
- data.tar.gz: 1106a2b2725ceace131f1ab7c570740f36d86f65
3
+ metadata.gz: 51b3f584f5483a34121bd2a1677f734b6cb80a6f
4
+ data.tar.gz: e729dd858c0d21c8167c802d6c46a33c59b093d6
5
5
  SHA512:
6
- metadata.gz: b2d469958cda871ea26993dd40a2c668ed06b27caeee38f03ee16c454fd685d33e33370a5a326de4b1a2eac44de12bfd1e75efbcddf8d51c8c5360ee5d35f43e
7
- data.tar.gz: d002ac2ae9a322a7bfd11cf64065059638b7ab1386994a6566a78f9ba3bb48b10b8d665bdacd4c7115f77f6abe1b42980070ab3a2c61a2b4f3042699dc495577
6
+ metadata.gz: 7ebfe1539d456e2e180dca78611efd49277464ad99bdb56daa094d5ae5d36ee7dec4b5cab24c7b3a2d3da1783c1f9b88c542649795c33c1301282d2d71c239e3
7
+ data.tar.gz: 674f730b3342ea05aff81acd135b1aa1e79931191500e66321094e70a2590414d43b440521595dba8fe0392d65b3dd6326e063b43aae57f6c6ed538b0f170379
data/bin/pygmy CHANGED
@@ -112,6 +112,7 @@ class PygmyBin < Thor
112
112
  Pygmy::Haproxy.pull
113
113
  Pygmy::Mailhog.pull
114
114
  Pygmy::SshAgent.pull
115
+ Pygmy::Amazee.pull_all
115
116
  puts "Done. Recreating containers...".yellow
116
117
  exec_stop({:destroy => true})
117
118
  exec_up({})
@@ -0,0 +1,49 @@
1
+ require_relative 'docker_service'
2
+
3
+ module Pygmy
4
+ class Amazee
5
+ extend Pygmy::DockerService
6
+
7
+ def self.pull(image_name)
8
+ puts "Pulling Docker Image #{Shellwords.escape(image_name)}".yellow
9
+ pull_cmd = "docker pull #{Shellwords.escape(image_name)}"
10
+ success = Sh.run_command(pull_cmd).success?
11
+ unless success
12
+ raise RuntimeError.new(
13
+ "Failed to update #{self.container_name}. Command #{pull_cmd} failed"
14
+ )
15
+ end
16
+ end
17
+
18
+ def self.ls_cmd
19
+ cmd = 'docker image ls --format "{{.Repository}}:{{.Tag}}"'
20
+ list = Sh.run_command(cmd)
21
+
22
+ # For better handling of containers, we should compare our
23
+ # results against a whitelist instead of preferential
24
+ # treatment of linux pipes.
25
+ containers = list.stdout.split("\n")
26
+ amazee_containers = []
27
+ containers.each do |container|
28
+ # Selectively target amazeeio/* images.
29
+ if container.include?('amazeeio/')
30
+ # Filter out items which we don't want.
31
+ unless container.include?("none") || container.include?("ssh-agent") || container.include?("haproxy")
32
+ amazee_containers.push(container)
33
+ end
34
+ end
35
+ end
36
+ amazee_containers
37
+ end
38
+
39
+ def self.pull_all
40
+ list = self.ls_cmd
41
+ unless list.nil?
42
+ list.each do |image|
43
+ pull(image)
44
+ end
45
+ end
46
+ end
47
+
48
+ end
49
+ end
@@ -1,4 +1,4 @@
1
1
  module Pygmy
2
- VERSION = '0.9.9'
3
- DATE = '2018-03-27'
2
+ VERSION = '0.9.10'
3
+ DATE = '2018-11-19'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pygmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Schmid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2018-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -122,6 +122,7 @@ extra_rdoc_files: []
122
122
  files:
123
123
  - bin/pygmy
124
124
  - lib/pygmy.rb
125
+ - lib/pygmy/amazee.rb
125
126
  - lib/pygmy/dnsmasq.rb
126
127
  - lib/pygmy/docker_network.rb
127
128
  - lib/pygmy/docker_service.rb
@@ -154,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  version: '0'
155
156
  requirements: []
156
157
  rubyforge_project:
157
- rubygems_version: 2.5.2
158
+ rubygems_version: 2.4.6
158
159
  signing_key:
159
160
  specification_version: 4
160
161
  summary: pygmy provides the required servies to run the amazee.io Drupal local development