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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
9f76632d
Commit
9f76632d
authored
Jun 07, 2018
by
Balasankar C
Committed by
Sean McGivern
Jun 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add installation type to usage ping data
parent
75ee50f8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
0 deletions
+5
-0
INSTALLATION_TYPE
INSTALLATION_TYPE
+1
-0
lib/gitlab.rb
lib/gitlab.rb
+1
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-0
No files found.
INSTALLATION_TYPE
0 → 100644
View file @
9f76632d
source
lib/gitlab.rb
View file @
9f76632d
...
@@ -33,6 +33,7 @@ module Gitlab
...
@@ -33,6 +33,7 @@ module Gitlab
APP_DIRS_PATTERN
=
%r{^/?(app|config|ee|lib|spec|
\(\w
*
\)
)}
APP_DIRS_PATTERN
=
%r{^/?(app|config|ee|lib|spec|
\(\w
*
\)
)}
SUBDOMAIN_REGEX
=
%r{
\A
https://[a-z0-9]+
\.
gitlab
\.
com
\z
}
SUBDOMAIN_REGEX
=
%r{
\A
https://[a-z0-9]+
\.
gitlab
\.
com
\z
}
VERSION
=
File
.
read
(
root
.
join
(
"VERSION"
)).
strip
.
freeze
VERSION
=
File
.
read
(
root
.
join
(
"VERSION"
)).
strip
.
freeze
INSTALLATION_TYPE
=
File
.
read
(
root
.
join
(
"INSTALLATION_TYPE"
)).
strip
.
freeze
def
self
.
com?
def
self
.
com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
# Check `gl_subdomain?` as well to keep parity with gitlab.com
...
...
lib/gitlab/usage_data.rb
View file @
9f76632d
...
@@ -21,6 +21,7 @@ module Gitlab
...
@@ -21,6 +21,7 @@ module Gitlab
uuid:
Gitlab
::
CurrentSettings
.
uuid
,
uuid:
Gitlab
::
CurrentSettings
.
uuid
,
hostname:
Gitlab
.
config
.
gitlab
.
host
,
hostname:
Gitlab
.
config
.
gitlab
.
host
,
version:
Gitlab
::
VERSION
,
version:
Gitlab
::
VERSION
,
installation_type:
Gitlab
::
INSTALLATION_TYPE
,
active_user_count:
User
.
active
.
count
,
active_user_count:
User
.
active
.
count
,
recorded_at:
Time
.
now
,
recorded_at:
Time
.
now
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
mattermost_enabled:
Gitlab
.
config
.
mattermost
.
enabled
,
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
9f76632d
...
@@ -32,6 +32,7 @@ describe Gitlab::UsageData do
...
@@ -32,6 +32,7 @@ describe Gitlab::UsageData do
mattermost_enabled
mattermost_enabled
edition
edition
version
version
installation_type
uuid
uuid
hostname
hostname
signup
signup
...
@@ -156,6 +157,7 @@ describe Gitlab::UsageData do
...
@@ -156,6 +157,7 @@ describe Gitlab::UsageData do
it
"gathers license data"
do
it
"gathers license data"
do
expect
(
subject
[
:uuid
]).
to
eq
(
Gitlab
::
CurrentSettings
.
uuid
)
expect
(
subject
[
:uuid
]).
to
eq
(
Gitlab
::
CurrentSettings
.
uuid
)
expect
(
subject
[
:version
]).
to
eq
(
Gitlab
::
VERSION
)
expect
(
subject
[
:version
]).
to
eq
(
Gitlab
::
VERSION
)
expect
(
subject
[
:installation_type
]).
to
eq
(
Gitlab
::
INSTALLATION_TYPE
)
expect
(
subject
[
:active_user_count
]).
to
eq
(
User
.
active
.
count
)
expect
(
subject
[
:active_user_count
]).
to
eq
(
User
.
active
.
count
)
expect
(
subject
[
:recorded_at
]).
to
be_a
(
Time
)
expect
(
subject
[
:recorded_at
]).
to
be_a
(
Time
)
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