This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Bump version, improve how version is stored for better commit history (
#2526
)
closed-social-glitch-2
Eugen Rochko
7 years ago
committed by
GitHub
parent
b48f2cbc8b
commit
b48c9013aa
4 changed files
with
30 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/helpers/http_helper.rb
+1
-1
app/presenters/instance_presenter.rb
+1
-1
app/views/api/v1/instances/show.rabl
+27
-1
lib/mastodon/version.rb
+ 1
- 1
app/helpers/http_helper.rb
View File
@ -1,7 +1,7 @@
# 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
)
+ 1
- 1
app/presenters/instance_presenter.rb
View File
@ -27,6 +27,6 @@ class InstancePresenter
end
def
version_number
Mastodon
::
V
ERSION
Mastodon
::
V
ersion
end
end
+ 1
- 1
app/views/api/v1/instances/show.rabl
View File
@ -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
}
+ 27
- 1
lib/mastodon/version.rb
View File
@ -1,5 +1,31 @@
# 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
Loading…
Cancel
Save