Class: Defmastership::App
- Inherits:
-
Object
- Object
- Defmastership::App
- Extended by:
- GLI::App
- Defined in:
- lib/defmastership/app.rb
Overview
The start of everything !
Class Method Summary collapse
-
.configure_export_flags(command) ⇒ Object
Helper method.
-
.configure_modify_changes_summary_flag(command) ⇒ Object
Helper method.
-
.configure_modify_flags(command) ⇒ Object
Helper method.
-
.configure_modify_modifications_file_flag(command) ⇒ Object
Helper method.
-
.configure_modify_modifications_flag(command) ⇒ Object
Helper method.
Class Method Details
.configure_export_flags(command) ⇒ Object
Helper method
24 25 26 27 |
# File 'lib/defmastership/app.rb', line 24 def self.configure_export_flags(command) command.flag(%i[separator sep s], default_value: ',', desc: 'CSV separator') command.switch(%i[no-fail], desc: 'Exit success even in case of wrong explicit checksum') end |
.configure_modify_changes_summary_flag(command) ⇒ Object
Helper method
84 85 86 87 88 89 |
# File 'lib/defmastership/app.rb', line 84 def self.configure_modify_changes_summary_flag(command) command.flag( %i[changes-summary s], desc: 'generates a change summary in a CSV file' ) end |
.configure_modify_flags(command) ⇒ Object
Helper method
58 59 60 61 62 |
# File 'lib/defmastership/app.rb', line 58 def self.configure_modify_flags(command) configure_modify_modifications_flag(command) configure_modify_modifications_file_flag(command) configure_modify_changes_summary_flag(command) end |
.configure_modify_modifications_file_flag(command) ⇒ Object
Helper method
75 76 77 78 79 80 81 |
# File 'lib/defmastership/app.rb', line 75 def self.configure_modify_modifications_file_flag(command) command.flag( %i[modifications-file mf], default_value: 'modifications.yml', desc: 'modifications description file' ) end |
.configure_modify_modifications_flag(command) ⇒ Object
Helper method
65 66 67 68 69 70 71 72 |
# File 'lib/defmastership/app.rb', line 65 def self.configure_modify_modifications_flag(command) command.flag( %i[modifications mod m], must_match: /(?:[\w-]+)(?:,[\w-]+)*/, default_value: 'all', desc: 'comma separated list of modifications to apply' ) end |