Determines the version of Vagrant based on the output
192486
def version
      logger.debug "Parsing version from output using #{description}"
      matches = output.match PARSE_VERSION_FROM_OUTPUT
      raise InvalidFormat.new output if matches.nil?
      matches.captures[0]
    end
367625
def get_version(self, dependency):
        """"""
        logger.debug("getting installed version for %s", dependency)
        stdout = helpers.logged_exec([self.pip_exe, "show", str(dependency)])
        version = [line for line in stdout if line.startswith('Version:')]
        if len(version) == 1:
            version = version[0].strip().split()[1]
            logger.debug("Installed version of %s is: %s", dependency, version)
            return version
        else:
            logger.error('Fades is having problems getting the installed version. '
                         'Run with -v or check the logs for details')
            return ''
633420
def show_version(self):
        
        version_info = self.get_cli_version()
        version_info += self.get_runtime_version()
        print(version_info, file=self.out_file)
652966
def version():
    '''
    
    '''
    ret = _client_wrapper('version')
    version_re = re.compile(VERSION_RE)
    if 'Version' in ret:
        match = version_re.match(six.text_type(ret['Version']))
        if match:
            ret['VersionInfo'] = tuple(
                [int(x) for x in match.group(1).split('.')]
            )
    if 'ApiVersion' in ret:
        match = version_re.match(six.text_type(ret['ApiVersion']))
        if match:
            ret['ApiVersionInfo'] = tuple(
                [int(x) for x in match.group(1).split('.')]
            )
    return ret
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version
395172
def get_version():
    """"""
    try:
        f = open('eztemplate/version.py', 'r')
    except IOError as e:
        if e.errno != errno.ENOENT:
            raise
        m = None
    else:
        m = re.match('^\s*__version__\s*=\s*(?P<version>.*)$', f.read(), re.M)
        f.close()

    __version__ = ast.literal_eval(m.group('version')) if m else None

    try:
        git_version = subprocess.check_output(['git', 'describe', '--dirty'])
    except:
        if __version__ is None:
            raise ValueError("cannot determine version number")
        return __version__

    m = re.match(r'^\s*'
                 r'(?P<version>\S+?)'
                 r'(-(?P<post>\d+)-(?P<commit>g[0-9a-f]+))?'
                 r'(-(?P<dirty>dirty))?'
                 r'\s*$', git_version.decode())
    if not m:
        raise ValueError("cannot parse git describe output")

    git_version = m.group('version')
    post = m.group('post')
    commit = m.group('commit')
    dirty = m.group('dirty')

    local = []

    if post:
        post = int(post)
        if post:
            git_version += '.post%d' % (post,)
            if commit:
                local.append(commit)

    if dirty:
        local.append(dirty)

    if local:
        git_version += '+' + '.'.join(local)

    if git_version != __version__:
        with open('eztemplate/version.py', 'w') as f:
            f.write("__version__ = %r\n" % (str(git_version),))

    return git_version
693136
def check_version(version_)
      v = version
      f = false
      if v.kind_of?(Hash) && v.include?("version") &&
          v['version'] >= "#{version_}" then
	f = true
      end

      [f, v['version']]
    end
860917
function showVersion(){
  var jshint_proc = fork(__dirname + '/node_modules/jshint/bin/jshint', ['-v'], {silent: true});
  var ts = through(function write(chunk){
    this.queue("JSXHint v" + require('./package.json').version + " (" +
      chunk.toString().replace("\n", "") + ")\n");
  });
  jshint_proc.stderr.pipe(ts).pipe(process.stderr);
}
939606
def version(self):
        """"""

        versions = []
        versions.append("sosreport: %s" % __version__)

        for plugname, plug in self.loaded_plugins:
            versions.append("%s: %s" % (plugname, plug.version))

        self.archive.add_string(content="\n".join(versions),
                                dest='version.txt')
659624
def versions(runas=None):
    '''
    
    '''
    ret = _pyenv_exec('versions', '--bare', runas=runas)
    return [] if ret is False else ret.splitlines()
114912
def get_version
      version = nil
      Execute.task_popen3("_version") do |i, o, e, t|
        version = Helpers.to_gem_version(o.read.chomp)
      end
      version
    end
1274432
def package_version(filename, varname):
    """"""
    _locals = {}
    with open(filename) as fp:
        exec(fp.read(), None, _locals)
    return _locals[varname]
1304420
def _version(self):
        """"""
        # TODO: Can we delete this method and just print the line from the
        # reqs file verbatim instead?
        def version_of_archive(filename, package_name):
            # Since we know the project_name, we can strip that off the left, strip
            # any archive extensions off the right, and take the rest as the
            # version.
            for ext in ARCHIVE_EXTENSIONS:
                if filename.endswith(ext):
                    filename = filename[:-len(ext)]
                    break
            # Handle github sha tarball downloads.
            if is_git_sha(filename):
                filename = package_name + '-' + filename
            if not filename.lower().replace('_', '-').startswith(package_name.lower()):
                # TODO: Should we replace runs of [^a-zA-Z0-9.], not just _, with -?
                give_up(filename, package_name)
            return filename[len(package_name) + 1:]  # Strip off '-' before version.

        def version_of_wheel(filename, package_name):
            # For Wheel files (http://legacy.python.org/dev/peps/pep-0427/#file-
            # name-convention) we know the format bits are '-' separated.
            whl_package_name, version, _rest = filename.split('-', 2)
            # Do the alteration to package_name from PEP 427:
            our_package_name = re.sub(r'[^\w\d.]+', '_', package_name, re.UNICODE)
            if whl_package_name != our_package_name:
                give_up(filename, whl_package_name)
            return version

        def give_up(filename, package_name):
            raise RuntimeError("The archive '%s' didn't start with the package name "
                               "'%s', so I couldn't figure out the version number. "
                               "My bad; improve me." %
                               (filename, package_name))

        get_version = (version_of_wheel
                       if self._downloaded_filename().endswith('.whl')
                       else version_of_archive)
        return get_version(self._downloaded_filename(), self._project_name())
14292
def status
      logger.info "Retrieving Vagrant status for #{description}"
      output = connection.execute!(:status).stdout
      Derelict::Parser::Status.new(output)
    end
478970
def find_version():
    """"""
    version_file = read_file('__init__.py')
    version_match = re.search(r'^__version__ = ["\']([^"\']*)["\']',
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError('Unable to find version string.')
870814
def get_version(self):
        
        command = ["haproxy", "-v"]
        try:
            output = subprocess.check_output(command)
            version_line = output.split("\n")[0]
        except subprocess.CalledProcessError as e:
            logger.error("Could not get HAProxy version: %s", str(e))
            return None

        match = version_re.match(version_line)
        if not match:
            logger.error("Could not parse version from '%s'", version_line)
            return None

        version = (
            int(match.group("major")),
            int(match.group("minor")),
            int(match.group("patch"))
        )

        logger.debug("Got HAProxy version: %s", version)

        return version
1353428
def version():
    '''
    
    '''
    cmd = 'dnsmasq -v'
    out = __salt__['cmd.run'](cmd).splitlines()
    comps = out[0].split()
    return comps[2]