github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

crafterm / sprinkle

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 546
    • 54
  • Source
  • Commits
  • Network (54)
  • Issues (1)
  • Downloads (5)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (5)
    • RELEASE_0_3_1
    • RELEASE_0_3_0
    • RELEASE_0_2_6
    • RELEASE_0_2_5
    • RELEASE_0_2_4
Sending Request…
Click here to lend your support to: sprinkle and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created — Read more

  cancel

http://github.com/crafterm/sprinkle

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Merge branch 'powcloud' 
crafterm (author)
Tue Jan 12 12:36:03 -0800 2010
commit  27c4cb9cb04c91e7c57e0faf61f894e5d79dc4fc
tree    edf7dd62a85c04bd766892fd7faef59c4a35becd
parent  588d138467c2a0893d4db37f105c737f2ad144da parent  a9be3d454a40339eaacc757765660b6eb2ed050e
sprinkle / lib / sprinkle / actors / local.rb lib/sprinkle/actors/local.rb
100644 38 lines (34 sloc) 1.109 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module Sprinkle
  module Actors
    # = Local Delivery Method
    #
    # This actor implementation performs any given commands on your local system, as
    # opposed to other implementations that generally run commands on a remote system
    # via the network.
    #
    # This is useful if you'd like to use Sprinkle to provision your local machine.
    # To enable this actor, in your Sprinkle script specify the :local delivery mechanism.
    #
    # deployment do
    # delivery :local
    # end
    #
    # Note, your local machine will be assumed to be a member of all roles when applying policies
    #
    class Local
      
      def process(name, commands, roles, suppress_and_return_failures = false) #:nodoc:
        commands.each do |command|
          system command
          return false if $?.to_i != 0
        end
        return true
      end
      
def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false)
if recursive
flags = "-R "
end
 
system "cp #{flags}#{source} #{destination}"
end
    end
  end
end
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server