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)
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)
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)
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)
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)
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")
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()
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"
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")
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()
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"