]> cat aescling's git repositories - mastodon.git/blob - lib/mastodon/version.rb
Bump version to 2.7.3 (#10102)
[mastodon.git] / lib / mastodon / version.rb
1 # frozen_string_literal: true
2
3 module Mastodon
4 module Version
5 module_function
6
7 def major
8 2
9 end
10
11 def minor
12 7
13 end
14
15 def patch
16 3
17 end
18
19 def pre
20 nil
21 end
22
23 def flags
24 ''
25 end
26
27 def to_a
28 [major, minor, patch, pre].compact
29 end
30
31 def to_s
32 [to_a.join('.'), flags].join
33 end
34
35 def repository
36 'tootsuite/mastodon'
37 end
38
39 def source_base_url
40 "https://github.com/#{repository}"
41 end
42
43 # specify git tag or commit hash here
44 def source_tag
45 nil
46 end
47
48 def source_url
49 if source_tag
50 "#{source_base_url}/tree/#{source_tag}"
51 else
52 source_base_url
53 end
54 end
55
56 def user_agent
57 @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
58 end
59 end
60 end
This page took 0.103237 seconds and 6 git commands to generate.