Sha256: 464d82e561fdb3ee4ec248e8bcb9dbcaac4f723948158aba9bb02666dc77aad3

Contents?: true

Size: 828 Bytes

Versions: 7

Compression:

Stored size: 828 Bytes

Contents

module Veewee
  module Provider
    module Virtualbox
      module BoxCommand
        UNSYNCED_VERSIONS = {"4.2.1" => "4.2.0", "4.1.23" => "4.1.22"}

        # Return the major/minor/incremental version of VirtualBox.
        # For example: 4.1.8_Debianr75467 -> 4.1.8
        def vbox_version
          command="#{@vboxcmd} --version"
          shell_results=shell_exec("#{command}",{:mute => true})
          version=shell_results.stdout.strip.split(/[^0-9\.]/)[0]
          return version
        end

        def vboxga_version
          affected_version?(self.vbox_version) ? UNSYNCED_VERSIONS[self.vbox_version] : self.vbox_version
        end
      protected
        def affected_version?(ver)
          RUBY_PLATFORM.downcase.include?("darwin") && UNSYNCED_VERSIONS.has_key?(ver)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
veewee-0.3.7 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.6 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.5 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.4 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.3 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.2 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.1 lib/veewee/provider/virtualbox/box/helper/version.rb