Sha256: a75ccdc52440e01680b52178684f7f068d533c246ab02327429eacc886421de0
Contents?: true
Size: 506 Bytes
Versions: 10
Compression:
Stored size: 506 Bytes
Contents
module Story # Returns the URL for the story at Pivotal Tracker. def story_url(story_id) "https://www.pivotaltracker.com/story/show/#{story_id}" end # Returns the ids of delivered stories found in the given text. def delivered_ids(text) delivered = text.scan(/\[Deliver(?:s|ed) (.*?)\]/).flatten # Handle multiple ids, i.e., '[Delivers #<id 1> #<id 2>]' delivered.inject([]) do |ids, element| ids.concat(element.scan(/[0-9]{8,}/).flatten) ids end.uniq end end
Version data entries
10 entries across 10 versions & 1 rubygems