tootlab-mastodon/lib/mastodon/version.rb
Thibaut Girka d392020da6 Merge branch 'master' into glitch-soc/tentative-merge
Conflicts:
	README.md
	app/controllers/statuses_controller.rb
	app/lib/feed_manager.rb
	config/navigation.rb
	spec/lib/feed_manager_spec.rb

Conflicts were resolved by taking both versions for each change.
This means the two filter systems (glitch-soc's keyword mutes and tootsuite's
custom filters) are in place, which will be changed in a follow-up commit.
2018-07-09 07:13:59 +02:00

57 lines
868 B
Ruby

# frozen_string_literal: true
module Mastodon
module Version
module_function
def major
2
end
def minor
4
end
def patch
3
end
def pre
nil
end
def flags
'rc2'
end
def to_a
[major, minor, patch, pre].compact
end
def to_s
[to_a.join('.'), flags].join
end
def source_base_url
'https://github.com/glitch-soc/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
def user_agent
@user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
end
end
end