be able to source with :path for mrbgems

This commit is contained in:
Terence Lee
2015-08-02 14:37:12 +02:00
parent 52a9712c26
commit 5c055d670a
+3
View File
@@ -76,6 +76,9 @@ module MRuby
if params[:core]
gemdir = "#{root}/mrbgems/#{params[:core]}"
elsif params[:path]
require 'pathname'
gemdir = Pathname.new(params[:path]).absolute? ? params[:path] : "#{root}/#{params[:path]}"
elsif params[:git]
url = params[:git]
gemdir = "#{gem_clone_dir}/#{url.match(/([-\w]+)(\.[-\w]+|)$/).to_a[1]}"