Sha256: fe9a13b0cf4dd9b4778d49b0bf3391f8d380d6015aad311568b1bedf70cea8f5

Contents?: true

Size: 713 Bytes

Versions: 10

Compression:

Stored size: 713 Bytes

Contents

require 'rocket_fuel/precheck/check'

module RocketFuel
  module Precheck
    class RvmCheck < Check
      check_name :rvm
      register!

      def ok?
        !home_path_exists? && !global_path_exists?
      end

      class << self
        def home_path
          File.join(ENV['HOME'], '.rvm')
        end

        def global_path
          '/usr/local/rvm'
        end
      end

      protected
      def success_message
        "RVM NOT found."
      end

      def failure_message
        "RVM found!"
      end

      def home_path_exists?
        FileTest.exist?(self.class.home_path)
      end

      def global_path_exists?
        FileTest.exist?(self.class.global_path)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rocket_fuel-0.2.0 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.1.0 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.8 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.7 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.6 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.5 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.4 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.3 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.2 lib/rocket_fuel/precheck/rvm_check.rb
rocket_fuel-0.0.1 lib/rocket_fuel/precheck/rvm_check.rb