Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
mamot
Commits
b48c9013
Commit
b48c9013
authored
Apr 27, 2017
by
Eugen Rochko
Committed by
GitHub
Apr 27, 2017
Browse files
Bump version, improve how version is stored for better commit history (#2526)
parent
b48f2cbc
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/helpers/http_helper.rb
View file @
b48c9013
# frozen_string_literal: true
module
HttpHelper
USER_AGENT
=
"
#{
HTTP
::
Request
::
USER_AGENT
}
(Mastodon/
#{
Mastodon
::
V
ERSION
}
; +http://
#{
Rails
.
configuration
.
x
.
local_domain
}
/)"
USER_AGENT
=
"
#{
HTTP
::
Request
::
USER_AGENT
}
(Mastodon/
#{
Mastodon
::
V
ersion
}
; +http://
#{
Rails
.
configuration
.
x
.
local_domain
}
/)"
def
http_client
(
options
=
{})
timeout
=
{
write:
10
,
connect:
10
,
read:
10
}.
merge
(
options
)
...
...
app/presenters/instance_presenter.rb
View file @
b48c9013
...
...
@@ -27,6 +27,6 @@ class InstancePresenter
end
def
version_number
Mastodon
::
V
ERSION
Mastodon
::
V
ersion
end
end
app/views/api/v1/instances/show.rabl
View file @
b48c9013
...
...
@@ -4,4 +4,4 @@ node(:uri) { site_hostname }
node(:title) { Setting.site_title }
node(:description) { Setting.site_description }
node(:email) { Setting.site_contact_email }
node(:version) { Mastodon::V
ERSION
}
node(:version) { Mastodon::V
ersion
}
lib/mastodon/version.rb
View file @
b48c9013
# frozen_string_literal: true
module
Mastodon
VERSION
=
'1.2.2'
module
Version
module_function
def
major
1
end
def
minor
3
end
def
patch
0
end
def
pre
nil
end
def
to_a
[
major
,
minor
,
patch
,
pre
].
compact
end
def
to_s
to_a
.
join
(
'.'
)
end
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment