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
6ccd5325
Commit
6ccd5325
authored
Nov 22, 2021
by
eugielimpin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Camelize options keys to correctly override options in the frontend
parent
3dd92405
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
lib/gitlab/tracking/destinations/snowplow_micro.rb
lib/gitlab/tracking/destinations/snowplow_micro.rb
+1
-1
spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb
spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb
+20
-0
spec/lib/gitlab/tracking_spec.rb
spec/lib/gitlab/tracking_spec.rb
+1
-1
No files found.
lib/gitlab/tracking/destinations/snowplow_micro.rb
View file @
6ccd5325
...
...
@@ -15,7 +15,7 @@ module Gitlab
protocol:
uri
.
scheme
,
port:
uri
.
port
,
force_secure_tracker:
false
)
)
.
transform_keys!
{
|
key
|
key
.
to_s
.
camelize
(
:lower
).
to_sym
}
end
override
:hostname
...
...
spec/lib/gitlab/tracking/destinations/snowplow_micro_spec.rb
View file @
6ccd5325
...
...
@@ -48,4 +48,24 @@ RSpec.describe Gitlab::Tracking::Destinations::SnowplowMicro do
end
end
end
describe
'#options'
do
let_it_be
(
:group
)
{
create
:group
}
before
do
stub_env
(
'SNOWPLOW_MICRO_URI'
,
'http://gdk.test:9091'
)
end
it
'includes protocol with the correct value'
do
expect
(
subject
.
options
(
group
)[
:protocol
]).
to
eq
'http'
end
it
'includes port with the correct value'
do
expect
(
subject
.
options
(
group
)[
:port
]).
to
eq
9091
end
it
'includes forceSecureTracker with value false'
do
expect
(
subject
.
options
(
group
)[
:forceSecureTracker
]).
to
eq
false
end
end
end
spec/lib/gitlab/tracking_spec.rb
View file @
6ccd5325
...
...
@@ -63,7 +63,7 @@ RSpec.describe Gitlab::Tracking do
appId:
'_abc123_'
,
protocol:
'http'
,
port:
9090
,
force
_secure_t
racker:
false
,
force
SecureT
racker:
false
,
formTracking:
true
,
linkClickTracking:
true
}
...
...
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