summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuichiro MASUI <[email protected]>2013-01-08 00:44:48 +0900
committerYuichiro MASUI <[email protected]>2013-01-08 00:44:48 +0900
commita19c061cb13d9cebcbf96e00d6add8c16b546032 (patch)
tree049fbf90ed98a95e0aada317a4e455db814f1a76
parentf1eb0a053778df3cfc2d776dad8b63c65c4c6c7d (diff)
downloadmruby-a19c061cb13d9cebcbf96e00d6add8c16b546032.tar.gz
mruby-a19c061cb13d9cebcbf96e00d6add8c16b546032.zip
Added gem :github option
-rw-r--r--doc/mrbgems/README.md4
-rw-r--r--tasks/mruby_build.rake4
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/mrbgems/README.md b/doc/mrbgems/README.md
index cc28f48f8..9e930d8b2 100644
--- a/doc/mrbgems/README.md
+++ b/doc/mrbgems/README.md
@@ -27,6 +27,10 @@ A remote GIT repository location for a GEM is also supported:
conf.gem :git => 'https://github.com/masuidrive/mrbgems-example.git', :branch => 'master'
```
+```
+conf.gem :github => 'masuidrive/mrbgems-example', :branch => 'master'
+```
+
## GEM Structure
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index 65c80ab6a..d5dc075c3 100644
--- a/tasks/mruby_build.rake
+++ b/tasks/mruby_build.rake
@@ -67,6 +67,10 @@ module MRuby
end
def load_external_gem(params)
+ if params[:github]
+ params[:git] = "[email protected]:#{params[:github]}.git"
+ end
+
if params[:git]
url = params[:git]
gemdir = "build/mrbgems/#{url.match(/([-_\w]+)(\.[-_\w]+|)$/).to_a[1]}"