# Path: revolver/contextmanager.py
# def sudo(username=None, login=False):
# def unpatched_state():
# 
# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/log.py

# 
# Path: revolver/user.py
# def _get_with_abort(username):
# def exists(username):
# def home_directory(username):
# def shell(username):
# 
# Path: revolver/core.py
# VERSION = '0.0.5'
# def put(*args, **kwargs):
# def run(*args, **kwargs):
# def sudo(*args, **kwargs):


import os
from revolver import contextmanager as ctx
from revolver import directory as dir
from revolver import log, user, core
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement




def inside():
    return dir.exists("/vagrant") and user.exists("vagrant")


def is_running():
    with ctx.settings(warn_only=True):
        command = "vagrant status | egrep -o 'running$'"

# Path: revolver/contextmanager.py
# def sudo(username=None, login=False):
# def unpatched_state():
# 
# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/log.py

# 
# Path: revolver/user.py
# def _get_with_abort(username):
# def exists(username):
# def home_directory(username):
# def shell(username):
# 
# Path: revolver/core.py
# VERSION = '0.0.5'
# def put(*args, **kwargs):
# def run(*args, **kwargs):
# def sudo(*args, **kwargs):


# Path: revolver/vagrant.py
import os
from revolver import contextmanager as ctx
from revolver import directory as dir
from revolver import log, user, core

# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement




def inside():
    return dir.exists("/vagrant") and user.exists("vagrant")


def is_running():
    with ctx.settings(warn_only=True):
        command = "vagrant status | egrep -o 'running$'"

        vm_running = core.local(command, capture=True)