Sha256: d49c5e01b7a35bf91d24dc0d0678d1d6e5e0d367b7fc04bcfa300309396548b0
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
module Granify module Controller class Update < Controller::Base # Setup all flags supported by this command def pre_exec # flag methods that require internet access @methods_require_internet.push(:rbtils) super end def rbtils Notify.info("Checking for updates") status = Command::Exec.global("(cd #{Granify::INSTALLED_DIR} && git checkout master && git pull) 2>&1").split("\n") if status.include? "Your branch is up-to-date with 'origin/master'." Notify.warning("You are running the current version of #{Granify::PACKAGE_NAME}") else # TODO: run on a different machine, currently this just assumes it worked.. Notify.success("Successfully updated to the latest version") end end def granify Notify.info("Checking for updates") status = @model.command.arbitrary("git checkout master && git pull") puts status.inspect exit end def goliath Notify.info("Checking for updates") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rbtils-0.0.2 | lib/controllers/update.rb |
rbtils-0.0.1 | lib/controllers/update.rb |