Sha256: a641716dee0c75905cbc90e1336a01ea65495dd34aba53acce0d7aaa2b981cf1

Contents?: true

Size: 845 Bytes

Versions: 43

Compression:

Stored size: 845 Bytes

Contents

module Sprinkle
  module Installers
    # = Rake Installer
    #
    # This installer runs a rake command.
    # 
    # == Example Usage
    #
    # The following example runs the command "rake spec" on
    # the remote server.
    #
    #   package :spec do
    #     rake 'spec'
    #   end
    # 
    # Specify a Rakefile with the :rakefile option.
    #
    #   package :spec, :rakefile => "/var/setup/Rakefile" do
    #     rake 'spec'
    #   end
     
    class Rake < Installer
      def initialize(parent, commands, options = {}, &block) #:nodoc:
        super parent, options, &block
        @commands = commands.to_a
      end

      protected

        def install_commands #:nodoc:
          file = @options[:rakefile] ? "-f #{@options[:rakefile]} " : ""
          "rake #{file}#{@commands.join(' ')}"
        end

    end
  end
end

Version data entries

43 entries across 43 versions & 10 rubygems

Version Path
crafterm-sprinkle-0.2.0 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.1 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.2 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.3 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.4 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.5 lib/sprinkle/installers/rake.rb
crafterm-sprinkle-0.2.6 lib/sprinkle/installers/rake.rb
jemmyw-sprinkle-0.2.3 lib/sprinkle/installers/rake.rb
jemmyw-sprinkle-0.2.4 lib/sprinkle/installers/rake.rb
justsee-sprinkle-0.2.4 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.1 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.10 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.11 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.13 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.14 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.15 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.16 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.2 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.3 lib/sprinkle/installers/rake.rb
lachlan-sprinkle-0.0.4 lib/sprinkle/installers/rake.rb