Sha256: 936a25cb100c6c90f93df5cd8098dfb291cbff454a8ff1c750afad27edf29988

Contents?: true

Size: 994 Bytes

Versions: 16

Compression:

Stored size: 994 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"
          stderr = "/dev/null"
          is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
          stderr = "nul" if is_windows
          shell_results=shell_exec("#{command}",{:mute => true, :stderr => stderr})
          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

16 entries across 16 versions & 1 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.5.0.alpha3 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.5.0.alpha2 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.5.0.alpha1 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.5.1 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.5 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.5.pre1 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.4 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.3 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.2 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.1 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.4.0 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.12 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.11 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.10 lib/veewee/provider/virtualbox/box/helper/version.rb
veewee-0.3.9 lib/veewee/provider/virtualbox/box/helper/version.rb