Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rubygemsrecipe
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
Xavier Thompson
rubygemsrecipe
Commits
f3c62b5f
Commit
f3c62b5f
authored
Oct 04, 2011
by
sirex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coorect way to find gem executable, which can be named differently, depending on host system.
parent
7e2fc17f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
rubygems.py
rubygems.py
+16
-3
No files found.
rubygems.py
View file @
f3c62b5f
import
errno
import
glob
import
hexagonit.recipe.download
import
logging
import
os
...
...
@@ -116,6 +117,8 @@ class Recipe(object):
s
=
{
'OPTIONS'
:
' '
.
join
([
'--prefix=%s'
%
self
.
options
[
'location'
],
'--no-rdoc'
,
'--no-ri'
,
]),
}
self
.
run
(
'ruby setup.rb all %(OPTIONS)s'
%
s
,
env
)
...
...
@@ -137,15 +140,25 @@ class Recipe(object):
os
.
chmod
(
executable
,
0755
)
return
executable
def
get_gem_executable
(
self
,
bindir
):
gem_executable
=
os
.
path
.
join
(
bindir
,
'gem'
)
gem_executable
=
glob
.
glob
(
gem_executable
+
'*'
)
if
gem_executable
:
return
gem_executable
[
0
]
def
install
(
self
):
parts
=
[
self
.
options
[
'location'
]]
if
not
os
.
path
.
exists
(
self
.
options
[
'location'
]):
bindir
=
os
.
path
.
join
(
self
.
options
[
'location'
],
'bin'
)
gem_executable
=
self
.
get_gem_executable
(
bindir
)
if
not
gem_executable
:
self
.
_install_rubygems
()
gem_executable
=
self
.
get_gem_executable
(
bindir
)
bindir
=
os
.
path
.
join
(
self
.
options
[
'location'
],
'bin'
)
s
=
{
'GEM'
:
os
.
path
.
join
(
bindir
,
'gem1.8'
)
,
'GEM'
:
gem_executable
,
'OPTIONS'
:
' '
.
join
([
'--no-rdoc'
,
'--no-ri'
,
...
...
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