Sha256: fbb870f528123f20a91911803116f461a04aaf5d22497a72fcb71a82e1976118

Contents?: true

Size: 756 Bytes

Versions: 1

Compression:

Stored size: 756 Bytes

Contents

#!/usr/bin/env ruby
#
# Class which installs rbenv packages, and installs ruby versions
#
# This class does not add the shims path to your shell or manage any aliases
#
require 'yaml'
require_relative 'config'

class Rbenv < Config
  def config
    $global_config['rbenv']
  end

  def install
    packages = ['rbenv', 'rbenv-aliases', 'rbenv-bundler']
    packages.each do |pkg|
      unless system("brew list #{pkg} >/dev/null 2>&1")
        puts "Installing #{pkg}"
        system("brew install #{pkg}")
      end
    end

    versions = config['versions']
    puts "Checking Ruby version:"
    versions.each do |version|
      puts "  #{version}"
      system("rbenv install #{version} --skip-existing")
    end
  end

  def exec
    install
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myosx-0.2.2 lib/myosx/rbenv.rb