Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
4940ddb9
Commit
4940ddb9
authored
Mar 22, 2018
by
Takeshi Watanabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `:path` option for git repository.
parent
1a8483f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
doc/guides/mrbgems.md
doc/guides/mrbgems.md
+5
-0
lib/mruby/build/load_gems.rb
lib/mruby/build/load_gems.rb
+5
-3
No files found.
doc/guides/mrbgems.md
View file @
4940ddb9
...
...
@@ -26,6 +26,11 @@ conf.gem :github => 'masuidrive/mrbgems-example', :branch => 'master'
conf
.
gem
:bitbucket
=>
'mruby/mrbgems-example'
,
:branch
=>
'master'
```
You can specify the sub directory of the repository with
`:path`
option:
```
ruby
conf
.
gem
github:
'mruby/mruby'
,
path:
'mrbgems/mruby-socket'
```
To use mrbgem from
[
mgem-list
](
https://github.com/mruby/mgem-list
)
use
`:mgem`
option:
```
ruby
conf
.
gem
:mgem
=>
'mruby-yaml'
...
...
lib/mruby/build/load_gems.rb
View file @
4940ddb9
...
...
@@ -76,9 +76,6 @@ 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
]
}
"
...
...
@@ -108,6 +105,11 @@ module MRuby
# Jump to the top of the branch
git
.
run_checkout
gemdir
,
branch
if
$pull_gems
end
gemdir
<<
"/
#{
params
[
:path
]
}
"
if
params
[
:path
]
elsif
params
[
:path
]
require
'pathname'
gemdir
=
Pathname
.
new
(
params
[
:path
]).
absolute?
?
params
[
:path
]
:
"
#{
root
}
/
#{
params
[
:path
]
}
"
else
fail
"unknown gem option
#{
params
}
"
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment