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
5025cfe2
Commit
5025cfe2
authored
Jun 20, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port of da-usage-ping to EE
parent
427c3447
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+10
-10
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+20
-19
No files found.
lib/gitlab/usage_data.rb
View file @
5025cfe2
...
...
@@ -24,7 +24,6 @@ module Gitlab
installation_type:
Gitlab
::
INSTALLATION_TYPE
,
active_user_count:
User
.
active
.
count
,
recorded_at:
Time
.
now
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
edition:
'EE'
}
...
...
@@ -128,20 +127,21 @@ module Gitlab
def
features_usage_data_ce
{
signup:
Gitlab
::
CurrentSettings
.
allow_signup?
,
ldap:
Gitlab
.
config
.
ldap
.
enabled
,
gravatar:
Gitlab
::
CurrentSettings
.
gravatar_enabled?
,
omniauth:
Gitlab
.
config
.
omniauth
.
enabled
,
reply_by_email:
Gitlab
::
IncomingEmail
.
enabled?
,
container_registry:
Gitlab
.
config
.
registry
.
enabled
,
gitlab_shared_runners:
Gitlab
.
config
.
gitlab_ci
.
shared_runners_enabled
container_registry_enabled:
Gitlab
.
config
.
registry
.
enabled
,
gitlab_shared_runners_enabled:
Gitlab
.
config
.
gitlab_ci
.
shared_runners_enabled
,
gravatar_enabled:
Gitlab
::
CurrentSettings
.
gravatar_enabled?
,
ldap_enabled:
Gitlab
.
config
.
ldap
.
enabled
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
omniauth_enabled:
Gitlab
.
config
.
omniauth
.
enabled
,
reply_by_email_enabled:
Gitlab
::
IncomingEmail
.
enabled?
,
signup_enabled:
Gitlab
::
CurrentSettings
.
allow_signup?
}
end
def
features_usage_data_ee
{
elasticsearch:
Gitlab
::
CurrentSettings
.
elasticsearch_search?
,
geo:
Gitlab
::
Geo
.
enabled?
elasticsearch
_enabled
:
Gitlab
::
CurrentSettings
.
elasticsearch_search?
,
geo
_enabled
:
Gitlab
::
Geo
.
enabled?
}
end
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
5025cfe2
...
...
@@ -40,22 +40,22 @@ describe Gitlab::UsageData do
license_md5
license_id
recorded_at
mattermost_enabled
edition
version
installation_type
uuid
hostname
signup
ldap
gravatar
omniauth
reply_by_email
container_registry
mattermost_enabled
signup_enabled
ldap_enabled
gravatar_enabled
omniauth_enabled
reply_by_email_enabled
container_registry_enabled
gitlab_shared_runners_enabled
elasticsearch_enabled
geo_enabled
gitlab_pages
gitlab_shared_runners
elasticsearch
geo
git
database
avg_cycle_analytics
...
...
@@ -149,13 +149,14 @@ describe Gitlab::UsageData do
subject
{
described_class
.
features_usage_data_ce
}
it
'gathers feature usage data'
do
expect
(
subject
[
:signup
]).
to
eq
(
Gitlab
::
CurrentSettings
.
allow_signup?
)
expect
(
subject
[
:ldap
]).
to
eq
(
Gitlab
.
config
.
ldap
.
enabled
)
expect
(
subject
[
:gravatar
]).
to
eq
(
Gitlab
::
CurrentSettings
.
gravatar_enabled?
)
expect
(
subject
[
:omniauth
]).
to
eq
(
Gitlab
.
config
.
omniauth
.
enabled
)
expect
(
subject
[
:reply_by_email
]).
to
eq
(
Gitlab
::
IncomingEmail
.
enabled?
)
expect
(
subject
[
:container_registry
]).
to
eq
(
Gitlab
.
config
.
registry
.
enabled
)
expect
(
subject
[
:gitlab_shared_runners
]).
to
eq
(
Gitlab
.
config
.
gitlab_ci
.
shared_runners_enabled
)
expect
(
subject
[
:mattermost_enabled
]).
to
eq
(
Gitlab
.
config
.
mattermost
.
enabled
)
expect
(
subject
[
:signup_enabled
]).
to
eq
(
Gitlab
::
CurrentSettings
.
allow_signup?
)
expect
(
subject
[
:ldap_enabled
]).
to
eq
(
Gitlab
.
config
.
ldap
.
enabled
)
expect
(
subject
[
:gravatar_enabled
]).
to
eq
(
Gitlab
::
CurrentSettings
.
gravatar_enabled?
)
expect
(
subject
[
:omniauth_enabled
]).
to
eq
(
Gitlab
.
config
.
omniauth
.
enabled
)
expect
(
subject
[
:reply_by_email_enabled
]).
to
eq
(
Gitlab
::
IncomingEmail
.
enabled?
)
expect
(
subject
[
:container_registry_enabled
]).
to
eq
(
Gitlab
.
config
.
registry
.
enabled
)
expect
(
subject
[
:gitlab_shared_runners_enabled
]).
to
eq
(
Gitlab
.
config
.
gitlab_ci
.
shared_runners_enabled
)
end
end
...
...
@@ -163,8 +164,8 @@ describe Gitlab::UsageData do
subject
{
described_class
.
features_usage_data_ee
}
it
'gathers feature usage data of EE'
do
expect
(
subject
[
:elasticsearch
]).
to
eq
(
Gitlab
::
CurrentSettings
.
elasticsearch_search?
)
expect
(
subject
[
:geo
]).
to
eq
(
Gitlab
::
Geo
.
enabled?
)
expect
(
subject
[
:elasticsearch
_enabled
]).
to
eq
(
Gitlab
::
CurrentSettings
.
elasticsearch_search?
)
expect
(
subject
[
:geo
_enabled
]).
to
eq
(
Gitlab
::
Geo
.
enabled?
)
end
end
...
...
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