Module: VagrantPlugins::Pushbullet

Defined in:
lib/vagrant-pushbullet.rb,
lib/vagrant-pushbullet/action.rb,
lib/vagrant-pushbullet/config.rb,
lib/vagrant-pushbullet/plugin.rb,
lib/vagrant-pushbullet/command.rb,
lib/vagrant-pushbullet/version.rb

Defined Under Namespace

Classes: Action, Command, Config, Plugin

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.config_fileObject



8
9
10
11
# File 'lib/vagrant-pushbullet.rb', line 8

def self.config_file
  vag_home = Pathname.new(File.expand_path("~", __FILE__))
  Pathname.new("#{vag_home}/.vagrant.d/pushbullet.rb")
end

.write_default_keyObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-pushbullet.rb', line 13

def self.write_default_key
  content = <<-EOF
module PushbulletConfig
  TOKEN = "" #required
  DEVICES = [] #optional. MUST use quotes. NO empty strings.
end
EOF
  #TODO: write default config file again. 
  File.open(config_file,'w') do |f|
    f.puts content
  end
end