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
7a7674cd
Commit
7a7674cd
authored
May 05, 2021
by
Alex Kalderimis
Committed by
Rajendra Kadam
May 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 2 suggestion(s) to 2 file(s)
parent
6c9e6395
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
doc/development/snowplow/event_dictionary_guide.md
doc/development/snowplow/event_dictionary_guide.md
+1
-1
lib/generators/gitlab/snowplow_event_definition_generator.rb
lib/generators/gitlab/snowplow_event_definition_generator.rb
+1
-1
No files found.
doc/development/snowplow/event_dictionary_guide.md
View file @
7a7674cd
...
@@ -86,7 +86,7 @@ The generator takes three options:
...
@@ -86,7 +86,7 @@ The generator takes three options:
-
`--ee`
: Indicates if the event is for EE.
-
`--ee`
: Indicates if the event is for EE.
-
`--category=CATEGORY`
: Indicates the
`category`
of the event.
-
`--category=CATEGORY`
: Indicates the
`category`
of the event.
-
`--action=ACTION`
: Indicates the
`action`
of the event.
-
`--action=ACTION`
: Indicates the
`action`
of the event.
-
`--force`
:
Force flag to overwrite existing event definition
.
-
`--force`
:
Overwrite existing event definition, if one already exists
.
```
shell
```
shell
bundle
exec
rails generate gitlab:snowplow_event_definition
--category
Groups::EmailCampaignsController
--action
click
bundle
exec
rails generate gitlab:snowplow_event_definition
--category
Groups::EmailCampaignsController
--action
click
...
...
lib/generators/gitlab/snowplow_event_definition_generator.rb
View file @
7a7674cd
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
class_option
:ee
,
type: :boolean
,
optional:
true
,
default:
false
,
desc:
'Indicates if event is for ee'
class_option
:ee
,
type: :boolean
,
optional:
true
,
default:
false
,
desc:
'Indicates if event is for ee'
class_option
:category
,
type: :string
,
optional:
false
,
desc:
'Category of the event'
class_option
:category
,
type: :string
,
optional:
false
,
desc:
'Category of the event'
class_option
:action
,
type: :string
,
optional:
false
,
desc:
'Action of the event'
class_option
:action
,
type: :string
,
optional:
false
,
desc:
'Action of the event'
class_option
:force
,
type: :boolean
,
optional:
true
,
default:
false
,
desc:
'
Force definition override
'
class_option
:force
,
type: :boolean
,
optional:
true
,
default:
false
,
desc:
'
Overwrite existing definition
'
def
create_event_file
def
create_event_file
raise
"Event definition already exists at
#{
file_path
}
"
if
definition_exists?
&&
!
force_definition_override?
raise
"Event definition already exists at
#{
file_path
}
"
if
definition_exists?
&&
!
force_definition_override?
...
...
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