Sha256: a78f9d302c6f728dbd6e1dd1eb7b971e57c7cddcd41255619f41f21d029b8c81

Contents?: true

Size: 620 Bytes

Versions: 9

Compression:

Stored size: 620 Bytes

Contents

require "thor"

module Codelation
  class Cli < Thor
    ATOM_APP_DOWNLOAD_URL = "https://atom.io/download/mac".freeze

  private

    # Add the path to the Atom Init Script
    def add_atom_init_script
      init_path = File.expand_path("~/.atom/init.coffee")
      return if File.read(init_path).include?("process.env.PATH")
      path = `echo $PATH`.strip
      append_to_file "~/.atom/init.coffee", "process.env.PATH = \"#{path}\""
    end

    # Install Atom.app
    def install_atom
      zip_file_path = download_file(ATOM_APP_DOWNLOAD_URL)
      extract_app_from_zip("Atom.app", zip_file_path)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
codelation-cli-0.2.0 lib/codelation/development/atom.rb
codelation-cli-0.1.1 lib/codelation/development/atom.rb
codelation-cli-0.1.0 lib/codelation/development/atom.rb
codelation-cli-0.0.28 lib/codelation/development/atom.rb
codelation-cli-0.0.27 lib/codelation/development/atom.rb
codelation-cli-0.0.26 lib/codelation/development/atom.rb
codelation-cli-0.0.25 lib/codelation/development/atom.rb
codelation-cli-0.0.24 lib/codelation/development/atom.rb
codelation-cli-0.0.23 lib/codelation/development/atom.rb