Skip to content
代码片段 群组 项目
提交 7a7674cd 编辑于 作者: Alex Kalderimis's avatar Alex Kalderimis 提交者: Rajendra Kadam
浏览文件

Apply 2 suggestion(s) to 2 file(s)

上级 6c9e6395
No related branches found
No related tags found
无相关合并请求
......@@ -86,7 +86,7 @@ The generator takes three options:
- `--ee`: Indicates if the event is for EE.
- `--category=CATEGORY`: Indicates the `category` 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
bundle exec rails generate gitlab:snowplow_event_definition --category Groups::EmailCampaignsController --action click
......
......@@ -14,7 +14,7 @@ class SnowplowEventDefinitionGenerator < Rails::Generators::Base
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 :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
raise "Event definition already exists at #{file_path}" if definition_exists? && !force_definition_override?
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册