Class: RedmineCLI::Subcommands::Conf
- Inherits:
-
Thor
- Object
- Thor
- RedmineCLI::Subcommands::Conf
- Extended by:
- Helpers::Output
- Includes:
- Helpers::Input, Helpers::Output
- Defined in:
- lib/redmine_cli/subcommands/conf.rb
Overview
All methods for working with config file
Instance Method Summary collapse
Methods included from Helpers::Output
erb, message, print_object_list, print_prompt_message
Methods included from Helpers::Input
#ask, #ask_for_object, #ask_for_user, #ask_from_text_editor, #ask_url
Instance Method Details
#init ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/redmine_cli/subcommands/conf.rb', line 15 def init Config['user'] = ask m('commands.conf.init.enter_user'), default: Config['user'] Config['password'] = ask m('commands.conf.init.enter_password'), default: Config['password'] Config['site'] = ask_url m('commands.conf.init.enter_site'), default: Config['site'] Config['just_created'] = false Config.save puts m(:thank_you) end |
#status_complete ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/redmine_cli/subcommands/conf.rb', line 27 def status_complete puts m('commands.conf.status_complete.select_status') Config['statuses'] ||= {} Config['statuses']['complete'] = ask_for_object(RedmineRest::Models::IssueStatus.all).id Config.save puts m(:thank_you) end |