The Cybre.Space fork of Mastodon -- https://github.com/tootsuite/mastodon https://cybre.space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

version.rb 993B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # frozen_string_literal: true
  2. module Mastodon
  3. module Version
  4. module_function
  5. def major
  6. 2
  7. end
  8. def minor
  9. 8
  10. end
  11. def patch
  12. 3
  13. end
  14. def pre
  15. nil
  16. end
  17. def flags
  18. ''
  19. end
  20. def to_a
  21. [major, minor, patch, pre].compact
  22. end
  23. def to_s
  24. [to_a.join('.'), flags, '-cybre'].join
  25. end
  26. def repository
  27. ENV.fetch('GITHUB_REPOSITORY') { 'tootsuite/mastodon' }
  28. end
  29. def source_base_url
  30. 'https://cybre.tech/cybrespace/mastodon'
  31. end
  32. # specify git tag or commit hash here
  33. def source_tag
  34. ENV.fetch('SOURCE_TAG') { nil }
  35. end
  36. def source_url
  37. if source_tag
  38. "#{source_base_url}/tree/#{source_tag}"
  39. else
  40. source_base_url
  41. end
  42. end
  43. def user_agent
  44. @user_agent ||= "#{HTTP::Request::USER_AGENT} (Mastodon/#{Version}; +http#{Rails.configuration.x.use_https ? 's' : ''}://#{Rails.configuration.x.web_domain}/)"
  45. end
  46. end
  47. end