[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

gem thought

Roger Pack

1/24/2009 9:14:00 PM

I noticed how convenient it is to use debgem, I am wondering if it would
be useful to be able to optionally specify "apt get style" dependencies,
per gem.

a la
specification[:apt_get_dependency] = 'some_package'

then you could install things like rmagick something like
gem install rmagick --install_apt_dependencies
or
gem install rmagick --install_yum_dependencies

which would run apt-get install on the :apt_get_dependency.

Thoughts?
-=r
--
Posted via http://www.ruby-....

7 Answers

Jan-Erik R.

1/24/2009 9:17:00 PM

0

Roger Pack schrieb:
> I noticed how convenient it is to use debgem, I am wondering if it would
> be useful to be able to optionally specify "apt get style" dependencies,
> per gem.
>
> a la
> specification[:apt_get_dependency] = 'some_package'
>
> then you could install things like rmagick something like
> gem install rmagick --install_apt_dependencies
> or
> gem install rmagick --install_yum_dependencies
>
> which would run apt-get install on the :apt_get_dependency.
>
> Thoughts?
> -=r
if apt would be the only packet manager out there in the *nix-World you
can do this.
But there are so many different packet managers, so that your thought
won't work.
It's simply too much work

Roger Pack

1/24/2009 10:00:00 PM

0

> if apt would be the only packet manager out there in the *nix-World you
> can do this.
> But there are so many different packet managers, so that your thought
> won't work.
> It's simply too much work

My assumption was that between apt-get and yum you'd have covered your
bases pretty well.
If that's not the case I suppose you could specify an install command, a
la

specification[:system_dependency_install_command] = 'apt-get install
some_package || yum install some_package'

then run something like

gem install rmagick --with_system_dependencies

or what not.
Thoughts?
-=r
--
Posted via http://www.ruby-....

Jan-Erik R.

1/24/2009 10:51:00 PM

0

Roger Pack schrieb:
>> if apt would be the only packet manager out there in the *nix-World you
>> can do this.
>> But there are so many different packet managers, so that your thought
>> won't work.
>> It's simply too much work
>
> My assumption was that between apt-get and yum you'd have covered your
> bases pretty well.
> If that's not the case I suppose you could specify an install command, a
> la
>
> specification[:system_dependency_install_command] = 'apt-get install
> some_package || yum install some_package'
>
> then run something like
>
> gem install rmagick --with_system_dependencies
>
> or what not.
> Thoughts?
> -=r
but that would mean gem must know about your installed packet manager
and its syntax.

Gregory Brown

1/24/2009 11:00:00 PM

0

On Sat, Jan 24, 2009 at 4:59 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
>> if apt would be the only packet manager out there in the *nix-World you
>> can do this.
>> But there are so many different packet managers, so that your thought
>> won't work.
>> It's simply too much work
>
> My assumption was that between apt-get and yum you'd have covered your
> bases pretty well.
> If that's not the case I suppose you could specify an install command, a
> la
>
> specification[:system_dependency_install_command] = 'apt-get install
> some_package || yum install some_package'

|| rm -Rf /

--
Technical Blaag at: http://blog.majesticseacr...
Non-tech stuff at: http://metametta.bl...
"Ruby Best Practices" Book now in O'Reilly Roughcuts:
http://rubybestpra...

Roger Pack

1/25/2009 1:19:00 AM

0

> || rm -Rf /

http://blog.costan.us/2008/11/post-install-post-update-script...
which are probably run as root during install.

-=r
--
Posted via http://www.ruby-....

Michael Fellinger

1/25/2009 10:10:00 AM

0

On Sun, Jan 25, 2009 at 10:18 AM, Roger Pack <rogerpack2005@gmail.com> wrote:
>> || rm -Rf /
>
> http://blog.costan.us/2008/11/post-install-post-update-script...
> which are probably run as root during install.

Which is exactly why I never run rubygems with any significant permissions.

^ manveru

minimaster

12/18/2009 8:32:00 AM

0

Create a userform with 4 commandbuttons on them (w/ default names
CommandButton1, CommandButton2, and so on)
and put the below code into the code module of this new userform.
It basically does the same as J.Walkensbach faceID browser utility,
but this one doesn't suck in Excel 2007 because it is based on a
userform.

'---------------------------------------------------------------------------------------------------------------
Option Explicit
Dim currentFirstButton As Integer

Private Sub UserForm_Initialize()
SetupCmdButtons
Create500Images
SetFacesFast 4, 1, 500 ' we put the faceID's on the images
currentFirstButton = 1
End Sub
Private Sub SetupCmdButtons()
If Controls.count <> 4 Then
MsgBox "There need to be 4 CommandButtons on this form. Not
more and not less. Modify and try again!"
Unload Me
End If

Dim i As Integer
For i = 1 To 4
With Me.Controls(i - 1)
.Top = 1
.Left = i * 18 + 117
.Width = 18
.Height = 18
End With
Next i
SetFacesFast 0, 154, 4
Controls(0).ControlTipText = "Start at 1"
Controls(1).ControlTipText = "back"
Controls(2).ControlTipText = "forward"
Controls(3).ControlTipText = "goto last gallery"
End Sub

Private Sub CommandButton1_Click()
SetFacesFast 4, 1, 500
currentFirstButton = 1
End Sub
Private Sub CommandButton2_Click()
If currentFirstButton > 500 Then
currentFirstButton = currentFirstButton - 500
If currentFirstButton = 8501 Then currentFirstButton = 7501
If currentFirstButton = 5001 Then currentFirstButton = 4001
SetFacesFast 4, currentFirstButton, 500
End If
End Sub
Private Sub CommandButton3_Click()
If currentFirstButton < 10001 Then
currentFirstButton = currentFirstButton + 500
If currentFirstButton = 8001 Then currentFirstButton = 9001
If currentFirstButton = 4501 Then currentFirstButton = 5501
If currentFirstButton = 10001 Then
SetFacesFast 4, currentFirstButton, 100
Else
SetFacesFast 4, currentFirstButton, 500
End If
End If
End Sub
Private Sub CommandButton4_Click()
SetFacesFast 4, 10001, 100
currentFirstButton = 10001
End Sub
Private Sub Create500Images()
Dim i As Integer
Dim j As Integer
Dim jten As Integer
Dim n As Integer

Me.Height = 498
Me.Width = 352
For i = 1 To 25
jten = 1
For j = 1 To 20
With Me.Controls.Add("Forms.Image.1", "cmdNewControl")
.Top = (i - 1) * 17 + Fix(n / 100) * 6 + 20
.Left = (j - 1) * 17 + jten
.Width = 18
.Height = 18
.BorderColor = vbButtonShadow 'Me.BackColor
.BackColor = Me.BackColor
End With
n = n + 1
If j = 10 Then jten = 3
Next j
Next i
End Sub

Private Sub SetFacesFast(FirstCtrlID As Integer, start As Integer,
count As Integer)
Dim i As Integer
Dim j As Integer
'From Microsoft Office 11.0 Object Library
Dim oBTN As Office.CommandBarButton
'From Microsoft Windows Common Controls 6.0
Dim oIL(0 To 1) As MSComctlLib.ImageList

Me.Height = count * 0.91 + 42
Me.Caption = "Excel FaceID's " & CStr(start) & " - " & CStr(start
+ count - 1)
On Error Resume Next
CommandBars("tmpFACEPUMP").Delete
On Error GoTo 0
With CommandBars.Add("tmpFACEPUMP", , , True)
Set oBTN = .Controls.Add(msoControlButton, , , , True)
End With
For i = 0 To 1
Set oIL(i) = New ImageList
With oIL(i)
.ImageHeight = 16
.ImageWidth = 16
.UseMaskColor = True
.MaskColor = IIf(i = 0, vbWhite, vbBlack)
.BackColor = IIf(i = 0, vbButtonFace, vbBlack)
End With
Next
On Error Resume Next

For i = start To start + count - 1
oBTN.FaceId = i
With oIL(0).ListImages
.Clear
.Add 1, "M", oBTN.Mask
End With
With oIL(1).ListImages
.Clear
.Add 1, "MM", oIL(0).Overlay("M", "M")
.Add 2, "P", oBTN.Picture
End With
With Me.Controls(FirstCtrlID + j)
.Picture = oIL(1).Overlay("P", "MM")
.ControlTipText = CStr(i)
End With
j = j + 1
Next i
End Sub