From 696c2c6f2f3338df121cf17389478da9ecab11af Mon Sep 17 00:00:00 2001 From: Daigo 3 Dango Date: Tue, 22 Aug 2017 20:54:19 +0000 Subject: Add Mastodon::Source.url (#4643) * Add Mastodon::Source.url * Update spec * Refactor Move things frmo Mastodon::Source to Mastodon::Version --- lib/mastodon/version.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib') diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 381e9aac9..fcca875d9 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -31,5 +31,22 @@ module Mastodon def to_s [to_a.join('.'), flags].join end + + def source_base_url + 'https://github.com/tootsuite/mastodon' + end + + # specify git tag or commit hash here + def source_tag + nil + end + + def source_url + if source_tag + "#{source_base_url}/tree/#{source_tag}" + else + source_base_url + end + end end end -- cgit