Class: Codelation::Cli
- Inherits:
-
Thor
- Object
- Thor
- Codelation::Cli
- Defined in:
- lib/codelation/base.rb,
lib/codelation/version.rb,
lib/codelation/development.rb,
lib/codelation/development/rvm.rb,
lib/codelation/development/atom.rb,
lib/codelation/development/postgres.rb,
lib/codelation/development/dot_files.rb,
lib/codelation/development/atom_packages.rb
Constant Summary collapse
- ATOM_APP_DOWNLOAD_URL =
"https://atom.io/download/mac"- POSTGRES_APP_DOWNLOAD_URL =
"https://github.com/PostgresApp/PostgresApp/releases/download/9.4.1.0/Postgres-9.4.1.0.zip"
Instance Method Summary collapse
Instance Method Details
#development_install ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/codelation/development.rb', line 10 def development_install print_heading("Installing Atom.app") install_atom print_heading("Installing Atom Packages") install_atom_packages print_heading("Installing Dot Files") install_dot_files print_heading("Installing Postgres.app") install_postgres print_heading("Installing RVM") install_rvm end |
#update ⇒ Object
10 11 12 13 14 |
# File 'lib/codelation/version.rb', line 10 def update command = "gem install codelation-cli" puts "Running #{command}..." exec(command) end |
#version ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/codelation/version.rb', line 17 def version gem_version = "v#{Codelation::VERSION}" # Grab the latest version of the RubyGem rubygems_json = open("https://rubygems.org/api/v1/gems/codelation-cli.json").read rubygems_version = "v#{JSON.parse(rubygems_json)["version"].strip}" = "" if gem_version != rubygems_version = " Run `codelation update` to install" end puts puts "Codelation CLI" puts " Installed: #{gem_version}" puts " Latest: #{rubygems_version}#{upgrade_message}" puts end |