Пример #1
0
def install():
    nodejs.ensure()
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            sudo("curl http://npmjs.org/install.sh | sh")
    finally:
        dir.remove(tmpdir, recursive=True)
Пример #2
0
def install():
    package.ensure(['git-core', 'curl', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            repo = 'git://github.com/sstephenson/ruby-build.git'
            run('git clone %s ./ --depth 1' % repo)
            sudo('./install.sh')
    finally:
        dir.remove(tmpdir, recursive=True)
Пример #3
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(['git-core', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            run('git clone git://github.com/antirez/redis.git ./ --depth 1')
            run('git checkout %s' % version)
            run('make %s > /dev/null' % options)
            sudo('make install')
    finally:
        dir.remove(tmpdir, recursive=True)
Пример #4
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(["git-core", "build-essential"])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            run("git clone git://github.com/antirez/redis.git ./ --depth 1")
            run("git checkout %s" % version)
            run("make %s > /dev/null" % options)
            sudo("make install")
    finally:
        dir.remove(tmpdir, recursive=True)
Пример #5
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(['git-core', 'libssl-dev', 'curl', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            repo = 'git://github.com/joyent/node.git' 
            run('git clone %s ./ --depth 1' % repo)
            run('git checkout %s' % version)
            run('./configure %s' % options)
            run('make > /dev/null')
            sudo('make install')
    finally:
        dir.remove(tmpdir, recursive=True)
Пример #6
0
def test_temp_passes_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call()
        .with_args("path", mode="foo", owner="bar", group="baz"))
    directory.temp("foo", "bar", "baz")
Пример #7
0
def test_temp_default_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call()
        .with_args("path", mode=None, owner=None, group=None))
    directory.temp()
Пример #8
0
def test_temp_calles_mktemp(run, attributes):
    (run.expects_call()
        .with_args("mktemp --directory")
        .returns(run_result("foo")))
    attributes.expects_call()
    assert directory.temp() == "foo"
Пример #9
0
def test_temp_passes_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path", mode="foo", owner="bar", group="baz"))
    directory.temp("foo", "bar", "baz")
Пример #10
0
def test_temp_default_attributes(run, attributes):
    run.expects_call().returns(run_result("path"))
    (attributes.expects_call().with_args("path", mode=None, owner=None, group=None))
    directory.temp()
Пример #11
0
def test_temp_calles_mktemp(run, attributes):
    (run.expects_call().with_args("mktemp --directory").returns(run_result("foo")))
    attributes.expects_call()
    assert directory.temp() == "foo"