class Renuo::Cli
Constants
- NAME
- VERSION
Public Instance Methods
Source
# File lib/renuo/cli.rb, line 34 def start require "commander/import" program :version, Renuo::Cli::VERSION program :description, "Renuo CLI" update Dir[File.expand_path("cli/{commands,services}/*.rb", __dir__)].each { |f| require f } end
include CommandHelper
Private Instance Methods
Source
# File lib/renuo/cli.rb, line 46 def update info = Gems.info Renuo::Cli::NAME return unless Gem::Version.new(Renuo::Cli::VERSION) < Gem::Version.new(info["version"]) say "You are running the version #{Renuo::Cli::VERSION} but the brand new #{info["version"]} is available. 🎉" if agree("Why don't you update with `gem update renuo-cli`? I can run it for you. 💪") system("gem update #{Renuo::Cli::NAME}") abort "Nice! I updated myself. 🤩 Now you can run the command again." end abort("Good. Just do it yourself then...😒") end