<commit_before># -*- coding: utf-8 -*-

u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""

import contextlib

from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import run

env.user = 'root'
env.hosts = ['plantingjs.org']
env.forward_agent = True


def update():
    u"""Function defining all steps required to properly update application."""

    with contextlib.nested(
        cd('/var/www/plantingjs_org/plantingjs.org'),
        prefix('workon plantingjs_org')
    ):
        run('git pull')
        run('git checkout master')

    run('service apache2 restart')<commit_msg>#52 - fabric is updating js dependecies and building assets using gulp<commit_after># -*- coding: utf-8 -*-

u"""
.. module:: fabfile
Be aware, that becaus fabric doesn't support py3k You need to execute this
particular script using Python 2.
"""

from fabric.api import cd
from fabric.api import env
from fabric.api import run

env.user = 'root'
env.hosts = ['plantingjs.org']
env.forward_agent = True


def update():
    u"""Function defining all steps required to properly update application."""

    with cd('/var/www/plantingjs_org/plantingjs.org'):
        run('git pull')
        run('git checkout master')
        run('npm cache clear')
        run('rm -rf ./node_modules')
        run('npm install')
        run('gulp build')

    run('service apache2 restart')
{'fraction_non_alphanumeric': 0.11851851851851852, 'fraction_numerical': 0.006734006734006734, 'mean_word_length': 3.3577712609970676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3332175', 'n_tokens_mistral': 444, 'n_tokens_neox': 421, 'n_words': 154}