From 7c3f06ddd8cd61277e041b538da68fd5b8be9dde Mon Sep 17 00:00:00 2001 From: William Light Date: Thu, 26 Sep 2013 17:49:31 +0200 Subject: 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 --- tasks/mrbgem_spec.rake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tasks/mrbgem_spec.rake') 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 -- cgit v1.2.3