Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e17a9a38
Commit
e17a9a38
authored
Mar 27, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add uuid to usage ping
parent
a8441c99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+4
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-0
No files found.
lib/gitlab/usage_data.rb
View file @
e17a9a38
module
Gitlab
class
UsageData
include
Gitlab
::
CurrentSettings
class
<<
self
def
data
(
force_refresh:
false
)
Rails
.
cache
.
fetch
(
'usage_data'
,
force:
force_refresh
,
expires_in:
2
.
weeks
)
{
uncached_data
}
...
...
@@ -51,7 +53,8 @@ module Gitlab
end
def
license_usage_data
usage_data
=
{
version:
Gitlab
::
VERSION
,
usage_data
=
{
uuid:
current_application_settings
.
uuid
,
version:
Gitlab
::
VERSION
,
active_user_count:
User
.
active
.
count
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
}
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
e17a9a38
...
...
@@ -22,6 +22,7 @@ describe Gitlab::UsageData do
recorded_at
version
mattermost_enabled
uuid
)
)
end
...
...
@@ -72,6 +73,7 @@ describe Gitlab::UsageData do
it
"gathers license data"
do
license
=
::
License
.
current
expect
(
subject
[
:uuid
]).
to
eq
(
current_application_settings
.
uuid
)
expect
(
subject
[
:license_md5
]).
to
eq
(
Digest
::
MD5
.
hexdigest
(
license
.
data
))
expect
(
subject
[
:version
]).
to
eq
(
Gitlab
::
VERSION
)
expect
(
subject
[
:licensee
]).
to
eq
(
license
.
licensee
)
...
...
Write
Preview
Markdown
is supported
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