lib/pinpress.rb in pinpress-1.5.1 vs lib/pinpress.rb in pinpress-1.5.2

- old
+ new

@@ -62,11 +62,11 @@ def init_template(explicit_template, template_type) pin_t_sym = :default_pin_template tag_t_sym = :default_tag_template s = (template_type == PinPress::Template::TYPE_PIN ? pin_t_sym : tag_t_sym) default_template = configuration.pinpress[s] - + if explicit_template && PinPress.is_template?(explicit_template, template_type) messenger.debug("Using explicit template: #{ explicit_template }") return explicit_template, PinPress.get_template(explicit_template, template_type) elsif PinPress.is_template?(default_template, template_type) messenger.debug("Using default template: #{ default_template }") @@ -215,10 +215,10 @@ def tag_yield(template, opts) output = '' PinPress.execute_template(opts) do |data| tags = [] data.each { |i| tags += i[:tag] } - tags = (tags -= template.ignored_tags if template.ignored_tags).uniq.map do |t| + tags = tags.uniq.map do |t| { tag: t, count: tags.count(t) } end output += template[:opener] if template[:opener] tags.each do |t|