Sha256: 9c85269f2ceb3d0a210e2bab29dc59a47d0578041de84d02e5b2afb365753111

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

module Boxy
  class LuarockHandler
    def install(name, options)
      unless luarock_installed?(name)
        system "luarocks install #{name}"
      else
        puts "skipping #{name}, already installed"
      end
    end

    private

    def luarock_installed?(name)
      `luarocks show #{name} > /dev/null 2>&1`
      $? == 0
    end
  end

  Boxy.register(:luarock, LuarockHandler.new)
end



Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
boxy-0.2.1 lib/boxy/luarock.rb
boxy-0.2.0 lib/boxy/luarock.rb
boxy-0.1.0 lib/boxy/luarock.rb