awful 0.0.101 → 0.0.102

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: 97898e016a1a9ab513f0bc272ce427778968dd65
4
- data.tar.gz: 85272e8e58adb64c441b9d5957409b1de9223523
3
+ metadata.gz: 507cb6aceaf2ecadde5e9691a17570fd4998bf21
4
+ data.tar.gz: 150879f71f9994a29645bb6c13bf794f93d5fc6f
5
5
  SHA512:
6
- metadata.gz: f800aa388fd1712d601a594364cad4e7e417c1691bc8f2c96185da77cdfe0c0d4db5f6437afc8515dd8cb7944e549c66f2d71b9ff2d9855ffe96f28d3e779ac7
7
- data.tar.gz: f4face869d54d7a83e3cf9b2c34b2390f10b61fe55615ab6498321c5cd5a14a11721f12a82c4166491cf8ac34e13ebae638565f0eec8d5557a5631c2d0cb6887
6
+ metadata.gz: ea7cc02925108b1a8822a7dd1956dda7849ce0120647151193591e8865d8eb4c625af7f664ab5a5d24d661295f508433ee6899fd8fc918d77ffdba2d72537c0f
7
+ data.tar.gz: 755e48925051c3e00f1c9abe80bd9397262df09958487da00740e1628e30d1b2d3be44bd7f92b7ed4268ce8b4ff4beffbc38d40f9ddea7d68273c386a86c53be
@@ -78,5 +78,23 @@ module Awful
78
78
  end
79
79
  end
80
80
  end
81
+
82
+ desc 'get REPO TAG[S]', 'get image details for all given TAGS'
83
+ def get(repository, *tags)
84
+ ids = tags.map do |tag|
85
+ {image_tag: tag}
86
+ end
87
+ ecr.batch_get_image(repository_name: repository, image_ids: ids).images.tap do |imgs|
88
+ imgs.each do |img|
89
+ puts YAML.dump(stringify_keys(img.to_h))
90
+ end
91
+ end
92
+ end
93
+
94
+ desc 'exists REPO TAG', 'test if repo with given tag exists in registry'
95
+ def exists(repository, tag)
96
+ imgs = ecr.batch_get_image(repository_name: repository, image_ids: [{image_tag: tag}]).images
97
+ (imgs.empty? ? false : true).tap(&method(:puts))
98
+ end
81
99
  end
82
100
  end
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.101'
2
+ VERSION = '0.0.102'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.101
4
+ version: 0.0.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler