Class: VagrantPlugins::Pushover::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-pushover/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject



7
8
9
# File 'lib/vagrant-pushover/command.rb', line 7

def self.synopsis
  "generates pushover configration file"
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
18
19
# File 'lib/vagrant-pushover/command.rb', line 11

def execute
  config_file = ::VagrantPlugins::Pushover.config_file
  if config_file.exist?
    @env.ui.info("Vagrant-pushover configuration file (.vagrant/pushover.rb) is already exist. Edit it and set your app token and your key.")
  else
    ::VagrantPlugins::Pushover.write_default_key
    @env.ui.info("Generated vagrant-pushover configuration file (.vagrant/pushover.rb). Edit it and set your app token and your key.")
  end
end