From: m b Date: 2011-07-04T05:15:20+09:00 Subject: Re: downloading all of gem to my hd? --_76bc0958-7a2b-48e1-a5b4-4ccd4b9a8b3a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > Date: Mon=2C 4 Jul 2011 03:35:02 +0900 > From: jan@agetty.de > Subject: Re: downloading all of gem to my hd? > To: ruby-talk@ruby-lang.org > CC: nobuoka@r-definition.com >=20 > Hi *=2C >=20 > On 07/03/2011 04:57 PM Y. NOBUOKA wrote: > > 1. obtain all gem names with "gem search" command > > $ gem search --remote > > 2. download all gem files with "gem fetch" command > > $ gem fetch [gemname] [gemname] [gemname] ... > > ([gemname] is one of the gem names obtained in step 1) > >=20 > > Although this way is troublesome if you do by your hand=2C > > you can write a simple script which do these steps automatically. >=20 > using bash this might look like this: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > $ for GEM in $(gem search -qr | awk 'NR>2 { print $1 }')=3B do gem fetch > ${GEM}=3B done=3B > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > All available remote gems (~25k@gemcutter) will be fetched to the current > working directory. However=2C this also includes all sort of garbage modu= les > created for testing or those no longer under active development. >=20 > Hope this helps ... thanx ill try this.. im sure cpan holds some garbage modules too.. this m= eans i can stick with ruby.. :) =20 >=20 > So long ... > Jan >=20 = --_76bc0958-7a2b-48e1-a5b4-4ccd4b9a8b3a_--