Class: Appifier::CLI::Subcommands::Configuration
- Inherits:
-
Thor
- Object
- Thor
- Appifier::CLI::Subcommands::Configuration
- Defined in:
- lib/appifier/cli/configuration.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Configuration
constructor
A new instance of Configuration.
- #reset ⇒ Object
- #sanitycheck ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(*args) ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 |
# File 'lib/appifier/cli/configuration.rb', line 8 def initialize(*args) super @output = Carioca::Registry.get.get_service name: :output @finisher = Carioca::Registry.get.get_service name: :finisher end |
Instance Method Details
#reset ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/appifier/cli/configuration.rb', line 29 def reset begin raise "[DANGER] please add -F if you sure : appifier configuration reset -F" unless [:force] @output.warn "Appifier reset configuration" Appifier::Configuration.setup force: true @finisher.terminate exit_case: :quiet_exit rescue RuntimeError => e @output.error e. @finisher.terminate exit_case: :error_exit end end |
#sanitycheck ⇒ Object
16 17 18 19 |
# File 'lib/appifier/cli/configuration.rb', line 16 def sanitycheck Appifier::Configuration::Checker.sanitycheck end |
#version ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/appifier/cli/configuration.rb', line 44 def version; @output.info "Querying version" puts 'Appifier (c) Ultragreen Software' puts "Camille PAQUET - Romain GEORGES " puts TTY::Link.link_to("http://www.ultragreen.net", "http://www.ultragreen.net") puts "Version #{Appifier::VERSION}" @finisher.terminate exit_case: :quiet_exit end |