lib/hypercuke/cli/builder.rb in hypercuke-0.4.1 vs lib/hypercuke/cli/builder.rb in hypercuke-0.5.0

- old
+ new

@@ -33,12 +33,13 @@ def add_layer_tag_for_mode cuke_args << "--tags #{layer_tag_for_mode}" end def layer_tag_for_mode - layer = options[:layer_name] - mode = options[:mode] || 'ok' - '@%s_%s' % [ layer, mode ] + layer = options.fetch(:layer_name) + mode = options[:mode] + blank_or_ok = ->(e) { e.to_s =~ /^(\s*|ok)$/ } + '@' + [ layer, mode ].reject(&blank_or_ok).join('_') end def add_profile_unless_already_present if profile_specified? add_profile options[:profile]