summaryrefslogtreecommitdiffhomepage
path: root/tasks/mrbgem_spec.rake
diff options
context:
space:
mode:
authorWilliam Light <[email protected]>2013-09-26 17:49:31 +0200
committerWilliam Light <[email protected]>2013-10-01 20:21:46 +0200
commit7c3f06ddd8cd61277e041b538da68fd5b8be9dde (patch)
treeb8902f9b6417bde36458545a1ab8662f94d69026 /tasks/mrbgem_spec.rake
parente06a0e39f8bad9c4f2b6f52d8b70345ca63d1d7d (diff)
downloadmruby-7c3f06ddd8cd61277e041b538da68fd5b8be9dde.tar.gz
mruby-7c3f06ddd8cd61277e041b538da68fd5b8be9dde.zip
Implement gembox-relative gemdir paths
In the case where a relative path is specified to a gembox from build_config.rb, it was previously tricky to specify relative gem paths from inside that gembox. For example, consider a project in which mruby is checked out as a submodule in the project root: +- project_root | +- mruby/ | | | +- build_config.rb | | | +- ... | +- my_gembox/ | +- my_gembox.gembox | +- my_gem/ | +- mrbgem.rake | +- ... If build_config.rb refers to my_gembox with a relative path, it's difficult for my_gembox to then refer to my_gem. With this proposed change, my_gembox.gembox can look like this: MRuby::GemBox.new do |conf| conf.gem "my_gem" end
Diffstat (limited to 'tasks/mrbgem_spec.rake')
-rw-r--r--tasks/mrbgem_spec.rake2
1 files changed, 2 insertions, 0 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake
index 94f24af26..70c44ed5e 100644
--- a/tasks/mrbgem_spec.rake
+++ b/tasks/mrbgem_spec.rake
@@ -297,6 +297,8 @@ module MRuby
GemBox = Object.new
class << GemBox
+ attr_accessor :path
+
def new(&block); block.call(self); end
def config=(obj); @config = obj; end
def gem(gemdir, &block); @config.gem(gemdir, &block); end