Skip to content

Commit

Permalink
Add luarocks installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
weakish committed May 3, 2016
1 parent 303b371 commit 4628558
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions lib/sprinkle/installers/luarocks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module Sprinkle
module Installers
# The luarocks package installer installs Lua modules.
#
#
# == Example Usage
#
# A simple installation:
#
# package :magic_beans do
# description "Beans beans they're good for your heart..."
# luarocks 'magic_beans'
# end
class LuaRocks < Installer

api do
def luarocks(name, options = {}, &block)
install LuaRocks.new(self, name, options, &block)
end
end

attr_accessor :luarocks #:nodoc:

def initialize(parent, luarocks, options = {}, &block) #:nodoc:
super parent, options, &block
@luarocks = luarocks
end


protected


def install_commands #:nodoc:
cmd = "#{sudo_cmd}luarocks install #{luarocks}"
end

end
end
end

0 comments on commit 4628558

Please sign in to comment.