flickrup 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,16 +4,21 @@ class PrefixedExtension
4
4
  end
5
5
 
6
6
  def values(prefix_key, ctx)
7
- all_tags = ctx.image.tags
8
7
 
9
8
  prefix = @config[prefix_key]
10
9
 
11
- (selected_tags, tags) = all_tags.partition do |x|
12
- x.start_with?("#{prefix}")
13
- end
10
+ if prefix
11
+ all_tags = ctx.image.tags
12
+
13
+ (selected_tags, tags) = all_tags.partition do |x|
14
+ x.start_with?("#{prefix}")
15
+ end
14
16
 
15
- selected_tags.map do |x|
16
- x[(prefix.length)..x.length]
17
+ selected_tags.map do |x|
18
+ x[(prefix.length)..x.length]
19
+ end
20
+ else
21
+ []
17
22
  end
18
23
  end
19
24
  end
@@ -12,7 +12,7 @@ class Visibility < PrefixedExtension
12
12
  visibility = values(:visibilityprefix, ctx)
13
13
 
14
14
  config_override = if visibility.length == 0
15
- logger.debug("No visibility specified for #{image}.")
15
+ logger.debug("No visibility specified for #{ctx.image.filename}.")
16
16
  {}
17
17
  elsif visibility.length == 1
18
18
  config_for_visibility(visibility[0])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flickrup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Gilbert