ruby.scm 269 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
  3. ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
  4. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  5. ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
  6. ;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
  7. ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
  8. ;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
  9. ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
  10. ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
  11. ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  12. ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
  13. ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
  14. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  15. ;;;
  16. ;;; This file is part of GNU Guix.
  17. ;;;
  18. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  19. ;;; under the terms of the GNU General Public License as published by
  20. ;;; the Free Software Foundation; either version 3 of the License, or (at
  21. ;;; your option) any later version.
  22. ;;;
  23. ;;; GNU Guix is distributed in the hope that it will be useful, but
  24. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  25. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. ;;; GNU General Public License for more details.
  27. ;;;
  28. ;;; You should have received a copy of the GNU General Public License
  29. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  30. (define-module (gnu packages ruby)
  31. #:use-module ((guix licenses) #:prefix license:)
  32. #:use-module (gnu packages)
  33. #:use-module (gnu packages base)
  34. #:use-module (gnu packages check)
  35. #:use-module (gnu packages compression)
  36. #:use-module (gnu packages databases)
  37. #:use-module (gnu packages dbm)
  38. #:use-module (gnu packages rails)
  39. #:use-module (gnu packages readline)
  40. #:use-module (gnu packages autotools)
  41. #:use-module (gnu packages java)
  42. #:use-module (gnu packages libffi)
  43. #:use-module (gnu packages libidn)
  44. #:use-module (gnu packages linux)
  45. #:use-module (gnu packages lsof)
  46. #:use-module (gnu packages maths)
  47. #:use-module (gnu packages ncurses)
  48. #:use-module (gnu packages networking)
  49. #:use-module (gnu packages python)
  50. #:use-module (gnu packages python-xyz)
  51. #:use-module (gnu packages ragel)
  52. #:use-module (gnu packages rsync)
  53. #:use-module (gnu packages sqlite)
  54. #:use-module (gnu packages tls)
  55. #:use-module (gnu packages version-control)
  56. #:use-module (guix packages)
  57. #:use-module (guix download)
  58. #:use-module (guix git-download)
  59. #:use-module (guix utils)
  60. #:use-module (guix build-system gnu)
  61. #:use-module (gnu packages xml)
  62. #:use-module (gnu packages web)
  63. #:use-module (guix build-system ruby)
  64. #:use-module ((srfi srfi-1) #:select (alist-delete)))
  65. (define-public ruby
  66. (package
  67. (name "ruby")
  68. (version "2.5.3")
  69. (source
  70. (origin
  71. (method url-fetch)
  72. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  73. (version-major+minor version)
  74. "/ruby-" version ".tar.xz"))
  75. (sha256
  76. (base32
  77. "0vrhrw7kcz9mg0jkqnihkcxqy5k05v8k1j0y2735z8wfk8sx1j8w"))
  78. (modules '((guix build utils)))
  79. (snippet `(begin
  80. ;; Remove bundled libffi
  81. (delete-file-recursively "ext/fiddle/libffi-3.2.1")
  82. #t))))
  83. (build-system gnu-build-system)
  84. (arguments
  85. `(#:test-target "test"
  86. #:phases
  87. (modify-phases %standard-phases
  88. (add-before 'configure 'replace-bin-sh-and-remove-libffi
  89. (lambda _
  90. (substitute* '("Makefile.in"
  91. "ext/pty/pty.c"
  92. "io.c"
  93. "lib/mkmf.rb"
  94. "process.c"
  95. "test/rubygems/test_gem_ext_configure_builder.rb"
  96. "test/rdoc/test_rdoc_parser.rb"
  97. "test/ruby/test_rubyoptions.rb"
  98. "test/ruby/test_process.rb"
  99. "test/ruby/test_system.rb"
  100. "tool/rbinstall.rb")
  101. (("/bin/sh") (which "sh")))
  102. #t)))))
  103. (inputs
  104. `(("readline" ,readline)
  105. ("openssl" ,openssl)
  106. ("libffi" ,libffi)
  107. ("gdbm" ,gdbm)
  108. ("zlib" ,zlib)))
  109. (native-search-paths
  110. (list (search-path-specification
  111. (variable "GEM_PATH")
  112. (files (list (string-append "lib/ruby/vendor_ruby"))))))
  113. (synopsis "Programming language interpreter")
  114. (description "Ruby is a dynamic object-oriented programming language with
  115. a focus on simplicity and productivity.")
  116. (home-page "https://www.ruby-lang.org")
  117. (license license:ruby)))
  118. (define-public ruby-2.4
  119. (package
  120. (inherit ruby)
  121. (version "2.4.3")
  122. (source
  123. (origin
  124. (method url-fetch)
  125. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  126. (version-major+minor version)
  127. "/ruby-" version ".tar.xz"))
  128. (sha256
  129. (base32
  130. "0l9bv67dgsphk42lmiskhrnh47hbyj6rfg2rcjx22xivpx07srr3"))
  131. (patches (search-patches "ruby-rubygems-276-for-ruby24.patch"))
  132. (modules '((guix build utils)))
  133. (snippet `(begin
  134. ;; Remove bundled libffi
  135. (delete-file-recursively "ext/fiddle/libffi-3.2.1")
  136. #t))))))
  137. (define-public ruby-2.3
  138. (package
  139. (inherit ruby)
  140. (version "2.3.8")
  141. (source
  142. (origin
  143. (method url-fetch)
  144. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  145. (version-major+minor version)
  146. "/ruby-" version ".tar.xz"))
  147. (sha256
  148. (base32
  149. "1zhxbjff08pvbnxvn58krns6q0p6g4977q6ykfn823gxhifn63wi"))
  150. (modules '((guix build utils)))
  151. (snippet `(begin
  152. ;; Remove bundled libffi
  153. (delete-file-recursively "ext/fiddle/libffi-3.2.1")
  154. #t))))))
  155. (define-public ruby-commander
  156. (package
  157. (name "ruby-commander")
  158. (version "4.4.7")
  159. (source
  160. (origin
  161. (method url-fetch)
  162. (uri (rubygems-uri "commander" version))
  163. (sha256
  164. (base32
  165. "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
  166. (build-system ruby-build-system)
  167. (arguments
  168. `(#:test-target "spec"
  169. #:phases
  170. (modify-phases %standard-phases
  171. ;; Don't run or require rubocop, the code linting tool, as this is a
  172. ;; bit unnecessary.
  173. (add-after 'unpack 'dont-run-rubocop
  174. (lambda _
  175. (substitute* "Rakefile"
  176. ((".*rubocop.*") "")
  177. ((".*RuboCop.*") ""))
  178. #t)))))
  179. (propagated-inputs
  180. `(("ruby-highline" ,ruby-highline)))
  181. (native-inputs
  182. `(("bundler" ,bundler)
  183. ("ruby-rspec-core" ,ruby-rspec-core)
  184. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  185. ("ruby-rspec-mocks" ,ruby-rspec-mocks)
  186. ("ruby-simplecov" ,ruby-simplecov)))
  187. (home-page "https://github.com/commander-rb/commander")
  188. (synopsis "Library for building Ruby command-line executables")
  189. (description
  190. "Commander aims to be a complete solution for Ruby command-line
  191. executables. Commander bridges the gap between other terminal related
  192. libraries (OptionParser, HighLine), while providing many new features, and an
  193. elegant API.")
  194. (license license:expat)))
  195. (define-public ruby-highline
  196. (package
  197. (name "ruby-highline")
  198. (version "2.0.1")
  199. (source
  200. (origin
  201. (method url-fetch)
  202. (uri (rubygems-uri "highline" version))
  203. (sha256
  204. (base32
  205. "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
  206. (build-system ruby-build-system)
  207. (arguments
  208. `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
  209. (native-inputs
  210. `(("bundler" ,bundler)
  211. ("ruby-code-statistics" ,ruby-code-statistics)))
  212. (synopsis
  213. "HighLine helps you build command-line interfaces")
  214. (description
  215. "HighLine provides a high-level IO library that provides validation,
  216. type conversion, and more for command-line interfaces. HighLine also includes
  217. a menu system for providing multiple options to the user.")
  218. (home-page "https://github.com/JEG2/highline")
  219. (license (list license:gpl2 license:ruby))))
  220. (define-public ruby-hoe
  221. (package
  222. (name "ruby-hoe")
  223. (version "3.16.2")
  224. (source (origin
  225. (method url-fetch)
  226. (uri (rubygems-uri "hoe" version))
  227. (sha256
  228. (base32
  229. "12q6dn2irsfamdbjpqvs0dwl4i1vl7wflxrcg972h9jw0ds38f3a"))))
  230. (build-system ruby-build-system)
  231. (synopsis "Ruby project management helper")
  232. (description
  233. "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
  234. maintain, and release projects and includes a dynamic plug-in system allowing
  235. for easy extensibility. Hoe ships with plug-ins for all the usual project
  236. tasks including rdoc generation, testing, packaging, deployment, and
  237. announcement.")
  238. (home-page "https://www.zenspider.com/projects/hoe.html")
  239. (license license:expat)))
  240. (define-public ruby-rake-compiler
  241. (package
  242. (name "ruby-rake-compiler")
  243. (version "1.0.4")
  244. (source (origin
  245. (method url-fetch)
  246. (uri (rubygems-uri "rake-compiler" version))
  247. (sha256
  248. (base32
  249. "1xpdi4w8zaklk1i9ps8g3k0icw3v5fcks092l84w28rgrpx82qip"))))
  250. (build-system ruby-build-system)
  251. (arguments
  252. '(#:tests? #f)) ; needs cucumber
  253. (synopsis "Building and packaging helper for Ruby native extensions")
  254. (description "Rake-compiler provides a framework for building and
  255. packaging native C and Java extensions in Ruby.")
  256. (home-page "https://github.com/rake-compiler/rake-compiler")
  257. (license license:expat)))
  258. (define-public ruby-rsync
  259. (package
  260. (name "ruby-rsync")
  261. (version "1.0.9")
  262. (source
  263. (origin
  264. (method url-fetch)
  265. (uri (rubygems-uri "rsync" version))
  266. (sha256
  267. (base32
  268. "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
  269. (build-system ruby-build-system)
  270. (arguments
  271. '(#:test-target "spec"
  272. #:phases
  273. (modify-phases %standard-phases
  274. (add-after 'unpack 'remove-coveralls-requirement
  275. (lambda _
  276. (substitute* "spec/spec_helper.rb"
  277. (("require 'coveralls'") "")
  278. (("Coveralls.wear!") ""))
  279. #t)))))
  280. (native-inputs
  281. `(("bundler" ,bundler)
  282. ("rsync" ,rsync)
  283. ("ruby-rspec-core" ,ruby-rspec-core)
  284. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  285. ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
  286. (home-page "https://github.com/jbussdieker/ruby-rsync")
  287. (synopsis "Ruby wrapper around rsync")
  288. (description
  289. "Ruby Rsync is a Ruby library that can synchronize files between remote
  290. hosts by wrapping the @file{rsync} binary.")
  291. (license license:expat)))
  292. (define-public ruby-i18n
  293. (package
  294. (name "ruby-i18n")
  295. (version "1.1.0")
  296. (source (origin
  297. (method url-fetch)
  298. (uri (rubygems-uri "i18n" version))
  299. (sha256
  300. (base32
  301. "0ppvmla21hssvrfm8g1n2fnb4lxn4yhy9qmmba0imanflgldrjmr"))))
  302. (build-system ruby-build-system)
  303. (arguments
  304. '(#:tests? #f)) ; no tests
  305. (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
  306. (synopsis "Internationalization library for Ruby")
  307. (description "Ruby i18n is an internationalization and localization
  308. solution for Ruby programs. It features translation and localization,
  309. interpolation of values to translations, pluralization, customizable
  310. transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
  311. translation data, custom key/scope separator, custom exception handlers, and
  312. an extensible architecture with a swappable backend.")
  313. (home-page "https://github.com/svenfuchs/i18n")
  314. (license license:expat)))
  315. (define-public ruby-iruby
  316. (package
  317. (name "ruby-iruby")
  318. (version "0.3")
  319. (source
  320. (origin
  321. (method url-fetch)
  322. (uri (rubygems-uri "iruby" version))
  323. (sha256
  324. (base32
  325. "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
  326. (build-system ruby-build-system)
  327. (arguments
  328. ;; TODO: Tests currently fail.
  329. ;;
  330. ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
  331. ;;
  332. ;; 1) Failure:
  333. ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
  334. ;; In [ expected
  335. ;;
  336. ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
  337. '(#:tests? #f
  338. #:phases
  339. (modify-phases %standard-phases
  340. (add-after 'unpack 'patch-ipython
  341. (lambda* (#:key inputs #:allow-other-keys)
  342. (substitute* "lib/iruby/command.rb"
  343. (("version = `")
  344. (string-append
  345. "version = `"
  346. (assoc-ref inputs "python-ipython")
  347. "/bin/"))
  348. (("Kernel\\.exec\\('")
  349. (string-append
  350. "Kernel.exec('"
  351. (assoc-ref inputs "python-ipython")
  352. "/bin/")))
  353. #t)))))
  354. (inputs
  355. `(("python-ipython" ,python-ipython)))
  356. (propagated-inputs
  357. `(("ruby-bond" ,ruby-bond)
  358. ("ruby-data_uri" ,ruby-data_uri)
  359. ("ruby-mimemagic" ,ruby-mimemagic)
  360. ("ruby-multi-json" ,ruby-multi-json)
  361. ("ruby-cztop" ,ruby-cztop)
  362. ;; Optional inputs
  363. ("ruby-pry" ,ruby-pry)))
  364. (synopsis "Ruby kernel for Jupyter/IPython")
  365. (description
  366. "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
  367. notebook).")
  368. (home-page "https://github.com/SciRuby/iruby")
  369. (license license:expat)))
  370. ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
  371. ;; dependencies use RSpec for their test suites! To avoid these circular
  372. ;; dependencies, we disable tests for all of the RSpec-related packages.
  373. (define ruby-rspec-support
  374. (package
  375. (name "ruby-rspec-support")
  376. (version "3.5.0")
  377. (source (origin
  378. (method url-fetch)
  379. (uri (rubygems-uri "rspec-support" version))
  380. (sha256
  381. (base32
  382. "10vf3k3d472y573mag2kzfsfrf6rv355s13kadnpryk8d36yq5r0"))))
  383. (build-system ruby-build-system)
  384. (arguments
  385. '(#:tests? #f)) ; avoid dependency cycles
  386. (synopsis "RSpec support library")
  387. (description "Support utilities for RSpec gems.")
  388. (home-page "https://github.com/rspec/rspec-support")
  389. (license license:expat)))
  390. (define-public ruby-rspec-core
  391. (package
  392. (name "ruby-rspec-core")
  393. (version "3.5.4")
  394. (source (origin
  395. (method url-fetch)
  396. (uri (rubygems-uri "rspec-core" version))
  397. (sha256
  398. (base32
  399. "1nacs062qbr98fx6czf1vwppn1js956nv2c8vfwj6i65axdfs46i"))))
  400. (build-system ruby-build-system)
  401. (arguments
  402. '(#:tests? #f)) ; avoid dependency cycles
  403. (propagated-inputs
  404. `(("ruby-rspec-support" ,ruby-rspec-support)))
  405. (synopsis "RSpec core library")
  406. (description "Rspec-core provides the RSpec test runner and example
  407. groups.")
  408. (home-page "https://github.com/rspec/rspec-core")
  409. (license license:expat)))
  410. (define-public ruby-rspec-core-2
  411. (package (inherit ruby-rspec-core)
  412. (version "2.14.8")
  413. (source (origin
  414. (method url-fetch)
  415. (uri (rubygems-uri "rspec-core" version))
  416. (sha256
  417. (base32
  418. "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
  419. (propagated-inputs `())))
  420. (define-public ruby-diff-lcs
  421. (package
  422. (name "ruby-diff-lcs")
  423. (version "1.3")
  424. (source (origin
  425. (method url-fetch)
  426. (uri (rubygems-uri "diff-lcs" version))
  427. (sha256
  428. (base32
  429. "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
  430. (build-system ruby-build-system)
  431. (arguments
  432. '(#:tests? #f)) ; avoid dependency cycles
  433. (synopsis "Compute the difference between two Enumerable sequences")
  434. (description "Diff::LCS computes the difference between two Enumerable
  435. sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
  436. It includes utilities to create a simple HTML diff output format and a
  437. standard diff-like tool.")
  438. (home-page "https://github.com/halostatue/diff-lcs")
  439. (license license:expat)))
  440. (define-public ruby-rspec-expectations
  441. (package
  442. (name "ruby-rspec-expectations")
  443. (version "3.5.0")
  444. (source (origin
  445. (method url-fetch)
  446. (uri (rubygems-uri "rspec-expectations" version))
  447. (sha256
  448. (base32
  449. "0bbqfrb1x8gmwf8x2xhhwvvlhwbbafq4isbvlibxi6jk602f09gs"))))
  450. (build-system ruby-build-system)
  451. (arguments
  452. '(#:tests? #f)) ; avoid dependency cycles
  453. (propagated-inputs
  454. `(("ruby-rspec-support" ,ruby-rspec-support)
  455. ("ruby-diff-lcs" ,ruby-diff-lcs)))
  456. (synopsis "RSpec expectations library")
  457. (description "Rspec-expectations provides a simple API to express expected
  458. outcomes of a code example.")
  459. (home-page "https://github.com/rspec/rspec-expectations")
  460. (license license:expat)))
  461. (define-public ruby-rspec-expectations-2
  462. (package (inherit ruby-rspec-expectations)
  463. (version "2.14.5")
  464. (source (origin
  465. (method url-fetch)
  466. (uri (rubygems-uri "rspec-expectations" version))
  467. (sha256
  468. (base32
  469. "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
  470. (propagated-inputs
  471. `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
  472. (define-public ruby-rspec-its
  473. (package
  474. (name "ruby-rspec-its")
  475. (version "1.2.0")
  476. (source
  477. (origin
  478. (method git-fetch)
  479. (uri (git-reference
  480. (url "https://github.com/rspec/rspec-its.git")
  481. (commit (string-append "v" version))))
  482. (file-name (git-file-name name version))
  483. (sha256
  484. (base32
  485. "190rz7v4q4wk80fzhr5hknvxx4vb2pywmqr8wc41w2blj9ylzi0f"))
  486. (patches
  487. (list
  488. (origin (method url-fetch)
  489. (uri (string-append
  490. "https://github.com/rspec/rspec-its/commit/"
  491. "bfaab439c7c879f5ef25552f41827891f6308373.patch"))
  492. (file-name "ruby-rspec-its-fix-specs-for-ruby-2.4.patch")
  493. (sha256
  494. (base32
  495. "0lnik0kvrpgkakvdb2fmzg22pdlraf6kiidr9sv6rnfyviiqwxgh")))))))
  496. (build-system ruby-build-system)
  497. (arguments
  498. `(#:test-target "spec"
  499. #:phases
  500. (modify-phases %standard-phases
  501. (add-after 'unpack 'dont-install-gems-from-gemfile
  502. (lambda _
  503. (substitute* "Gemfile"
  504. (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
  505. ""))
  506. #t))
  507. (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
  508. (lambda _
  509. (substitute* "rspec-its.gemspec"
  510. (("rake.*") "rake'\n")
  511. (("cucumber.*") "cucumber'\n")
  512. (("bundler.*") "bundler'\n")
  513. (("aruba.*") "aruba'\n"))
  514. #t)))))
  515. (propagated-inputs
  516. `(("ruby-rspec-core" ,ruby-rspec-core)
  517. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  518. (native-inputs
  519. `(("bundler" ,bundler)
  520. ("ruby-cucumber" ,ruby-cucumber)
  521. ("ruby-aruba" ,ruby-aruba)))
  522. (synopsis "RSpec extension that provides the @code{its} method")
  523. (description
  524. "RSpec::Its provides the its method as a short-hand to specify the expected
  525. value of an attribute. For example, one can use @code{its(:size)\\{should
  526. eq(1)\\}}.")
  527. (home-page "https://github.com/rspec/rspec-its")
  528. (license license:expat)))
  529. (define-public ruby-rspec-mocks
  530. (package
  531. (name "ruby-rspec-mocks")
  532. (version "3.5.0")
  533. (source (origin
  534. (method url-fetch)
  535. (uri (rubygems-uri "rspec-mocks" version))
  536. (sha256
  537. (base32
  538. "0nl3ksivh9wwrjjd47z5dggrwx40v6gpb3a0gzbp1gs06a5dmk24"))))
  539. (build-system ruby-build-system)
  540. (arguments
  541. '(#:tests? #f)) ; avoid dependency cycles
  542. (propagated-inputs
  543. `(("ruby-rspec-support" ,ruby-rspec-support)
  544. ("ruby-diff-lcs" ,ruby-diff-lcs)))
  545. (synopsis "RSpec stubbing and mocking library")
  546. (description "Rspec-mocks provides RSpec's \"test double\" framework, with
  547. support for stubbing and mocking.")
  548. (home-page "https://github.com/rspec/rspec-mocks")
  549. (license license:expat)))
  550. (define-public ruby-rspec-mocks-2
  551. (package (inherit ruby-rspec-mocks)
  552. (version "2.14.6")
  553. (source (origin
  554. (method url-fetch)
  555. (uri (rubygems-uri "rspec-mocks" version))
  556. (sha256
  557. (base32
  558. "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
  559. (propagated-inputs
  560. `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
  561. (define-public ruby-rspec-rerun
  562. (package
  563. (name "ruby-rspec-rerun")
  564. (version "1.1.0")
  565. (source
  566. (origin
  567. (method url-fetch)
  568. (uri (rubygems-uri "rspec-rerun" version))
  569. (sha256
  570. (base32
  571. "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
  572. (build-system ruby-build-system)
  573. (arguments
  574. '(;; No included tests
  575. #:tests? #f))
  576. (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
  577. (synopsis "Track failed RSpec tests to re-run them")
  578. (description
  579. "This package provides an automated way to track, and then re-run failed
  580. RSpec tests.")
  581. (home-page "https://github.com/dblock/rspec-rerun")
  582. (license license:expat)))
  583. (define-public ruby-rspec
  584. (package
  585. (name "ruby-rspec")
  586. (version "3.5.0")
  587. (source (origin
  588. (method url-fetch)
  589. (uri (rubygems-uri "rspec" version))
  590. (sha256
  591. (base32
  592. "16g3mmih999f0b6vcz2c3qsc7ks5zy4lj1rzjh8hf6wk531nvc6s"))))
  593. (build-system ruby-build-system)
  594. (arguments
  595. '(#:tests? #f)) ; avoid dependency cycles
  596. (propagated-inputs
  597. `(("ruby-rspec-core" ,ruby-rspec-core)
  598. ("ruby-rspec-mocks" ,ruby-rspec-mocks)
  599. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  600. (synopsis "Behavior-driven development framework for Ruby")
  601. (description "RSpec is a behavior-driven development (BDD) framework for
  602. Ruby. This meta-package includes the RSpec test runner, along with the
  603. expectations and mocks frameworks.")
  604. (home-page "http://rspec.info/")
  605. (license license:expat)))
  606. (define-public ruby-rspec-2
  607. (package (inherit ruby-rspec)
  608. (version "2.14.1")
  609. (source (origin
  610. (method url-fetch)
  611. (uri (rubygems-uri "rspec" version))
  612. (sha256
  613. (base32
  614. "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
  615. (propagated-inputs
  616. `(("ruby-rspec-core" ,ruby-rspec-core-2)
  617. ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
  618. ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
  619. ;; Bundler is yet another source of circular dependencies, so we must disable
  620. ;; its test suite as well.
  621. (define-public bundler
  622. (package
  623. (name "bundler")
  624. (version "1.15.4")
  625. (source (origin
  626. (method url-fetch)
  627. (uri (rubygems-uri "bundler" version))
  628. (sha256
  629. (base32
  630. "0wl4r7wbwdq68xidfv4hhzfb1spb6lmhbspwlzrg4pf1l6ipxlgs"))))
  631. (build-system ruby-build-system)
  632. (arguments
  633. '(#:tests? #f)) ; avoid dependency cycles
  634. (synopsis "Ruby gem bundler")
  635. (description "Bundler automatically downloads and installs a list of gems
  636. specified in a \"Gemfile\", as well as their dependencies.")
  637. (home-page "https://bundler.io/")
  638. (license license:expat)))
  639. (define-public ruby-builder
  640. (package
  641. (name "ruby-builder")
  642. (version "3.2.3")
  643. (source (origin
  644. (method url-fetch)
  645. (uri (rubygems-uri "builder" version))
  646. (sha256
  647. (base32
  648. "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
  649. (build-system ruby-build-system)
  650. (arguments
  651. `(#:phases
  652. (modify-phases %standard-phases
  653. (add-after 'unpack 'do-not-use-rvm
  654. (lambda _
  655. (substitute* "rakelib/tags.rake"
  656. (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
  657. #t)))))
  658. (synopsis "Ruby library to create structured data")
  659. (description "Builder provides a number of builder objects that make it
  660. easy to create structured data. Currently the following builder objects are
  661. supported: XML Markup and XML Events.")
  662. (home-page "https://github.com/jimweirich/builder")
  663. (license license:expat)))
  664. (define-public ruby-bump
  665. (package
  666. (name "ruby-bump")
  667. (version "0.7.0")
  668. (source
  669. (origin
  670. (method url-fetch)
  671. (uri (rubygems-uri "bump" version))
  672. (sha256
  673. (base32
  674. "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
  675. (build-system ruby-build-system)
  676. (arguments
  677. '(;; No included tests
  678. #:tests? #f))
  679. (synopsis "Tool for working with Rubygems")
  680. (description
  681. "Bump provides commands to manage Rubygem versioning, updating to the
  682. next patch version for example.")
  683. (home-page "https://github.com/gregorym/bump")
  684. (license license:expat)))
  685. (define-public ruby-rjb
  686. (package
  687. (name "ruby-rjb")
  688. (version "1.5.5")
  689. (source (origin
  690. (method url-fetch)
  691. (uri (rubygems-uri "rjb" version))
  692. (sha256
  693. (base32
  694. "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
  695. (build-system ruby-build-system)
  696. (arguments
  697. `(#:tests? #f ; no rakefile
  698. #:phases
  699. (modify-phases %standard-phases
  700. (add-before 'build 'set-java-home
  701. (lambda* (#:key inputs #:allow-other-keys)
  702. (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
  703. #t)))))
  704. (native-inputs
  705. `(("jdk" ,icedtea "jdk")))
  706. (synopsis "Ruby-to-Java bridge using the Java Native Interface")
  707. (description "RJB is a bridge program that connects Ruby and Java via the
  708. Java Native Interface.")
  709. (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
  710. (license license:lgpl2.1+)))
  711. (define-public ruby-log4r
  712. (package
  713. (name "ruby-log4r")
  714. (version "1.1.10")
  715. (source
  716. (origin
  717. (method url-fetch)
  718. (uri (rubygems-uri "log4r" version))
  719. (sha256
  720. (base32
  721. "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
  722. (build-system ruby-build-system)
  723. (arguments
  724. '(#:tests? #f)) ; no Rakefile in gem
  725. (synopsis "Flexible logging library for Ruby")
  726. (description "Comprehensive and flexible logging library written
  727. in Ruby for use in Ruby programs. It features a hierarchical logging
  728. system of any number of levels, custom level names, logger
  729. inheritance, multiple output destinations per log event, execution
  730. tracing, custom formatting, thread safteyness, XML and YAML
  731. configuration, and more.")
  732. (home-page "http://log4r.rubyforge.org/")
  733. (license license:bsd-3)))
  734. (define-public ruby-atoulme-antwrap
  735. (package
  736. (name "ruby-atoulme-antwrap")
  737. (version "0.7.5")
  738. (source (origin
  739. (method url-fetch)
  740. (uri (rubygems-uri "atoulme-Antwrap" version))
  741. (sha256
  742. (base32
  743. "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
  744. (build-system ruby-build-system)
  745. ;; Test data required for most of the tests are not included.
  746. (arguments `(#:tests? #f))
  747. (native-inputs
  748. `(("ruby-hoe" ,ruby-hoe)))
  749. (inputs
  750. `(("ruby-rjb" ,ruby-rjb)))
  751. (synopsis "Ruby wrapper for the Ant build tool")
  752. (description "Antwrap is a Ruby module that wraps the Apache Ant build
  753. tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
  754. script.")
  755. (home-page "http://rubyforge.org/projects/antwrap/")
  756. (license license:expat)))
  757. (define-public ruby-atoulme-saikuro
  758. (package
  759. (name "ruby-atoulme-saikuro")
  760. (version "1.2.1")
  761. (source (origin
  762. (method url-fetch)
  763. (uri (rubygems-uri "atoulme-Saikuro" version))
  764. (sha256
  765. (base32
  766. "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
  767. (build-system ruby-build-system)
  768. ;; FIXME: There are no unit tests. The tests are demonstrations of the
  769. ;; "saikuro" tool.
  770. (arguments `(#:tests? #f))
  771. (synopsis "Cyclomatic complexity analyzer")
  772. (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
  773. given Ruby source code Saikuro will generate a report listing the cyclomatic
  774. complexity of each method found. In addition, Saikuro counts the number of
  775. lines per method and can generate a listing of the number of tokens on each
  776. line of code.")
  777. (home-page "http://www.github.com/atoulme/Saikuro")
  778. ;; File headers contain the BSD-3 license and the README.rdoc says that
  779. ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
  780. ;; of the Expat license.
  781. (license license:bsd-3)))
  782. (define-public ruby-asciidoctor
  783. (package
  784. (name "ruby-asciidoctor")
  785. (version "1.5.7.1")
  786. (source
  787. (origin
  788. (method url-fetch)
  789. (uri (rubygems-uri "asciidoctor" version))
  790. (sha256
  791. (base32
  792. "0v52bzc72cvg7zfgq27pa4mgyf29dx9m20fghrw1xmvwgd519n1w"))))
  793. (build-system ruby-build-system)
  794. (arguments
  795. `(#:test-target "test:all"
  796. #:phases
  797. (modify-phases %standard-phases
  798. (add-before 'check 'remove-circular-tests
  799. (lambda _
  800. ;; Remove tests that require circular dependencies to load or pass.
  801. (delete-file "test/invoker_test.rb")
  802. (delete-file "test/converter_test.rb")
  803. (delete-file "test/options_test.rb")
  804. #t)))))
  805. (native-inputs
  806. `(("ruby-minitest" ,ruby-minitest)
  807. ("ruby-nokogiri" ,ruby-nokogiri)
  808. ("ruby-asciimath" ,ruby-asciimath)
  809. ("ruby-coderay" ,ruby-coderay)))
  810. (synopsis "Converter from AsciiDoc content to other formats")
  811. (description
  812. "Asciidoctor is a text processor and publishing toolchain for converting
  813. AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other formats.")
  814. (home-page "https://asciidoctor.org")
  815. (license license:expat)))
  816. (define-public ruby-ast
  817. (package
  818. (name "ruby-ast")
  819. (version "2.4.0")
  820. (source
  821. (origin
  822. (method url-fetch)
  823. (uri (rubygems-uri "ast" version))
  824. (sha256
  825. (base32
  826. "184ssy3w93nkajlz2c70ifm79jp3j737294kbc5fjw69v1w0n9x7"))))
  827. (build-system ruby-build-system)
  828. (arguments
  829. '(#:phases
  830. (modify-phases %standard-phases
  831. (add-after 'unpack 'remove-coveralls-requirement
  832. (lambda _
  833. (substitute* "test/helper.rb"
  834. (("require 'coveralls'") "")
  835. (("Coveralls::SimpleCov::Formatter") ""))
  836. #t))
  837. (add-after 'extract-gemspec 'remove-unnecessary-requirements
  838. (lambda _
  839. (substitute* "ast.gemspec"
  840. ((".*coveralls.*") "\n")
  841. (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
  842. (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
  843. (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
  844. #t)))))
  845. (native-inputs
  846. `(("bundler" ,bundler)
  847. ("ruby-simplecov" ,ruby-simplecov)
  848. ("ruby-json-pure" ,ruby-json-pure)
  849. ("ruby-mime-times" ,ruby-mime-types)
  850. ("ruby-yard" ,ruby-yard)
  851. ("ruby-kramdown" ,ruby-kramdown)
  852. ("ruby-rest-client" ,ruby-rest-client)
  853. ("ruby-bacon" ,ruby-bacon)
  854. ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
  855. ("ruby-racc" ,ruby-racc)))
  856. (synopsis "Library for working with Abstract Syntax Trees")
  857. (description
  858. "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
  859. It does this through immutable data structures.")
  860. (home-page "https://whitequark.github.io/ast/")
  861. (license license:expat)))
  862. (define-public ruby-sporkmonger-rack-mount
  863. ;; Testing the addressable gem requires a newer commit than that released, so
  864. ;; use an up to date version.
  865. (let ((revision "1")
  866. (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
  867. (package
  868. (name "ruby-sporkmonger-rack-mount")
  869. (version (git-version "0.8.3" revision commit))
  870. (source (origin
  871. (method git-fetch)
  872. (uri (git-reference
  873. (url "https://github.com/sporkmonger/rack-mount.git")
  874. (commit commit)))
  875. (file-name (git-file-name name version))
  876. (sha256
  877. (base32
  878. "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
  879. (build-system ruby-build-system)
  880. (arguments
  881. ;; Tests currently fail so disable them.
  882. ;; https://github.com/sporkmonger/rack-mount/pull/1
  883. `(#:tests? #f))
  884. (propagated-inputs `(("ruby-rack" ,ruby-rack)))
  885. (synopsis "Stackable dynamic tree based Rack router")
  886. (description
  887. "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
  888. continue trying routes if the response returns pass. This allows multiple
  889. routes to be nested or stacked on top of each other.")
  890. (home-page "https://github.com/sporkmonger/rack-mount")
  891. (license license:expat))))
  892. (define-public ruby-ci-reporter
  893. (package
  894. (name "ruby-ci-reporter")
  895. (version "2.0.0")
  896. (source (origin
  897. (method url-fetch)
  898. (uri (rubygems-uri "ci_reporter" version))
  899. (sha256
  900. (base32
  901. "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
  902. (build-system ruby-build-system)
  903. (arguments
  904. `(#:test-target "rspec"))
  905. (propagated-inputs
  906. `(("ruby-builder" ,ruby-builder)))
  907. (native-inputs
  908. `(("bundler" ,bundler)
  909. ("ruby-rspec" ,ruby-rspec)))
  910. (synopsis "Generate XML reports of runs test")
  911. (description
  912. "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
  913. you to generate XML reports of your test runs. The resulting files can be
  914. read by a continuous integration system that understands Ant's JUnit report
  915. format.")
  916. (home-page "https://github.com/nicksieger/ci_reporter")
  917. (license license:expat)))
  918. (define-public ruby-contracts
  919. (package
  920. (name "ruby-contracts")
  921. (version "0.16.0")
  922. (source
  923. (origin
  924. (method url-fetch)
  925. (uri (rubygems-uri "contracts" version))
  926. (sha256
  927. (base32
  928. "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
  929. (build-system ruby-build-system)
  930. (arguments
  931. '(#:test-target "spec"
  932. #:phases
  933. (modify-phases %standard-phases
  934. ;; Don't run or require rubocop, the code linting tool, as this is a
  935. ;; bit unnecessary.
  936. (add-after 'unpack 'dont-run-rubocop
  937. (lambda _
  938. (substitute* "Rakefile"
  939. ((".*rubocop.*") "")
  940. ((".*RuboCop.*") ""))
  941. #t)))))
  942. (native-inputs
  943. `(("ruby-rspec" ,ruby-rspec)))
  944. (synopsis "Method contracts for Ruby")
  945. (description
  946. "This library provides contracts for Ruby. A contract describes the
  947. correct inputs and output for a method, and will raise an error if a incorrect
  948. value is found.")
  949. (home-page "https://github.com/egonSchiele/contracts.ruby")
  950. (license license:bsd-2)))
  951. (define-public ruby-crack
  952. (package
  953. (name "ruby-crack")
  954. (version "0.4.3")
  955. (source
  956. (origin
  957. (method url-fetch)
  958. (uri (rubygems-uri "crack" version))
  959. (sha256
  960. (base32
  961. "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
  962. (build-system ruby-build-system)
  963. (arguments
  964. `(#:phases
  965. (modify-phases %standard-phases
  966. (replace 'check
  967. (lambda* (#:key tests? #:allow-other-keys)
  968. (when tests?
  969. (for-each (lambda (file)
  970. (display file)(display "\n")
  971. (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
  972. (find-files "test" ".*rb$")))
  973. #t)))))
  974. (propagated-inputs
  975. `(("ruby-safe-yaml" ,ruby-safe-yaml)))
  976. (synopsis "Simple JSON and XML parsing for Ruby")
  977. (description
  978. "@code{crack} provides really simple JSON and XML parsing, extracted from
  979. code in Merb and Rails.")
  980. (home-page "https://github.com/jnunemaker/crack")
  981. (license license:expat)))
  982. (define-public ruby-crass
  983. (package
  984. (name "ruby-crass")
  985. (version "1.0.4")
  986. (source
  987. (origin
  988. (method url-fetch)
  989. (uri (rubygems-uri "crass" version))
  990. (sha256
  991. (base32
  992. "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"))))
  993. (build-system ruby-build-system)
  994. (synopsis "Pure Ruby CSS parser based on CSS Syntax Level 3")
  995. (description
  996. "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
  997. (home-page "https://github.com/rgrove/crass/")
  998. (license license:expat)))
  999. (define-public ruby-cliver
  1000. (package
  1001. (name "ruby-cliver")
  1002. (version "0.3.2")
  1003. (source
  1004. (origin
  1005. (method url-fetch)
  1006. (uri (rubygems-uri "cliver" version))
  1007. (sha256
  1008. (base32
  1009. "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
  1010. (build-system ruby-build-system)
  1011. (arguments
  1012. '(#:phases
  1013. (modify-phases %standard-phases
  1014. ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
  1015. ;; would be nice, but the tests look to be incompatible:
  1016. ;;
  1017. ;; NoMethodError: undefined method `last_comment'
  1018. (replace 'check
  1019. (lambda* (#:key tests? #:allow-other-keys)
  1020. (when tests?
  1021. (invoke "rspec"))
  1022. #t)))))
  1023. (native-inputs
  1024. `(("bundler" ,bundler)
  1025. ("ruby-rspec" ,ruby-rspec-2)))
  1026. (synopsis "Assertions for command-line dependencies in Ruby")
  1027. (description
  1028. "@code{cliver} provides a way to detect missing command-line
  1029. dependencies, including versions.")
  1030. (home-page "https://github.com/yaauie/cliver")
  1031. (license license:expat)))
  1032. (define-public ruby-czmq-ffi-gen
  1033. (package
  1034. (name "ruby-czmq-ffi-gen")
  1035. (version "0.13.0")
  1036. (source
  1037. (origin
  1038. (method url-fetch)
  1039. (uri (rubygems-uri "czmq-ffi-gen" version))
  1040. (sha256
  1041. (base32
  1042. "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
  1043. (build-system ruby-build-system)
  1044. (arguments
  1045. '(#:tests? #f ;; Tests are not included in the release on rubygems.org
  1046. #:phases
  1047. (modify-phases %standard-phases
  1048. (add-after 'unpack 'patch-lib_dirs
  1049. (lambda* (#:key inputs #:allow-other-keys)
  1050. (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
  1051. (("lib\\_dirs = \\[.*\\]")
  1052. (string-append "lib_dirs = ['"
  1053. (assoc-ref inputs "czmq") "/lib"
  1054. "']")))
  1055. (substitute* "lib/czmq-ffi-gen/libzmq.rb"
  1056. (("lib\\_dirs = \\[.*\\]")
  1057. (string-append "lib_dirs = ['"
  1058. (assoc-ref inputs "zeromq") "/lib"
  1059. "']"))))))))
  1060. (inputs
  1061. `(("zeromq" ,zeromq)
  1062. ("czmq" ,czmq)))
  1063. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  1064. (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
  1065. (description
  1066. "These Ruby bindings are not intended to be directly used, but rather
  1067. used by higher level bindings like those provided by CZTop.")
  1068. (home-page
  1069. "https://github.com/paddor/czmq-ffi-gen")
  1070. (license license:isc)))
  1071. (define-public ruby-cztop
  1072. (package
  1073. (name "ruby-cztop")
  1074. (version "0.12.2")
  1075. (source
  1076. (origin
  1077. (method url-fetch)
  1078. (uri (rubygems-uri "cztop" version))
  1079. (sha256
  1080. (base32
  1081. "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
  1082. (build-system ruby-build-system)
  1083. (arguments
  1084. '(#:test-target "spec"
  1085. #:phases
  1086. (modify-phases %standard-phases
  1087. (add-after 'unpack 'patch-lib_paths
  1088. (lambda* (#:key inputs #:allow-other-keys)
  1089. (substitute* "lib/cztop/poller/zmq.rb"
  1090. (("lib\\_paths = \\[.*\\]")
  1091. (string-append "lib_paths = ['"
  1092. (assoc-ref inputs "zeromq") "/lib"
  1093. "']"))))))))
  1094. (native-inputs
  1095. `(("bundler" ,bundler)
  1096. ("ruby-rspec" ,ruby-rspec)))
  1097. (inputs
  1098. `(("zeromq" ,zeromq)))
  1099. (propagated-inputs
  1100. `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
  1101. (synopsis "CZMQ Ruby bindings")
  1102. (description
  1103. "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
  1104. CZMQ. The focus of of CZTop is on being easy to use and providing first class
  1105. support for security mechanisms.")
  1106. (home-page "https://github.com/paddor/cztop")
  1107. (license license:isc)))
  1108. (define-public ruby-saikuro-treemap
  1109. (package
  1110. (name "ruby-saikuro-treemap")
  1111. (version "0.2.0")
  1112. (source (origin
  1113. (method url-fetch)
  1114. (uri (rubygems-uri "saikuro_treemap" version))
  1115. (sha256
  1116. (base32
  1117. "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
  1118. (build-system ruby-build-system)
  1119. ;; Some of the tests fail because the generated JSON has keys in a
  1120. ;; different order. This is a problem with the test suite rather than any
  1121. ;; of the involved libraries.
  1122. (arguments `(#:tests? #f))
  1123. (propagated-inputs
  1124. `(("ruby-json-pure" ,ruby-json-pure)
  1125. ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
  1126. (synopsis "Generate complexity treemap based on saikuro analysis")
  1127. (description
  1128. "This gem generates a treemap showing the complexity of Ruby code on
  1129. which it is run. It uses Saikuro under the covers to analyze Ruby code
  1130. complexity.")
  1131. (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
  1132. (license license:expat)))
  1133. (define-public ruby-options
  1134. (package
  1135. (name "ruby-options")
  1136. (version "2.3.2")
  1137. (source
  1138. (origin
  1139. (method url-fetch)
  1140. (uri (rubygems-uri "options" version))
  1141. (sha256
  1142. (base32
  1143. "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
  1144. (build-system ruby-build-system)
  1145. (arguments
  1146. '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
  1147. #:phases
  1148. (modify-phases %standard-phases
  1149. (add-before 'check 'set-LIB
  1150. (lambda _
  1151. ;; This is used in the Rakefile, and setting it avoids an issue
  1152. ;; with running the tests.
  1153. (setenv "LIB" "options")
  1154. #t)))))
  1155. (synopsis "Ruby library to parse options from *args cleanly")
  1156. (description
  1157. "The @code{options} library helps with parsing keyword options in Ruby
  1158. functions.")
  1159. (home-page "https://github.com/ahoward/options")
  1160. (license license:ruby)))
  1161. (define-public ruby-erubi
  1162. (package
  1163. (name "ruby-erubi")
  1164. (version "1.8.0")
  1165. (source
  1166. (origin
  1167. (method url-fetch)
  1168. (uri (rubygems-uri "erubi" version))
  1169. (sha256
  1170. (base32
  1171. "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
  1172. (build-system ruby-build-system)
  1173. (synopsis "ERB template engine for Ruby")
  1174. (description
  1175. "Erubi is a ERB template engine for Ruby. It is a simplified fork of
  1176. Erubis")
  1177. (home-page "https://github.com/jeremyevans/erubi")
  1178. (license license:expat)))
  1179. (define-public ruby-erubis
  1180. (package
  1181. (name "ruby-erubis")
  1182. (version "2.7.0")
  1183. (source
  1184. (origin
  1185. (method url-fetch)
  1186. (uri (rubygems-uri "erubis" version))
  1187. (sha256
  1188. (base32
  1189. "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
  1190. (build-system ruby-build-system)
  1191. (arguments
  1192. '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
  1193. (synopsis "Implementation of embedded Ruby (eRuby)")
  1194. (description
  1195. "Erubis is a fast implementation of embedded Ruby (eRuby) with several
  1196. features such as multi-language support, auto escaping, auto trimming spaces
  1197. around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
  1198. support.")
  1199. (home-page "http://www.kuwata-lab.com/erubis/")
  1200. (license license:expat)))
  1201. (define-public ruby-orderedhash
  1202. (package
  1203. (name "ruby-orderedhash")
  1204. (version "0.0.6")
  1205. (source (origin
  1206. (method url-fetch)
  1207. (uri (rubygems-uri "orderedhash" version))
  1208. (sha256
  1209. (base32
  1210. "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
  1211. (build-system ruby-build-system)
  1212. (arguments
  1213. '(#:tests? #f)) ; no test suite
  1214. (synopsis "Ruby library providing an order-preserving hash")
  1215. (description "Orderedhash is a Ruby library providing a hash
  1216. implementation that preserves the order of items and features some array-like
  1217. extensions.")
  1218. (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
  1219. (license license:public-domain)))
  1220. (define-public ruby-libxml
  1221. (package
  1222. (name "ruby-libxml")
  1223. (version "3.0.0")
  1224. (source
  1225. (origin
  1226. (method url-fetch)
  1227. (uri (rubygems-uri "libxml-ruby" version))
  1228. (sha256
  1229. (base32
  1230. "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
  1231. (build-system ruby-build-system)
  1232. (inputs
  1233. `(("zlib" ,zlib)
  1234. ("libxml2" ,libxml2)))
  1235. (arguments
  1236. '(#:tests? #f ; test suite hangs for unknown reason
  1237. #:gem-flags
  1238. (list "--"
  1239. (string-append "--with-xml2-include="
  1240. (assoc-ref %build-inputs "libxml2")
  1241. "/include/libxml2" ))))
  1242. (synopsis "Ruby bindings for GNOME Libxml2")
  1243. (description "The Libxml-Ruby project provides Ruby language bindings for
  1244. the GNOME Libxml2 XML toolkit.")
  1245. (home-page "https://xml4r.github.com/libxml-ruby")
  1246. (license license:expat)))
  1247. (define-public ruby-xml-simple
  1248. (package
  1249. (name "ruby-xml-simple")
  1250. (version "1.1.5")
  1251. (source (origin
  1252. (method url-fetch)
  1253. (uri (rubygems-uri "xml-simple" version))
  1254. (sha256
  1255. (base32
  1256. "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
  1257. (build-system ruby-build-system)
  1258. (arguments
  1259. '(#:tests? #f)) ; no test suite
  1260. (synopsis "Simple Ruby library for XML processing")
  1261. (description "This library provides a simple API for XML processing in
  1262. Ruby.")
  1263. (home-page "https://github.com/maik/xml-simple")
  1264. (license license:ruby)))
  1265. (define-public ruby-thor
  1266. (package
  1267. (name "ruby-thor")
  1268. (version "0.19.4")
  1269. (source (origin
  1270. (method url-fetch)
  1271. (uri (rubygems-uri "thor" version))
  1272. (sha256
  1273. (base32
  1274. "01n5dv9kql60m6a00zc0r66jvaxx98qhdny3klyj0p3w34pad2ns"))))
  1275. (build-system ruby-build-system)
  1276. (arguments
  1277. '(#:tests? #f)) ; no test suite
  1278. (native-inputs
  1279. `(("bundler" ,bundler)))
  1280. (synopsis "Ruby toolkit for building command-line interfaces")
  1281. (description "Thor is a toolkit for building powerful command-line
  1282. interfaces.")
  1283. (home-page "http://whatisthor.com/")
  1284. (license license:expat)))
  1285. (define-public ruby-lumberjack
  1286. (package
  1287. (name "ruby-lumberjack")
  1288. (version "1.0.13")
  1289. (source (origin
  1290. (method url-fetch)
  1291. (uri (rubygems-uri "lumberjack" version))
  1292. (sha256
  1293. (base32
  1294. "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
  1295. (build-system ruby-build-system)
  1296. (native-inputs
  1297. `(("ruby-rspec" ,ruby-rspec)
  1298. ("ruby-timecop" ,ruby-timecop)))
  1299. (synopsis "Logging utility library for Ruby")
  1300. (description "Lumberjack is a simple logging utility that can be a drop in
  1301. replacement for Logger or ActiveSupport::BufferedLogger. It provides support
  1302. for automatically rolling log files even with multiple processes writing the
  1303. same log file.")
  1304. (home-page "https://github.com/bdurand/lumberjack")
  1305. (license license:expat)))
  1306. (define-public ruby-nenv
  1307. (package
  1308. (name "ruby-nenv")
  1309. (version "0.3.0")
  1310. (source (origin
  1311. (method url-fetch)
  1312. (uri (rubygems-uri "nenv" version))
  1313. (sha256
  1314. (base32
  1315. "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
  1316. (build-system ruby-build-system)
  1317. (arguments
  1318. `(#:tests? #f)) ; no tests included
  1319. (native-inputs
  1320. `(("ruby-rspec" ,ruby-rspec)
  1321. ("bundler" ,bundler)))
  1322. (synopsis "Ruby interface for modifying the environment")
  1323. (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
  1324. and inspect the environment.")
  1325. (home-page "https://github.com/e2/nenv")
  1326. (license license:expat)))
  1327. (define-public ruby-permutation
  1328. (package
  1329. (name "ruby-permutation")
  1330. (version "0.1.8")
  1331. (source (origin
  1332. (method url-fetch)
  1333. (uri (rubygems-uri "permutation" version))
  1334. (sha256
  1335. (base32
  1336. "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
  1337. (build-system ruby-build-system)
  1338. (arguments
  1339. `(#:phases
  1340. (modify-phases %standard-phases
  1341. (add-after 'unpack 'fix-rakefile
  1342. (lambda _
  1343. (substitute* "Rakefile"
  1344. (("require 'rake/gempackagetask'")
  1345. "require 'rubygems/package_task'")
  1346. (("include Config") ""))
  1347. #t))
  1348. (replace 'check
  1349. (lambda _
  1350. (invoke "ruby" "-Ilib" "test/test.rb"))))))
  1351. (synopsis "Library to perform operations with sequence permutations")
  1352. (description "This package provides a Ruby library to perform different
  1353. operations with permutations of sequences, such as strings and arrays.")
  1354. (home-page "https://flori.github.io/permutation")
  1355. (license license:gpl2))) ; GPL 2 only
  1356. (define-public ruby-shellany
  1357. (package
  1358. (name "ruby-shellany")
  1359. (version "0.0.1")
  1360. (source (origin
  1361. (method url-fetch)
  1362. (uri (rubygems-uri "shellany" version))
  1363. (sha256
  1364. (base32
  1365. "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
  1366. (build-system ruby-build-system)
  1367. (arguments
  1368. `(#:test-target "default"
  1369. #:phases
  1370. (modify-phases %standard-phases
  1371. (add-after 'unpack 'fix-version-test
  1372. (lambda _
  1373. (substitute* "spec/shellany_spec.rb"
  1374. (("^RSpec") "require \"shellany\"\nRSpec"))
  1375. #t)))))
  1376. (native-inputs
  1377. `(("ruby-rspec" ,ruby-rspec)
  1378. ("ruby-nenv" ,ruby-nenv)
  1379. ("bundler" ,bundler)))
  1380. (synopsis "Capture command output")
  1381. (description "Shellany is a Ruby library providing functions to capture
  1382. the output produced by running shell commands.")
  1383. (home-page "https://rubygems.org/gems/shellany")
  1384. (license license:expat)))
  1385. (define-public ruby-notiffany
  1386. (package
  1387. (name "ruby-notiffany")
  1388. (version "0.1.1")
  1389. (source (origin
  1390. (method url-fetch)
  1391. (uri (rubygems-uri "notiffany" version))
  1392. (sha256
  1393. (base32
  1394. "0x838fa5il0dd9zbm3lxkpbfxcf5fxv9556mayc2mxsdl5ghv8nx"))))
  1395. (build-system ruby-build-system)
  1396. ;; Tests are not included in the gem.
  1397. (arguments `(#:tests? #f))
  1398. (propagated-inputs
  1399. `(("ruby-shellany" ,ruby-shellany)
  1400. ("ruby-nenv" ,ruby-nenv)))
  1401. (native-inputs
  1402. `(("bundler" ,bundler)))
  1403. (synopsis "Wrapper libray for notification libraries")
  1404. (description "Notiffany is a Ruby wrapper libray for notification
  1405. libraries such as Libnotify.")
  1406. (home-page "https://github.com/guard/notiffany")
  1407. (license license:expat)))
  1408. (define-public ruby-formatador
  1409. (package
  1410. (name "ruby-formatador")
  1411. (version "0.2.5")
  1412. (source (origin
  1413. (method url-fetch)
  1414. (uri (rubygems-uri "formatador" version))
  1415. (sha256
  1416. (base32
  1417. "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
  1418. (build-system ruby-build-system)
  1419. ;; Circular dependency: Tests require ruby-shindo, which requires
  1420. ;; ruby-formatador at runtime.
  1421. (arguments `(#:tests? #f))
  1422. (synopsis "Ruby library to format text on stdout")
  1423. (description "Formatador is a Ruby library to format text printed to the
  1424. standard output stream.")
  1425. (home-page "https://github.com/geemus/formatador")
  1426. (license license:expat)))
  1427. (define-public ruby-fuubar
  1428. (package
  1429. (name "ruby-fuubar")
  1430. (version "2.3.2")
  1431. (source
  1432. (origin
  1433. ;; Fetch from the git repository, as the gem package doesn't include
  1434. ;; the tests.
  1435. (method git-fetch)
  1436. (uri (git-reference
  1437. (url "https://github.com/thekompanee/fuubar.git")
  1438. (commit (string-append "releases/v" version))))
  1439. (file-name (git-file-name name version))
  1440. (sha256
  1441. (base32
  1442. "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
  1443. (build-system ruby-build-system)
  1444. (arguments
  1445. '(;; TODO: Some tests fail, unsure why.
  1446. ;; 21 examples, 7 failures
  1447. #:tests? #f
  1448. #:phases
  1449. (modify-phases %standard-phases
  1450. (add-before 'build 'delete-certificate
  1451. (lambda _
  1452. ;; Remove 's.cert_chain' as we do not build with a private key
  1453. (substitute* "fuubar.gemspec"
  1454. ((".*cert_chain.*") "")
  1455. ((".*signing_key.*") ""))
  1456. #t))
  1457. (replace 'check
  1458. (lambda* (#:key tests? #:allow-other-keys)
  1459. (when tests?
  1460. (invoke "rspec"))
  1461. #t)))))
  1462. (native-inputs
  1463. `(("bundler" ,bundler)))
  1464. (propagated-inputs
  1465. `(("ruby-rspec-core" ,ruby-rspec-core)
  1466. ("ruby-progressbar" ,ruby-progressbar)))
  1467. (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
  1468. (description
  1469. "Fuubar is an RSpec formatter that uses a progress bar instead of a
  1470. string of letters and dots as feedback. It also stops on the first test
  1471. failure.")
  1472. (home-page "https://github.com/thekompanee/fuubar")
  1473. (license license:expat)))
  1474. (define-public ruby-hashdiff
  1475. (package
  1476. (name "ruby-hashdiff")
  1477. (version "0.3.8")
  1478. (source
  1479. (origin
  1480. (method url-fetch)
  1481. (uri (rubygems-uri "hashdiff" version))
  1482. (sha256
  1483. (base32
  1484. "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
  1485. (build-system ruby-build-system)
  1486. (arguments
  1487. '(#:phases
  1488. (modify-phases %standard-phases
  1489. ;; Run tests directly via rspec to avoid Rake issue:
  1490. ;; NoMethodError: undefined method `last_comment'
  1491. (replace 'check
  1492. (lambda* (#:key tests? #:allow-other-keys)
  1493. (when tests?
  1494. (invoke "rspec"))
  1495. #t)))))
  1496. (native-inputs
  1497. `(("bundler" ,bundler)
  1498. ("ruby-rspec" ,ruby-rspec-2)))
  1499. (synopsis "HashDiff computes the smallest difference between two hashes")
  1500. (description
  1501. "HashDiff is a Ruby library to compute the smallest difference between
  1502. two hashes.")
  1503. (home-page "https://github.com/liufengyun/hashdiff")
  1504. (license license:expat)))
  1505. (define-public ruby-shindo
  1506. (package
  1507. (name "ruby-shindo")
  1508. (version "0.3.8")
  1509. (source (origin
  1510. (method url-fetch)
  1511. (uri (rubygems-uri "shindo" version))
  1512. (sha256
  1513. (base32
  1514. "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
  1515. (build-system ruby-build-system)
  1516. (arguments
  1517. `(#:test-target "shindo_tests"
  1518. #:phases
  1519. (modify-phases %standard-phases
  1520. (add-after 'unpack 'fix-tests
  1521. (lambda _
  1522. (substitute* "tests/tests_helper.rb"
  1523. (("-rubygems") ""))
  1524. (substitute* "Rakefile"
  1525. (("system \"shindo") "system \"./bin/shindo")
  1526. ;; This test doesn't work, so we disable it.
  1527. (("fail \"The build_error test should fail") "#")
  1528. ((" -rubygems") ""))
  1529. #t)))))
  1530. (propagated-inputs
  1531. `(("ruby-formatador" ,ruby-formatador)))
  1532. (synopsis "Simple depth first Ruby testing")
  1533. (description "Shindo is a simple depth first testing library for Ruby.")
  1534. (home-page "https://github.com/geemus/shindo")
  1535. (license license:expat)))
  1536. (define-public ruby-rubygems-tasks
  1537. (package
  1538. (name "ruby-rubygems-tasks")
  1539. (version "0.2.4")
  1540. (source (origin
  1541. (method url-fetch)
  1542. (uri (rubygems-uri "rubygems-tasks" version))
  1543. (sha256
  1544. (base32
  1545. "16cp45qlbcglnqdm4f1vj3diywdz4v024saqpgrz6palf0wmgz2j"))))
  1546. (build-system ruby-build-system)
  1547. ;; Tests need Internet access.
  1548. (arguments `(#:tests? #f))
  1549. (native-inputs
  1550. `(("ruby-rspec" ,ruby-rspec)
  1551. ("ruby-yard" ,ruby-yard)))
  1552. (synopsis "Rake tasks for managing and releasing Ruby Gems")
  1553. (description "Rubygems-task provides Rake tasks for managing and releasing
  1554. Ruby Gems.")
  1555. (home-page "https://github.com/postmodern/rubygems-tasks")
  1556. (license license:expat)))
  1557. (define-public ruby-rubyzip
  1558. (package
  1559. (name "ruby-rubyzip")
  1560. (version "1.2.1")
  1561. (source
  1562. (origin
  1563. (method url-fetch)
  1564. (uri (rubygems-uri "rubyzip" version))
  1565. (sha256
  1566. (base32
  1567. "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
  1568. (build-system ruby-build-system)
  1569. (arguments
  1570. '(#:phases
  1571. (modify-phases %standard-phases
  1572. (add-before 'check 'patch-tests
  1573. (lambda* (#:key inputs #:allow-other-keys)
  1574. (substitute* "test/gentestfiles.rb"
  1575. (("/usr/bin/zip")
  1576. (string-append
  1577. (assoc-ref inputs "zip") "/bin/zip")))
  1578. (substitute* "test/input_stream_test.rb"
  1579. (("/usr/bin/env ruby") (which "ruby")))
  1580. #t)))))
  1581. (native-inputs
  1582. `(("bundler" ,bundler)
  1583. ("ruby-simplecov" ,ruby-simplecov)
  1584. ("zip" ,zip)
  1585. ("unzip" ,unzip)))
  1586. (synopsis "Ruby module is for reading and writing zip files")
  1587. (description
  1588. "The rubyzip module provides ways to read from and create zip files.")
  1589. (home-page "http://github.com/rubyzip/rubyzip")
  1590. (license license:bsd-2)))
  1591. (define-public ruby-simplecov-html
  1592. (package
  1593. (name "ruby-simplecov-html")
  1594. (version "0.10.2")
  1595. (source (origin
  1596. (method url-fetch)
  1597. (uri (rubygems-uri "simplecov-html" version))
  1598. (sha256
  1599. (base32
  1600. "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
  1601. (build-system ruby-build-system)
  1602. (arguments `(#:tests? #f)) ; there are no tests
  1603. (native-inputs
  1604. `(("bundler" ,bundler)))
  1605. (synopsis "Default HTML formatter for SimpleCov code coverage tool")
  1606. (description "This package provides the default HTML formatter for
  1607. the SimpleCov code coverage tool for Ruby version 1.9 and above.")
  1608. (home-page "https://github.com/colszowka/simplecov-html")
  1609. (license license:expat)))
  1610. (define-public ruby-simplecov
  1611. (package
  1612. (name "ruby-simplecov")
  1613. (version "0.12.0")
  1614. (source (origin
  1615. (method url-fetch)
  1616. (uri (rubygems-uri "simplecov" version))
  1617. (sha256
  1618. (base32
  1619. "0ffhyrfnq2zm2mc1742a4hqy475g3qa1zf6yfldwg1ldh5sn3qbx"))))
  1620. (build-system ruby-build-system)
  1621. ;; Simplecov depends on rubocop for code style checking at build time.
  1622. ;; Rubocop needs simplecov at build time.
  1623. (arguments `(#:tests? #f))
  1624. (propagated-inputs
  1625. `(("ruby-json" ,ruby-json)
  1626. ("ruby-docile" ,ruby-docile)
  1627. ("ruby-simplecov-html" ,ruby-simplecov-html)))
  1628. (native-inputs
  1629. `(("bundler" ,bundler)))
  1630. (synopsis "Code coverage framework for Ruby")
  1631. (description "SimpleCov is a code coverage framework for Ruby with a
  1632. powerful configuration library and automatic merging of coverage across test
  1633. suites.")
  1634. (home-page "https://github.com/colszowka/simplecov")
  1635. (license license:expat)))
  1636. (define-public ruby-useragent
  1637. (package
  1638. (name "ruby-useragent")
  1639. (version "0.16.8")
  1640. (source (origin
  1641. (method url-fetch)
  1642. (uri (rubygems-uri "useragent" version))
  1643. (sha256
  1644. (base32
  1645. "1139cjqyv1hk1qcw89k81ajjkqyakqgbcyvmfrsmjqi8yn9kgqhq"))))
  1646. (build-system ruby-build-system)
  1647. (arguments
  1648. '(#:tests? #f)) ; no test suite
  1649. (synopsis "HTTP user agent parser for Ruby")
  1650. (description "UserAgent is a Ruby library that parses and compares HTTP
  1651. User Agents.")
  1652. (home-page "https://github.com/gshutler/useragent")
  1653. (license license:expat)))
  1654. (define-public ruby-backports
  1655. (package
  1656. (name "ruby-backports")
  1657. (version "3.11.4")
  1658. (source
  1659. (origin
  1660. (method url-fetch)
  1661. (uri (rubygems-uri "backports" version))
  1662. (sha256
  1663. (base32
  1664. "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
  1665. (build-system ruby-build-system)
  1666. (arguments
  1667. '(;; TODO: This should be default, but there is one test failure
  1668. #:test-target "all_spec"))
  1669. (native-inputs
  1670. `(("ruby-mspec" ,ruby-mspec)
  1671. ("ruby-activesupport" ,ruby-activesupport)))
  1672. (synopsis "Backports of the features in newer Ruby versions")
  1673. (description
  1674. "Backports enables more compatibility across Ruby versions by providing
  1675. backports of some features.")
  1676. (home-page "https://github.com/marcandre/backports")
  1677. (license license:expat)))
  1678. (define-public ruby-bacon
  1679. (package
  1680. (name "ruby-bacon")
  1681. (version "1.2.0")
  1682. (source (origin
  1683. (method url-fetch)
  1684. (uri (rubygems-uri "bacon" version))
  1685. (sha256
  1686. (base32
  1687. "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
  1688. (build-system ruby-build-system)
  1689. (synopsis "Small RSpec clone")
  1690. (description "Bacon is a small RSpec clone providing all essential
  1691. features.")
  1692. (home-page "https://github.com/chneukirchen/bacon")
  1693. (license license:expat)))
  1694. (define-public ruby-bacon-bits
  1695. (package
  1696. (name "ruby-bacon-bits")
  1697. (version "0.1.0")
  1698. (source
  1699. (origin
  1700. (method url-fetch)
  1701. (uri (rubygems-uri "bacon-bits" version))
  1702. (sha256
  1703. (base32
  1704. "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
  1705. (build-system ruby-build-system)
  1706. (arguments
  1707. ;; No tests
  1708. '(#:tests? #f))
  1709. (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
  1710. (synopsis "Extensions to Bacon, for disabling tests, before and after
  1711. blocks and more")
  1712. (description
  1713. "This extends the bacon testing framework with useful extensions to
  1714. disable tests, have before and after blocks that run once and more.")
  1715. (home-page "https://github.com/cldwalker/bacon-bits")
  1716. (license license:expat)))
  1717. (define-public ruby-bacon-colored-output
  1718. (package
  1719. (name "ruby-bacon-colored-output")
  1720. (version "1.1.1")
  1721. (source
  1722. (origin
  1723. (method url-fetch)
  1724. (uri (rubygems-uri "bacon-colored_output" version))
  1725. (sha256
  1726. (base32
  1727. "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
  1728. (build-system ruby-build-system)
  1729. (arguments
  1730. '(;; No included tests
  1731. #:tests? #f))
  1732. (propagated-inputs
  1733. `(("ruby-bacon" ,ruby-bacon)))
  1734. (synopsis "Colored output for Bacon test framework")
  1735. (description
  1736. "This package adds color through ANSI escape codes to Bacon test
  1737. output.")
  1738. (home-page "https://github.com/whitequark/bacon-colored_output")
  1739. (license license:expat)))
  1740. (define-public ruby-connection-pool
  1741. (package
  1742. (name "ruby-connection-pool")
  1743. (version "2.2.2")
  1744. (source (origin
  1745. (method url-fetch)
  1746. (uri (rubygems-uri "connection_pool" version))
  1747. (sha256
  1748. (base32
  1749. "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
  1750. (build-system ruby-build-system)
  1751. (native-inputs
  1752. `(("bundler" ,bundler)))
  1753. (synopsis "Generic connection pool for Ruby")
  1754. (description "Connection_pool provides a generic connection pooling
  1755. interface for Ruby programs.")
  1756. (home-page "https://github.com/mperham/connection_pool")
  1757. (license license:expat)))
  1758. (define-public ruby-net-http-persistent
  1759. (package
  1760. (name "ruby-net-http-persistent")
  1761. (version "3.0.0")
  1762. (source (origin
  1763. (method url-fetch)
  1764. (uri (rubygems-uri "net-http-persistent" version))
  1765. (sha256
  1766. (base32
  1767. "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
  1768. (build-system ruby-build-system)
  1769. (native-inputs
  1770. `(("ruby-connection-pool" ,ruby-connection-pool)
  1771. ("ruby-hoe" ,ruby-hoe)))
  1772. (synopsis "Persistent HTTP connection manager")
  1773. (description "Net::HTTP::Persistent manages persistent HTTP connections
  1774. using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
  1775. (home-page "https://github.com/drbrain/net-http-persistent")
  1776. (license license:expat)))
  1777. (define-public ruby-power-assert
  1778. (package
  1779. (name "ruby-power-assert")
  1780. (version "0.2.7")
  1781. (source (origin
  1782. (method url-fetch)
  1783. (uri (rubygems-uri "power_assert" version))
  1784. (sha256
  1785. (base32
  1786. "0ka6w71lcan4wgf111xi3pcn9ma9lhakv31jg8w007nwzi0xfjbi"))))
  1787. (build-system ruby-build-system)
  1788. (native-inputs
  1789. `(("bundler" ,bundler)))
  1790. (synopsis "Assert library with descriptive assertion messages")
  1791. (description "Power-assert is an assertion library providing descriptive
  1792. assertion messages for tests.")
  1793. (home-page "https://github.com/k-tsj/power_assert")
  1794. (license (list license:bsd-2 license:ruby))))
  1795. (define-public ruby-powerpack
  1796. (package
  1797. (name "ruby-powerpack")
  1798. (version "0.1.2")
  1799. (source
  1800. (origin
  1801. (method url-fetch)
  1802. (uri (rubygems-uri "powerpack" version))
  1803. (sha256
  1804. (base32
  1805. "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
  1806. (build-system ruby-build-system)
  1807. (arguments
  1808. '(#:test-target "spec"))
  1809. (native-inputs
  1810. `(("bundler" ,bundler)
  1811. ("ruby-rspec" ,ruby-rspec)
  1812. ("ruby-yard" ,ruby-yard)))
  1813. (synopsis "Useful extensions to core Ruby classes")
  1814. (description
  1815. "This package provides a few useful extensions to core Ruby classes,
  1816. including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
  1817. @code{String}.")
  1818. (home-page "https://github.com/bbatsov/powerpack")
  1819. (license license:expat)))
  1820. (define-public ruby-locale
  1821. (package
  1822. (name "ruby-locale")
  1823. (version "2.1.2")
  1824. (source (origin
  1825. (method url-fetch)
  1826. (uri (rubygems-uri "locale" version))
  1827. (sha256
  1828. (base32
  1829. "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
  1830. (build-system ruby-build-system)
  1831. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  1832. ;; which needs ruby-gettext, which needs ruby-locale. To break the
  1833. ;; dependency cycle we disable tests.
  1834. (arguments `(#:tests? #f))
  1835. (native-inputs
  1836. `(("bundler" ,bundler)
  1837. ("ruby-yard" ,ruby-yard)))
  1838. (synopsis "Ruby library providing basic localization APIs")
  1839. (description
  1840. "Ruby-Locale is the pure ruby library which provides basic APIs for
  1841. localization.")
  1842. (home-page "https://github.com/ruby-gettext/locale")
  1843. (license (list license:lgpl3+ license:ruby))))
  1844. (define-public ruby-text
  1845. (package
  1846. (name "ruby-text")
  1847. (version "1.3.1")
  1848. (source (origin
  1849. (method url-fetch)
  1850. (uri (rubygems-uri "text" version))
  1851. (sha256
  1852. (base32
  1853. "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
  1854. (build-system ruby-build-system)
  1855. (synopsis "Collection of text algorithms for Ruby")
  1856. (description
  1857. "This package provides a collection of text algorithms: Levenshtein,
  1858. Soundex, Metaphone, Double Metaphone, Porter Stemming.")
  1859. (home-page "https://github.com/threedaymonk/text")
  1860. (license license:expat)))
  1861. (define-public ruby-gettext
  1862. (package
  1863. (name "ruby-gettext")
  1864. (version "3.1.7")
  1865. (source (origin
  1866. (method url-fetch)
  1867. (uri (rubygems-uri "gettext" version))
  1868. (sha256
  1869. (base32
  1870. "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
  1871. (build-system ruby-build-system)
  1872. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  1873. ;; which needs ruby-gettext. To break the dependency cycle we disable
  1874. ;; tests.
  1875. (arguments `(#:tests? #f))
  1876. (propagated-inputs
  1877. `(("ruby-locale" ,ruby-locale)
  1878. ("ruby-text" ,ruby-text)))
  1879. (native-inputs
  1880. `(("bundler" ,bundler)
  1881. ("ruby-yard" ,ruby-yard)))
  1882. (synopsis "GNU gettext-like program for Ruby")
  1883. (description
  1884. "Gettext is a GNU gettext-like program for Ruby. The catalog
  1885. file (po-file) used is the same as that used by GNU gettext, allowing you to
  1886. use GNU gettext tools for maintenance.")
  1887. (home-page "https://ruby-gettext.github.com/")
  1888. (license (list license:lgpl3+ license:ruby))))
  1889. (define-public ruby-packnga
  1890. (package
  1891. (name "ruby-packnga")
  1892. (version "1.0.4")
  1893. (source (origin
  1894. (method url-fetch)
  1895. (uri (rubygems-uri "packnga" version))
  1896. (sha256
  1897. (base32
  1898. "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
  1899. (build-system ruby-build-system)
  1900. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
  1901. ;; To break the dependency cycle we disable tests.
  1902. (arguments `(#:tests? #f))
  1903. (propagated-inputs
  1904. `(("ruby-gettext" ,ruby-gettext)
  1905. ("ruby-yard" ,ruby-yard)))
  1906. (native-inputs
  1907. `(("bundler" ,bundler)))
  1908. (synopsis "Utility library to package internationalized libraries")
  1909. (description
  1910. "Packnga is a library to translate to many languages using YARD.")
  1911. (home-page "http://ranguba.org/packnga/")
  1912. (license license:lgpl2.0+)))
  1913. (define-public ruby-test-unit
  1914. (package
  1915. (name "ruby-test-unit")
  1916. (version "3.2.5")
  1917. (source (origin
  1918. (method url-fetch)
  1919. (uri (rubygems-uri "test-unit" version))
  1920. (sha256
  1921. (base32
  1922. "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
  1923. (build-system ruby-build-system)
  1924. (propagated-inputs
  1925. `(("ruby-power-assert" ,ruby-power-assert)))
  1926. (native-inputs
  1927. `(("bundler" ,bundler)
  1928. ("ruby-packnga" ,ruby-packnga)
  1929. ("ruby-yard" ,ruby-yard)))
  1930. (synopsis "Unit testing framework for Ruby")
  1931. (description "@code{Test::Unit} is unit testing framework for Ruby, based
  1932. on xUnit principles. These were originally designed by Kent Beck, creator of
  1933. extreme programming software development methodology, for Smalltalk's SUnit.
  1934. It allows writing tests, checking results and automated testing in Ruby.")
  1935. (home-page "https://test-unit.github.io/")
  1936. (license (list license:psfl license:ruby))))
  1937. (define-public ruby-maruku
  1938. (package
  1939. (name "ruby-maruku")
  1940. (version "0.7.3")
  1941. (source
  1942. (origin
  1943. (method url-fetch)
  1944. (uri (rubygems-uri "maruku" version))
  1945. (sha256
  1946. (base32
  1947. "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
  1948. (build-system ruby-build-system)
  1949. (arguments
  1950. '(;; TODO: 3 tests seem to fail due to HTML encoding issues
  1951. #:tests? #f
  1952. #:phases
  1953. (modify-phases %standard-phases
  1954. (replace 'check
  1955. (lambda* (#:key tests? #:allow-other-keys)
  1956. (when tests?
  1957. (invoke "rspec"))
  1958. #t)))))
  1959. (native-inputs
  1960. `(("ruby-rspec" ,ruby-rspec)
  1961. ("ruby-simplecov" ,ruby-simplecov)
  1962. ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
  1963. (synopsis "Markdown interpreter in Ruby")
  1964. (description
  1965. "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
  1966. HTML, and PDF through LaTeX.")
  1967. (home-page "https://github.com/bhollis/maruku")
  1968. (license license:expat)))
  1969. (define-public ruby-metaclass
  1970. (package
  1971. (name "ruby-metaclass")
  1972. (version "0.0.4")
  1973. (source (origin
  1974. (method url-fetch)
  1975. (uri (rubygems-uri "metaclass" version))
  1976. (sha256
  1977. (base32
  1978. "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
  1979. (build-system ruby-build-system)
  1980. (arguments
  1981. `(#:phases
  1982. (modify-phases %standard-phases
  1983. (add-after 'unpack 'add-test-unit-to-search-path
  1984. (lambda* (#:key inputs #:allow-other-keys)
  1985. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  1986. (substitute* "Rakefile"
  1987. (("t\\.libs << \"test\"" line)
  1988. (string-append line "; t.libs << \""
  1989. test-unit "/lib/ruby/vendor_ruby"
  1990. "/gems/test-unit-"
  1991. ,(package-version ruby-test-unit)
  1992. "/lib\""))))
  1993. #t)))))
  1994. (native-inputs
  1995. `(("bundler" ,bundler)
  1996. ("ruby-test-unit" ,ruby-test-unit)))
  1997. (synopsis "Ruby library adding metaclass method to all objects")
  1998. (description
  1999. "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
  2000. objects.")
  2001. (home-page "https://github.com/floehopper/metaclass")
  2002. (license license:expat)))
  2003. (define-public ruby-mspec
  2004. (package
  2005. (name "ruby-mspec")
  2006. (version "1.9.1")
  2007. (source
  2008. (origin
  2009. (method url-fetch)
  2010. (uri (rubygems-uri "mspec" version))
  2011. (sha256
  2012. (base32
  2013. "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
  2014. (build-system ruby-build-system)
  2015. (arguments
  2016. '(;; TODO: 3 test failures
  2017. ;; ./spec/mocks/mock_spec.rb:82
  2018. ;; ./spec/utils/name_map_spec.rb:151
  2019. ;; ./spec/utils/name_map_spec.rb:155
  2020. #:tests? #f
  2021. #:phases
  2022. (modify-phases %standard-phases
  2023. (add-after 'extract-gemspec 'change-dependency-constraints
  2024. (lambda _
  2025. (substitute* "mspec.gemspec"
  2026. (("rake.*") "rake>)\n")
  2027. (("rspec.*") "rspec>)\n"))
  2028. #t))
  2029. (replace 'check
  2030. (lambda* (#:key tests? #:allow-other-keys)
  2031. (when tests?
  2032. (invoke "rspec" "spec"))
  2033. #t)))))
  2034. (native-inputs
  2035. `(("bundler" ,bundler)
  2036. ("ruby-rake" ,ruby-rake)
  2037. ("ruby-rspec" ,ruby-rspec)))
  2038. (synopsis "MSpec is a specialized framework for RubySpec")
  2039. (description
  2040. "MSpec is a specialized framework that is syntax-compatible with RSpec 2
  2041. for basic features. MSpec contains additional features that assist in writing
  2042. specs for Ruby implementations in ruby/spec.")
  2043. (home-page "http://rubyspec.org")
  2044. (license license:expat)))
  2045. (define-public ruby-mysql2
  2046. (package
  2047. (name "ruby-mysql2")
  2048. (version "0.5.2")
  2049. (source
  2050. (origin
  2051. (method git-fetch)
  2052. (uri (git-reference
  2053. (url "https://github.com/brianmario/mysql2.git")
  2054. (commit version)))
  2055. (file-name (git-file-name name version))
  2056. (sha256
  2057. (base32
  2058. "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
  2059. (build-system ruby-build-system)
  2060. (arguments
  2061. '(;; TODO: Tests require a running MySQL/MariaDB service
  2062. #:tests? #f
  2063. #:phases
  2064. (modify-phases %standard-phases
  2065. (replace 'replace-git-ls-files
  2066. (lambda _
  2067. (substitute* "mysql2.gemspec"
  2068. (("git ls-files .*`") "find . -type f |sort`"))
  2069. #t))
  2070. (add-before 'install 'set-MAKEFLAGS
  2071. (lambda* (#:key outputs #:allow-other-keys)
  2072. (setenv "MAKEFLAGS"
  2073. (string-append
  2074. "V=1 "
  2075. "prefix=" (assoc-ref outputs "out")))
  2076. #t))
  2077. ;; Move the 'check phase to after 'install, as then you can test
  2078. ;; using the installed mysql2 gem in the store.
  2079. (delete 'check)
  2080. (add-after 'install 'check
  2081. (lambda* (#:key outputs tests? #:allow-other-keys)
  2082. (setenv "GEM_PATH"
  2083. (string-append
  2084. (getenv "GEM_PATH")
  2085. ":"
  2086. (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
  2087. (when tests?
  2088. (invoke "rspec"))
  2089. #t)))))
  2090. (inputs
  2091. `(("mariadb" ,mariadb)
  2092. ("zlib" ,zlib)))
  2093. (native-inputs
  2094. `(("ruby-rspec" ,ruby-rspec)
  2095. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  2096. (synopsis "MySQL library for Ruby, binding to libmysql")
  2097. (description
  2098. "This package provides a simple, fast MySQL library for Ruby, binding to
  2099. libmysql.")
  2100. (home-page "https://github.com/brianmario/mysql2")
  2101. (license license:expat)))
  2102. (define-public ruby-blankslate
  2103. (package
  2104. (name "ruby-blankslate")
  2105. (version "3.1.3")
  2106. (source (origin
  2107. (method url-fetch)
  2108. (uri (rubygems-uri "blankslate" version))
  2109. (sha256
  2110. (base32
  2111. "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
  2112. (build-system ruby-build-system)
  2113. (arguments
  2114. `(#:phases
  2115. (modify-phases %standard-phases
  2116. (replace 'check
  2117. (lambda _ (invoke "rspec" "spec/"))))))
  2118. (native-inputs
  2119. `(("bundler" ,bundler)
  2120. ("ruby-rspec" ,ruby-rspec)))
  2121. (synopsis "Abstract base class with no predefined methods")
  2122. (description
  2123. "BlankSlate provides an abstract base class with no predefined
  2124. methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
  2125. as a base class when writing classes that depend upon
  2126. @code{method_missing} (e.g. dynamic proxies).")
  2127. (home-page "https://github.com/masover/blankslate")
  2128. (license license:expat)))
  2129. (define-public ruby-bond
  2130. (package
  2131. (name "ruby-bond")
  2132. (version "0.5.1")
  2133. (source
  2134. (origin
  2135. (method url-fetch)
  2136. (uri (rubygems-uri "bond" version))
  2137. (sha256
  2138. (base32
  2139. "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
  2140. (build-system ruby-build-system)
  2141. (native-inputs
  2142. `(("ruby-bacon" ,ruby-bacon)
  2143. ("ruby-bacon-bits" ,ruby-bacon-bits)
  2144. ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
  2145. (synopsis "Bond can provide custom autocompletion for arguments, methods
  2146. and more")
  2147. (description
  2148. "Bond can autocomplete argument(s) to methods, uniquely completing per
  2149. module, per method and per argument. Bond provides a configuration system and
  2150. a DSL for creating custom completions and completion rules. Bond can also
  2151. load completions that ship with gems. Bond is able to offer more than irb's
  2152. completion since it uses the full line of input when completing as opposed to
  2153. irb's last-word approach.")
  2154. (home-page "http://tagaholic.me/bond/")
  2155. (license license:expat)))
  2156. (define-public ruby-idn-ruby
  2157. (package
  2158. (name "ruby-idn-ruby")
  2159. (version "0.1.0")
  2160. (source
  2161. (origin
  2162. (method url-fetch)
  2163. (uri (rubygems-uri "idn-ruby" version))
  2164. (sha256
  2165. (base32
  2166. "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
  2167. (build-system ruby-build-system)
  2168. (arguments
  2169. '(#:phases
  2170. (modify-phases %standard-phases
  2171. (delete 'check)
  2172. (add-after 'install 'check
  2173. (lambda* (#:key tests? outputs #:allow-other-keys)
  2174. (when tests?
  2175. (let* ((gem-file (cadr (find-files "." "\\.gem")))
  2176. (name-and-version (basename gem-file ".gem")))
  2177. (apply invoke
  2178. "ruby" "--verbose"
  2179. (string-append "-I"
  2180. (assoc-ref outputs "out")
  2181. "/lib/ruby/vendor_ruby/gems/"
  2182. name-and-version
  2183. "/lib")
  2184. (find-files "./test" ".*\\.rb"))))
  2185. #t)))))
  2186. (inputs
  2187. `(("libidn" ,libidn)))
  2188. (synopsis "Ruby Bindings for the GNU LibIDN library")
  2189. (description
  2190. "Ruby Bindings for the GNU LibIDN library, an implementation of the
  2191. Stringprep, Punycode and IDNA specifications. These are used to encode and
  2192. decode internationalized domain + names according to the IDNA2003
  2193. specifications.
  2194. Included are the most important parts of the Stringprep, Punycode and IDNA
  2195. APIs like performing Stringprep processings, encoding to and decoding from
  2196. Punycode strings and converting entire domain names to and from the ACE
  2197. encoded form.")
  2198. (home-page "https://github.com/deepfryed/idn-ruby")
  2199. (license license:asl2.0)))
  2200. (define-public ruby-instantiator
  2201. (package
  2202. (name "ruby-instantiator")
  2203. (version "0.0.7")
  2204. (source (origin
  2205. (method url-fetch)
  2206. (uri (rubygems-uri "instantiator" version))
  2207. (sha256
  2208. (base32
  2209. "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
  2210. (build-system ruby-build-system)
  2211. (arguments
  2212. `(#:phases
  2213. (modify-phases %standard-phases
  2214. (add-after 'unpack 'add-test-unit-to-search-path
  2215. (lambda* (#:key inputs #:allow-other-keys)
  2216. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  2217. (substitute* "Rakefile"
  2218. (("t\\.libs << \"test\"" line)
  2219. (string-append line "; t.libs << \""
  2220. test-unit "/lib/ruby/vendor_ruby"
  2221. "/gems/test-unit-"
  2222. ,(package-version ruby-test-unit)
  2223. "/lib\""))))
  2224. #t)))))
  2225. (propagated-inputs
  2226. `(("ruby-blankslate" ,ruby-blankslate)))
  2227. (native-inputs
  2228. `(("bundler" ,bundler)
  2229. ("ruby-test-unit" ,ruby-test-unit)))
  2230. (synopsis "Instantiate an arbitrary Ruby class")
  2231. (description
  2232. "Instantiator lets you instantiate an arbitrary Ruby class without
  2233. knowing anything about the constructor.")
  2234. (home-page "https://github.com/floehopper/instantiator")
  2235. (license license:expat)))
  2236. (define-public ruby-introspection
  2237. (package
  2238. (name "ruby-introspection")
  2239. (version "0.0.4")
  2240. (source (origin
  2241. (method url-fetch)
  2242. (uri (rubygems-uri "introspection" version))
  2243. (sha256
  2244. (base32
  2245. "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
  2246. (build-system ruby-build-system)
  2247. (arguments
  2248. `(#:phases
  2249. (modify-phases %standard-phases
  2250. (add-after 'unpack 'add-test-unit-to-search-path
  2251. (lambda* (#:key inputs #:allow-other-keys)
  2252. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  2253. (substitute* "Rakefile"
  2254. (("t\\.libs << \"test\"" line)
  2255. (string-append line "; t.libs << \""
  2256. test-unit "/lib/ruby/vendor_ruby"
  2257. "/gems/test-unit-"
  2258. ,(package-version ruby-test-unit)
  2259. "/lib\""))))
  2260. #t)))))
  2261. (propagated-inputs
  2262. `(("ruby-instantiator" ,ruby-instantiator)
  2263. ("ruby-metaclass" ,ruby-metaclass)))
  2264. (native-inputs
  2265. `(("bundler" ,bundler)
  2266. ("ruby-blankslate" ,ruby-blankslate)
  2267. ("ruby-test-unit" ,ruby-test-unit)))
  2268. (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
  2269. (description
  2270. "Introspection provides tools to inspect the hierarchy of method
  2271. definitions on a Ruby object.")
  2272. (home-page "https://github.com/floehopper/introspection")
  2273. (license license:expat)))
  2274. (define-public ruby-redcarpet
  2275. (package
  2276. (name "ruby-redcarpet")
  2277. (version "3.4.0")
  2278. (source (origin
  2279. (method url-fetch)
  2280. (uri (rubygems-uri "redcarpet" version))
  2281. (sha256
  2282. (base32
  2283. "0h9qz2hik4s9knpmbwrzb3jcp3vc5vygp9ya8lcpl7f1l9khmcd7"))))
  2284. (build-system ruby-build-system)
  2285. (arguments
  2286. `(#:phases
  2287. (modify-phases %standard-phases
  2288. ;; The gem archive does not include the conformance tests.
  2289. (add-after 'unpack 'disable-conformance-tests
  2290. (lambda _
  2291. (substitute* "Rakefile"
  2292. (("task :test => %w\\[test:unit test:conformance\\]")
  2293. "task :test => %w[test:unit]"))
  2294. #t)))))
  2295. (native-inputs
  2296. `(("bundler" ,bundler)
  2297. ("ruby-test-unit" ,ruby-test-unit)
  2298. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  2299. (synopsis "Extensible Markdown to (X)HTML converter")
  2300. (description
  2301. "Redcarpet is an extensible Ruby library for Markdown processing and
  2302. conversion to (X)HTML.")
  2303. (home-page "https://github.com/vmg/redcarpet")
  2304. (license license:expat)))
  2305. (define-public ruby-mocha
  2306. (package
  2307. (name "ruby-mocha")
  2308. (version "1.1.0")
  2309. (source (origin
  2310. (method url-fetch)
  2311. (uri (rubygems-uri "mocha" version))
  2312. (sha256
  2313. (base32
  2314. "107nmnngbv8lq2g7hbjpn5kplb4v2c8gs9lxrg6vs8gdbddkilzi"))))
  2315. (build-system ruby-build-system)
  2316. (arguments
  2317. `(#:phases
  2318. (modify-phases %standard-phases
  2319. (add-after 'unpack 'add-test-unit-to-search-path
  2320. (lambda* (#:key inputs #:allow-other-keys)
  2321. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  2322. (substitute* "Rakefile"
  2323. (("t\\.libs << 'test'" line)
  2324. (string-append line "; t.libs << \""
  2325. test-unit "/lib/ruby/vendor_ruby"
  2326. "/gems/test-unit-"
  2327. ,(package-version ruby-test-unit)
  2328. "/lib\""))))
  2329. #t))
  2330. (add-before 'check 'use-latest-redcarpet
  2331. (lambda _
  2332. (substitute* "mocha.gemspec"
  2333. (("<redcarpet>.freeze, \\[\"~> 1\"\\]")
  2334. "<redcarpet>.freeze, [\">= 3\"]"))
  2335. #t))
  2336. (add-before 'check 'hardcode-version
  2337. (lambda _
  2338. ;; Mocha is undefined at build time
  2339. (substitute* "Rakefile"
  2340. (("#\\{Mocha::VERSION\\}") ,version))
  2341. #t))
  2342. (add-before 'check 'remove-failing-test
  2343. ;; FIXME: This test fails for reasons unrelated to Guix packaging.
  2344. (lambda _
  2345. (delete-file "test/acceptance/stubbing_nil_test.rb")
  2346. #t)))))
  2347. (propagated-inputs
  2348. `(("ruby-metaclass" ,ruby-metaclass)))
  2349. (native-inputs
  2350. `(("bundler" ,bundler)
  2351. ("ruby-yard" ,ruby-yard)
  2352. ("ruby-introspection" ,ruby-introspection)
  2353. ("ruby-test-unit" ,ruby-test-unit)
  2354. ("ruby-redcarpet" ,ruby-redcarpet)))
  2355. (synopsis "Mocking and stubbing library for Ruby")
  2356. (description
  2357. "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
  2358. allows mocking and stubbing of methods on real (non-mock) classes.")
  2359. (home-page "http://gofreerange.com/mocha/docs")
  2360. (license license:expat)))
  2361. (define-public ruby-mocha-on-bacon
  2362. (package
  2363. (name "ruby-mocha-on-bacon")
  2364. (version "0.2.3")
  2365. (source
  2366. (origin
  2367. (method url-fetch)
  2368. (uri (rubygems-uri "mocha-on-bacon" version))
  2369. (sha256
  2370. (base32
  2371. "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
  2372. (build-system ruby-build-system)
  2373. (arguments
  2374. ;; rubygems.org release missing tests
  2375. '(#:tests? #f))
  2376. (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
  2377. (synopsis "Mocha adapter for Bacon")
  2378. (description
  2379. "This package provides a Mocha adapter for Bacon, allowing you to use the
  2380. Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
  2381. (home-page
  2382. "https://github.com/alloy/mocha-on-bacon")
  2383. (license license:expat)))
  2384. (define-public ruby-net-ssh
  2385. (package
  2386. (name "ruby-net-ssh")
  2387. (version "4.2.0")
  2388. (source (origin
  2389. (method url-fetch)
  2390. (uri (rubygems-uri "net-ssh" version))
  2391. (sha256
  2392. (base32
  2393. "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
  2394. (build-system ruby-build-system)
  2395. (native-inputs
  2396. `(("bundler" ,bundler)
  2397. ("ruby-mocha" ,ruby-mocha)
  2398. ("ruby-test-unit" ,ruby-test-unit)))
  2399. (synopsis "Ruby implementation of the SSH2 client protocol")
  2400. (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
  2401. client protocol. It allows you to write programs that invoke and interact
  2402. with processes on remote servers, via SSH2.")
  2403. (home-page "https://github.com/net-ssh/net-ssh")
  2404. (license license:expat)))
  2405. (define-public ruby-net-scp
  2406. (package
  2407. (name "ruby-net-scp")
  2408. ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
  2409. (version "1.2.2.rc2")
  2410. (source
  2411. (origin
  2412. (method url-fetch)
  2413. (uri (string-append "https://github.com/net-ssh/net-scp/archive/v"
  2414. version ".tar.gz"))
  2415. (sha256
  2416. (base32
  2417. "0xyf17mhgvyz54xjj9ria4wnq3x62bhmkfgzqv8jwiip2bplv1nk"))))
  2418. (build-system ruby-build-system)
  2419. (native-inputs
  2420. `(("bundler" ,bundler)
  2421. ("ruby-test-unit" ,ruby-test-unit)
  2422. ("ruby-mocha" ,ruby-mocha)))
  2423. (propagated-inputs
  2424. `(("ruby-net-ssh" ,ruby-net-ssh)))
  2425. (synopsis "Pure-Ruby SCP client library")
  2426. (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
  2427. client protocol.")
  2428. (home-page "https://github.com/net-ssh/net-scp")
  2429. (license license:expat)))
  2430. (define-public ruby-minitest
  2431. (package
  2432. (name "ruby-minitest")
  2433. (version "5.11.3")
  2434. (source (origin
  2435. (method url-fetch)
  2436. (uri (rubygems-uri "minitest" version))
  2437. (sha256
  2438. (base32
  2439. "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
  2440. (build-system ruby-build-system)
  2441. (native-inputs
  2442. `(("ruby-hoe" ,ruby-hoe)))
  2443. (synopsis "Small test suite library for Ruby")
  2444. (description "Minitest provides a complete suite of Ruby testing
  2445. facilities supporting TDD, BDD, mocking, and benchmarking.")
  2446. (home-page "https://github.com/seattlerb/minitest")
  2447. (license license:expat)))
  2448. ;; This is the last release of Minitest 4, which is used by some packages.
  2449. (define-public ruby-minitest-4
  2450. (package (inherit ruby-minitest)
  2451. (version "4.7.5")
  2452. (source (origin
  2453. (method url-fetch)
  2454. (uri (rubygems-uri "minitest" version))
  2455. (sha256
  2456. (base32
  2457. "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
  2458. (arguments
  2459. `(#:phases
  2460. (modify-phases %standard-phases
  2461. (add-after 'unpack 'remove-unsupported-method
  2462. (lambda _
  2463. (substitute* "Rakefile"
  2464. (("self\\.rubyforge_name = .*") ""))
  2465. #t))
  2466. (add-after 'build 'exclude-failing-tests
  2467. (lambda _
  2468. ;; Some tests are failing on Ruby 2.4 due to the deprecation of
  2469. ;; Fixnum.
  2470. (delete-file "test/minitest/test_minitest_spec.rb")
  2471. #t)))))))
  2472. (define-public ruby-minitest-sprint
  2473. (package
  2474. (name "ruby-minitest-sprint")
  2475. (version "1.1.0")
  2476. (source (origin
  2477. (method url-fetch)
  2478. (uri (rubygems-uri "minitest-sprint" version))
  2479. (sha256
  2480. (base32
  2481. "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
  2482. (build-system ruby-build-system)
  2483. (native-inputs
  2484. `(("ruby-hoe" ,ruby-hoe)
  2485. ("ruby-minitest" ,ruby-minitest)))
  2486. (synopsis "Fast test suite runner for minitest")
  2487. (description "Minitest-sprint is a test runner for minitest that makes it
  2488. easier to re-run individual failing tests.")
  2489. (home-page "https://github.com/seattlerb/minitest-sprint")
  2490. (license license:expat)))
  2491. (define-public ruby-minitest-bacon
  2492. (package
  2493. (name "ruby-minitest-bacon")
  2494. (version "1.0.3")
  2495. (source (origin
  2496. (method url-fetch)
  2497. (uri (rubygems-uri "minitest-bacon" version))
  2498. (sha256
  2499. (base32
  2500. "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
  2501. (build-system ruby-build-system)
  2502. (native-inputs
  2503. `(("ruby-hoe" ,ruby-hoe)))
  2504. (inputs
  2505. `(("ruby-minitest" ,ruby-minitest)))
  2506. (synopsis "Bacon compatibility library for minitest")
  2507. (description "Minitest-bacon extends minitest with bacon-like
  2508. functionality, making it easier to migrate test suites from bacon to minitest.")
  2509. (home-page "https://github.com/seattlerb/minitest-bacon")
  2510. (license license:expat)))
  2511. (define-public ruby-minitest-focus
  2512. (package
  2513. (name "ruby-minitest-focus")
  2514. (version "1.1.2")
  2515. (source
  2516. (origin
  2517. (method url-fetch)
  2518. (uri (rubygems-uri "minitest-focus" version))
  2519. (sha256
  2520. (base32
  2521. "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
  2522. (build-system ruby-build-system)
  2523. (propagated-inputs
  2524. `(("ruby-minitest" ,ruby-minitest)))
  2525. (native-inputs
  2526. `(("ruby-hoe" ,ruby-hoe)))
  2527. (synopsis "Allows a few specific tests to be focused on")
  2528. (description
  2529. "@code{minitest-focus} gives the ability focus on a few tests with ease
  2530. without having to use command-line arguments. It introduces a @code{focus}
  2531. class method for use in testing classes, specifying that the next defined test
  2532. is to be run.")
  2533. (home-page "https://github.com/seattlerb/minitest-focus")
  2534. (license license:expat)))
  2535. (define-public ruby-minitest-pretty-diff
  2536. ;; Use git reference because gem is out of date and does not contain testing
  2537. ;; script. There are no releases on GitHub.
  2538. (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
  2539. (package
  2540. (name "ruby-minitest-pretty-diff")
  2541. (version (string-append "0.1-1." (string-take commit 8)))
  2542. (source (origin
  2543. (method git-fetch)
  2544. (uri (git-reference
  2545. (url "https://github.com/adammck/minitest-pretty_diff.git")
  2546. (commit commit)))
  2547. (file-name (string-append name "-" version "-checkout"))
  2548. (sha256
  2549. (base32
  2550. "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
  2551. (build-system ruby-build-system)
  2552. (arguments
  2553. `(#:phases
  2554. (modify-phases %standard-phases
  2555. (replace 'check
  2556. (lambda _
  2557. (invoke "script/test"))))))
  2558. (native-inputs
  2559. `(("bundler" ,bundler)
  2560. ("ruby-turn" ,ruby-turn)))
  2561. (synopsis "Pretty-print hashes and arrays in MiniTest")
  2562. (description
  2563. "@code{minitest-pretty_diff} monkey-patches
  2564. @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
  2565. diffing them. This makes it easier to spot differences between nested
  2566. structures when tests fail.")
  2567. (home-page "https://github.com/adammck/minitest-pretty_diff")
  2568. (license license:expat))))
  2569. (define-public ruby-minitest-moar
  2570. (package
  2571. (name "ruby-minitest-moar")
  2572. (version "0.0.4")
  2573. (source
  2574. (origin
  2575. (method url-fetch)
  2576. (uri (rubygems-uri "minitest-moar" version))
  2577. (sha256
  2578. (base32
  2579. "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
  2580. (build-system ruby-build-system)
  2581. (arguments
  2582. `(#:phases
  2583. (modify-phases %standard-phases
  2584. (add-before 'check 'clean-dependencies
  2585. (lambda _
  2586. ;; Remove all gems defined in the Gemfile because these are not
  2587. ;; truly needed.
  2588. (substitute* "Gemfile"
  2589. (("gem .*") ""))
  2590. ;; Remove byebug as not needed to run tests.
  2591. (substitute* "test/test_helper.rb"
  2592. (("require 'byebug'") ""))
  2593. #t)))))
  2594. (native-inputs
  2595. `(("bundler" ,bundler)
  2596. ("ruby-minitest" ,ruby-minitest)))
  2597. (synopsis "Extra features and changes to MiniTest")
  2598. (description "@code{MiniTest Moar} add some additional features and
  2599. changes some default behaviours in MiniTest. For instance, Moar replaces the
  2600. MiniTest @code{Object#stub} with a global @code{stub} method.")
  2601. (home-page "https://github.com/dockyard/minitest-moar")
  2602. (license license:expat)))
  2603. (define-public ruby-minitest-bonus-assertions
  2604. (package
  2605. (name "ruby-minitest-bonus-assertions")
  2606. (version "3.0")
  2607. (source
  2608. (origin
  2609. (method url-fetch)
  2610. (uri (rubygems-uri "minitest-bonus-assertions" version))
  2611. (sha256
  2612. (base32
  2613. "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
  2614. (build-system ruby-build-system)
  2615. (arguments
  2616. `(#:phases
  2617. (modify-phases %standard-phases
  2618. (add-before 'check 'clean-dependencies
  2619. (lambda _
  2620. ;; Remove unneeded require statement that would entail another
  2621. ;; dependency.
  2622. (substitute* "test/minitest_config.rb"
  2623. (("require 'minitest/bisect'") ""))
  2624. #t)))))
  2625. (native-inputs
  2626. `(("ruby-hoe" ,ruby-hoe)
  2627. ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
  2628. ("ruby-minitest-focus" ,ruby-minitest-focus)
  2629. ("ruby-minitest-moar" ,ruby-minitest-moar)))
  2630. (synopsis "Bonus assertions for @code{Minitest}")
  2631. (description
  2632. "Minitest bonus assertions provides extra MiniTest assertions. For
  2633. instance, it provides @code{assert_true}, @code{assert_false} and
  2634. @code{assert_set_equal}.")
  2635. (home-page "https://github.com/halostatue/minitest-bonus-assertions")
  2636. (license license:expat)))
  2637. (define-public ruby-minitest-reporters
  2638. (package
  2639. (name "ruby-minitest-reporters")
  2640. (version "1.3.6")
  2641. (source
  2642. (origin
  2643. (method url-fetch)
  2644. (uri (rubygems-uri "minitest-reporters" version))
  2645. (sha256
  2646. (base32
  2647. "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
  2648. (build-system ruby-build-system)
  2649. (arguments
  2650. '(#:phases
  2651. (modify-phases %standard-phases
  2652. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  2653. ;; including it as an input can lead to circular dependencies.
  2654. (add-after 'unpack 'remove-rubocop-from-Rakefile
  2655. (lambda _
  2656. (substitute* "Rakefile"
  2657. (("require 'rubocop/rake\\_task'") "")
  2658. (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
  2659. #t))
  2660. (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
  2661. (lambda _
  2662. (substitute* "minitest-reporters.gemspec"
  2663. ((".*%q<rubocop>.*") "\n"))
  2664. #t)))))
  2665. (propagated-inputs
  2666. `(("ruby-ansi" ,ruby-ansi)
  2667. ("ruby-builder" ,ruby-builder)
  2668. ("ruby-minitest" ,ruby-minitest)
  2669. ("ruby-progressbar" ,ruby-progressbar)))
  2670. (native-inputs
  2671. `(("bundler" ,bundler)
  2672. ("ruby-maruku" ,ruby-maruku)))
  2673. (synopsis "Enhanced reporting for Minitest tests")
  2674. (description
  2675. "@code{minitest/reporters} provides a custom Minitest runner to improve
  2676. how the test state is reported. A number of different reporters are
  2677. available, including a spec reporter, progress bar reporter, a HTML
  2678. reporter.")
  2679. (home-page "https://github.com/kern/minitest-reporters")
  2680. (license license:expat)))
  2681. (define-public ruby-minitest-rg
  2682. (package
  2683. (name "ruby-minitest-rg")
  2684. (version "5.2.0")
  2685. (source
  2686. (origin
  2687. (method url-fetch)
  2688. (uri (rubygems-uri "minitest-rg" version))
  2689. (sha256
  2690. (base32
  2691. "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
  2692. (build-system ruby-build-system)
  2693. (arguments
  2694. ;; Some tests fail even outside Guix, so disable tests.
  2695. ;; https://github.com/blowmage/minitest-rg/issues/12
  2696. ;; https://github.com/blowmage/minitest-rg/pull/13
  2697. `(#:tests? #f))
  2698. (propagated-inputs
  2699. `(("ruby-minitest" ,ruby-minitest)))
  2700. (synopsis "Coloured output for Minitest")
  2701. (description
  2702. "@code{minitest-rg} changes the colour of the output from Minitest.")
  2703. (home-page "http://blowmage.com/minitest-rg")
  2704. (license license:expat)))
  2705. (define-public ruby-minitest-hooks
  2706. (package
  2707. (name "ruby-minitest-hooks")
  2708. (version "1.4.2")
  2709. (source
  2710. (origin
  2711. (method url-fetch)
  2712. (uri (rubygems-uri "minitest-hooks" version))
  2713. (sha256
  2714. (base32
  2715. "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
  2716. (build-system ruby-build-system)
  2717. (arguments
  2718. '(#:test-target "spec"))
  2719. (native-inputs
  2720. `(("ruby-sequel" ,ruby-sequel)
  2721. ("ruby-sqlite3" ,ruby-sqlite3)))
  2722. (synopsis "Hooks for the minitest framework")
  2723. (description
  2724. "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
  2725. @code{around_all} hooks for Minitest. This allows, for instance, running each
  2726. suite of specs inside a database transaction, running each spec inside its own
  2727. savepoint inside that transaction. This can significantly speed up testing
  2728. for specs that share expensive database setup code.")
  2729. (home-page "https://github.com/jeremyevans/minitest-hooks")
  2730. (license license:expat)))
  2731. (define-public ruby-daemons
  2732. (package
  2733. (name "ruby-daemons")
  2734. (version "1.2.5")
  2735. (source (origin
  2736. (method url-fetch)
  2737. (uri (rubygems-uri "daemons" version))
  2738. (sha256
  2739. (base32
  2740. "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
  2741. (build-system ruby-build-system)
  2742. (arguments
  2743. `(#:tests? #f)) ; no test suite
  2744. (synopsis "Daemonize Ruby programs")
  2745. (description "Daemons provides a way to wrap existing Ruby scripts to be
  2746. run as a daemon and to be controlled by simple start/stop/restart commands.")
  2747. (home-page "https://github.com/thuehlinger/daemons")
  2748. (license license:expat)))
  2749. (define-public ruby-data_uri
  2750. (package
  2751. (name "ruby-data_uri")
  2752. (version "0.1.0")
  2753. (source
  2754. (origin
  2755. (method url-fetch)
  2756. (uri (rubygems-uri "data_uri" version))
  2757. (sha256
  2758. (base32
  2759. "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
  2760. (build-system ruby-build-system)
  2761. (synopsis "URI class for parsing data URIs")
  2762. (description
  2763. "Data @acronym{URI, universal resource idenfitier}s allow resources to be
  2764. embedded inside a URI. The URI::Data class provides support for parsing these
  2765. URIs using the normal URI.parse method.")
  2766. (home-page "https://github.com/dball/data_uri")
  2767. (license license:expat)))
  2768. (define-public ruby-git
  2769. (package
  2770. (name "ruby-git")
  2771. (version "1.3.0")
  2772. (source (origin
  2773. (method url-fetch)
  2774. (uri (rubygems-uri "git" version))
  2775. (sha256
  2776. (base32
  2777. "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
  2778. (build-system ruby-build-system)
  2779. (arguments
  2780. `(#:tests? #f ; no tests
  2781. #:phases (modify-phases %standard-phases
  2782. (add-after 'install 'patch-git-binary
  2783. (lambda* (#:key inputs outputs #:allow-other-keys)
  2784. ;; Make the default git binary an absolute path to the
  2785. ;; store.
  2786. (let ((git (string-append (assoc-ref inputs "git")
  2787. "/bin/git"))
  2788. (config (string-append
  2789. (assoc-ref outputs "out")
  2790. "/lib/ruby/vendor_ruby/gems/git-"
  2791. ,version "/lib/git/config.rb")))
  2792. (substitute* (list config)
  2793. (("'git'")
  2794. (string-append "'" git "'")))
  2795. #t))))))
  2796. (inputs
  2797. `(("git" ,git)))
  2798. (synopsis "Ruby wrappers for Git")
  2799. (description "Ruby/Git is a Ruby library that can be used to create, read
  2800. and manipulate Git repositories by wrapping system calls to the git binary.")
  2801. (home-page "https://github.com/schacon/ruby-git")
  2802. (license license:expat)))
  2803. (define-public ruby-slop
  2804. (package
  2805. (name "ruby-slop")
  2806. (version "4.5.0")
  2807. (source (origin
  2808. (method url-fetch)
  2809. (uri (rubygems-uri "slop" version))
  2810. (sha256
  2811. (base32
  2812. "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
  2813. (build-system ruby-build-system)
  2814. (native-inputs
  2815. `(("ruby-minitest" ,ruby-minitest)))
  2816. (synopsis "Ruby command line option parser")
  2817. (description "Slop provides a Ruby domain specific language for gathering
  2818. options and parsing command line flags.")
  2819. (home-page "https://github.com/leejarvis/slop")
  2820. (license license:expat)))
  2821. (define-public ruby-slop-3
  2822. (package (inherit ruby-slop)
  2823. (version "3.6.0")
  2824. (source (origin
  2825. (method url-fetch)
  2826. (uri (rubygems-uri "slop" version))
  2827. (sha256
  2828. (base32
  2829. "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
  2830. (define-public ruby-multipart-post
  2831. (package
  2832. (name "ruby-multipart-post")
  2833. (version "2.0.0")
  2834. (source (origin
  2835. (method url-fetch)
  2836. (uri (rubygems-uri "multipart-post" version))
  2837. (sha256
  2838. (base32
  2839. "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
  2840. (build-system ruby-build-system)
  2841. (native-inputs
  2842. `(("bundler" ,bundler)))
  2843. (synopsis "Multipart POST library for Ruby")
  2844. (description "Multipart-Post Adds multipart POST capability to Ruby's
  2845. net/http library.")
  2846. (home-page "https://github.com/nicksieger/multipart-post")
  2847. (license license:expat)))
  2848. (define-public ruby-multi-json
  2849. (package
  2850. (name "ruby-multi-json")
  2851. (version "1.13.1")
  2852. (source
  2853. (origin
  2854. (method url-fetch)
  2855. ;; Tests are not distributed at rubygems.org so download from GitHub
  2856. ;; instead.
  2857. (uri (string-append "https://github.com/intridea/multi_json/archive/v"
  2858. version ".tar.gz"))
  2859. (file-name (string-append name "-" version ".tar.gz"))
  2860. (sha256
  2861. (base32
  2862. "1s64xqvrnrxmb59v6b2kchnisawg5ai9ky1w60dy6z6ws9la1xv4"))))
  2863. (build-system ruby-build-system)
  2864. (arguments
  2865. `(#:phases
  2866. (modify-phases %standard-phases
  2867. (add-after 'unpack 'remove-signing-key-reference
  2868. (lambda _
  2869. (substitute* "multi_json.gemspec"
  2870. ((".*spec.signing_key.*") ""))
  2871. #t)))))
  2872. (native-inputs
  2873. `(("bundler" ,bundler)
  2874. ("ruby-rspec" ,ruby-rspec)
  2875. ("ruby-yard" ,ruby-yard)
  2876. ("ruby-json-pure" ,ruby-json-pure)
  2877. ("ruby-oj" ,ruby-oj)
  2878. ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
  2879. (synopsis "Common interface to multiple JSON libraries for Ruby")
  2880. (description
  2881. "This package provides a common interface to multiple JSON libraries,
  2882. including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
  2883. NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
  2884. (home-page "https://github.com/intridea/multi_json")
  2885. (license license:expat)))
  2886. (define-public ruby-multi-test
  2887. (package
  2888. (name "ruby-multi-test")
  2889. (version "0.1.2")
  2890. (source
  2891. (origin
  2892. (method url-fetch)
  2893. (uri (rubygems-uri "multi_test" version))
  2894. (sha256
  2895. (base32
  2896. "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
  2897. (build-system ruby-build-system)
  2898. (arguments
  2899. '(;; Tests require different sets of specific gem versions to be available,
  2900. ;; and there is no gemfile that specifies the newest versions of
  2901. ;; dependencies to be tested.
  2902. #:tests? #f))
  2903. (synopsis
  2904. "Interface to testing libraries loaded into a running Ruby process")
  2905. (description
  2906. "@code{multi_test} provides a uniform interface onto whatever testing
  2907. libraries that have been loaded into a running Ruby process to help control
  2908. rogue test/unit/autorun requires.")
  2909. (home-page "https://github.com/cucumber/multi_test")
  2910. (license license:expat)))
  2911. (define-public ruby-arel
  2912. (package
  2913. (name "ruby-arel")
  2914. (version "9.0.0")
  2915. (source (origin
  2916. (method url-fetch)
  2917. (uri (rubygems-uri "arel" version))
  2918. (sha256
  2919. (base32
  2920. "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
  2921. (build-system ruby-build-system)
  2922. (arguments '(#:tests? #f)) ; no tests
  2923. (home-page "https://github.com/rails/arel")
  2924. (synopsis "SQL AST manager for Ruby")
  2925. (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
  2926. Ruby. It simplifies the generation of complex SQL queries and adapts to
  2927. various relational database implementations.")
  2928. (license license:expat)))
  2929. (define-public ruby-marcel
  2930. (package
  2931. (name "ruby-marcel")
  2932. (version "0.3.3")
  2933. (source
  2934. (origin
  2935. (method url-fetch)
  2936. (uri (rubygems-uri "marcel" version))
  2937. (sha256
  2938. (base32
  2939. "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
  2940. (build-system ruby-build-system)
  2941. (arguments
  2942. '(;; No included tests
  2943. #:tests? #f))
  2944. (propagated-inputs
  2945. `(("ruby-mimemagic" ,ruby-mimemagic)))
  2946. (synopsis "MIME type detection using magic numbers, filenames and extensions")
  2947. (description
  2948. "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
  2949. Extensions} type detection using magic numbers, filenames, and extensions")
  2950. (home-page "https://github.com/basecamp/marcel")
  2951. (license license:expat)))
  2952. (define-public ruby-minitar
  2953. ;; We package from the GitHub source to fix the security issue reported at
  2954. ;; https://github.com/halostatue/minitar/issues/16.
  2955. (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
  2956. (package
  2957. (name "ruby-minitar")
  2958. (version (string-append "0.5.4-1." (string-take commit 8)))
  2959. (source
  2960. (origin
  2961. (method git-fetch)
  2962. (uri (git-reference
  2963. (url "https://github.com/halostatue/minitar.git")
  2964. (commit commit)))
  2965. (file-name (string-append name "-" version "-checkout"))
  2966. (sha256
  2967. (base32
  2968. "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
  2969. (build-system ruby-build-system)
  2970. (arguments
  2971. '(#:tests? #f)) ; missing a gemspec
  2972. (synopsis "Ruby library and utility for handling tar archives")
  2973. (description
  2974. "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
  2975. that provides the ability to deal with POSIX tar archive files.")
  2976. (home-page "http://www.github.com/atoulme/minitar")
  2977. (license (list license:gpl2+ license:ruby)))))
  2978. (define-public ruby-mini-portile
  2979. (package
  2980. (name "ruby-mini-portile")
  2981. (version "0.6.2")
  2982. (source
  2983. (origin
  2984. (method url-fetch)
  2985. (uri (rubygems-uri "mini_portile" version))
  2986. (sha256
  2987. (base32
  2988. "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
  2989. (build-system ruby-build-system)
  2990. (arguments
  2991. '(#:tests? #f)) ; tests require network access
  2992. (synopsis "Ports system for Ruby developers")
  2993. (description "Mini-portile is a port/recipe system for Ruby developers.
  2994. It provides a standard way to compile against specific versions of libraries
  2995. to reproduce user environments.")
  2996. (home-page "https://github.com/flavorjones/mini_portile")
  2997. (license license:expat)))
  2998. (define-public ruby-mini-portile-2
  2999. (package (inherit ruby-mini-portile)
  3000. (version "2.2.0")
  3001. (source (origin
  3002. (method url-fetch)
  3003. (uri (rubygems-uri "mini_portile2" version))
  3004. (sha256
  3005. (base32
  3006. "0g5bpgy08q0nc0anisg3yvwc1gc3inl854fcrg48wvg7glqd6dpm"))))))
  3007. (define-public ruby-nokogiri
  3008. (package
  3009. (name "ruby-nokogiri")
  3010. (version "1.8.0")
  3011. (source (origin
  3012. (method url-fetch)
  3013. (uri (rubygems-uri "nokogiri" version))
  3014. (sha256
  3015. (base32
  3016. "1nffsyx1xjg6v5n9rrbi8y1arrcx2i5f21cp6clgh9iwiqkr7rnn"))))
  3017. (build-system ruby-build-system)
  3018. (arguments
  3019. ;; Tests fail because Nokogiri can only test with an installed extension,
  3020. ;; and also because many test framework dependencies are missing.
  3021. `(#:tests? #f
  3022. #:gem-flags (list "--" "--use-system-libraries"
  3023. (string-append "--with-xml2-include="
  3024. (assoc-ref %build-inputs "libxml2")
  3025. "/include/libxml2" ))
  3026. #:phases
  3027. (modify-phases %standard-phases
  3028. (add-before 'build 'patch-extconf
  3029. ;; 'pkg-config' is not included in the GEM_PATH during
  3030. ;; installation, so we add it directly to the load path.
  3031. (lambda* (#:key inputs #:allow-other-keys)
  3032. (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
  3033. (substitute* "ext/nokogiri/extconf.rb"
  3034. (("gem 'pkg-config'.*")
  3035. (string-append "$:.unshift '"
  3036. pkg-config "/lib/ruby/vendor_ruby"
  3037. "/gems/pkg-config-"
  3038. ,(package-version ruby-pkg-config)
  3039. "/lib'\n"))))
  3040. #t)))))
  3041. (native-inputs
  3042. `(("ruby-hoe" ,ruby-hoe)))
  3043. (inputs
  3044. `(("zlib" ,zlib)
  3045. ("libxml2" ,libxml2)
  3046. ("libxslt" ,libxslt)))
  3047. (propagated-inputs
  3048. `(("ruby-mini-portile" ,ruby-mini-portile-2)
  3049. ("ruby-pkg-config" ,ruby-pkg-config)))
  3050. (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
  3051. (description "Nokogiri (鋸) parses and searches XML/HTML, and features
  3052. both CSS3 selector and XPath 1.0 support.")
  3053. (home-page "http://www.nokogiri.org/")
  3054. (license license:expat)))
  3055. (define-public ruby-method-source
  3056. (package
  3057. (name "ruby-method-source")
  3058. (version "0.9.0")
  3059. (source
  3060. (origin
  3061. (method url-fetch)
  3062. (uri (rubygems-uri "method_source" version))
  3063. (sha256
  3064. (base32
  3065. "0xqj21j3vfq4ldia6i2akhn2qd84m0iqcnsl49kfpq3xk6x0dzgn"))))
  3066. (build-system ruby-build-system)
  3067. (arguments
  3068. `(#:test-target "spec"))
  3069. (native-inputs
  3070. `(("ruby-rspec" ,ruby-rspec)
  3071. ("git" ,git)))
  3072. (synopsis "Retrieve the source code for Ruby methods")
  3073. (description "Method_source retrieves the source code for Ruby methods.
  3074. Additionally, it can extract source code from Proc and Lambda objects or just
  3075. extract comments.")
  3076. (home-page "https://github.com/banister/method_source")
  3077. (license license:expat)))
  3078. (define-public ruby-coderay
  3079. (package
  3080. (name "ruby-coderay")
  3081. (version "1.1.2")
  3082. (source
  3083. (origin
  3084. (method url-fetch)
  3085. (uri (rubygems-uri "coderay" version))
  3086. (sha256
  3087. (base32
  3088. "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
  3089. (build-system ruby-build-system)
  3090. (arguments
  3091. '(#:tests? #f)) ; missing test files
  3092. (synopsis "Ruby syntax highlighting library")
  3093. (description "Coderay is a Ruby library that provides syntax highlighting
  3094. for select languages.")
  3095. (home-page "http://coderay.rubychan.de")
  3096. (license license:expat)))
  3097. (define-public ruby-parser
  3098. (package
  3099. (name "ruby-parser")
  3100. (version "2.6.0.0")
  3101. (source
  3102. (origin
  3103. (method url-fetch)
  3104. (uri (rubygems-uri "parser" version))
  3105. (sha256
  3106. (base32
  3107. "1hhz2k5417vr2k1llwqgjdnmyrhlpqicy0y2arr6r1gp04fg9wlm"))))
  3108. (build-system ruby-build-system)
  3109. (native-inputs
  3110. `(("bundler" ,bundler)
  3111. ("ruby-cliver" ,ruby-cliver)
  3112. ("ruby-simplecov" ,ruby-simplecov)
  3113. ("ruby-racc" ,ruby-racc)))
  3114. (inputs
  3115. `(("ragel" ,ragel)))
  3116. (propagated-inputs
  3117. `(("ruby-ast" ,ruby-ast)))
  3118. (synopsis "Ruby parser written in pure Ruby")
  3119. (description
  3120. "This package provides a Ruby parser written in pure Ruby.")
  3121. (home-page "https://github.com/whitequark/parser")
  3122. (license license:expat)))
  3123. (define-public ruby-prawn-manual-builder
  3124. (package
  3125. (name "ruby-prawn-manual-builder")
  3126. (version "0.3.0")
  3127. (source
  3128. (origin
  3129. (method url-fetch)
  3130. (uri (rubygems-uri "prawn-manual_builder" version))
  3131. (sha256
  3132. (base32
  3133. "0wbjnkqp55p5wmz85ldypcray223glckd209hmdxhnzk8s5pb3za"))))
  3134. (build-system ruby-build-system)
  3135. (arguments
  3136. '(;; No included tests
  3137. #:tests? #f
  3138. #:phases
  3139. (modify-phases %standard-phases
  3140. (add-after 'extract-gemspec 'patch-gemspec
  3141. (lambda _
  3142. (substitute* ".gemspec"
  3143. ;; Loosen the requirement for pdf-inspector
  3144. (("~> 1\\.0\\.7") ">= 0")))))))
  3145. (propagated-inputs
  3146. `(("ruby-coderay" ,ruby-coderay)))
  3147. (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
  3148. (description
  3149. "This package provides a tool for writing manuals for Prawn and Prawn
  3150. accessories")
  3151. (home-page "https://github.com/prawnpdf/prawn-manual_builder")
  3152. (license (list
  3153. ;; GPLv2 or GPLv3 or custom license described in LICENSE file
  3154. license:gpl2
  3155. license:gpl3))))
  3156. (define-public ruby-progress_bar
  3157. (package
  3158. (name "ruby-progress_bar")
  3159. (version "1.1.0")
  3160. (source
  3161. (origin
  3162. (method url-fetch)
  3163. (uri (rubygems-uri "progress_bar" version))
  3164. (sha256
  3165. (base32
  3166. "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
  3167. (build-system ruby-build-system)
  3168. (arguments
  3169. '(#:test-target "spec"))
  3170. (propagated-inputs
  3171. `(("ruby-highline" ,ruby-highline)
  3172. ("ruby-options" ,ruby-options)))
  3173. (native-inputs
  3174. `(("bundler" ,bundler)
  3175. ("ruby-rspec" ,ruby-rspec)
  3176. ("ruby-timecop" ,ruby-timecop)))
  3177. (synopsis
  3178. "Ruby library for displaying progress bars")
  3179. (description
  3180. "ProgressBar is a simple library for displaying progress bars. The
  3181. maximum value is configurable, and additional information can be displayed
  3182. like the percentage completion, estimated time remaining, elapsed time and
  3183. rate.")
  3184. (home-page "https://github.com/paul/progress_bar")
  3185. (license license:wtfpl2)))
  3186. (define-public ruby-progressbar
  3187. (package
  3188. (name "ruby-progressbar")
  3189. (version "1.10.0")
  3190. (source
  3191. (origin
  3192. (method url-fetch)
  3193. (uri (rubygems-uri "ruby-progressbar" version))
  3194. (sha256
  3195. (base32
  3196. "1cv2ym3rl09svw8940ny67bav7b2db4ms39i4raaqzkf59jmhglk"))))
  3197. (build-system ruby-build-system)
  3198. (arguments
  3199. '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
  3200. #:tests? #f))
  3201. (synopsis "Text progress bar library for Ruby")
  3202. (description
  3203. "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
  3204. The output can be customized with a formatting system.")
  3205. (home-page "https://github.com/jfelchner/ruby-progressbar")
  3206. (license license:expat)))
  3207. (define-public ruby-pry
  3208. (package
  3209. (name "ruby-pry")
  3210. (version "0.11.3")
  3211. (source
  3212. (origin
  3213. (method url-fetch)
  3214. (uri (rubygems-uri "pry" version))
  3215. (sha256
  3216. (base32
  3217. "1mh312k3y94sj0pi160wpia0ps8f4kmzvm505i6bvwynfdh7v30g"))))
  3218. (build-system ruby-build-system)
  3219. (arguments
  3220. '(#:tests? #f)) ; no tests
  3221. (propagated-inputs
  3222. `(("ruby-coderay" ,ruby-coderay)
  3223. ("ruby-method-source" ,ruby-method-source)))
  3224. (synopsis "Ruby REPL")
  3225. (description "Pry is an IRB alternative and runtime developer console for
  3226. Ruby. It features syntax highlighting, a plugin architecture, runtime
  3227. invocation, and source and documentation browsing.")
  3228. (home-page "https://pryrepl.org")
  3229. (license license:expat)))
  3230. (define-public ruby-guard
  3231. (package
  3232. (name "ruby-guard")
  3233. (version "2.13.0")
  3234. (source (origin
  3235. (method url-fetch)
  3236. ;; The gem does not include a Rakefile, nor does it contain a
  3237. ;; gemspec file, nor does it come with the tests. This is why
  3238. ;; we fetch the tarball from Github.
  3239. (uri (string-append "https://github.com/guard/guard/archive/v"
  3240. version ".tar.gz"))
  3241. (file-name (string-append name "-" version ".tar.gz"))
  3242. (sha256
  3243. (base32
  3244. "1hwj0yi17k6f5axrm0k2bb7fq71dlp0zfywmd7pij9iimbppcca0"))))
  3245. (build-system ruby-build-system)
  3246. (arguments
  3247. `(#:tests? #f ; tests require cucumber
  3248. #:phases
  3249. (modify-phases %standard-phases
  3250. (add-after 'unpack 'remove-git-ls-files
  3251. (lambda* (#:key outputs #:allow-other-keys)
  3252. (substitute* "guard.gemspec"
  3253. (("git ls-files -z") "find . -type f -print0"))
  3254. #t))
  3255. (replace 'build
  3256. (lambda _
  3257. (invoke "gem" "build" "guard.gemspec"))))))
  3258. (propagated-inputs
  3259. `(("ruby-formatador" ,ruby-formatador)
  3260. ("ruby-listen" ,ruby-listen)
  3261. ("ruby-lumberjack" ,ruby-lumberjack)
  3262. ("ruby-nenv" ,ruby-nenv)
  3263. ("ruby-notiffany" ,ruby-notiffany)
  3264. ("ruby-pry" ,ruby-pry)
  3265. ("ruby-shellany" ,ruby-shellany)
  3266. ("ruby-thor" ,ruby-thor)))
  3267. (native-inputs
  3268. `(("bundler" ,bundler)
  3269. ("ruby-rspec" ,ruby-rspec)))
  3270. (synopsis "Tool to handle events on file system modifications")
  3271. (description
  3272. "Guard is a command line tool to easily handle events on file system
  3273. modifications. Guard automates various tasks by running custom rules whenever
  3274. file or directories are modified.")
  3275. (home-page "http://guardgem.org/")
  3276. (license license:expat)))
  3277. (define-public ruby-thread-safe
  3278. (package
  3279. (name "ruby-thread-safe")
  3280. (version "0.3.6")
  3281. (source
  3282. (origin
  3283. (method url-fetch)
  3284. (uri (rubygems-uri "thread_safe" version))
  3285. (sha256
  3286. (base32
  3287. "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
  3288. (build-system ruby-build-system)
  3289. (arguments
  3290. '(#:tests? #f)) ; needs simplecov, among others
  3291. (synopsis "Thread-safe utilities for Ruby")
  3292. (description "The thread_safe library provides thread-safe collections and
  3293. utilities for Ruby.")
  3294. (home-page "https://github.com/ruby-concurrency/thread_safe")
  3295. (license license:asl2.0)))
  3296. (define-public ruby-tzinfo
  3297. (package
  3298. (name "ruby-tzinfo")
  3299. (version "1.2.4")
  3300. (source
  3301. (origin
  3302. (method url-fetch)
  3303. (uri (rubygems-uri "tzinfo" version))
  3304. (sha256
  3305. (base32
  3306. "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
  3307. (build-system ruby-build-system)
  3308. (propagated-inputs
  3309. `(("ruby-thread-safe" ,ruby-thread-safe)))
  3310. (synopsis "Time zone library for Ruby")
  3311. (description "TZInfo is a Ruby library that provides daylight savings
  3312. aware transformations between times in different time zones.")
  3313. (home-page "https://tzinfo.github.io")
  3314. (license license:expat)))
  3315. (define-public ruby-tzinfo-data
  3316. (package
  3317. (name "ruby-tzinfo-data")
  3318. (version "1.2017.3")
  3319. (source
  3320. (origin
  3321. (method url-fetch)
  3322. ;; Download from GitHub because the rubygems version does not contain
  3323. ;; Rakefile or tests.
  3324. (uri (string-append
  3325. "https://github.com/tzinfo/tzinfo-data/archive/v"
  3326. version
  3327. ".tar.gz"))
  3328. (file-name (string-append name "-" version ".tar.gz"))
  3329. (sha256
  3330. (base32
  3331. "01wff7syqzikbxalbg3isgxasmvzicr85bzadzkb6bf20bip4v54"))
  3332. ;; Remove the known test failure.
  3333. ;; https://github.com/tzinfo/tzinfo-data/issues/10
  3334. ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
  3335. (patches (search-patches
  3336. "ruby-tzinfo-data-ignore-broken-test.patch"))))
  3337. (build-system ruby-build-system)
  3338. (propagated-inputs
  3339. `(("ruby-tzinfo" ,ruby-tzinfo)))
  3340. (synopsis "Data from the IANA Time Zone database")
  3341. (description
  3342. "This library provides @code{TZInfo::Data}, which contains data from the
  3343. IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
  3344. (home-page "https://tzinfo.github.io")
  3345. (license license:expat)))
  3346. (define-public ruby-rb-inotify
  3347. (package
  3348. (name "ruby-rb-inotify")
  3349. (version "0.9.10")
  3350. (source
  3351. (origin
  3352. (method url-fetch)
  3353. (uri (rubygems-uri "rb-inotify" version))
  3354. (sha256
  3355. (base32
  3356. "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
  3357. (build-system ruby-build-system)
  3358. (arguments
  3359. '(#:tests? #f ; there are no tests
  3360. #:phases
  3361. (modify-phases %standard-phases
  3362. ;; Building the gemspec with rake is not working here since it is
  3363. ;; generated with Jeweler. It is also unnecessary because the
  3364. ;; existing gemspec does not use any development tools to generate a
  3365. ;; list of files.
  3366. (replace 'build
  3367. (lambda _
  3368. (invoke "gem" "build" "rb-inotify.gemspec"))))))
  3369. (propagated-inputs
  3370. `(("ruby-ffi" ,ruby-ffi)))
  3371. (native-inputs
  3372. `(("ruby-yard" ,ruby-yard)))
  3373. (synopsis "Ruby wrapper for Linux's inotify")
  3374. (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
  3375. kernel subsystem for monitoring changes to files and directories.")
  3376. (home-page "https://github.com/nex3/rb-inotify")
  3377. (license license:expat)))
  3378. (define-public ruby-pry-editline
  3379. (package
  3380. (name "ruby-pry-editline")
  3381. (version "1.1.2")
  3382. (source (origin
  3383. (method url-fetch)
  3384. (uri (rubygems-uri "pry-editline" version))
  3385. (sha256
  3386. (base32
  3387. "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
  3388. (build-system ruby-build-system)
  3389. (arguments `(#:tests? #f)) ; no tests included
  3390. (native-inputs
  3391. `(("bundler" ,bundler)))
  3392. (synopsis "Open the current REPL line in an editor")
  3393. (description
  3394. "This gem provides a plugin for the Ruby REPL to enable opening the
  3395. current line in an external editor.")
  3396. (home-page "https://github.com/tpope/pry-editline")
  3397. (license license:expat)))
  3398. (define-public ruby-sdoc
  3399. (package
  3400. (name "ruby-sdoc")
  3401. (version "0.4.2")
  3402. (source (origin
  3403. (method url-fetch)
  3404. (uri (rubygems-uri "sdoc" version))
  3405. (sha256
  3406. (base32
  3407. "0qhvy10vnmrqcgh8494m13kd5ag9c3sczzhfasv8j0294ylk679n"))))
  3408. (build-system ruby-build-system)
  3409. (arguments
  3410. `(#:phases
  3411. (modify-phases %standard-phases
  3412. (add-before 'check 'set-rubylib-and-patch-gemfile
  3413. (lambda _
  3414. (setenv "RUBYLIB" "lib")
  3415. (substitute* "sdoc.gemspec"
  3416. (("s.add_runtime_dependency.*") "\n")
  3417. (("s.add_dependency.*") "\n"))
  3418. (substitute* "Gemfile"
  3419. (("gem \"rake\".*")
  3420. "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
  3421. #t)))))
  3422. (propagated-inputs
  3423. `(("ruby-json" ,ruby-json)))
  3424. (native-inputs
  3425. `(("bundler" ,bundler)
  3426. ("ruby-minitest" ,ruby-minitest)
  3427. ("ruby-hoe" ,ruby-hoe)))
  3428. (synopsis "Generate searchable RDoc documentation")
  3429. (description
  3430. "SDoc is an RDoc documentation generator to build searchable HTML
  3431. documentation for Ruby code.")
  3432. (home-page "https://github.com/voloko/sdoc")
  3433. (license license:expat)))
  3434. (define-public ruby-tins
  3435. (package
  3436. (name "ruby-tins")
  3437. (version "1.15.0")
  3438. (source (origin
  3439. (method url-fetch)
  3440. (uri (rubygems-uri "tins" version))
  3441. (sha256
  3442. (base32
  3443. "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
  3444. (build-system ruby-build-system)
  3445. ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
  3446. ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
  3447. ;; the gemspec.
  3448. (arguments
  3449. `(#:tests? #f ; there are no tests
  3450. #:phases
  3451. (modify-phases %standard-phases
  3452. (replace 'build
  3453. (lambda _
  3454. ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
  3455. ;; causes an error.
  3456. (substitute* "tins.gemspec"
  3457. (("\"lib/spruz\", ") ""))
  3458. (invoke "gem" "build" "tins.gemspec"))))))
  3459. (synopsis "Assorted tools for Ruby")
  3460. (description "Tins is a Ruby library providing assorted tools.")
  3461. (home-page "https://github.com/flori/tins")
  3462. (license license:expat)))
  3463. (define-public ruby-gem-hadar
  3464. (package
  3465. (name "ruby-gem-hadar")
  3466. (version "1.9.1")
  3467. (source (origin
  3468. (method url-fetch)
  3469. (uri (rubygems-uri "gem_hadar" version))
  3470. (sha256
  3471. (base32
  3472. "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
  3473. (build-system ruby-build-system)
  3474. ;; This gem needs itself at development time. We disable rebuilding of the
  3475. ;; gemspec to avoid this loop.
  3476. (arguments
  3477. `(#:tests? #f ; there are no tests
  3478. #:phases
  3479. (modify-phases %standard-phases
  3480. (replace 'build
  3481. (lambda _
  3482. (invoke "gem" "build" "gem_hadar.gemspec"))))))
  3483. (propagated-inputs
  3484. `(("git" ,git)
  3485. ("ruby-tins" ,ruby-tins)
  3486. ("ruby-yard" ,ruby-yard)))
  3487. (synopsis "Library for the development of Ruby gems")
  3488. (description
  3489. "This library contains some useful functionality to support the
  3490. development of Ruby gems.")
  3491. (home-page "https://github.com/flori/gem_hadar")
  3492. (license license:expat)))
  3493. (define-public ruby-minitest-tu-shim
  3494. (package
  3495. (name "ruby-minitest-tu-shim")
  3496. (version "1.3.3")
  3497. (source (origin
  3498. (method url-fetch)
  3499. (uri (rubygems-uri "minitest_tu_shim" version))
  3500. (sha256
  3501. (base32
  3502. "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
  3503. (build-system ruby-build-system)
  3504. (arguments
  3505. `(#:phases
  3506. (modify-phases %standard-phases
  3507. (add-after 'unpack 'fix-test-include-path
  3508. (lambda* (#:key inputs #:allow-other-keys)
  3509. (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
  3510. (substitute* "Rakefile"
  3511. (("Hoe\\.add_include_dirs .*")
  3512. (string-append "Hoe.add_include_dirs \""
  3513. minitest "/lib/ruby/vendor_ruby"
  3514. "/gems/minitest-"
  3515. ,(package-version ruby-minitest-4)
  3516. "/lib" "\""))))
  3517. #t))
  3518. (add-before 'check 'fix-test-assumptions
  3519. (lambda _
  3520. ;; The test output includes the file name, so a couple of tests
  3521. ;; fail. Changing the regular expressions slightly fixes this
  3522. ;; problem.
  3523. (substitute* "test/test_mini_test.rb"
  3524. (("output.sub!\\(.*, 'FILE:LINE'\\)")
  3525. "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
  3526. (("gsub\\(/.*, 'FILE:LINE'\\)")
  3527. "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
  3528. #t)))))
  3529. (propagated-inputs
  3530. `(("ruby-minitest-4" ,ruby-minitest-4)))
  3531. (native-inputs
  3532. `(("ruby-hoe" ,ruby-hoe)))
  3533. (synopsis "Adapter library between minitest and test/unit")
  3534. (description
  3535. "This library bridges the gap between the small and fast minitest and
  3536. Ruby's large and slower test/unit.")
  3537. (home-page "https://rubygems.org/gems/minitest_tu_shim")
  3538. (license license:expat)))
  3539. (define-public ruby-term-ansicolor
  3540. (package
  3541. (name "ruby-term-ansicolor")
  3542. (version "1.6.0")
  3543. (source (origin
  3544. (method url-fetch)
  3545. (uri (rubygems-uri "term-ansicolor" version))
  3546. (sha256
  3547. (base32
  3548. "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
  3549. (build-system ruby-build-system)
  3550. ;; Rebuilding the gemspec seems to require git, even though this is not a
  3551. ;; git repository, so we just build the gem from the existing gemspec.
  3552. (arguments
  3553. `(#:phases
  3554. (modify-phases %standard-phases
  3555. (add-after 'unpack 'fix-test
  3556. (lambda -
  3557. (substitute* "tests/hsl_triple_test.rb"
  3558. (("0\\\\\\.0%")
  3559. "0\\.?0?%"))))
  3560. (replace 'build
  3561. (lambda _
  3562. (invoke "gem" "build" "term-ansicolor.gemspec"))))))
  3563. (propagated-inputs
  3564. `(("ruby-tins" ,ruby-tins)))
  3565. (native-inputs
  3566. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  3567. ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
  3568. (synopsis "Ruby library to control the attributes of terminal output")
  3569. (description
  3570. "This Ruby library uses ANSI escape sequences to control the attributes
  3571. of terminal output.")
  3572. (home-page "https://flori.github.io/term-ansicolor/")
  3573. ;; There is no mention of the "or later" clause.
  3574. (license license:gpl2)))
  3575. (define-public ruby-pstree
  3576. (package
  3577. (name "ruby-pstree")
  3578. (version "0.1.0")
  3579. (source (origin
  3580. (method url-fetch)
  3581. (uri (rubygems-uri "pstree" version))
  3582. (sha256
  3583. (base32
  3584. "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
  3585. (build-system ruby-build-system)
  3586. (native-inputs
  3587. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  3588. ("bundler" ,bundler)))
  3589. (synopsis "Create a process tree data structure")
  3590. (description
  3591. "This library uses the output of the @code{ps} command to create a
  3592. process tree data structure for the current host.")
  3593. (home-page "https://github.com/flori/pstree")
  3594. ;; There is no mention of the "or later" clause.
  3595. (license license:gpl2)))
  3596. (define-public ruby-utils
  3597. (package
  3598. (name "ruby-utils")
  3599. (version "0.9.0")
  3600. (source (origin
  3601. (method url-fetch)
  3602. (uri (rubygems-uri "utils" version))
  3603. (sha256
  3604. (base32
  3605. "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
  3606. (build-system ruby-build-system)
  3607. (propagated-inputs
  3608. `(("ruby-tins" ,ruby-tins)
  3609. ("ruby-term-ansicolor" ,ruby-term-ansicolor)
  3610. ("ruby-pstree" ,ruby-pstree)
  3611. ("ruby-pry-editline" ,ruby-pry-editline)))
  3612. (native-inputs
  3613. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  3614. ("bundler" ,bundler)))
  3615. (synopsis "Command line tools for working with Ruby")
  3616. (description
  3617. "This package provides assorted command line tools that may be useful
  3618. when working with Ruby code.")
  3619. (home-page "https://github.com/flori/utils")
  3620. ;; There is no mention of the "or later" clause.
  3621. (license license:gpl2)))
  3622. (define-public ruby-jaro-winkler
  3623. (package
  3624. (name "ruby-jaro-winkler")
  3625. (version "1.5.2")
  3626. (source
  3627. (origin
  3628. (method url-fetch)
  3629. (uri (rubygems-uri "jaro_winkler" version))
  3630. (sha256
  3631. (base32
  3632. "1zz27z88qznix4r65gd9h56gl177snlfpgv10b0s69vi8qpl909l"))))
  3633. (build-system ruby-build-system)
  3634. (arguments
  3635. '(;; No included tests
  3636. #:tests? #f))
  3637. (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
  3638. (description
  3639. "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
  3640. algorithm. It is written as a C extension and will fallback to a pure Ruby
  3641. implementation on platforms where this is unsupported.")
  3642. (home-page "https://github.com/tonytonyjan/jaro_winkler")
  3643. (license license:expat)))
  3644. (define-public ruby-json
  3645. (package
  3646. (name "ruby-json")
  3647. (version "2.1.0")
  3648. (source
  3649. (origin
  3650. (method url-fetch)
  3651. (uri (rubygems-uri "json" version))
  3652. (sha256
  3653. (base32
  3654. "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
  3655. (build-system ruby-build-system)
  3656. (arguments '(#:tests? #f)) ; dependency cycle with sdoc
  3657. (synopsis "JSON library for Ruby")
  3658. (description "This Ruby library provides a JSON implementation written as
  3659. a native C extension.")
  3660. (home-page "http://json-jruby.rubyforge.org/")
  3661. (license (list license:ruby license:gpl2)))) ; GPL2 only
  3662. (define-public ruby-json-pure
  3663. (package
  3664. (name "ruby-json-pure")
  3665. (version "2.1.0")
  3666. (source (origin
  3667. (method url-fetch)
  3668. (uri (rubygems-uri "json_pure" version))
  3669. (sha256
  3670. (base32
  3671. "12yf9fmhr4c2jm3xl20vf1qyz5i63vc8a6ngz9j0f86nqwhmi2as"))))
  3672. (build-system ruby-build-system)
  3673. (arguments
  3674. `(#:phases
  3675. (modify-phases %standard-phases
  3676. (add-after 'unpack 'fix-rakefile
  3677. (lambda _
  3678. (substitute* "Rakefile"
  3679. ;; Since this is not a git repository, do not call 'git'.
  3680. (("`git ls-files`") "`find . -type f |sort`")
  3681. ;; Loosen dependency constraint.
  3682. (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
  3683. #t))
  3684. (add-after 'replace-git-ls-files 'regenerate-gemspec
  3685. (lambda _
  3686. ;; Regenerate gemspec so loosened dependency constraints are
  3687. ;; propagated.
  3688. (invoke "rake" "gemspec")))
  3689. (add-after 'regenerate-gemspec 'fix-json-java.gemspec
  3690. (lambda _
  3691. ;; This gemspec doesn't look to be generated by the above
  3692. ;; command, so patch it separately.
  3693. (substitute* "json-java.gemspec"
  3694. (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
  3695. "%q<test-unit>.freeze, [\">= 2.0\"]"))
  3696. #t)))))
  3697. (native-inputs
  3698. `(("bundler" ,bundler)
  3699. ("ragel" ,ragel)
  3700. ("ruby-simplecov" ,ruby-simplecov)
  3701. ("ruby-test-unit" ,ruby-test-unit)))
  3702. (synopsis "JSON implementation in pure Ruby")
  3703. (description
  3704. "This package provides a JSON implementation written in pure Ruby.")
  3705. (home-page "https://flori.github.com/json")
  3706. (license license:ruby)))
  3707. ;; Even though this package only provides bindings for a Mac OSX API it is
  3708. ;; required by "ruby-listen" at runtime.
  3709. (define-public ruby-rb-fsevent
  3710. (package
  3711. (name "ruby-rb-fsevent")
  3712. (version "0.10.3")
  3713. (source (origin
  3714. (method url-fetch)
  3715. (uri (rubygems-uri "rb-fsevent" version))
  3716. (sha256
  3717. (base32
  3718. "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
  3719. (build-system ruby-build-system)
  3720. ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
  3721. ;; "listen", which needs "rb-fsevent" at runtime.
  3722. (arguments `(#:tests? #f))
  3723. (synopsis "FSEvents API with signals catching")
  3724. (description
  3725. "This library provides Ruby bindings for the Mac OSX FSEvents API.")
  3726. (home-page "https://rubygems.org/gems/rb-fsevent")
  3727. (license license:expat)))
  3728. (define-public ruby-listen
  3729. (package
  3730. (name "ruby-listen")
  3731. (version "3.1.5")
  3732. (source
  3733. (origin
  3734. (method url-fetch)
  3735. (uri (rubygems-uri "listen" version))
  3736. (sha256
  3737. (base32
  3738. "01v5mrnfqm6sgm8xn2v5swxsn1wlmq7rzh2i48d4jzjsc7qvb6mx"))))
  3739. (build-system ruby-build-system)
  3740. (arguments '(#:tests? #f)) ; no tests
  3741. (propagated-inputs
  3742. `(("ruby-rb-inotify" ,ruby-rb-inotify)
  3743. ("ruby-rb-fsevent" ,ruby-rb-fsevent)))
  3744. (synopsis "Listen to file modifications")
  3745. (description "The Listen gem listens to file modifications and notifies
  3746. you about the changes.")
  3747. (home-page "https://github.com/guard/listen")
  3748. (license license:expat)))
  3749. (define-public ruby-listen-3.0
  3750. (package
  3751. (inherit ruby-listen)
  3752. (version "3.0.8")
  3753. (source (origin
  3754. (method url-fetch)
  3755. (uri (rubygems-uri "listen" version))
  3756. (sha256
  3757. (base32
  3758. "1l0y7hbyfiwpvk172r28hsdqsifq1ls39hsfmzi1vy4ll0smd14i"))))))
  3759. (define-public ruby-loofah
  3760. (package
  3761. (name "ruby-loofah")
  3762. (version "2.2.3")
  3763. (source
  3764. (origin
  3765. (method url-fetch)
  3766. (uri (rubygems-uri "loofah" version))
  3767. (sha256
  3768. (base32
  3769. "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
  3770. (build-system ruby-build-system)
  3771. (arguments
  3772. '(#:phases
  3773. (modify-phases %standard-phases
  3774. (add-after 'unpack 'remove-unnecessary-dependencies
  3775. (lambda _
  3776. ;; concourse is a development tool which is unused, so remove it
  3777. ;; so it's not required.
  3778. (substitute* "Gemfile"
  3779. ((".*\"concourse\".*") "\n"))
  3780. (substitute* "Rakefile"
  3781. (("require 'concourse'") "")
  3782. (("Concourse\\.new.*") "\n"))
  3783. #t)))))
  3784. (native-inputs
  3785. `(("ruby-hoe" ,ruby-hoe)
  3786. ("ruby-rr" ,ruby-rr)))
  3787. (propagated-inputs
  3788. `(("ruby-nokogiri" ,ruby-nokogiri)
  3789. ("ruby-crass" ,ruby-crass)))
  3790. (synopsis "Ruby library for manipulating and transforming HTML/XML")
  3791. (description
  3792. "Loofah is a general library for manipulating and transforming HTML/XML
  3793. documents and fragments. It's built on top of Nokogiri and libxml2.")
  3794. (home-page "https://github.com/flavorjones/loofah")
  3795. (license license:expat)))
  3796. (define-public ruby-activesupport
  3797. (package
  3798. (name "ruby-activesupport")
  3799. (version "5.2.2")
  3800. (source
  3801. (origin
  3802. (method url-fetch)
  3803. (uri (rubygems-uri "activesupport" version))
  3804. (sha256
  3805. (base32
  3806. "1iya7vxqwxysr74s7b4z1x19gmnx5advimzip3cbmsd5bd43wfgz"))))
  3807. (build-system ruby-build-system)
  3808. (arguments
  3809. `(#:phases
  3810. (modify-phases %standard-phases
  3811. (replace 'check
  3812. (lambda _
  3813. ;; There are no tests, instead attempt to load the library.
  3814. (invoke "ruby" "-Ilib" "-r" "active_support"))))))
  3815. (propagated-inputs
  3816. `(("ruby-concurrent" ,ruby-concurrent)
  3817. ("ruby-i18n" ,ruby-i18n)
  3818. ("ruby-minitest" ,ruby-minitest)
  3819. ("ruby-tzinfo" ,ruby-tzinfo)
  3820. ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
  3821. (synopsis "Ruby on Rails utility library")
  3822. (description "ActiveSupport is a toolkit of support libraries and Ruby
  3823. core extensions extracted from the Rails framework. It includes support for
  3824. multibyte strings, internationalization, time zones, and testing.")
  3825. (home-page "http://www.rubyonrails.org")
  3826. (license license:expat)))
  3827. (define-public ruby-crass
  3828. (package
  3829. (name "ruby-crass")
  3830. (version "1.0.4")
  3831. (source (origin
  3832. (method url-fetch)
  3833. (uri (rubygems-uri "crass" version))
  3834. (sha256
  3835. (base32
  3836. "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"))))
  3837. (build-system ruby-build-system)
  3838. (native-inputs
  3839. `(("bundler" ,bundler)
  3840. ("ruby-minitest" ,ruby-minitest)))
  3841. (synopsis "Pure Ruby CSS parser")
  3842. (description
  3843. "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
  3844. (home-page "https://github.com/rgrove/crass/")
  3845. (license license:expat)))
  3846. (define-public ruby-nokogumbo
  3847. (let ((commit "fb51ff299a1c34346837580b6d1d9a60fadf5dbd"))
  3848. (package
  3849. (name "ruby-nokogumbo")
  3850. (version (string-append "1.4.7-1." (string-take commit 8)))
  3851. (source (origin
  3852. ;; We use the git reference, because there's no Rakefile in the
  3853. ;; published gem and the tarball on Github is outdated.
  3854. (method git-fetch)
  3855. (uri (git-reference
  3856. (url "https://github.com/rubys/nokogumbo.git")
  3857. (commit "d56f954d20a")))
  3858. (file-name (string-append name "-" version "-checkout"))
  3859. (sha256
  3860. (base32
  3861. "0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
  3862. (build-system ruby-build-system)
  3863. (arguments
  3864. `(#:modules ((guix build ruby-build-system)
  3865. (guix build utils)
  3866. (ice-9 rdelim))
  3867. #:phases
  3868. (modify-phases %standard-phases
  3869. (add-after 'unpack 'build-gemspec
  3870. (lambda _
  3871. (substitute* "Rakefile"
  3872. ;; Build Makefile even without a copy of gumbo-parser sources
  3873. (("'gumbo-parser/src',") "")
  3874. ;; We don't bundle gumbo-parser sources
  3875. (("'gumbo-parser/src/\\*',") "")
  3876. (("'gumbo-parser/visualc/include/\\*',") "")
  3877. ;; The definition of SOURCES will be cut in gemspec, and
  3878. ;; "FileList" will be undefined.
  3879. (("SOURCES \\+ FileList\\[")
  3880. "['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', "))
  3881. ;; Copy the Rakefile and cut out the gemspec.
  3882. (copy-file "Rakefile" ".gemspec")
  3883. (with-atomic-file-replacement ".gemspec"
  3884. (lambda (in out)
  3885. (let loop ((line (read-line in 'concat))
  3886. (skipping? #t))
  3887. (if (eof-object? line)
  3888. #t
  3889. (let ((skip-next? (if skipping?
  3890. (not (string-prefix? "SPEC =" line))
  3891. (string-prefix? "end" line))))
  3892. (when (or (not skipping?)
  3893. (and skipping? (not skip-next?)))
  3894. (format #t "~a" line)
  3895. (display line out))
  3896. (loop (read-line in 'concat) skip-next?))))))
  3897. #t)))))
  3898. (inputs
  3899. `(("gumbo-parser" ,gumbo-parser)))
  3900. (propagated-inputs
  3901. `(("ruby-nokogiri" ,ruby-nokogiri)))
  3902. (synopsis "Ruby bindings to the Gumbo HTML5 parser")
  3903. (description
  3904. "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
  3905. access the result as a Nokogiri parsed document.")
  3906. (home-page "https://github.com/rubys/nokogumbo/")
  3907. (license license:asl2.0))))
  3908. (define-public ruby-sanitize
  3909. (package
  3910. (name "ruby-sanitize")
  3911. (version "4.6.3")
  3912. (source (origin
  3913. (method url-fetch)
  3914. ;; The gem does not include the Rakefile, so we download the
  3915. ;; release tarball from Github.
  3916. (uri (string-append "https://github.com/rgrove/"
  3917. "sanitize/archive/v" version ".tar.gz"))
  3918. (file-name (string-append name "-" version ".tar.gz"))
  3919. (sha256
  3920. (base32
  3921. "1fmqppwif3cm8h79006jfzkdnlxxzlry9kzk03psk0d5xpg55ycc"))))
  3922. (build-system ruby-build-system)
  3923. (propagated-inputs
  3924. `(("ruby-crass" ,ruby-crass)
  3925. ("ruby-nokogiri" ,ruby-nokogiri)
  3926. ("ruby-nokogumbo" ,ruby-nokogumbo)))
  3927. (native-inputs
  3928. `(("bundler" ,bundler)
  3929. ("ruby-minitest" ,ruby-minitest)
  3930. ("ruby-redcarpet" ,ruby-redcarpet)
  3931. ("ruby-yard" ,ruby-yard)))
  3932. (synopsis "Whitelist-based HTML and CSS sanitizer")
  3933. (description
  3934. "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
  3935. acceptable elements, attributes, and CSS properties, Sanitize will remove all
  3936. unacceptable HTML and/or CSS from a string.")
  3937. (home-page "https://github.com/rgrove/sanitize/")
  3938. (license license:expat)))
  3939. (define-public ruby-oj
  3940. (package
  3941. (name "ruby-oj")
  3942. (version "3.6.7")
  3943. (source
  3944. (origin
  3945. (method url-fetch)
  3946. ;; Version on rubygems.org does not contain Rakefile, so download from
  3947. ;; GitHub instead.
  3948. (uri (string-append "https://github.com/ohler55/oj/archive/v"
  3949. version ".tar.gz"))
  3950. (file-name (string-append name "-" version ".tar.gz"))
  3951. (sha256
  3952. (base32
  3953. "1x28ga72jxlnmsd8g8c0fw81vlh54r0qgagw2lxsd3x3la091g2h"))))
  3954. (build-system ruby-build-system)
  3955. (arguments
  3956. '(#:test-target "test_all"
  3957. #:phases
  3958. (modify-phases %standard-phases
  3959. (add-before 'check 'disable-bundler
  3960. (lambda _
  3961. (substitute* "Rakefile"
  3962. (("Bundler\\.with_clean_env") "1.times")
  3963. (("bundle exec ") "")))))))
  3964. (native-inputs
  3965. `(("bundler" ,bundler)
  3966. ("ruby-rspec" ,ruby-rspec)
  3967. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  3968. (synopsis "JSON parser for Ruby optimized for speed")
  3969. (description
  3970. "Oj is a JSON parser and generator for Ruby, where the encoding and
  3971. decoding of JSON is implemented as a C extension to Ruby.")
  3972. (home-page "http://www.ohler.com/oj")
  3973. (license (list license:expat ; Ruby code
  3974. license:bsd-3)))) ; extension code
  3975. (define-public ruby-ox
  3976. (package
  3977. (name "ruby-ox")
  3978. (version "2.6.0")
  3979. (source
  3980. (origin
  3981. (method url-fetch)
  3982. (uri (rubygems-uri "ox" version))
  3983. (sha256
  3984. (base32
  3985. "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
  3986. (build-system ruby-build-system)
  3987. (arguments
  3988. '(#:tests? #f)) ; no tests
  3989. (synopsis "Optimized XML library for Ruby")
  3990. (description
  3991. "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
  3992. written as a native C extension. It was designed to be an alternative to
  3993. Nokogiri and other Ruby XML parsers for generic XML parsing and as an
  3994. alternative to Marshal for Object serialization. ")
  3995. (home-page "http://www.ohler.com/ox")
  3996. (license license:expat)))
  3997. (define-public ruby-redcloth
  3998. (package
  3999. (name "ruby-redcloth")
  4000. (version "4.3.2")
  4001. (source (origin
  4002. (method url-fetch)
  4003. (uri (rubygems-uri "RedCloth" version))
  4004. (sha256
  4005. (base32
  4006. "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
  4007. (build-system ruby-build-system)
  4008. (arguments
  4009. `(#:tests? #f ; no tests
  4010. #:phases
  4011. (modify-phases %standard-phases
  4012. ;; Redcloth has complicated rake tasks to build various versions for
  4013. ;; multiple targets using RVM. We don't want this so we just use the
  4014. ;; existing gemspec.
  4015. (replace 'build
  4016. (lambda _
  4017. (invoke "gem" "build" "redcloth.gemspec"))))))
  4018. (native-inputs
  4019. `(("bundler" ,bundler)
  4020. ("ruby-diff-lcs" ,ruby-diff-lcs)
  4021. ("ruby-rspec-2" ,ruby-rspec-2)))
  4022. (synopsis "Textile markup language parser for Ruby")
  4023. (description
  4024. "RedCloth is a Ruby parser for the Textile markup language.")
  4025. (home-page "http://redcloth.org")
  4026. (license license:expat)))
  4027. (define-public ruby-pg
  4028. (package
  4029. (name "ruby-pg")
  4030. (version "1.1.3")
  4031. (source
  4032. (origin
  4033. (method url-fetch)
  4034. (uri (rubygems-uri "pg" version))
  4035. (sha256
  4036. (base32
  4037. "1pnjw3rspdfjssxyf42jnbsdlgri8ylysimp0s28wxb93k6ff2qb"))))
  4038. (build-system ruby-build-system)
  4039. (arguments
  4040. '(#:test-target "spec"))
  4041. (native-inputs
  4042. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  4043. ("ruby-hoe" ,ruby-hoe)
  4044. ("ruby-rspec" ,ruby-rspec)))
  4045. (inputs
  4046. `(("postgresql" ,postgresql-9.6)))
  4047. (synopsis "Ruby interface to PostgreSQL")
  4048. (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
  4049. with PostgreSQL 9.0 and later.")
  4050. (home-page "https://bitbucket.org/ged/ruby-pg")
  4051. (license license:ruby)))
  4052. (define-public ruby-byebug
  4053. (package
  4054. (name "ruby-byebug")
  4055. (version "9.0.6")
  4056. (source
  4057. (origin
  4058. (method url-fetch)
  4059. (uri (rubygems-uri "byebug" version))
  4060. (sha256
  4061. (base32
  4062. "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
  4063. (build-system ruby-build-system)
  4064. (arguments
  4065. '(#:tests? #f)) ; no tests
  4066. (synopsis "Debugger for Ruby 2")
  4067. (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
  4068. TracePoint C API for execution control and the Debug Inspector C API for call
  4069. stack navigation. The core component provides support that front-ends can
  4070. build on. It provides breakpoint handling and bindings for stack frames among
  4071. other things and it comes with a command line interface.")
  4072. (home-page "https://github.com/deivid-rodriguez/byebug")
  4073. (license license:bsd-2)))
  4074. (define-public ruby-netrc
  4075. (package
  4076. (name "ruby-netrc")
  4077. (version "0.11.0")
  4078. (source (origin
  4079. (method url-fetch)
  4080. (uri (rubygems-uri "netrc" version))
  4081. (sha256
  4082. (base32
  4083. "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
  4084. (build-system ruby-build-system)
  4085. (arguments
  4086. `(#:phases
  4087. (modify-phases %standard-phases
  4088. (replace 'check
  4089. ;; There is no Rakefile and minitest can only run one file at once,
  4090. ;; so we have to iterate over all test files.
  4091. (lambda _
  4092. (map (lambda (file)
  4093. (invoke "ruby" "-Itest" file))
  4094. (find-files "./test" "test_.*\\.rb")))))))
  4095. (native-inputs
  4096. `(("ruby-minitest" ,ruby-minitest)))
  4097. (synopsis "Library to read and update netrc files")
  4098. (description
  4099. "This library can read and update netrc files, preserving formatting
  4100. including comments and whitespace.")
  4101. (home-page "https://github.com/geemus/netrc")
  4102. (license license:expat)))
  4103. (define-public ruby-unf-ext
  4104. (package
  4105. (name "ruby-unf-ext")
  4106. (version "0.0.7.1")
  4107. (source (origin
  4108. (method url-fetch)
  4109. (uri (rubygems-uri "unf_ext" version))
  4110. (sha256
  4111. (base32
  4112. "0ly2ms6c3irmbr1575ldyh52bz2v0lzzr2gagf0p526k12ld2n5b"))))
  4113. (build-system ruby-build-system)
  4114. (arguments
  4115. `(#:phases
  4116. (modify-phases %standard-phases
  4117. (add-after 'build 'build-ext
  4118. (lambda _ (invoke "rake" "compile:unf_ext"))))))
  4119. (native-inputs
  4120. `(("bundler" ,bundler)
  4121. ("ruby-rake-compiler" ,ruby-rake-compiler)
  4122. ("ruby-test-unit" ,ruby-test-unit)))
  4123. (synopsis "Unicode normalization form support library")
  4124. (description
  4125. "This package provides unicode normalization form support for Ruby.")
  4126. (home-page "https://github.com/knu/ruby-unf_ext")
  4127. (license license:expat)))
  4128. (define-public ruby-tdiff
  4129. ;; Use a newer than released snapshot so that rspec-2 is not required.
  4130. (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
  4131. (package
  4132. (name "ruby-tdiff")
  4133. (version (string-append "0.3.3-1." (string-take commit 8)))
  4134. (source (origin
  4135. (method git-fetch)
  4136. (uri (git-reference
  4137. (url "https://github.com/postmodern/tdiff.git")
  4138. (commit commit)))
  4139. (file-name (string-append name "-" version "-checkout"))
  4140. (sha256
  4141. (base32
  4142. "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
  4143. (build-system ruby-build-system)
  4144. (native-inputs
  4145. `(("ruby-rspec" ,ruby-rspec)
  4146. ("ruby-yard" ,ruby-yard)
  4147. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  4148. (synopsis "Calculate the differences between two tree-like structures")
  4149. (description
  4150. "This library provides functions to calculate the differences between two
  4151. tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
  4152. (home-page "https://github.com/postmodern/tdiff")
  4153. (license license:expat))))
  4154. (define-public ruby-nokogiri-diff
  4155. ;; Use a newer than released snapshot so that rspec-2 is not required.
  4156. (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
  4157. (package
  4158. (name "ruby-nokogiri-diff")
  4159. (version (string-append "0.2.0-1." (string-take commit 8)))
  4160. (source (origin
  4161. (method git-fetch)
  4162. (uri (git-reference
  4163. (url "https://github.com/postmodern/nokogiri-diff.git")
  4164. (commit commit)))
  4165. (file-name (string-append name "-" version "-checkout"))
  4166. (sha256
  4167. (base32
  4168. "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
  4169. (build-system ruby-build-system)
  4170. (propagated-inputs
  4171. `(("ruby-tdiff" ,ruby-tdiff)
  4172. ("ruby-nokogiri" ,ruby-nokogiri)))
  4173. (native-inputs
  4174. `(("ruby-rspec" ,ruby-rspec)
  4175. ("ruby-yard" ,ruby-yard)
  4176. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  4177. (synopsis "Calculate the differences between two XML/HTML documents")
  4178. (description
  4179. "@code{Nokogiri::Diff} adds the ability to calculate the
  4180. differences (added or removed nodes) between two XML/HTML documents.")
  4181. (home-page "https://github.com/postmodern/nokogiri-diff")
  4182. (license license:expat))))
  4183. (define-public ruby-racc
  4184. (package
  4185. (name "ruby-racc")
  4186. (version "1.4.14")
  4187. (source
  4188. (origin
  4189. (method url-fetch)
  4190. (uri (rubygems-uri "racc" version))
  4191. (sha256
  4192. (base32
  4193. "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
  4194. (build-system ruby-build-system)
  4195. (native-inputs
  4196. `(("ruby-hoe" ,ruby-hoe)
  4197. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  4198. (synopsis "LALR(1) parser generator for Ruby")
  4199. (description
  4200. "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
  4201. generates Ruby program.")
  4202. (home-page "http://i.loveruby.net/en/projects/racc/")
  4203. (license (list
  4204. ;; Generally licensed under the LGPL2.1, and some files also
  4205. ;; available under the same license as Ruby.
  4206. license:lgpl2.1
  4207. license:ruby))))
  4208. (define-public ruby-rack
  4209. (package
  4210. (name "ruby-rack")
  4211. (version "2.0.6")
  4212. (source
  4213. (origin
  4214. (method url-fetch)
  4215. ;; Download from GitHub so that the patch can be applied.
  4216. (uri (string-append
  4217. "https://github.com/rack/rack/archive/"
  4218. version
  4219. ".tar.gz"))
  4220. (file-name (string-append name "-" version ".tar.gz"))
  4221. (sha256
  4222. (base32
  4223. "0pb3g5ymvbf07xaxcn51dpqv3djlxavckp3qkxsjdxiqznb0d9p1"))
  4224. ;; Ignore test which fails inside the build environment but works
  4225. ;; outside.
  4226. (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
  4227. (build-system ruby-build-system)
  4228. (arguments
  4229. '(#:phases
  4230. (modify-phases %standard-phases
  4231. (add-before 'check 'fix-tests
  4232. (lambda _
  4233. ;; A few of the tests use the length of a file on disk for
  4234. ;; Content-Length and Content-Range headers. However, this file
  4235. ;; has a shebang in it which an earlier phase patches, growing
  4236. ;; the file size from 193 to 239 bytes when the store prefix is
  4237. ;; "/gnu/store".
  4238. (let ((size-diff (- (string-length (which "ruby"))
  4239. (string-length "/usr/bin/env ruby"))))
  4240. (substitute* '("test/spec_file.rb")
  4241. (("193")
  4242. (number->string (+ 193 size-diff)))
  4243. (("bytes(.)22-33" all delimiter)
  4244. (string-append "bytes"
  4245. delimiter
  4246. (number->string (+ 22 size-diff))
  4247. "-"
  4248. (number->string (+ 33 size-diff))))))
  4249. #t)))))
  4250. (native-inputs
  4251. `(("ruby-minitest" ,ruby-minitest)
  4252. ("ruby-minitest-sprint" ,ruby-minitest-sprint)
  4253. ("which" ,which)))
  4254. (propagated-inputs
  4255. `(("ruby-concurrent" ,ruby-concurrent)))
  4256. (synopsis "Unified web application interface for Ruby")
  4257. (description "Rack provides a minimal, modular and adaptable interface for
  4258. developing web applications in Ruby. By wrapping HTTP requests and responses,
  4259. it unifies the API for web servers, web frameworks, and software in between
  4260. into a single method call.")
  4261. (home-page "https://rack.github.io/")
  4262. (license license:expat)))
  4263. (define-public ruby-rack-test
  4264. (package
  4265. (name "ruby-rack-test")
  4266. (version "0.8.3")
  4267. (source
  4268. (origin
  4269. (method url-fetch)
  4270. (uri (rubygems-uri "rack-test" version))
  4271. (sha256
  4272. (base32
  4273. "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
  4274. (build-system ruby-build-system)
  4275. (arguments
  4276. ;; Disable tests because of circular dependencies: requires sinatra,
  4277. ;; which requires rack-protection, which requires rack-test. Instead
  4278. ;; simply require the library.
  4279. `(#:phases
  4280. (modify-phases %standard-phases
  4281. (replace 'check
  4282. (lambda _
  4283. (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
  4284. (propagated-inputs
  4285. `(("ruby-rack" ,ruby-rack)))
  4286. (synopsis "Testing API for Rack applications")
  4287. (description
  4288. "Rack::Test is a small, simple testing API for Rack applications. It can
  4289. be used on its own or as a reusable starting point for Web frameworks and
  4290. testing libraries to build on.")
  4291. (home-page "https://github.com/rack-test/rack-test")
  4292. (license license:expat)))
  4293. (define-public ruby-rack-protection
  4294. (package
  4295. (name "ruby-rack-protection")
  4296. (version "2.0.3")
  4297. (source
  4298. (origin
  4299. (method url-fetch)
  4300. (uri (rubygems-uri "rack-protection" version))
  4301. (sha256
  4302. (base32
  4303. "1z5598qipilmnf45428jnxi63ykrgvnyywa5ckpr52zv2vpd8jdp"))))
  4304. (build-system ruby-build-system)
  4305. (arguments
  4306. '(;; Tests missing from the gem.
  4307. #:tests? #f))
  4308. (propagated-inputs
  4309. `(("ruby-rack" ,ruby-rack)))
  4310. (native-inputs
  4311. `(("bundler" ,bundler)
  4312. ("ruby-rspec" ,ruby-rspec-2)
  4313. ("ruby-rack-test" ,ruby-rack-test)))
  4314. (synopsis "Rack middleware that protects against typical web attacks")
  4315. (description "Rack middleware that can be used to protect against typical
  4316. web attacks. It can protect all Rack apps, including Rails. For instance, it
  4317. protects against cross site request forgery, cross site scripting,
  4318. clickjacking, directory traversal, session hijacking and IP spoofing.")
  4319. (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
  4320. (license license:expat)))
  4321. (define-public ruby-rainbow
  4322. (package
  4323. (name "ruby-rainbow")
  4324. (version "3.0.0")
  4325. (source
  4326. (origin
  4327. (method url-fetch)
  4328. (uri (rubygems-uri "rainbow" version))
  4329. (sha256
  4330. (base32
  4331. "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
  4332. (build-system ruby-build-system)
  4333. (arguments
  4334. '(#:phases
  4335. (modify-phases %standard-phases
  4336. ;; Run rspec directly, to avoid requiring Rubocop which is used from
  4337. ;; the Rakefile.
  4338. (replace 'check
  4339. (lambda* (#:key tests? #:allow-other-keys)
  4340. (when tests?
  4341. (invoke "rspec"))
  4342. #t)))))
  4343. (native-inputs
  4344. `(("bundler" ,bundler)
  4345. ("ruby-rspec" ,ruby-rspec)))
  4346. (synopsis "Colorize printed text on ANSI terminals")
  4347. (description
  4348. "@code{rainbow} provides a string presenter object to colorize strings by
  4349. wrapping them in ANSI escape codes.")
  4350. (home-page "https://github.com/sickill/rainbow")
  4351. (license license:expat)))
  4352. (define-public ruby-rr
  4353. (package
  4354. (name "ruby-rr")
  4355. (version "1.2.1")
  4356. (source
  4357. (origin
  4358. (method url-fetch)
  4359. (uri (rubygems-uri "rr" version))
  4360. (sha256
  4361. (base32
  4362. "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
  4363. (build-system ruby-build-system)
  4364. (arguments
  4365. '(#:tests? #f)) ; test files not included
  4366. (native-inputs
  4367. `(("bundler" ,bundler)
  4368. ("ruby-rspec" ,ruby-rspec)))
  4369. (synopsis "Ruby test double framework")
  4370. (description
  4371. "RR is a test double framework that features a rich selection of double
  4372. techniques and a terse syntax.")
  4373. (home-page "https://rr.github.io/rr/")
  4374. (license license:expat)))
  4375. (define-public ruby-rest-client
  4376. (package
  4377. (name "ruby-rest-client")
  4378. (version "2.0.2")
  4379. (source
  4380. (origin
  4381. (method url-fetch)
  4382. (uri (rubygems-uri "rest-client" version))
  4383. (sha256
  4384. (base32
  4385. "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
  4386. (build-system ruby-build-system)
  4387. (arguments
  4388. '(#:phases
  4389. (modify-phases %standard-phases
  4390. (add-before 'check 'remove-unnecessary-development-dependencies
  4391. (lambda _
  4392. (substitute* "rest-client.gemspec"
  4393. ;; Remove rubocop as it's unused. Rubocop also indirectly
  4394. ;; depends on this package through ruby-parser and ruby-ast so
  4395. ;; this avoids a dependency loop.
  4396. ((".*rubocop.*") "\n")
  4397. ;; Remove pry as it's unused, it's a debugging tool
  4398. ((".*pry.*") "\n")
  4399. ;; Remove an unnecessarily strict rdoc dependency
  4400. ((".*rdoc.*") "\n"))
  4401. #t))
  4402. (add-before 'check 'delete-network-dependent-tests
  4403. (lambda _
  4404. (delete-file "spec/integration/request_spec.rb")
  4405. (delete-file "spec/integration/httpbin_spec.rb")
  4406. #t)))))
  4407. (propagated-inputs
  4408. `(("ruby-http-cookie" ,ruby-http-cookie)
  4409. ("ruby-mime-types" ,ruby-mime-types)
  4410. ("ruby-netrc" ,ruby-netrc)))
  4411. (native-inputs
  4412. `(("bundler" ,bundler)
  4413. ("ruby-webmock", ruby-webmock-2)
  4414. ("ruby-rspec", ruby-rspec)))
  4415. (synopsis "Simple HTTP and REST client for Ruby")
  4416. (description
  4417. "@code{rest-client} provides a simple HTTP and REST client for Ruby,
  4418. inspired by the Sinatra microframework style of specifying actions:
  4419. @code{get}, @code{put}, @code{post}, @code{delete}.")
  4420. (home-page "https://github.com/rest-client/rest-client")
  4421. (license license:expat)))
  4422. (define-public ruby-rubocop
  4423. (package
  4424. (name "ruby-rubocop")
  4425. (version "0.64.0")
  4426. (source
  4427. (origin
  4428. (method url-fetch)
  4429. (uri (rubygems-uri "rubocop" version))
  4430. (sha256
  4431. (base32
  4432. "07shi6kncwhkvlh9ci9rgccrjsq4448hbic3yrakh2w65ppynvbj"))))
  4433. (build-system ruby-build-system)
  4434. (arguments
  4435. '(;; No included tests
  4436. #:tests? #f))
  4437. (propagated-inputs
  4438. `(("ruby-parser" ,ruby-parser)
  4439. ("ruby-powerpack" ,ruby-powerpack)
  4440. ("ruby-rainbow" ,ruby-rainbow)
  4441. ("ruby-progressbar" ,ruby-progressbar)
  4442. ("ruby-parallel" ,ruby-parallel)
  4443. ("ruby-jaro-winkler" ,ruby-jaro-winkler)
  4444. ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
  4445. (synopsis "Ruby code style checking tool")
  4446. (description
  4447. "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
  4448. the community-driven Ruby Style Guide.")
  4449. (home-page "https://github.com/rubocop-hq/rubocop")
  4450. (license license:expat)))
  4451. (define-public ruby-contest
  4452. (package
  4453. (name "ruby-contest")
  4454. (version "0.1.3")
  4455. (source
  4456. (origin
  4457. (method url-fetch)
  4458. (uri (rubygems-uri "contest" version))
  4459. (sha256
  4460. (base32
  4461. "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
  4462. (build-system ruby-build-system)
  4463. (synopsis "Write declarative tests using nested contexts")
  4464. (description
  4465. "Contest allows writing declarative @code{Test::Unit} tests using nested
  4466. contexts without performance penalties.")
  4467. (home-page "https://github.com/citrusbyte/contest")
  4468. (license license:expat)))
  4469. (define-public ruby-creole
  4470. (package
  4471. (name "ruby-creole")
  4472. (version "0.5.0")
  4473. (source
  4474. (origin
  4475. (method url-fetch)
  4476. (uri (rubygems-uri "creole" version))
  4477. (sha256
  4478. (base32
  4479. "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
  4480. (build-system ruby-build-system)
  4481. (native-inputs
  4482. `(("ruby-bacon" ,ruby-bacon)))
  4483. (synopsis "Creole markup language converter")
  4484. (description
  4485. "Creole is a lightweight markup language and this library for converting
  4486. creole to @code{HTML}.")
  4487. (home-page "https://github.com/minad/creole")
  4488. (license license:ruby)))
  4489. (define-public ruby-docile
  4490. (package
  4491. (name "ruby-docile")
  4492. (version "1.1.5")
  4493. (source
  4494. (origin
  4495. (method url-fetch)
  4496. (uri (rubygems-uri "docile" version))
  4497. (sha256
  4498. (base32
  4499. "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
  4500. (build-system ruby-build-system)
  4501. (arguments
  4502. '(#:tests? #f)) ; needs github-markup, among others
  4503. (synopsis "Ruby EDSL helper library")
  4504. (description "Docile is a Ruby library that provides an interface for
  4505. creating embedded domain specific languages (EDSLs) that manipulate existing
  4506. Ruby classes.")
  4507. (home-page "https://ms-ati.github.io/docile/")
  4508. (license license:expat)))
  4509. (define-public ruby-gherkin
  4510. (package
  4511. (name "ruby-gherkin")
  4512. (version "5.1.0")
  4513. (source
  4514. (origin
  4515. (method url-fetch)
  4516. (uri (rubygems-uri "gherkin" version))
  4517. (sha256
  4518. (base32
  4519. "1cgcdchwwdm10rsk44frjwqd4ihprhxjbm799nscqy2q1raqfj5s"))))
  4520. (build-system ruby-build-system)
  4521. (native-inputs
  4522. `(("bundler" ,bundler)))
  4523. (arguments
  4524. '(#:tests? #f)) ; needs simplecov, among others
  4525. (synopsis "Gherkin parser for Ruby")
  4526. (description "Gherkin is a parser and compiler for the Gherkin language.
  4527. It is intended be used by all Cucumber implementations to parse
  4528. @file{.feature} files.")
  4529. (home-page "https://github.com/cucumber-attic/gherkin")
  4530. (license license:expat)))
  4531. (define-public ruby-aruba
  4532. (package
  4533. (name "ruby-aruba")
  4534. (version "0.14.8")
  4535. (source
  4536. (origin
  4537. (method url-fetch)
  4538. (uri (rubygems-uri "aruba" version))
  4539. (sha256
  4540. (base32
  4541. "0zdd81l1lp0x78sxa6kkfqclpj5il3xl70nz05wqv2sfzzhqydxh"))))
  4542. (build-system ruby-build-system)
  4543. (arguments
  4544. '(#:test-target "spec"
  4545. #:phases
  4546. (modify-phases %standard-phases
  4547. (add-after 'unpack 'patch
  4548. (lambda _
  4549. (substitute* "spec/aruba/api_spec.rb"
  4550. ;; This resolves some errors in the specs
  4551. ;;
  4552. ;; undefined method `parse' for Time:Class
  4553. (("require 'spec_helper'")
  4554. "require 'spec_helper'\nrequire 'time'"))
  4555. ;; Avoid shebang issues in this spec file
  4556. (substitute* "spec/aruba/matchers/command_spec.rb"
  4557. (("/usr/bin/env bash")
  4558. (which "bash")))
  4559. #t))
  4560. (add-before 'check 'remove-unnecessary-dependencies
  4561. (lambda _
  4562. (substitute* "Gemfile"
  4563. ((".*byebug.*") "\n")
  4564. ((".*pry.*") "\n")
  4565. ((".*yaml.*") "\n")
  4566. ((".*bcat.*") "\n")
  4567. ((".*kramdown.*") "\n")
  4568. ((".*rubocop.*") "\n")
  4569. ((".*cucumber-pro.*") "\n")
  4570. ((".*cucumber.*") "\n")
  4571. ((".*license_finder.*") "\n")
  4572. ((".*rake.*") "gem 'rake'\n")
  4573. ((".*simplecov.*") "\n")
  4574. ((".*relish.*") "\n"))
  4575. (substitute* "spec/spec_helper.rb"
  4576. ((".*simplecov.*") "")
  4577. (("^SimpleCov.*") ""))
  4578. (substitute* "aruba.gemspec"
  4579. (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
  4580. "spec.add_runtime_dependency 'cucumber'"))
  4581. #t))
  4582. (add-before 'check 'set-home
  4583. (lambda _ (setenv "HOME" "/tmp") #t)))))
  4584. (native-inputs
  4585. `(("bundler" ,bundler)
  4586. ("ruby-rspec" ,ruby-rspec)
  4587. ("ruby-fuubar" ,ruby-fuubar)))
  4588. (propagated-inputs
  4589. `(("ruby-childprocess" ,ruby-childprocess)
  4590. ("ruby-contracts" ,ruby-contracts)
  4591. ("ruby-cucumber" ,ruby-cucumber)
  4592. ("ruby-ffi" ,ruby-ffi)
  4593. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  4594. ("ruby-thor" ,ruby-thor)
  4595. ("ruby-yard" ,ruby-yard)))
  4596. (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
  4597. (description
  4598. "Aruba is an extension for Cucumber, RSpec and Minitest for testing
  4599. command-line applications. It supports applications written in any
  4600. language.")
  4601. (home-page "https://github.com/cucumber/aruba")
  4602. (license license:expat)))
  4603. ;; A version of ruby-aruba without tests run so that circular dependencies can
  4604. ;; be avoided.
  4605. (define ruby-aruba-without-tests
  4606. (package
  4607. (inherit ruby-aruba)
  4608. (arguments '(#:tests? #f))
  4609. (propagated-inputs
  4610. `(("ruby-cucumber" ,ruby-cucumber-without-tests)
  4611. ,@(alist-delete "ruby-cucumber"
  4612. (package-propagated-inputs ruby-aruba))))
  4613. (native-inputs '())))
  4614. (define-public ruby-cucumber
  4615. (package
  4616. (name "ruby-cucumber")
  4617. (version "3.1.2")
  4618. (source
  4619. (origin
  4620. (method git-fetch)
  4621. (uri (git-reference
  4622. (url "https://github.com/cucumber/cucumber-ruby.git")
  4623. (commit (string-append "v" version))))
  4624. (file-name (git-file-name name version))
  4625. (sha256
  4626. (base32
  4627. "0764wp2cjg60qa3l69q1dxda5g06a01n5w92szqbf89d2hgl47n3"))))
  4628. (build-system ruby-build-system)
  4629. (arguments
  4630. '(#:test-target "spec"
  4631. #:phases
  4632. (modify-phases %standard-phases
  4633. ;; Don't run or require rubocop, the code linting tool, as this is a
  4634. ;; bit unnecessary.
  4635. (add-after 'unpack 'dont-run-rubocop
  4636. (lambda _
  4637. (substitute* "Rakefile"
  4638. ((".*rubocop/rake\\_task.*") "")
  4639. ((".*RuboCop.*") ""))
  4640. #t)))))
  4641. (propagated-inputs
  4642. `(("ruby-builder" ,ruby-builder)
  4643. ("ruby-cucumber-core" ,ruby-cucumber-core)
  4644. ("ruby-cucumber-wire" ,ruby-cucumber-wire)
  4645. ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
  4646. ("ruby-diff-lcs" ,ruby-diff-lcs)
  4647. ("ruby-gherkin" ,ruby-gherkin)
  4648. ("ruby-multi-json" ,ruby-multi-json)
  4649. ("ruby-multi-test" ,ruby-multi-test)))
  4650. (native-inputs
  4651. `(("bundler" ,bundler)
  4652. ;; Use a untested version of aruba, to avoid a circular dependency, as
  4653. ;; ruby-aruba depends on ruby-cucumber.
  4654. ("ruby-aruba", ruby-aruba-without-tests)
  4655. ("ruby-rspec" ,ruby-rspec)
  4656. ("ruby-pry" ,ruby-pry)
  4657. ("ruby-nokogiri" ,ruby-nokogiri)))
  4658. (synopsis "Describe automated tests in plain language")
  4659. (description
  4660. "Cucumber is a tool for running automated tests written in plain
  4661. language. It's designed to support a Behaviour Driven Development (BDD)
  4662. software development workflow.")
  4663. (home-page "https://cucumber.io/")
  4664. (license license:expat)))
  4665. (define ruby-cucumber-without-tests
  4666. (package (inherit ruby-cucumber)
  4667. (arguments
  4668. '(#:tests? #f))
  4669. (native-inputs
  4670. '())))
  4671. (define-public ruby-cucumber-core
  4672. (package
  4673. (name "ruby-cucumber-core")
  4674. ;; Stick to major version 3, until version 4 of Cucumber is released.
  4675. (version "3.2.1")
  4676. (source
  4677. (origin
  4678. (method url-fetch)
  4679. (uri (rubygems-uri "cucumber-core" version))
  4680. (sha256
  4681. (base32
  4682. "1iavlh8hqj9lwljbpkw06259gdicbr1bdb6pbj5yy3n8szgr8k3c"))))
  4683. (build-system ruby-build-system)
  4684. (propagated-inputs
  4685. `(("ruby-backports" ,ruby-backports)
  4686. ("ruby-gherkin" ,ruby-gherkin)
  4687. ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
  4688. (native-inputs
  4689. `(("bundler" ,bundler)))
  4690. (arguments
  4691. '(#:tests? #f)) ; needs simplecov, among others
  4692. (synopsis "Core library for the Cucumber BDD app")
  4693. (description "Cucumber is a tool for running automated tests
  4694. written in plain language. Because they're written in plain language,
  4695. they can be read by anyone on your team. Because they can be read by
  4696. anyone, you can use them to help improve communication, collaboration
  4697. and trust on your team.")
  4698. (home-page "https://cucumber.io/")
  4699. (license license:expat)))
  4700. (define-public ruby-cucumber-expressions
  4701. (package
  4702. (name "ruby-cucumber-expressions")
  4703. (version "6.0.1")
  4704. (source
  4705. (origin
  4706. (method url-fetch)
  4707. (uri (rubygems-uri "cucumber-expressions" version))
  4708. (sha256
  4709. (base32
  4710. "0zwmv6hznyz9vk81f5dhwcr9jhxx2vmbk8yyazayvllvhy0fkpdw"))))
  4711. (build-system ruby-build-system)
  4712. (arguments
  4713. '(#:test-target "spec"))
  4714. (native-inputs
  4715. `(("bundler" ,bundler)
  4716. ("ruby-rspec" ,ruby-rspec)
  4717. ("ruby-simplecov" ,ruby-simplecov)))
  4718. (synopsis "Simpler alternative to Regular Expressions")
  4719. (description "Cucumber Expressions offer similar functionality to Regular
  4720. Expressions, with a syntax that is easier to read and write. Cucumber
  4721. Expressions are extensible with parameter types.")
  4722. (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
  4723. (license license:expat)))
  4724. (define-public ruby-cucumber-wire
  4725. (package
  4726. (name "ruby-cucumber-wire")
  4727. ;; Package version 0.0.1 initially, as this is what's needed by Cucumber
  4728. ;; 3, and Cucumber 4 hasn't been released yet.
  4729. (version "0.0.1")
  4730. (source
  4731. (origin
  4732. (method url-fetch)
  4733. (uri (rubygems-uri "cucumber-wire" version))
  4734. (sha256
  4735. (base32
  4736. "09ymvqb0sbw2if1nxg8rcj33sf0va88ancq5nmp8g01dfwzwma2f"))))
  4737. (build-system ruby-build-system)
  4738. (arguments
  4739. '(;; TODO: Currently, the tests can't be run as cucumber is required,
  4740. ;; which would lead to a circular dependency.
  4741. #:tests? #f
  4742. #:test-target "default"
  4743. #:phases
  4744. (modify-phases %standard-phases
  4745. (add-before 'check 'set-CUCUMBER_USE_RELEASED_GEMS
  4746. (lambda _
  4747. (setenv "CUCUMBER_USE_RELEASED_GEMS" "true")
  4748. #t)))))
  4749. (native-inputs
  4750. `(("bundler" ,bundler)
  4751. ("ruby-rspec" ,ruby-rspec)))
  4752. (synopsis "Cucumber wire protocol plugin")
  4753. (description
  4754. "Cucumber's wire protocol allows step definitions to be implemented and
  4755. invoked on any platform.")
  4756. (home-page "https://github.com/cucumber/cucumber-ruby-wire")
  4757. (license license:expat)))
  4758. (define-public ruby-cucumber-tag-expressions
  4759. (package
  4760. (name "ruby-cucumber-tag-expressions")
  4761. (version "1.1.1")
  4762. (source
  4763. (origin
  4764. (method url-fetch)
  4765. (uri (rubygems-uri "cucumber-tag_expressions" version))
  4766. (sha256
  4767. (base32
  4768. "0cvmbljybws0qzjs1l67fvr9gqr005l8jk1ni5gcsis9pfmqh3vc"))))
  4769. (build-system ruby-build-system)
  4770. (arguments
  4771. '(#:phases
  4772. (modify-phases %standard-phases
  4773. (replace 'check
  4774. (lambda _
  4775. (invoke "rspec")
  4776. #t)))))
  4777. (native-inputs
  4778. `(("ruby-rspec" ,ruby-rspec)))
  4779. (synopsis "Cucumber tag expressions for Ruby")
  4780. (description
  4781. "Cucumber tag expression parser for Ruby. A tag expression is an infix
  4782. boolean expression used by Cucumber.")
  4783. (home-page "https://github.com/cucumber/tag-expressions-ruby")
  4784. (license license:expat)))
  4785. (define-public ruby-bio-logger
  4786. (package
  4787. (name "ruby-bio-logger")
  4788. (version "1.0.1")
  4789. (source
  4790. (origin
  4791. (method url-fetch)
  4792. (uri (rubygems-uri "bio-logger" version))
  4793. (sha256
  4794. (base32
  4795. "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
  4796. (build-system ruby-build-system)
  4797. (arguments
  4798. `(#:tests? #f)) ; rake errors, missing shoulda
  4799. (propagated-inputs
  4800. `(("ruby-log4r" ,ruby-log4r)))
  4801. (synopsis "Log4r wrapper for Ruby")
  4802. (description "Bio-logger is a wrapper around Log4r adding extra logging
  4803. features such as filtering and fine grained logging.")
  4804. (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
  4805. (license license:expat)))
  4806. (define-public ruby-yajl-ruby
  4807. (package
  4808. (name "ruby-yajl-ruby")
  4809. (version "1.4.1")
  4810. (source
  4811. (origin
  4812. (method url-fetch)
  4813. (uri (rubygems-uri "yajl-ruby" version))
  4814. (sha256
  4815. (base32
  4816. "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
  4817. (build-system ruby-build-system)
  4818. (arguments
  4819. '(#:test-target "spec"
  4820. #:phases
  4821. (modify-phases %standard-phases
  4822. (add-before 'check 'patch-test-to-update-load-path
  4823. (lambda _
  4824. (substitute* "spec/parsing/large_number_spec.rb"
  4825. (("require \"yajl\"")
  4826. "$LOAD_PATH << 'lib'; require 'yajl'"))
  4827. #t)))))
  4828. (native-inputs
  4829. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  4830. ("ruby-rspec" ,ruby-rspec)))
  4831. (synopsis "Streaming JSON parsing and encoding library for Ruby")
  4832. (description
  4833. "Ruby C bindings to the Yajl JSON stream-based parser library. The API
  4834. is compatible with the JSON gem, so yajl-ruby can act as a drop in
  4835. replacement.
  4836. A modified copy of yajl is used, and included in the package.")
  4837. (home-page "https://github.com/brianmario/yajl-ruby")
  4838. (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
  4839. license:bsd-3)))) ; Included, modified copy of yajl
  4840. (define-public ruby-yard
  4841. (package
  4842. (name "ruby-yard")
  4843. (version "0.9.16")
  4844. (source
  4845. (origin
  4846. (method url-fetch)
  4847. ;; Tests do not pass if we build from the distributed gem.
  4848. (uri (string-append "https://github.com/lsegal/yard/archive/v"
  4849. version ".tar.gz"))
  4850. (file-name (string-append name "-" version ".tar.gz"))
  4851. (sha256
  4852. (base32
  4853. "0sqpbayy9sb406jh0zqg6qha1xds863qz9531dh6vp58hc00clfq"))))
  4854. (build-system ruby-build-system)
  4855. (arguments
  4856. `(#:phases
  4857. (modify-phases %standard-phases
  4858. (replace 'check
  4859. (lambda _
  4860. ;; $HOME needs to be set to somewhere writeable for tests to run
  4861. (setenv "HOME" "/tmp")
  4862. ;; Run tests without using 'rake' to avoid dependencies.
  4863. (invoke "rspec"))))))
  4864. (native-inputs
  4865. `(("ruby-rspec" ,ruby-rspec)
  4866. ("ruby-rack" ,ruby-rack)))
  4867. (synopsis "Documentation generation tool for Ruby")
  4868. (description
  4869. "YARD is a documentation generation tool for the Ruby programming
  4870. language. It enables the user to generate consistent, usable documentation
  4871. that can be exported to a number of formats very easily, and also supports
  4872. extending for custom Ruby constructs such as custom class level definitions.")
  4873. (home-page "https://yardoc.org")
  4874. (license license:expat)))
  4875. (define-public ruby-clap
  4876. (package
  4877. (name "ruby-clap")
  4878. (version "1.0.0")
  4879. (source (origin
  4880. (method url-fetch)
  4881. (uri (rubygems-uri "clap" version))
  4882. (sha256
  4883. (base32
  4884. "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
  4885. (build-system ruby-build-system)
  4886. ;; Clap needs cutest for running tests, but cutest needs clap.
  4887. (arguments `(#:tests? #f))
  4888. (synopsis "Command line argument parsing for simple applications")
  4889. (description
  4890. "Clap provides command line argument parsing features. It covers the
  4891. simple case of executing code based on the flags or parameters passed.")
  4892. (home-page "https://github.com/djanowski/cutest")
  4893. (license license:expat)))
  4894. (define-public ruby-cutest
  4895. (package
  4896. (name "ruby-cutest")
  4897. (version "1.2.2")
  4898. (source (origin
  4899. (method url-fetch)
  4900. (uri (rubygems-uri "cutest" version))
  4901. (sha256
  4902. (base32
  4903. "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
  4904. (build-system ruby-build-system)
  4905. (propagated-inputs
  4906. `(("ruby-clap" ,ruby-clap)))
  4907. (synopsis "Run tests in separate processes")
  4908. (description
  4909. "Cutest runs tests in separate processes to avoid shared state.")
  4910. (home-page "https://github.com/djanowski/cutest")
  4911. (license license:expat)))
  4912. (define-public ruby-pygmentize
  4913. (package
  4914. (name "ruby-pygmentize")
  4915. (version "0.0.3")
  4916. (source (origin
  4917. (method url-fetch)
  4918. (uri (rubygems-uri "pygmentize" version))
  4919. (sha256
  4920. (base32
  4921. "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
  4922. (build-system ruby-build-system)
  4923. (arguments
  4924. `(#:phases
  4925. (modify-phases %standard-phases
  4926. (add-after 'unpack 'fix-pygmentize-path
  4927. (lambda _
  4928. (substitute* "lib/pygmentize.rb"
  4929. (("\"/usr/bin/env python.*")
  4930. (string-append "\"" (which "pygmentize") "\"\n")))
  4931. #t))
  4932. (add-after 'build 'do-not-use-vendor-directory
  4933. (lambda _
  4934. ;; Remove bundled pygments sources
  4935. ;; FIXME: ruby-build-system does not support snippets.
  4936. (delete-file-recursively "vendor")
  4937. (substitute* "pygmentize.gemspec"
  4938. (("\"vendor/\\*\\*/\\*\",") ""))
  4939. #t)))))
  4940. (inputs
  4941. `(("pygments" ,python-pygments)))
  4942. (native-inputs
  4943. `(("ruby-cutest" ,ruby-cutest)
  4944. ("ruby-nokogiri" ,ruby-nokogiri)))
  4945. (synopsis "Thin Ruby wrapper around pygmentize")
  4946. (description
  4947. "Pygmentize provides a simple way to call pygmentize from within a Ruby
  4948. application.")
  4949. (home-page "https://github.com/djanowski/pygmentize")
  4950. (license license:expat)))
  4951. (define-public ruby-eventmachine
  4952. (package
  4953. (name "ruby-eventmachine")
  4954. (version "1.2.7")
  4955. (source
  4956. (origin
  4957. (method url-fetch)
  4958. (uri (rubygems-uri "eventmachine" version))
  4959. (sha256
  4960. (base32
  4961. "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
  4962. (build-system ruby-build-system)
  4963. (arguments
  4964. '(#:tests? #f)) ; test suite tries to connect to google.com
  4965. (native-inputs
  4966. `(("ruby-rake-compiler" ,ruby-rake-compiler)))
  4967. (synopsis "Single-threaded network event framework for Ruby")
  4968. (description
  4969. "EventMachine implements a single-threaded engine for arbitrary network
  4970. communications. EventMachine wraps all interactions with sockets, allowing
  4971. programs to concentrate on the implementation of network protocols. It can be
  4972. used to create both network servers and clients.")
  4973. ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
  4974. (home-page "https://github.com/eventmachine/eventmachine")
  4975. (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
  4976. (define-public ruby-ruby-engine
  4977. (package
  4978. (name "ruby-ruby-engine")
  4979. (version "1.0.1")
  4980. (source
  4981. (origin
  4982. (method url-fetch)
  4983. (uri (rubygems-uri "ruby_engine" version))
  4984. (sha256
  4985. (base32
  4986. "1d0sd4q50zkcqhr395wj1wpn2ql52r0fpwhzjfvi1bljml7k546v"))))
  4987. (build-system ruby-build-system)
  4988. (arguments
  4989. `(#:phases
  4990. (modify-phases %standard-phases
  4991. (add-before 'check 'clean-up
  4992. (lambda _
  4993. (delete-file "Gemfile.lock")
  4994. (substitute* "ruby_engine.gemspec"
  4995. ;; Remove unnecessary imports that would entail further
  4996. ;; dependencies.
  4997. ((".*<rdoc.*") "")
  4998. ((".*<rubygems-tasks.*") "")
  4999. ;; Remove extraneous .gem file
  5000. (("\\\"pkg/ruby_engine-1.0.0.gem\\\",") "")
  5001. ;; Soften rake dependency
  5002. (("%q<rake>.freeze, \\[\\\"~> 10.0\\\"\\]")
  5003. "%q<rake>.freeze, [\">= 10.0\"]")
  5004. ;; Soften the rspec dependency
  5005. (("%q<rspec>.freeze, \\[\\\"~> 2.4\\\"\\]")
  5006. "%q<rspec>.freeze, [\">= 2.4\"]"))
  5007. (substitute* "Rakefile"
  5008. (("require 'rubygems/tasks'") "")
  5009. (("Gem::Tasks.new") ""))
  5010. ;; Remove extraneous .gem file that otherwise gets installed.
  5011. (delete-file "pkg/ruby_engine-1.0.0.gem")
  5012. #t)))))
  5013. (native-inputs
  5014. `(("bundler" ,bundler)
  5015. ("ruby-rake" ,ruby-rake)
  5016. ("ruby-rspec" ,ruby-rspec)))
  5017. (synopsis "Simplifies checking for Ruby implementation")
  5018. (description
  5019. "@code{ruby_engine} provides an RubyEngine class that can be used to
  5020. check which implementation of Ruby is in use. It can provide the interpreter
  5021. name and provides query methods such as @{RubyEngine.mri?}.")
  5022. (home-page "https://github.com/janlelis/ruby_engine")
  5023. (license license:expat)))
  5024. (define-public ruby-turn
  5025. (package
  5026. (name "ruby-turn")
  5027. (version "0.9.7")
  5028. (source
  5029. (origin
  5030. (method url-fetch)
  5031. (uri (rubygems-uri "turn" version))
  5032. (sha256
  5033. (base32
  5034. "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
  5035. (build-system ruby-build-system)
  5036. (arguments
  5037. `(#:phases
  5038. (modify-phases %standard-phases
  5039. ;; Tests fail because turn changes its environment so can no longer
  5040. ;; find test/unit. Instead simply test if the executable runs
  5041. ;; without issue.
  5042. (replace 'check
  5043. (lambda _
  5044. (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
  5045. (propagated-inputs
  5046. `(("ruby-ansi" ,ruby-ansi)
  5047. ("ruby-minitest" ,ruby-minitest-4)))
  5048. (synopsis "Alternate set of alternative runners for MiniTest")
  5049. (description
  5050. "TURN provides a set of alternative runners for MiniTest which are both
  5051. colorful and informative. TURN displays each test on a separate line with
  5052. failures being displayed immediately instead of at the end of the tests. Note
  5053. that TURN is no longer being maintained.")
  5054. (home-page "http://rubygems.org/gems/turn")
  5055. (license license:expat)))
  5056. (define-public ruby-mimemagic
  5057. (package
  5058. (name "ruby-mimemagic")
  5059. (version "0.3.2")
  5060. (source
  5061. (origin
  5062. (method url-fetch)
  5063. (uri (rubygems-uri "mimemagic" version))
  5064. (sha256
  5065. (base32
  5066. "00ibc1mhvdfyfyl103xwb45621nwyqxf124cni5hyfhag0fn1c3q"))))
  5067. (build-system ruby-build-system)
  5068. (arguments
  5069. '(#:phases
  5070. (modify-phases %standard-phases
  5071. ;; This phase breaks the tests, as it patches some of the test data.
  5072. (delete 'patch-source-shebangs))))
  5073. (native-inputs
  5074. `(("ruby-bacon" ,ruby-bacon)))
  5075. (synopsis "Ruby library for MIME detection by extension or content")
  5076. (description
  5077. "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
  5078. extension or content, using the freedesktop.org.xml shared-mime-info
  5079. database.")
  5080. (home-page "https://github.com/minad/mimemagic")
  5081. (license license:expat)))
  5082. (define-public ruby-mime-types-data
  5083. (package
  5084. (name "ruby-mime-types-data")
  5085. (version "3.2016.0521")
  5086. (source
  5087. (origin
  5088. (method url-fetch)
  5089. (uri (rubygems-uri "mime-types-data" version))
  5090. (sha256
  5091. (base32
  5092. "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
  5093. (build-system ruby-build-system)
  5094. (native-inputs
  5095. `(("ruby-hoe" ,ruby-hoe)))
  5096. (synopsis "Registry for information about MIME media type definitions")
  5097. (description
  5098. "@code{mime-types-data} provides a registry for information about
  5099. Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
  5100. be used with the Ruby mime-types library or other software to determine
  5101. defined filename extensions for MIME types, or to use filename extensions to
  5102. look up the likely MIME type definitions.")
  5103. (home-page "https://github.com/mime-types/mime-types-data/")
  5104. (license license:expat)))
  5105. (define-public ruby-mime-types
  5106. (package
  5107. (name "ruby-mime-types")
  5108. (version "3.1")
  5109. (source
  5110. (origin
  5111. (method url-fetch)
  5112. (uri (rubygems-uri "mime-types" version))
  5113. (sha256
  5114. (base32
  5115. "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
  5116. (build-system ruby-build-system)
  5117. (propagated-inputs
  5118. `(("ruby-mime-types-data" ,ruby-mime-types-data)))
  5119. (native-inputs
  5120. `(("ruby-hoe" ,ruby-hoe)
  5121. ("ruby-fivemat" ,ruby-fivemat)
  5122. ("ruby-minitest-focus" ,ruby-minitest-focus)
  5123. ("ruby-minitest-rg" ,ruby-minitest-rg)
  5124. ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
  5125. ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
  5126. (synopsis "Library and registry for MIME content type definitions")
  5127. (description "The mime-types library provides a library and registry for
  5128. information about Multipurpose Internet Mail Extensions (MIME) content type
  5129. definitions. It can be used to determine defined filename extensions for MIME
  5130. types, or to use filename extensions to look up the likely MIME type
  5131. definitions.")
  5132. (home-page "https://github.com/mime-types/ruby-mime-types")
  5133. (license license:expat)))
  5134. (define-public ruby-fivemat
  5135. (package
  5136. (name "ruby-fivemat")
  5137. (version "1.3.6")
  5138. (source
  5139. (origin
  5140. (method url-fetch)
  5141. (uri (rubygems-uri "fivemat" version))
  5142. (sha256
  5143. (base32
  5144. "006n7b09vviv5bs5hv2ccmjxw9iw3brcsm3xh3dhzfncsknz4jp7"))))
  5145. (build-system ruby-build-system)
  5146. (arguments
  5147. `(#:tests? #f)) ; no tests
  5148. (synopsis "Each test file given its own line of dots")
  5149. (description
  5150. "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
  5151. its own line of dots during testing. It aims to provide test output that is
  5152. neither too verbose nor too minimal.")
  5153. (home-page "https://github.com/tpope/fivemat")
  5154. (license license:expat)))
  5155. (define-public ruby-sqlite3
  5156. (package
  5157. (name "ruby-sqlite3")
  5158. (version "1.3.13")
  5159. (source
  5160. (origin
  5161. (method url-fetch)
  5162. (uri (rubygems-uri "sqlite3" version))
  5163. (sha256
  5164. (base32
  5165. "01ifzp8nwzqppda419c9wcvr8n82ysmisrs0hph9pdmv1lpa4f5i"))))
  5166. (build-system ruby-build-system)
  5167. (arguments
  5168. `(#:phases
  5169. (modify-phases %standard-phases
  5170. (add-before 'check 'adjust-failing-test
  5171. (lambda _
  5172. ;; XXX: This test fails with SQLite versions >= 3.21.
  5173. ;; See <https://github.com/sparklemotion/sqlite3-ruby/issues/226>.
  5174. (substitute* "test/test_integration_resultset.rb"
  5175. (("\"integer\", \"text\"") "\"INTEGER\", \"text\""))
  5176. #t))
  5177. (add-before 'check 'add-gemtest-file
  5178. ;; This file exists in the repository but is not distributed.
  5179. (lambda _ (invoke "touch" ".gemtest"))))))
  5180. (inputs
  5181. `(("sqlite" ,sqlite)))
  5182. (native-inputs
  5183. `(("ruby-hoe" ,ruby-hoe)
  5184. ("ruby-rake-compiler" ,ruby-rake-compiler)
  5185. ("ruby-mini-portile" ,ruby-mini-portile)))
  5186. (synopsis "Interface with SQLite3 databases")
  5187. (description
  5188. "This module allows Ruby programs to interface with the SQLite3 database
  5189. engine.")
  5190. (home-page
  5191. "https://github.com/sparklemotion/sqlite3-ruby")
  5192. (license license:bsd-3)))
  5193. (define-public ruby-shoulda-context
  5194. (package
  5195. (name "ruby-shoulda-context")
  5196. (version "1.2.2")
  5197. (source
  5198. (origin
  5199. (method url-fetch)
  5200. (uri (rubygems-uri "shoulda-context" version))
  5201. (sha256
  5202. (base32
  5203. "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
  5204. (build-system ruby-build-system)
  5205. (arguments
  5206. `(#:phases
  5207. (modify-phases %standard-phases
  5208. (replace 'check
  5209. (lambda _
  5210. ;; Do not run tests to avoid circular dependence with rails.
  5211. ;; Instead just import the library to test.
  5212. (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
  5213. (synopsis "Test::Unit context framework extracted from Shoulda")
  5214. (description
  5215. "@code{shoulda-context} is the context framework extracted from Shoulda.
  5216. Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
  5217. context, setup, and should blocks combine to produce natural test method
  5218. names.")
  5219. (home-page "https://github.com/thoughtbot/shoulda-context")
  5220. (license license:expat)))
  5221. (define-public ruby-shoulda-matchers
  5222. (package
  5223. (name "ruby-shoulda-matchers")
  5224. (version "3.1.2")
  5225. (source
  5226. (origin
  5227. (method url-fetch)
  5228. (uri (rubygems-uri "shoulda-matchers" version))
  5229. (sha256
  5230. (base32
  5231. "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
  5232. (build-system ruby-build-system)
  5233. (arguments
  5234. `(#:phases
  5235. (modify-phases %standard-phases
  5236. (replace 'check
  5237. (lambda _
  5238. ;; Do not run tests to avoid circular dependence with rails. Instead
  5239. ;; just import the library to test.
  5240. (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
  5241. (propagated-inputs
  5242. `(("ruby-activesupport" ,ruby-activesupport)))
  5243. (synopsis "Collection of testing matchers extracted from Shoulda")
  5244. (description
  5245. "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
  5246. test common Rails functionality. These tests would otherwise be much longer,
  5247. more complex, and error-prone.")
  5248. (home-page "https://github.com/thoughtbot/shoulda-matchers")
  5249. (license license:expat)))
  5250. (define-public ruby-shoulda-matchers-2
  5251. (package
  5252. (inherit ruby-shoulda-matchers)
  5253. (version "2.8.0")
  5254. (source (origin
  5255. (method url-fetch)
  5256. (uri (rubygems-uri "shoulda-matchers" version))
  5257. (sha256
  5258. (base32
  5259. "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
  5260. (define-public ruby-shoulda
  5261. (package
  5262. (name "ruby-shoulda")
  5263. (version "3.5.0")
  5264. (source
  5265. (origin
  5266. (method url-fetch)
  5267. (uri (rubygems-uri "shoulda" version))
  5268. (sha256
  5269. (base32
  5270. "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
  5271. (build-system ruby-build-system)
  5272. (arguments
  5273. `(#:phases
  5274. (modify-phases %standard-phases
  5275. (replace 'check
  5276. ;; Don't run tests to avoid circular dependence with rails. Instead
  5277. ;; just import the library to test.
  5278. (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
  5279. (propagated-inputs
  5280. `(("ruby-shoulda-context" ,ruby-shoulda-context)
  5281. ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
  5282. (synopsis "Context framework and matchers for testing")
  5283. (description
  5284. "@code{shoulda} is a meta-package combining @code{shoulda-context} and
  5285. @code{shoulda-matchers} providing tools for writing tests.")
  5286. (home-page "https://github.com/thoughtbot/shoulda")
  5287. (license license:expat)))
  5288. (define-public ruby-unf
  5289. (package
  5290. (name "ruby-unf")
  5291. (version "0.1.4")
  5292. (source
  5293. (origin
  5294. (method url-fetch)
  5295. (uri (rubygems-uri "unf" version))
  5296. (sha256
  5297. (base32
  5298. "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
  5299. (build-system ruby-build-system)
  5300. (arguments
  5301. `(#:phases
  5302. (modify-phases %standard-phases
  5303. (add-before 'check 'add-dependency-to-bundler
  5304. (lambda _
  5305. ;; test-unit is required but not provided by the bundler
  5306. ;; environment. This is fixed in the upstream repository but fix
  5307. ;; has not been released.
  5308. (substitute* "Gemfile"
  5309. (("^gemspec") "gem 'test-unit'\ngemspec"))
  5310. #t)))))
  5311. (propagated-inputs
  5312. `(("ruby-unf-ext" ,ruby-unf-ext)))
  5313. (native-inputs
  5314. `(("ruby-shoulda" ,ruby-shoulda)
  5315. ("bundler" ,bundler)
  5316. ("ruby-test-unit" ,ruby-test-unit)))
  5317. (synopsis "Unicode Normalization Form support to Ruby and JRuby")
  5318. (description
  5319. "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
  5320. support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
  5321. @code{java.text.Normalizer} on JRuby.")
  5322. (home-page "https://github.com/knu/ruby-unf")
  5323. (license license:bsd-2)))
  5324. (define-public ruby-webmock-2
  5325. (package
  5326. (name "ruby-webmock")
  5327. (version "2.3.2")
  5328. (source
  5329. (origin
  5330. (method url-fetch)
  5331. (uri (rubygems-uri "webmock" version))
  5332. (sha256
  5333. (base32
  5334. "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
  5335. (build-system ruby-build-system)
  5336. (native-inputs
  5337. `(("bundler" ,bundler)
  5338. ("ruby-rspec" ,ruby-rspec)))
  5339. (propagated-inputs
  5340. `(("ruby-addressable" ,ruby-addressable)
  5341. ("ruby-crack" ,ruby-crack)
  5342. ("ruby-hashdiff" ,ruby-hashdiff)))
  5343. (synopsis "Allows stubbing and setting expectations on HTTP requests")
  5344. (description
  5345. "WebMock allows stubbing HTTP requests and setting expectations on HTTP
  5346. requests. This is useful when testing software.")
  5347. (home-page "https://github.com/bblimke/webmock")
  5348. (license license:expat)))
  5349. (define-public ruby-unicode-display-width
  5350. (package
  5351. (name "ruby-unicode-display-width")
  5352. (version "1.4.1")
  5353. (source
  5354. (origin
  5355. (method url-fetch)
  5356. (uri (rubygems-uri "unicode-display_width" version))
  5357. (sha256
  5358. (base32
  5359. "0bq528fibi8s0jmxz0xzlgzggdq0x4fx46wfqz49478pv8gb2diq"))))
  5360. (build-system ruby-build-system)
  5361. (arguments
  5362. '(;; Test data not included.
  5363. #:tests? #f))
  5364. (synopsis "Determine the monospace display width of Ruby strings")
  5365. (description
  5366. "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
  5367. display width of strings in Ruby.")
  5368. (home-page "https://github.com/janlelis/unicode-display_width")
  5369. (license license:expat)))
  5370. ;; There is another gem called 'ruby-version' so we use an underscore in this
  5371. ;; name
  5372. (define-public ruby_version
  5373. (package
  5374. (name "ruby_version")
  5375. (version "1.0.1")
  5376. (source
  5377. (origin
  5378. (method url-fetch)
  5379. (uri (rubygems-uri "ruby_version" version))
  5380. (sha256
  5381. (base32
  5382. "0854i1bjy56176anr05l5m0vc81nl53c7fyfg7sljj62m1d64dgj"))))
  5383. (build-system ruby-build-system)
  5384. (arguments
  5385. '(#:phases
  5386. (modify-phases %standard-phases
  5387. (add-before 'check 'fix-dependencies
  5388. (lambda _
  5389. ;; Remove the Gemfile.lock, as we want to use Guix packages at
  5390. ;; whatever versions.
  5391. (delete-file "Gemfile.lock")
  5392. ;; Remove the incldued gem file as it's unnecessary.
  5393. (delete-file "pkg/ruby_version-1.0.0.gem")
  5394. (substitute* "ruby_version.gemspec"
  5395. ;; Don't require rdoc and rubygems-tasks as they're unnecessary
  5396. ((".*rdoc.*") "\n")
  5397. ((".*rubygems-tasks.*") "\n")
  5398. ;; Accept any version of rake and rspec
  5399. (("%q<rake.*") "%q<rake>)\n")
  5400. (("%q<rspec.*") "%q<rspec>)\n"))
  5401. ;; Remove the use of rubygems-tasks from the Rakefile, as it's
  5402. ;; unnecessary.
  5403. (substitute* "Rakefile"
  5404. (("^require 'rubygems/tasks'") "")
  5405. (("Gem::Tasks.new") ""))
  5406. #t)))))
  5407. (native-inputs
  5408. `(("bundler" ,bundler)
  5409. ("ruby-rspec" ,ruby-rspec)))
  5410. (synopsis "Ruby library to help check the Ruby version")
  5411. (description
  5412. "@code{ruby_version} provides a @code{RubyVersion} module to simplify
  5413. checking for the right Ruby version in software.")
  5414. (home-page "https://github.com/janlelis/ruby_version")
  5415. (license license:expat)))
  5416. (define-public ruby-websocket-driver
  5417. (package
  5418. (name "ruby-websocket-driver")
  5419. (version "0.7.0")
  5420. (source
  5421. (origin
  5422. (method url-fetch)
  5423. (uri (rubygems-uri "websocket-driver" version))
  5424. (sha256
  5425. (base32
  5426. "1551k3fs3kkb3ghqfj3n5lps0ikb9pyrdnzmvgfdxy8574n4g1dn"))))
  5427. (build-system ruby-build-system)
  5428. (arguments
  5429. '(;; No included tests
  5430. #:tests? #f))
  5431. (propagated-inputs
  5432. `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
  5433. (synopsis "WebSocket protocol handler with pluggable I/O")
  5434. (description
  5435. "@code{websocket-driver} provides a complete implementation of the
  5436. WebSocket protocols that can be hooked up to any TCP library")
  5437. (home-page "https://github.com/faye/websocket-driver-ruby")
  5438. (license license:expat)))
  5439. (define-public ruby-websocket-extensions
  5440. (package
  5441. (name "ruby-websocket-extensions")
  5442. (version "0.1.3")
  5443. (source
  5444. (origin
  5445. (method url-fetch)
  5446. (uri (rubygems-uri "websocket-extensions" version))
  5447. (sha256
  5448. (base32
  5449. "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
  5450. (build-system ruby-build-system)
  5451. (arguments
  5452. '(;; No included tests
  5453. #:tests? #f))
  5454. (synopsis "Generic extension manager for WebSocket connections")
  5455. (description
  5456. "@code{websocket-extensions} provides a container for registering
  5457. extension plugins.")
  5458. (home-page "https://github.com/faye/websocket-extensions-ruby")
  5459. (license license:expat)))
  5460. (define-public ruby-domain-name
  5461. (package
  5462. (name "ruby-domain-name")
  5463. (version "0.5.20180417")
  5464. (source
  5465. (origin
  5466. (method url-fetch)
  5467. (uri (rubygems-uri "domain_name" version))
  5468. (sha256
  5469. (base32
  5470. "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"))))
  5471. (build-system ruby-build-system)
  5472. (arguments
  5473. `(#:phases
  5474. (modify-phases %standard-phases
  5475. (add-before 'check 'fix-versions
  5476. (lambda _
  5477. ;; Fix NameError that appears to already be fixed upstream.
  5478. (substitute* "Rakefile"
  5479. (("DomainName::VERSION")
  5480. "Bundler::GemHelper.gemspec.version"))
  5481. ;; Loosen unnecessarily strict test-unit version specification.
  5482. (substitute* "domain_name.gemspec"
  5483. (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
  5484. #t)))))
  5485. (propagated-inputs
  5486. `(("ruby-unf" ,ruby-unf)))
  5487. (native-inputs
  5488. `(("ruby-shoulda" ,ruby-shoulda)
  5489. ("bundler" ,bundler)
  5490. ("ruby-test-unit" ,ruby-test-unit)))
  5491. (synopsis "Domain name manipulation library")
  5492. (description
  5493. "@code{domain_name} is a Domain name manipulation library. It parses a
  5494. domain name ready for extracting the registered domain and TLD (Top Level
  5495. Domain). It can also be used for cookie domain validation based on the Public
  5496. Suffix List.")
  5497. (home-page "https://github.com/knu/ruby-domain_name")
  5498. (license license:bsd-2)))
  5499. (define-public ruby-http-cookie
  5500. (package
  5501. (name "ruby-http-cookie")
  5502. (version "1.0.3")
  5503. (source
  5504. (origin
  5505. (method url-fetch)
  5506. (uri (rubygems-uri "http-cookie" version))
  5507. (sha256
  5508. (base32
  5509. "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
  5510. (build-system ruby-build-system)
  5511. (arguments
  5512. `(#:phases
  5513. (modify-phases %standard-phases
  5514. (add-before 'check 'add-dependency-to-bundler
  5515. (lambda _
  5516. ;; Fix NameError
  5517. (substitute* "Rakefile"
  5518. (("HTTP::Cookie::VERSION")
  5519. "Bundler::GemHelper.gemspec.version"))
  5520. #t)))))
  5521. (propagated-inputs
  5522. `(("ruby-domain-name" ,ruby-domain-name)))
  5523. (native-inputs
  5524. `(("rubysimplecov" ,ruby-simplecov)
  5525. ("bundler" ,bundler)
  5526. ("ruby-sqlite3" ,ruby-sqlite3)
  5527. ("ruby-test-unit" ,ruby-test-unit)))
  5528. (synopsis "Handle HTTP Cookies based on RFC 6265")
  5529. (description
  5530. "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
  5531. RFC 6265. It has been designed with security, standards compliance and
  5532. compatibility in mind, to behave just the same as today's major web browsers.
  5533. It has built-in support for the legacy @code{cookies.txt} and
  5534. @code{cookies.sqlite} formats of Mozilla Firefox.")
  5535. (home-page "https://github.com/sparklemotion/http-cookie")
  5536. (license license:expat)))
  5537. (define-public ruby-httpclient
  5538. (package
  5539. (name "ruby-httpclient")
  5540. (version "2.8.3")
  5541. (source
  5542. (origin
  5543. (method url-fetch)
  5544. (uri (rubygems-uri "httpclient" version))
  5545. (sha256
  5546. (base32
  5547. "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
  5548. (build-system ruby-build-system)
  5549. (arguments
  5550. '(;; TODO: Some tests currently fail
  5551. ;; ------
  5552. ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
  5553. ;; 2 omissions, 0 notifications
  5554. ;; 91.866% passed
  5555. ;; ------
  5556. ;; 6.49 tests/s, 22.41 assertions/s
  5557. #:tests? #f
  5558. #:phases
  5559. (modify-phases %standard-phases
  5560. (replace 'check
  5561. (lambda* (#:key tests? #:allow-other-keys)
  5562. (if tests?
  5563. (invoke "ruby"
  5564. "-Ilib"
  5565. "test/runner.rb")
  5566. #t))))))
  5567. (native-inputs
  5568. `(("ruby-rack" ,ruby-rack)))
  5569. (synopsis
  5570. "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
  5571. (description
  5572. "The @code{httpclient} ruby library provides functionality related to
  5573. HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
  5574. Cookie, multithreading and authentication (digest, NTLM) support.
  5575. Also provided is a @command{httpclient} command, which can perform HTTP
  5576. requests either using arguments or with an interactive prompt.")
  5577. (home-page "https://github.com/nahi/httpclient")
  5578. (license license:ruby)))
  5579. (define-public ruby-ansi
  5580. (package
  5581. (name "ruby-ansi")
  5582. (version "1.5.0")
  5583. (source
  5584. (origin
  5585. (method url-fetch)
  5586. ;; Fetch from GitHub as the gem does not contain testing code.
  5587. (uri (string-append "https://github.com/rubyworks/ansi/archive/"
  5588. version ".tar.gz"))
  5589. (file-name (string-append name "-" version ".tar.gz"))
  5590. (sha256
  5591. (base32
  5592. "1zdip30hivyipi8hndhb457bhiz033awd00bgrsk5axjrwp6zhly"))))
  5593. (build-system ruby-build-system)
  5594. (arguments
  5595. `(#:phases
  5596. (modify-phases %standard-phases
  5597. ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
  5598. ;; cycle ansi, qed, ansi. Instead simply test that the library can
  5599. ;; be require'd.
  5600. (replace 'check
  5601. (lambda _
  5602. (invoke "ruby" "-Ilib" "-r" "ansi")))
  5603. (add-before 'validate-runpath 'replace-broken-symlink
  5604. (lambda* (#:key outputs #:allow-other-keys)
  5605. (let* ((out (assoc-ref outputs "out"))
  5606. (file (string-append
  5607. out "/lib/ruby/vendor_ruby/gems/ansi-"
  5608. ,version "/lib/ansi.yml")))
  5609. ;; XXX: This symlink is broken since ruby 2.4.
  5610. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  5611. (delete-file file)
  5612. (symlink "../.index" file)
  5613. #t))))))
  5614. (synopsis "ANSI escape code related libraries")
  5615. (description
  5616. "This package is a collection of ANSI escape code related libraries
  5617. enabling ANSI colorization and stylization of console output. Included in the
  5618. library are the @code{Code} module, which defines ANSI codes as constants and
  5619. methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
  5620. @code{ProgressBar}, and a @code{String} subclass. The library also includes a
  5621. @code{Terminal} module which provides information about the current output
  5622. device.")
  5623. (home-page "https://rubyworks.github.io/ansi")
  5624. (license license:bsd-2)))
  5625. (define-public ruby-systemu
  5626. (package
  5627. (name "ruby-systemu")
  5628. (version "2.6.5")
  5629. (source
  5630. (origin
  5631. (method url-fetch)
  5632. (uri (rubygems-uri "systemu" version))
  5633. (sha256
  5634. (base32
  5635. "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
  5636. (build-system ruby-build-system)
  5637. (arguments
  5638. `(#:phases
  5639. (modify-phases %standard-phases
  5640. (add-before 'check 'set-version
  5641. (lambda _
  5642. (setenv "VERSION" ,version)
  5643. #t)))))
  5644. (synopsis "Capture of stdout/stderr and handling of child processes")
  5645. (description
  5646. "Systemu can be used on any platform to return status, stdout, and stderr
  5647. of any command. Unlike other methods like @code{open3} and @code{popen4}
  5648. there is no danger of full pipes or threading issues hanging your process or
  5649. subprocess.")
  5650. (home-page "https://github.com/ahoward/systemu")
  5651. (license license:ruby)))
  5652. (define-public ruby-bio-commandeer
  5653. (package
  5654. (name "ruby-bio-commandeer")
  5655. (version "0.4.0")
  5656. (source
  5657. (origin
  5658. (method url-fetch)
  5659. (uri (rubygems-uri "bio-commandeer" version))
  5660. (sha256
  5661. (base32
  5662. "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
  5663. (build-system ruby-build-system)
  5664. (arguments
  5665. `(#:phases
  5666. (modify-phases %standard-phases
  5667. (replace 'check
  5668. ;; Run test without calling 'rake' so that jeweler is
  5669. ;; not required as an input.
  5670. (lambda _
  5671. (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
  5672. (propagated-inputs
  5673. `(("ruby-bio-logger" ,ruby-bio-logger)
  5674. ("ruby-systemu" ,ruby-systemu)))
  5675. (native-inputs
  5676. `(("bundler" ,bundler)
  5677. ("ruby-rspec" ,ruby-rspec)))
  5678. (synopsis "Simplified running of shell commands from within Ruby")
  5679. (description
  5680. "Bio-commandeer provides an opinionated method of running shell commands
  5681. from within Ruby. The advantage of bio-commandeer over other methods of
  5682. running external commands is that when something goes wrong, messages printed
  5683. to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
  5684. detail to ease debugging.")
  5685. (home-page "https://github.com/wwood/bioruby-commandeer")
  5686. (license license:expat)))
  5687. (define-public ruby-rubytest
  5688. (package
  5689. (name "ruby-rubytest")
  5690. (version "0.8.1")
  5691. (source
  5692. (origin
  5693. (method url-fetch)
  5694. (uri (rubygems-uri "rubytest" version))
  5695. (sha256
  5696. (base32
  5697. "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
  5698. (build-system ruby-build-system)
  5699. (arguments
  5700. ;; Disable regular testing to break the cycle rubytest, qed, brass,
  5701. ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
  5702. ;; simply test that the library can be require'd.
  5703. `(#:phases
  5704. (modify-phases %standard-phases
  5705. (replace 'check
  5706. (lambda _
  5707. (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
  5708. (propagated-inputs
  5709. `(("ruby-ansi" ,ruby-ansi)))
  5710. (synopsis "Universal test harness for Ruby")
  5711. (description
  5712. "Rubytest is a testing meta-framework for Ruby. It can handle any
  5713. compliant test framework and can run tests from multiple frameworks in a
  5714. single pass.")
  5715. (home-page "https://rubyworks.github.io/rubytest")
  5716. (license license:bsd-2)))
  5717. (define-public ruby-brass
  5718. (package
  5719. (name "ruby-brass")
  5720. (version "1.2.1")
  5721. (source
  5722. (origin
  5723. (method url-fetch)
  5724. (uri (rubygems-uri "brass" version))
  5725. (sha256
  5726. (base32
  5727. "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
  5728. (build-system ruby-build-system)
  5729. (arguments
  5730. ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
  5731. ;; Instead simply test that the library can be require'd.
  5732. `(#:phases
  5733. (modify-phases %standard-phases
  5734. (replace 'check
  5735. (lambda _
  5736. (invoke "ruby" "-Ilib" "-r" "brass"))))))
  5737. (synopsis "Basic foundational assertions framework")
  5738. (description
  5739. "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
  5740. foundational assertions framework for other assertion and test frameworks to
  5741. make use of.")
  5742. (home-page "https://rubyworks.github.io/brass")
  5743. (license license:bsd-2)))
  5744. (define-public ruby-qed
  5745. (package
  5746. (name "ruby-qed")
  5747. (version "2.9.2")
  5748. (source
  5749. (origin
  5750. (method url-fetch)
  5751. (uri (rubygems-uri "qed" version))
  5752. (sha256
  5753. (base32
  5754. "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
  5755. (build-system ruby-build-system)
  5756. (arguments
  5757. ;; Disable testing to break the cycle qed, ansi, qed, among others.
  5758. ;; Instead simply test that the executable runs using --copyright.
  5759. `(#:phases
  5760. (modify-phases %standard-phases
  5761. (replace 'check
  5762. (lambda _
  5763. (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
  5764. (propagated-inputs
  5765. `(("ruby-ansi" ,ruby-ansi)
  5766. ("ruby-brass" ,ruby-brass)))
  5767. (synopsis "Test framework utilizing literate programming techniques")
  5768. (description
  5769. "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
  5770. @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
  5771. Development} (BDD) utilizing Literate Programming techniques. QED sits
  5772. somewhere between lower-level testing tools like @code{Test::Unit} and
  5773. requirement specifications systems like Cucumber.")
  5774. (home-page "https://rubyworks.github.io/qed")
  5775. (license license:bsd-2)))
  5776. (define-public ruby-ae
  5777. (package
  5778. (name "ruby-ae")
  5779. (version "1.8.2")
  5780. (source
  5781. (origin
  5782. (method url-fetch)
  5783. ;; Fetch from github so tests are included.
  5784. (uri (string-append
  5785. "https://github.com/rubyworks/ae/archive/"
  5786. version ".tar.gz"))
  5787. (file-name (string-append name "-" version ".tar.gz"))
  5788. (sha256
  5789. (base32
  5790. "147jmkx54x7asy2d8m4dyrhhf4hdx4galpnhwzai030y3cdsfrrl"))))
  5791. (build-system ruby-build-system)
  5792. (arguments
  5793. `(#:phases
  5794. (modify-phases %standard-phases
  5795. (replace 'check
  5796. (lambda _ (invoke "qed")))
  5797. (add-before 'validate-runpath 'replace-broken-symlink
  5798. (lambda* (#:key outputs #:allow-other-keys)
  5799. (let* ((out (assoc-ref outputs "out"))
  5800. (file (string-append
  5801. out "/lib/ruby/vendor_ruby/gems/ae-"
  5802. ,version "/lib/ae.yml")))
  5803. ;; XXX: This symlink is broken since ruby 2.4.
  5804. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  5805. (delete-file file)
  5806. (symlink "../.index" file)
  5807. #t))))))
  5808. (propagated-inputs
  5809. `(("ruby-ansi" ,ruby-ansi)))
  5810. (native-inputs
  5811. `(("ruby-qed" ,ruby-qed)))
  5812. (synopsis "Assertions library")
  5813. (description
  5814. "Assertive Expressive (AE) is an assertions library specifically designed
  5815. for reuse by other test frameworks.")
  5816. (home-page "https://rubyworks.github.io/ae")
  5817. (license license:bsd-2)))
  5818. (define-public ruby-lemon
  5819. (package
  5820. (name "ruby-lemon")
  5821. (version "0.9.1")
  5822. (source
  5823. (origin
  5824. (method url-fetch)
  5825. (uri (rubygems-uri "lemon" version))
  5826. (sha256
  5827. (base32
  5828. "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
  5829. (build-system ruby-build-system)
  5830. (arguments
  5831. `(#:phases
  5832. (modify-phases %standard-phases
  5833. (replace 'check (lambda _ (invoke "qed"))))))
  5834. (propagated-inputs
  5835. `(("ruby-ae" ,ruby-ae)
  5836. ("ruby-ansi" ,ruby-ansi)
  5837. ("ruby-rubytest" ,ruby-rubytest)))
  5838. (native-inputs
  5839. `(("ruby-qed" ,ruby-qed)))
  5840. (synopsis "Test framework correlating code structure and test unit")
  5841. (description
  5842. "Lemon is a unit testing framework that enforces highly formal
  5843. case-to-class and unit-to-method test construction. This enforcement can help
  5844. focus concern on individual units of behavior.")
  5845. (home-page "https://rubyworks.github.io/lemon")
  5846. (license license:bsd-2)))
  5847. (define-public ruby-rubytest-cli
  5848. (package
  5849. (name "ruby-rubytest-cli")
  5850. (version "0.2.0")
  5851. (source
  5852. (origin
  5853. (method url-fetch)
  5854. (uri (rubygems-uri "rubytest-cli" version))
  5855. (sha256
  5856. (base32
  5857. "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
  5858. (build-system ruby-build-system)
  5859. (arguments
  5860. `(#:tests? #f)) ; no tests
  5861. (propagated-inputs
  5862. `(("ruby-ansi" ,ruby-ansi)
  5863. ("ruby-rubytest" ,ruby-rubytest)))
  5864. (synopsis "Command-line interface for rubytest")
  5865. (description
  5866. "Rubytest CLI is a command-line interface for running tests for
  5867. Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
  5868. (home-page "https://rubyworks.github.io/rubytest-cli")
  5869. (license license:bsd-2)))
  5870. (define-public ruby-hashery
  5871. (package
  5872. (name "ruby-hashery")
  5873. (version "2.1.2")
  5874. (source
  5875. (origin
  5876. (method url-fetch)
  5877. (uri (rubygems-uri "hashery" version))
  5878. (sha256
  5879. (base32
  5880. "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
  5881. (build-system ruby-build-system)
  5882. (arguments
  5883. `(#:phases
  5884. (modify-phases %standard-phases
  5885. (replace 'check
  5886. (lambda _
  5887. (invoke "qed")
  5888. (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
  5889. (native-inputs
  5890. `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
  5891. ("ruby-qed" ,ruby-qed)
  5892. ("ruby-lemon" ,ruby-lemon)))
  5893. (synopsis "Hash-like classes with extra features")
  5894. (description
  5895. "The Hashery is a tight collection of @code{Hash}-like classes.
  5896. Included are the auto-sorting @code{Dictionary} class, the efficient
  5897. @code{LRUHash}, the flexible @code{OpenHash} and the convenient
  5898. @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
  5899. defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
  5900. standard @code{Hash} making it possible to subclass and augment to fit any
  5901. specific use case.")
  5902. (home-page "https://rubyworks.github.io/hashery")
  5903. (license license:bsd-2)))
  5904. (define-public ruby-rc4
  5905. (package
  5906. (name "ruby-rc4")
  5907. (version "0.1.5")
  5908. (source
  5909. (origin
  5910. (method url-fetch)
  5911. (uri (rubygems-uri "ruby-rc4" version))
  5912. (sha256
  5913. (base32
  5914. "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
  5915. (build-system ruby-build-system)
  5916. (arguments
  5917. `(#:phases
  5918. (modify-phases %standard-phases
  5919. (replace 'check
  5920. (lambda _
  5921. (invoke "rspec" "spec/rc4_spec.rb"))))))
  5922. (native-inputs
  5923. `(("ruby-rspec" ,ruby-rspec-2)))
  5924. (synopsis "Implementation of the RC4 algorithm")
  5925. (description
  5926. "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
  5927. (home-page "https://github.com/caiges/Ruby-RC4")
  5928. (license license:expat)))
  5929. (define-public ruby-afm
  5930. (package
  5931. (name "ruby-afm")
  5932. (version "0.2.2")
  5933. (source
  5934. (origin
  5935. (method url-fetch)
  5936. (uri (rubygems-uri "afm" version))
  5937. (sha256
  5938. (base32
  5939. "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
  5940. (build-system ruby-build-system)
  5941. (native-inputs
  5942. `(("bundler" ,bundler)))
  5943. (synopsis "Read Adobe Font Metrics (afm) files")
  5944. (description
  5945. "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
  5946. files and use the data therein.")
  5947. (home-page "https://github.com/halfbyte/afm")
  5948. (license license:expat)))
  5949. (define-public ruby-ascii85
  5950. (package
  5951. (name "ruby-ascii85")
  5952. (version "1.0.3")
  5953. (source
  5954. (origin
  5955. (method url-fetch)
  5956. (uri (rubygems-uri "Ascii85" version))
  5957. (sha256
  5958. (base32
  5959. "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
  5960. (build-system ruby-build-system)
  5961. (native-inputs
  5962. `(("bundler" ,bundler)))
  5963. (synopsis "Encode and decode Ascii85 binary-to-text encoding")
  5964. (description
  5965. "This library provides methods to encode and decode Ascii85
  5966. binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
  5967. @dfn{Portable Document Format} (PDF) file formats.")
  5968. (home-page "https://github.com/datawraith/ascii85gem")
  5969. (license license:expat)))
  5970. (define-public ruby-ttfunk
  5971. (package
  5972. (name "ruby-ttfunk")
  5973. (version "1.5.1")
  5974. (source
  5975. (origin
  5976. (method url-fetch)
  5977. ;; fetch from github as the gem does not contain testing code
  5978. (uri (string-append
  5979. "https://github.com/prawnpdf/ttfunk/archive/"
  5980. version ".tar.gz"))
  5981. (file-name (string-append name "-" version ".tar.gz"))
  5982. (sha256
  5983. (base32
  5984. "1ymcn12n5iws401yz03zsj8rr653fdqq13czsrciq09phgh9jzc5"))))
  5985. (build-system ruby-build-system)
  5986. (arguments
  5987. `(#:test-target "spec"
  5988. #:phases
  5989. (modify-phases %standard-phases
  5990. (add-before 'build 'remove-ssh
  5991. (lambda _
  5992. ;; remove dependency on an ssh key pair that doesn't exist
  5993. (substitute* "ttfunk.gemspec"
  5994. (("spec.signing_key.*") ""))
  5995. #t))
  5996. (add-before 'check 'remove-rubocop
  5997. (lambda _
  5998. ;; remove rubocop as a dependency as not needed for testing
  5999. (substitute* "ttfunk.gemspec"
  6000. (("spec.add_development_dependency\\('rubocop'.*") ""))
  6001. (substitute* "Rakefile"
  6002. (("require 'rubocop/rake_task'") "")
  6003. (("RuboCop::RakeTask.new") ""))
  6004. #t)))))
  6005. (native-inputs
  6006. `(("ruby-rspec" ,ruby-rspec)
  6007. ("ruby-yard" ,ruby-yard)
  6008. ("bundler" ,bundler)))
  6009. (synopsis "Font metrics parser for the Prawn PDF generator")
  6010. (description
  6011. "TTFunk is a TrueType font parser written in pure Ruby. It is used as
  6012. part of the Prawn PDF generator.")
  6013. (home-page "https://github.com/prawnpdf/ttfunk")
  6014. ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
  6015. ;; for details."
  6016. (license (list license:gpl2 license:gpl3 license:ruby))))
  6017. (define-public ruby-puma
  6018. (package
  6019. (name "ruby-puma")
  6020. (version "3.9.1")
  6021. (source
  6022. (origin
  6023. (method url-fetch)
  6024. ;; Fetch from GitHub because distributed gem does not contain tests.
  6025. (uri (string-append "https://github.com/puma/puma/archive/v"
  6026. version ".tar.gz"))
  6027. (file-name (string-append name "-" version ".tar.gz"))
  6028. (sha256
  6029. (base32
  6030. "03pifga841h17brh4vgia8i2ybh3cmsyg0dbybzdf6dq51wzcxdx"))))
  6031. (build-system ruby-build-system)
  6032. (arguments
  6033. `(#:tests? #f ; Tests require an out-dated version of minitest.
  6034. #:phases
  6035. (modify-phases %standard-phases
  6036. (add-before 'build 'fix-gemspec
  6037. (lambda _
  6038. (substitute* "puma.gemspec"
  6039. (("git ls-files") "find * |sort"))
  6040. #t)))))
  6041. (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
  6042. (description
  6043. "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
  6044. for Ruby/Rack applications. Puma is intended for use in both development and
  6045. production environments. In order to get the best throughput, it is highly
  6046. recommended that you use a Ruby implementation with real threads like Rubinius
  6047. or JRuby.")
  6048. (home-page "http://puma.io")
  6049. (license license:expat)))
  6050. (define-public ruby-hoe-git
  6051. (package
  6052. (name "ruby-hoe-git")
  6053. (version "1.6.0")
  6054. (source
  6055. (origin
  6056. (method url-fetch)
  6057. (uri (rubygems-uri "hoe-git" version))
  6058. (sha256
  6059. (base32
  6060. "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
  6061. (build-system ruby-build-system)
  6062. (propagated-inputs
  6063. `(("ruby-hoe" ,ruby-hoe)
  6064. ("git" ,git)))
  6065. (synopsis "Hoe plugins for tighter Git integration")
  6066. (description
  6067. "This package provides a set of Hoe plugins for tighter Git integration.
  6068. It provides tasks to automate release tagging and pushing and changelog
  6069. generation.")
  6070. (home-page "https://github.com/jbarnette/hoe-git")
  6071. (license license:expat)))
  6072. (define-public ruby-sequel
  6073. (package
  6074. (name "ruby-sequel")
  6075. (version "4.49.0")
  6076. (source
  6077. (origin
  6078. (method url-fetch)
  6079. (uri (rubygems-uri "sequel" version))
  6080. (sha256
  6081. (base32
  6082. "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
  6083. (build-system ruby-build-system)
  6084. (arguments
  6085. '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
  6086. (synopsis "Database toolkit for Ruby")
  6087. (description "Sequel provides thread safety, connection pooling and a
  6088. concise DSL for constructing SQL queries and table schemas. It includes a
  6089. comprehensive ORM layer for mapping records to Ruby objects and handling
  6090. associated records.")
  6091. (home-page "http://sequel.jeremyevans.net")
  6092. (license license:expat)))
  6093. (define-public ruby-timecop
  6094. (package
  6095. (name "ruby-timecop")
  6096. (version "0.9.1")
  6097. (source
  6098. (origin
  6099. (method url-fetch)
  6100. (uri (rubygems-uri "timecop" version))
  6101. (sha256
  6102. (base32
  6103. "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
  6104. (build-system ruby-build-system)
  6105. (arguments
  6106. `(#:phases
  6107. (modify-phases %standard-phases
  6108. (add-before 'check 'set-check-rubylib
  6109. (lambda _
  6110. ;; Set RUBYLIB so timecop tests finds its own lib.
  6111. (setenv "RUBYLIB" "lib")
  6112. #t)))))
  6113. (native-inputs
  6114. `(("bundler" ,bundler)
  6115. ("ruby-minitest-rg" ,ruby-minitest-rg)
  6116. ("ruby-mocha" ,ruby-mocha)
  6117. ("ruby-activesupport" ,ruby-activesupport)))
  6118. (synopsis "Test mocks for time-dependent functions")
  6119. (description
  6120. "Timecop provides \"time travel\" and \"time freezing\" capabilities,
  6121. making it easier to test time-dependent code. It provides a unified method to
  6122. mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
  6123. call.")
  6124. (home-page "https://github.com/travisjeffery/timecop")
  6125. (license license:expat)))
  6126. (define-public ruby-concurrent
  6127. (package
  6128. (name "ruby-concurrent")
  6129. (version "1.0.5")
  6130. (source
  6131. (origin
  6132. (method url-fetch)
  6133. ;; Download from GitHub because the rubygems version does not contain
  6134. ;; Rakefile.
  6135. (uri (string-append
  6136. "https://github.com/ruby-concurrency/concurrent-ruby/archive/v"
  6137. version
  6138. ".tar.gz"))
  6139. (file-name (string-append name "-" version ".tar.gz"))
  6140. (sha256
  6141. (base32
  6142. "0qhv0qzsby4iijgwa4s9r88zj8123pmyz1dwaqzdk57xgqll9pny"))
  6143. ;; Exclude failing test reported at
  6144. ;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534
  6145. (patches (search-patches "ruby-concurrent-ignore-broken-test.patch"
  6146. "ruby-concurrent-test-arm.patch"))))
  6147. (build-system ruby-build-system)
  6148. (arguments
  6149. `(#:test-target "spec"
  6150. #:phases
  6151. (modify-phases %standard-phases
  6152. (add-before 'replace-git-ls-files 'remove-extra-gemspecs
  6153. (lambda _
  6154. ;; Delete extra gemspec files so 'first-gemspec' chooses the
  6155. ;; correct one.
  6156. (delete-file "concurrent-ruby-edge.gemspec")
  6157. (delete-file "concurrent-ruby-ext.gemspec")
  6158. #t))
  6159. (add-before 'build 'replace-git-ls-files2
  6160. (lambda _
  6161. (substitute* "support/file_map.rb"
  6162. (("git ls-files") "find * |sort"))
  6163. #t))
  6164. (add-before 'check 'rake-compile
  6165. ;; Fix the test error described at
  6166. ;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408
  6167. (lambda _ (invoke "rake" "compile")))
  6168. (add-before 'check 'remove-timecop-dependency
  6169. ;; Remove timecop-dependent tests as having timecop as a depedency
  6170. ;; causes circular depedencies.
  6171. (lambda _
  6172. (delete-file "spec/concurrent/executor/timer_set_spec.rb")
  6173. (delete-file "spec/concurrent/scheduled_task_spec.rb")
  6174. #t)))))
  6175. (native-inputs
  6176. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  6177. ("ruby-rspec" ,ruby-rspec)))
  6178. (synopsis "Concurrency tools for Ruby")
  6179. (description
  6180. "This library provides modern concurrency tools including agents,
  6181. futures, promises, thread pools, actors, supervisors, and more. It is
  6182. inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
  6183. patterns.")
  6184. (home-page "http://www.concurrent-ruby.com")
  6185. (license license:expat)))
  6186. (define-public ruby-pkg-config
  6187. (package
  6188. (name "ruby-pkg-config")
  6189. (version "1.2.5")
  6190. (source
  6191. (origin
  6192. (method url-fetch)
  6193. (uri (rubygems-uri "pkg-config" version))
  6194. (sha256
  6195. (base32
  6196. "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
  6197. (build-system ruby-build-system)
  6198. (arguments
  6199. ;; Tests require extra files not included in the gem.
  6200. `(#:tests? #f))
  6201. (synopsis "Detect libraries for compiling Ruby native extensions")
  6202. (description
  6203. "@code{pkg-config} can be used in your extconf.rb to properly detect need
  6204. libraries for compiling Ruby native extensions.")
  6205. (home-page "https://github.com/ruby-gnome2/pkg-config")
  6206. (license license:lgpl2.0+)))
  6207. (define-public ruby-net-http-digest-auth
  6208. (package
  6209. (name "ruby-net-http-digest-auth")
  6210. (version "1.4.1")
  6211. (source
  6212. (origin
  6213. (method url-fetch)
  6214. (uri (rubygems-uri "net-http-digest_auth" version))
  6215. (sha256
  6216. (base32
  6217. "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
  6218. (build-system ruby-build-system)
  6219. (native-inputs
  6220. `(("ruby-hoe" ,ruby-hoe)))
  6221. (synopsis "RFC 2617 HTTP digest authentication library")
  6222. (description
  6223. "This library implements HTTP's digest authentication scheme based on
  6224. RFC 2617. This enables the use of the digest authentication scheme instead
  6225. of the more insecure basic authentication scheme.")
  6226. (home-page "https://github.com/drbrain/net-http-digest_auth")
  6227. (license license:expat)))
  6228. (define-public ruby-mail
  6229. (package
  6230. (name "ruby-mail")
  6231. (version "2.6.6")
  6232. (source
  6233. (origin
  6234. (method url-fetch)
  6235. (uri (rubygems-uri "mail" version))
  6236. (sha256
  6237. (base32
  6238. "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
  6239. (build-system ruby-build-system)
  6240. (propagated-inputs
  6241. `(("ruby-mime-types" ,ruby-mime-types)))
  6242. (arguments
  6243. ;; Tests require extra gems not included in the Gemfile.
  6244. ;; XXX: Try enabling this for the next version with mini_mime.
  6245. `(#:tests? #f))
  6246. (synopsis "Mail library for Ruby")
  6247. (description
  6248. "Mail is an internet library for Ruby that is designed to handle email
  6249. generation, parsing and sending. The purpose of this library is to provide
  6250. a single point of access to handle all email functions, including sending
  6251. and receiving emails. All network type actions are done through proxy
  6252. methods to @code{Net::SMTP}, @code{Net::POP3} etc.
  6253. Mail has been designed with a very simple object oriented system that
  6254. really opens up the email messages you are parsing, if you know what you
  6255. are doing, you can fiddle with every last bit of your email directly.")
  6256. (home-page "https://github.com/mikel/mail")
  6257. (license license:expat)))
  6258. (define-public ruby-mathn
  6259. (package
  6260. (name "ruby-mathn")
  6261. (version "0.1.0")
  6262. (source
  6263. (origin
  6264. (method url-fetch)
  6265. (uri (rubygems-uri "mathn" version))
  6266. (sha256
  6267. (base32
  6268. "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
  6269. (build-system ruby-build-system)
  6270. (native-inputs
  6271. `(("bundler" ,bundler)
  6272. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  6273. (synopsis "Extends math operations for increased precision")
  6274. (description
  6275. "This gem makes mathematical operations more precise in Ruby and
  6276. integrates other mathematical standard libraries. Prior to Ruby 2.5,
  6277. @code{mathn} was part of the Ruby standard library.")
  6278. (home-page "https://github.com/ruby/mathn")
  6279. (license license:bsd-2)))
  6280. (define-public ruby-code-statistics
  6281. (package
  6282. (name "ruby-code-statistics")
  6283. (version "0.2.13")
  6284. (source
  6285. (origin
  6286. (method url-fetch)
  6287. (uri (rubygems-uri "code_statistics" version))
  6288. (sha256
  6289. (base32
  6290. "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
  6291. (build-system ruby-build-system)
  6292. (arguments
  6293. `(#:tests? #f)) ; Not all test code is included in gem.
  6294. (synopsis "Port of the rails 'rake stats' method")
  6295. (description
  6296. "This gem is a port of the rails 'rake stats' method so it can be made
  6297. more robust and work for non rails projects.")
  6298. (home-page "http://github.com/danmayer/code_statistics")
  6299. (license license:expat)))
  6300. (define-public ruby-rubypants
  6301. (package
  6302. (name "ruby-rubypants")
  6303. (version "0.6.0")
  6304. (source (origin
  6305. (method url-fetch)
  6306. (uri (rubygems-uri "rubypants" version))
  6307. (sha256
  6308. (base32
  6309. "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
  6310. (build-system ruby-build-system)
  6311. (arguments
  6312. '(#:tests? #f)) ; need Codecov
  6313. (synopsis "Port of the smart-quotes library SmartyPants")
  6314. (description
  6315. "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
  6316. original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
  6317. and BBEdit that easily translates plain ASCII punctuation characters into
  6318. smart typographic punctuation HTML entities.")
  6319. (home-page "https://github.com/jmcnevin/rubypants")
  6320. (license license:bsd-2)))
  6321. (define-public ruby-org-ruby
  6322. (package
  6323. (name "ruby-org-ruby")
  6324. (version "0.9.12")
  6325. (source (origin
  6326. (method url-fetch)
  6327. (uri (rubygems-uri "org-ruby" version))
  6328. (sha256
  6329. (base32
  6330. "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
  6331. (build-system ruby-build-system)
  6332. (arguments
  6333. '(#:tests? #f)) ; no rakefile
  6334. (propagated-inputs
  6335. `(("ruby-rubypants" ,ruby-rubypants)))
  6336. (synopsis "Org-mode parser written in Ruby")
  6337. (description
  6338. "Org-ruby is an org-mode parser written in Ruby. The most significant
  6339. thing this library does today is convert org-mode files to HTML or Textile or
  6340. Markdown.")
  6341. (home-page "https://github.com/wallyqs/org-ruby")
  6342. (license license:expat)))
  6343. (define-public ruby-rake
  6344. (package
  6345. (name "ruby-rake")
  6346. (version "12.3.1")
  6347. (source
  6348. (origin
  6349. (method url-fetch)
  6350. (uri (rubygems-uri "rake" version))
  6351. (sha256
  6352. (base32
  6353. "1idi53jay34ba9j68c3mfr9wwkg3cd9qh0fn9cg42hv72c6q8dyg"))))
  6354. (build-system ruby-build-system)
  6355. (native-inputs
  6356. `(("bundler" ,bundler)))
  6357. (synopsis "Rake is a Make-like program implemented in Ruby")
  6358. (description
  6359. "Rake is a Make-like program where tasks and dependencies are specified
  6360. in standard Ruby syntax.")
  6361. (home-page "https://github.com/ruby/rake")
  6362. (license license:expat)))
  6363. (define-public ruby-childprocess-0.6
  6364. (package
  6365. (name "ruby-childprocess")
  6366. (version "0.6.3")
  6367. (source
  6368. (origin
  6369. (method url-fetch)
  6370. (uri (rubygems-uri "childprocess" version))
  6371. (sha256
  6372. (base32
  6373. "1p3f43scdzx9zxmy2kw5zsc3az6v46nq4brwcxmnscjy4w4racbv"))))
  6374. (build-system ruby-build-system)
  6375. (arguments
  6376. `(#:tests? #f))
  6377. (native-inputs
  6378. `(("bundler" ,bundler)
  6379. ("ruby-rspec" ,ruby-rspec)))
  6380. (propagated-inputs
  6381. `(("ruby-ffi" ,ruby-ffi)))
  6382. (synopsis "Control external programs running in the background, in Ruby")
  6383. (description "@code{childprocess} provides a gem to control external
  6384. programs running in the background, in Ruby.")
  6385. (home-page "http://github.com/enkessler/childprocess")
  6386. (license license:expat)))
  6387. (define-public ruby-childprocess
  6388. (package
  6389. (inherit ruby-childprocess-0.6)
  6390. (name "ruby-childprocess")
  6391. (version "0.9.0")
  6392. (source
  6393. (origin
  6394. (method url-fetch)
  6395. (uri (rubygems-uri "childprocess" version))
  6396. (sha256
  6397. (base32
  6398. "0a61922kmvcxyj5l70fycapr87gz1dzzlkfpq85rfqk5vdh3d28p"))))))
  6399. (define-public ruby-public-suffix
  6400. (package
  6401. (name "ruby-public-suffix")
  6402. (version "3.0.3")
  6403. (source (origin
  6404. (method url-fetch)
  6405. (uri (rubygems-uri "public_suffix" version))
  6406. (sha256
  6407. (base32
  6408. "08q64b5br692dd3v0a9wq9q5dvycc6kmiqmjbdxkxbfizggsvx6l"))))
  6409. (build-system ruby-build-system)
  6410. (arguments
  6411. '(#:phases
  6412. (modify-phases %standard-phases
  6413. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  6414. ;; including it as an input can lead to circular dependencies.
  6415. (add-after 'unpack 'remove-rubocop-from-Rakefile
  6416. (lambda _
  6417. (substitute* "Rakefile"
  6418. (("require \"rubocop/rake\\_task\"") "")
  6419. (("RuboCop::RakeTask\\.new") ""))
  6420. #t)))))
  6421. (native-inputs
  6422. `(("bundler" ,bundler)
  6423. ("ruby-yard" ,ruby-yard)
  6424. ("ruby-mocha" ,ruby-mocha)
  6425. ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
  6426. (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
  6427. (synopsis "Domain name parser")
  6428. (description "The gem @code{public_suffix} is a domain name parser,
  6429. written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
  6430. is one under which Internet users can (or historically could) directly
  6431. register names. Some examples of public suffixes are @code{.com},
  6432. @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
  6433. all known public suffixes.")
  6434. (license license:expat)))
  6435. (define-public ruby-addressable
  6436. (package
  6437. (name "ruby-addressable")
  6438. (version "2.6.0")
  6439. (source (origin
  6440. (method url-fetch)
  6441. (uri (rubygems-uri "addressable" version))
  6442. (sha256
  6443. (base32
  6444. "0bcm2hchn897xjhqj9zzsxf3n9xhddymj4lsclz508f4vw3av46l"))))
  6445. (build-system ruby-build-system)
  6446. (arguments
  6447. '(#:test-target "spec"
  6448. #:phases
  6449. (modify-phases %standard-phases
  6450. (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
  6451. (lambda _
  6452. (substitute* "Gemfile"
  6453. (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
  6454. ((".*launchy.*") "")
  6455. ((".*rake.*") "gem 'rake'\n")
  6456. ((".*redcarpet.*") ""))
  6457. #t))
  6458. (add-before 'check 'delete-network-dependent-test
  6459. (lambda _
  6460. (delete-file "spec/addressable/net_http_compat_spec.rb")
  6461. #t)))))
  6462. (native-inputs
  6463. `(("ruby-rspec" ,ruby-rspec)
  6464. ("bundler" ,bundler)
  6465. ("ruby-idn-ruby" ,ruby-idn-ruby)
  6466. ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
  6467. ("ruby-rspec-its", ruby-rspec-its)
  6468. ("ruby-yard" ,ruby-yard)
  6469. ("ruby-simplecov" ,ruby-simplecov)))
  6470. (propagated-inputs
  6471. `(("ruby-public-suffix" ,ruby-public-suffix)))
  6472. (home-page "https://github.com/sporkmonger/addressable")
  6473. (synopsis "Alternative URI implementation")
  6474. (description "Addressable is a replacement for the URI implementation that
  6475. is part of Ruby's standard library. It more closely conforms to RFC 3986,
  6476. RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
  6477. (license license:asl2.0)))
  6478. (define-public ruby-colorator
  6479. (package
  6480. (name "ruby-colorator")
  6481. (version "1.1.0")
  6482. (source (origin
  6483. (method url-fetch)
  6484. (uri (rubygems-uri "colorator" version))
  6485. (sha256
  6486. (base32
  6487. "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
  6488. (build-system ruby-build-system)
  6489. (arguments
  6490. ;; No test target
  6491. `(#:tests? #f))
  6492. (home-page "http://octopress.org/colorator/")
  6493. (synopsis "Terminal color library")
  6494. (description "Colorator is a Ruby gem that helps you colorize your text
  6495. for the terminal.")
  6496. (license license:expat)))
  6497. (define-public ruby-command-line-reporter
  6498. (package
  6499. (name "ruby-command-line-reporter")
  6500. (version "4.0.0")
  6501. (source (origin
  6502. (method url-fetch)
  6503. (uri (rubygems-uri "command_line_reporter" version))
  6504. (sha256
  6505. (base32
  6506. "1qma35xrb772whxwy1rs9bicb9d6lvz0s2dd2dnn4fr6zcbcxc0a"))))
  6507. (build-system ruby-build-system)
  6508. (arguments
  6509. ;; No Rakefile
  6510. `(#:tests? #f
  6511. #:phases
  6512. (modify-phases %standard-phases
  6513. (add-before 'build 'fix-dependencies
  6514. (lambda _
  6515. (substitute* ".gemspec"
  6516. ;; colored is unmaintained
  6517. (("colored") "colorator")
  6518. ;; colorator version
  6519. (("= 1.2") "= 1.1"))
  6520. #t)))))
  6521. (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
  6522. (home-page "https://github.com/wbailey/command_line_reporter")
  6523. (synopsis "Report production while executing Ruby scripts")
  6524. (description "This gem provides a DSL that makes it easy to write reports
  6525. of various types in ruby. It eliminates the need to litter your source with
  6526. puts statements, instead providing a more readable, expressive interface to
  6527. your application.")
  6528. (license license:asl2.0)))
  6529. (define-public ruby-command-line-reporter-3
  6530. (package
  6531. (inherit ruby-command-line-reporter)
  6532. (version "3.3.6")
  6533. (source (origin
  6534. (method url-fetch)
  6535. (uri (rubygems-uri "command_line_reporter" version))
  6536. (sha256
  6537. (base32
  6538. "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
  6539. (define-public ruby-rdoc
  6540. (package
  6541. (name "ruby-rdoc")
  6542. (version "6.0.4")
  6543. (source
  6544. (origin
  6545. (method url-fetch)
  6546. (uri (rubygems-uri "rdoc" version))
  6547. (sha256
  6548. (base32
  6549. "0anv42cqcdc6g4n386mrva7mgav5i0c2ry3yzvzzc6z6hymkmcr7"))))
  6550. (build-system ruby-build-system)
  6551. (native-inputs
  6552. `(("bundler" ,bundler)))
  6553. (home-page "https://ruby.github.io/rdoc/")
  6554. (synopsis "HTML and command-line documentation utility")
  6555. (description "RDoc produces HTML and command-line documentation for Ruby
  6556. projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
  6557. documentation from the command-line.")
  6558. (license license:gpl2+)))
  6559. (define-public ruby-sass-listen
  6560. (package
  6561. (name "ruby-sass-listen")
  6562. (version "4.0.0")
  6563. (source (origin
  6564. (method url-fetch)
  6565. (uri (rubygems-uri "sass-listen" version))
  6566. (sha256
  6567. (base32
  6568. "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
  6569. (build-system ruby-build-system)
  6570. (arguments
  6571. ;; No test target
  6572. `(#:tests? #f))
  6573. (propagated-inputs
  6574. `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
  6575. ("ruby-rb-inotify" ,ruby-rb-inotify)))
  6576. (home-page "https://github.com/sass/listen")
  6577. (synopsis "File modification notification library")
  6578. (description "The Listen gem listens to file modifications and notifies you
  6579. about the changes.")
  6580. (license license:expat)))
  6581. (define-public ruby-terminfo
  6582. (package
  6583. (name "ruby-terminfo")
  6584. (version "0.1.1")
  6585. (source
  6586. (origin
  6587. (method url-fetch)
  6588. (uri (rubygems-uri "ruby-terminfo" version))
  6589. (sha256
  6590. (base32
  6591. "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
  6592. (build-system ruby-build-system)
  6593. (arguments
  6594. `(#:test-target "test"
  6595. ;; Rakefile requires old packages and would need modification to
  6596. ;; work with current software.
  6597. #:tests? #f))
  6598. (inputs
  6599. `(("ncurses" ,ncurses)))
  6600. (native-inputs
  6601. `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
  6602. ("ruby-rdoc" ,ruby-rdoc)))
  6603. (home-page "http://www.a-k-r.org/ruby-terminfo/")
  6604. (synopsis "Terminfo binding for Ruby")
  6605. (description "Ruby-terminfo provides terminfo binding for Ruby.")
  6606. (license license:bsd-3)))
  6607. (define-public ruby-diffy
  6608. (package
  6609. (name "ruby-diffy")
  6610. (version "3.2.1")
  6611. (source
  6612. (origin
  6613. (method url-fetch)
  6614. (uri (rubygems-uri "diffy" version))
  6615. (sha256
  6616. (base32
  6617. "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
  6618. (build-system ruby-build-system)
  6619. (arguments
  6620. ;; No tests
  6621. `(#:tests? #f))
  6622. (native-inputs
  6623. `(("ruby-rspec" ,ruby-rspec)))
  6624. (home-page "https://github.com/samg/diffy")
  6625. (synopsis "Convenient diffing in ruby")
  6626. (description "Diffy provides a convenient way to generate a diff from two
  6627. strings or files.")
  6628. (license license:expat)))
  6629. (define-public ruby-sass-spec
  6630. (package
  6631. (name "ruby-sass-spec")
  6632. (version "3.5.4")
  6633. (source (origin
  6634. (method url-fetch)
  6635. (uri (string-append "https://github.com/sass/sass-spec/archive/v"
  6636. version ".tar.gz"))
  6637. (file-name (string-append name "-" version ".tar.gz"))
  6638. (sha256
  6639. (base32
  6640. "0nx8lp7c9qa58w489crgqa3c489xsyarn1a8h4np9mwwfqm1h3rr"))))
  6641. (build-system ruby-build-system)
  6642. (propagated-inputs
  6643. `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
  6644. ("ruby-diffy" ,ruby-diffy)
  6645. ("ruby-terminfo" ,ruby-terminfo)))
  6646. (arguments
  6647. `(;; This package contains tests for a sass implementation, and the to
  6648. ;; avoid any circular dependencies, the tests are not run here
  6649. #:tests? #f
  6650. #:phases
  6651. (modify-phases %standard-phases
  6652. (add-after 'unpack 'patch-test
  6653. (lambda _
  6654. (delete-file "spec/values/colors/alpha_hex-3.5/error")
  6655. (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
  6656. (("string") "color")))))))
  6657. (home-page "https://github.com/sass/sass-spec")
  6658. (synopsis "Test suite for Sass")
  6659. (description "Sass Spec is a test suite for Sass. Test cases are all in
  6660. the @file{spec} directory.")
  6661. (license license:expat)))
  6662. (define-public ruby-sass
  6663. (package
  6664. (name "ruby-sass")
  6665. (version "3.6.0")
  6666. (source (origin
  6667. (method url-fetch)
  6668. (uri (rubygems-uri "sass" version))
  6669. (sha256
  6670. (base32
  6671. "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
  6672. (build-system ruby-build-system)
  6673. (propagated-inputs
  6674. `(("ruby-sass-listen" ,ruby-sass-listen)))
  6675. (native-inputs
  6676. `(("ruby-sass-spec" ,ruby-sass-spec)
  6677. ("ruby-mathn" ,ruby-mathn)))
  6678. (home-page "http://sass-lang.com/")
  6679. (synopsis "CSS extension language")
  6680. (description "Sass is a CSS extension language. It extends CSS with
  6681. features that don't exist yet like variables, nesting, mixins and inheritance.")
  6682. (license license:expat)))
  6683. (define-public ruby-jekyll-sass-converter
  6684. (package
  6685. (name "ruby-jekyll-sass-converter")
  6686. (version "1.5.2")
  6687. (source (origin
  6688. (method url-fetch)
  6689. (uri (rubygems-uri "jekyll-sass-converter" version))
  6690. (sha256
  6691. (base32
  6692. "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
  6693. (build-system ruby-build-system)
  6694. (propagated-inputs
  6695. `(("ruby-sass" ,ruby-sass)))
  6696. (arguments
  6697. ;; No rakefile
  6698. `(#:tests? #f))
  6699. (home-page "https://github.com/jekyll/jekyll-sass-converter")
  6700. (synopsis "Sass converter for Jekyll")
  6701. (description "This gem provide built-in support for the Sass converter
  6702. in Jekyll.")
  6703. (license license:expat)))
  6704. (define-public ruby-jekyll-watch
  6705. (package
  6706. (name "ruby-jekyll-watch")
  6707. (version "2.0.0")
  6708. (source (origin
  6709. (method url-fetch)
  6710. (uri (rubygems-uri "jekyll-watch" version))
  6711. (sha256
  6712. (base32
  6713. "0m7scvj3ki8bmyx5v8pzibpg6my10nycnc28lip98dskf8iakprp"))))
  6714. (build-system ruby-build-system)
  6715. (propagated-inputs
  6716. `(("ruby-listen-3.0" ,ruby-listen-3.0)))
  6717. (arguments
  6718. ;; No rakefile
  6719. `(#:tests? #f))
  6720. (home-page "https://github.com/jekyll/jekyll-watch")
  6721. (synopsis "Jekyll auto-rebuild support")
  6722. (description "This gems add the @code{--watch} switch to the jekyll CLI
  6723. interface. It allows Jekyll to rebuild your site when a file changes.")
  6724. (license license:expat)))
  6725. (define-public ruby-parallel
  6726. (package
  6727. (name "ruby-parallel")
  6728. (version "1.13.0")
  6729. (source
  6730. (origin
  6731. (method git-fetch)
  6732. (uri (git-reference
  6733. (url "https://github.com/grosser/parallel.git")
  6734. (commit (string-append "v" version))))
  6735. (file-name (git-file-name name version))
  6736. (sha256
  6737. (base32
  6738. "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
  6739. (build-system ruby-build-system)
  6740. (arguments
  6741. `(;; TODO 3 test failures
  6742. ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
  6743. ;; open unnecessary pipes
  6744. ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
  6745. ;; SQLite in processes
  6746. ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
  6747. ;; SQLite in threads
  6748. #:tests? #f
  6749. #:test-target "rspec-rerun:spec"
  6750. #:phases
  6751. (modify-phases %standard-phases
  6752. (add-after 'unpack 'patch-Gemfile
  6753. (lambda _
  6754. (substitute* "Gemfile"
  6755. (("gem 'rspec-legacy_formatters'") "")
  6756. (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
  6757. (add-before 'check 'delete-Gemfile.lock
  6758. (lambda _
  6759. ;; Bundler isn't being used for fetching dependendencies, so
  6760. ;; delete the Gemfile.lock
  6761. (delete-file "Gemfile.lock")
  6762. #t))
  6763. (add-before 'build 'patch-gemspec
  6764. (lambda _
  6765. (substitute* "parallel.gemspec"
  6766. (("git ls-files") "find"))
  6767. #t)))))
  6768. (native-inputs
  6769. `(("ruby-rspec" ,ruby-rspec)
  6770. ("ruby-rspec-rerun" ,ruby-rspec-rerun)
  6771. ("bundler" ,bundler)
  6772. ("ruby-activerecord" ,ruby-activerecord)
  6773. ("ruby-progressbar" ,ruby-progressbar)
  6774. ("ruby-bump" ,ruby-bump)
  6775. ("procps" ,procps)
  6776. ("lsof" ,lsof)
  6777. ("ruby-mysql2" ,ruby-mysql2)
  6778. ("ruby-sqlite3" ,ruby-sqlite3)
  6779. ("ruby-i18n" ,ruby-i18n)))
  6780. (home-page "https://github.com/grosser/parallel")
  6781. (synopsis "Parallel processing in Ruby")
  6782. (description "Parallel allows you to run any code in parallel Processes
  6783. (to use all CPUs) or Threads(to speedup blocking operations). It is best
  6784. suited for map-reduce or e.g. parallel downloads/uploads.")
  6785. (license license:expat)))
  6786. (define-public ruby-cane
  6787. (package
  6788. (name "ruby-cane")
  6789. (version "3.0.0")
  6790. (source (origin
  6791. (method url-fetch)
  6792. (uri (rubygems-uri "cane" version))
  6793. (sha256
  6794. (base32
  6795. "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
  6796. (build-system ruby-build-system)
  6797. (arguments `(#:tests? #f)); No rakefile
  6798. (home-page "https://github.com/square/cane")
  6799. (propagated-inputs
  6800. `(("ruby-parallel" ,ruby-parallel)))
  6801. (synopsis "Code quality threshold checking")
  6802. (description "Cane fails your build if code quality thresholds are not met.")
  6803. (license license:asl2.0)))
  6804. (define-public ruby-morecane
  6805. (package
  6806. (name "ruby-morecane")
  6807. (version "0.2.0")
  6808. (source (origin
  6809. (method url-fetch)
  6810. (uri (rubygems-uri "morecane" version))
  6811. (sha256
  6812. (base32
  6813. "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
  6814. (build-system ruby-build-system)
  6815. (home-page "https://github.com/yob/morecane")
  6816. (arguments `(#:tests? #f)); No rakefile
  6817. (propagated-inputs
  6818. `(("ruby-parallel" ,ruby-parallel)))
  6819. (synopsis "Extra checks for cane")
  6820. (description "The cane gem provides a great framework for running quality
  6821. checks over your ruby project as part of continuous integration build. It
  6822. comes with a few checks out of the box, but also provides an API for loading
  6823. custom checks. This gem provides a set of additional checks.")
  6824. (license license:expat)))
  6825. (define-public ruby-pdf-reader
  6826. (package
  6827. (name "ruby-pdf-reader")
  6828. (version "2.1.0")
  6829. (source (origin
  6830. (method url-fetch)
  6831. (uri (rubygems-uri "pdf-reader" version))
  6832. (sha256
  6833. (base32
  6834. "1b3ig4wpcgdbqa7yw0ahwbmikkkywn2a22bfmrknl5ls7g066x45"))))
  6835. (build-system ruby-build-system)
  6836. (arguments `(#:test-target "spec"))
  6837. (native-inputs
  6838. `(("bundler" ,bundler)
  6839. ("ruby-rspec" ,ruby-rspec)
  6840. ("ruby-cane" ,ruby-cane)
  6841. ("ruby-morecane" ,ruby-morecane)))
  6842. (propagated-inputs
  6843. `(("ruby-afm" ,ruby-afm)
  6844. ("ruby-ascii85" ,ruby-ascii85)
  6845. ("ruby-hashery" ,ruby-hashery)
  6846. ("ruby-rc4" ,ruby-rc4)
  6847. ("ruby-ttfunk" ,ruby-ttfunk)))
  6848. (home-page "https://github.com/yob/pdf-reader")
  6849. (synopsis "PDF parser in Ruby")
  6850. (description "The PDF::Reader library implements a PDF parser conforming as
  6851. much as possible to the PDF specification from Adobe. It provides programmatic
  6852. access to the contents of a PDF file with a high degree of flexibility.")
  6853. (license license:gpl3+)))
  6854. (define-public ruby-pdf-inspector
  6855. (package
  6856. (name "ruby-pdf-inspector")
  6857. (version "1.3.0")
  6858. (source (origin
  6859. (method url-fetch)
  6860. (uri (rubygems-uri "pdf-inspector" version))
  6861. (sha256
  6862. (base32
  6863. "1g853az4xzgqxr5xiwhb76g4sqmjg4s79mm35mp676zjsrwpa47w"))))
  6864. (build-system ruby-build-system)
  6865. (propagated-inputs
  6866. `(("ruby-pdf-reader" ,ruby-pdf-reader)))
  6867. (arguments `(#:tests? #f)); No rakefile
  6868. (home-page "https://github.com/prawnpdf/pdf-inspector")
  6869. (synopsis "Analysis classes for inspecting PDF output")
  6870. (description "This library provides a number of PDF::Reader based tools for
  6871. use in testing PDF output. Presently, the primary purpose of this tool is to
  6872. support the tests found in Prawn, a pure Ruby PDF generation library.")
  6873. (license license:gpl3+)))
  6874. (define-public ruby-pdf-core
  6875. (package
  6876. (name "ruby-pdf-core")
  6877. (version "0.8.1")
  6878. (source (origin
  6879. (method url-fetch)
  6880. (uri (rubygems-uri "pdf-core" version))
  6881. (sha256
  6882. (base32
  6883. "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
  6884. (build-system ruby-build-system)
  6885. (arguments
  6886. ; No test target
  6887. `(#:tests? #f))
  6888. (home-page "https://github.com/prawnpdf/pdf-core")
  6889. (synopsis "Low level PDF features for Prawn")
  6890. (description "This is an experimental gem that extracts low-level PDF
  6891. functionality from Prawn.")
  6892. (license license:gpl3+)))
  6893. (define-public ruby-prawn
  6894. (package
  6895. (name "ruby-prawn")
  6896. (version "2.2.2")
  6897. (source (origin
  6898. (method url-fetch)
  6899. (uri (rubygems-uri "prawn" version))
  6900. (sha256
  6901. (base32
  6902. "1qdjf1v6sfl44g3rqxlg8k4jrzkwaxgvh2l4xws97a8f3xv4na4m"))))
  6903. (build-system ruby-build-system)
  6904. (arguments
  6905. ; No tests
  6906. `(#:tests? #f
  6907. #:phases
  6908. (modify-phases %standard-phases
  6909. (add-before 'build 'fix-dependencies
  6910. (lambda _
  6911. (substitute* "prawn.gemspec"
  6912. (("~> 0.7.0") "~> 0.7"))
  6913. #t)))))
  6914. (propagated-inputs
  6915. `(("ruby-pdf-core" ,ruby-pdf-core)
  6916. ("ruby-ttfunk" ,ruby-ttfunk)))
  6917. (native-inputs
  6918. `(("bundler" ,bundler)
  6919. ("ruby-pdf-inspector" ,ruby-pdf-inspector)
  6920. ("ruby-rspec" ,ruby-rspec)
  6921. ("ruby-simplecov" ,ruby-simplecov)
  6922. ("ruby-yard" ,ruby-yard)))
  6923. (home-page "http://prawnpdf.org/api-docs/2.0/")
  6924. (synopsis "PDF generation for Ruby")
  6925. (description "Prawn is a pure Ruby PDF generation library.")
  6926. (license license:gpl3+)))
  6927. (define-public ruby-prawn-table
  6928. (package
  6929. (name "ruby-prawn-table")
  6930. (version "0.2.2")
  6931. (source (origin
  6932. (method url-fetch)
  6933. (uri (rubygems-uri "prawn-table" version))
  6934. (sha256
  6935. (base32
  6936. "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
  6937. (build-system ruby-build-system)
  6938. (propagated-inputs
  6939. `(("ruby-prawn" ,ruby-prawn)
  6940. ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
  6941. (native-inputs
  6942. `(("bundler" ,bundler)
  6943. ("ruby-yard" ,ruby-yard)
  6944. ("ruby-mocha" ,ruby-mocha)
  6945. ("ruby-coderay" ,ruby-coderay)
  6946. ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
  6947. ("ruby-simplecov" ,ruby-simplecov)
  6948. ("ruby-rspec-2" ,ruby-rspec-2)))
  6949. (arguments
  6950. '(;; TODO: 1 test fails
  6951. ;; Failure/Error: pdf.page_count.should == 1
  6952. ;; expected: 1
  6953. ;; got: 2 (using ==)
  6954. ;; # ./spec/table_spec.rb:1308
  6955. ;;
  6956. ;; 225 examples, 1 failure
  6957. #:tests? #f
  6958. #:phases
  6959. (modify-phases %standard-phases
  6960. (add-before 'check 'patch-gemspec
  6961. (lambda _
  6962. (substitute* "prawn-table.gemspec"
  6963. ;; Loosen the requirement for pdf-inspector
  6964. (("~> 1\\.1\\.0") ">= 0")
  6965. ;; Loosen the requirement for pdf-reader
  6966. (("~> 1\\.2") ">= 0"))))
  6967. (replace 'check
  6968. (lambda* (#:key tests? #:allow-other-keys)
  6969. (when tests?
  6970. (invoke "rspec"))
  6971. #t)))))
  6972. (home-page "https://github.com/prawnpdf/prawn-table")
  6973. (synopsis "Tables support for Prawn")
  6974. (description "This gem provides tables support for Prawn.")
  6975. (license license:gpl3+)))
  6976. (define-public ruby-kramdown
  6977. (package
  6978. (name "ruby-kramdown")
  6979. (version "1.17.0")
  6980. (source (origin
  6981. (method url-fetch)
  6982. (uri (rubygems-uri "kramdown" version))
  6983. (sha256
  6984. (base32
  6985. "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq"))))
  6986. (build-system ruby-build-system)
  6987. (arguments `(#:tests? #f)); FIXME: some test failures
  6988. (native-inputs
  6989. `(("ruby-prawn" ,ruby-prawn)
  6990. ("ruby-prawn-table" ,ruby-prawn-table)))
  6991. (home-page "https://kramdown.gettalong.org/")
  6992. (synopsis "Markdown parsing and converting library")
  6993. (description "Kramdown is a library for parsing and converting a superset
  6994. of Markdown. It is completely written in Ruby, supports standard Markdown
  6995. (with some minor modifications) and various extensions that have been made
  6996. popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
  6997. (license license:expat)))
  6998. (define-public ruby-http-parser.rb
  6999. (package
  7000. (name "ruby-http-parser.rb")
  7001. (version "0.6.0")
  7002. (source
  7003. (origin
  7004. (method url-fetch)
  7005. (uri (rubygems-uri "http_parser.rb" version))
  7006. (sha256
  7007. (base32
  7008. "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
  7009. (build-system ruby-build-system)
  7010. (arguments
  7011. ;; No tests
  7012. `(#:tests? #f))
  7013. (native-inputs
  7014. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  7015. ("ruby-rspec" ,ruby-rspec)))
  7016. (home-page "https://github.com/tmm1/http_parser.rb")
  7017. (synopsis "HTTP parser un Ruby")
  7018. (description "This gem is a simple callback-based HTTP request/response
  7019. parser for writing http servers, clients and proxies.")
  7020. (license license:expat)))
  7021. (define-public ruby-em-websocket
  7022. (package
  7023. (name "ruby-em-websocket")
  7024. (version "0.5.1")
  7025. (source
  7026. (origin
  7027. (method url-fetch)
  7028. (uri (rubygems-uri "em-websocket" version))
  7029. (sha256
  7030. (base32
  7031. "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
  7032. (build-system ruby-build-system)
  7033. (arguments
  7034. ;; No tests
  7035. `(#:tests? #f))
  7036. (propagated-inputs
  7037. `(("ruby-eventmachine" ,ruby-eventmachine)
  7038. ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
  7039. (native-inputs
  7040. `(("bundler" ,bundler)
  7041. ("ruby-rspec" ,ruby-rspec)))
  7042. (home-page "https://github.com/igrigorik/em-websocket")
  7043. (synopsis "EventMachine based WebSocket server")
  7044. (description "Em-websocket is an EventMachine based WebSocket server
  7045. implementation.")
  7046. (license license:expat)))
  7047. (define-public ruby-rouge
  7048. (package
  7049. (name "ruby-rouge")
  7050. (version "3.2.1")
  7051. (source (origin
  7052. (method url-fetch)
  7053. (uri (rubygems-uri "rouge" version))
  7054. (sha256
  7055. (base32
  7056. "0h79gn2wmn1wix2d27lgiaimccyj8gvizrllyym500pir408x62f"))))
  7057. (build-system ruby-build-system)
  7058. (arguments `(#:tests? #f)); No rakefile
  7059. (home-page "http://rouge.jneen.net/")
  7060. (synopsis "Code highlighter")
  7061. (description "Rouge is a code highlighter written in Ruby. It supports more
  7062. than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
  7063. is compatible with stylesheets designed for pygments.")
  7064. (license (list
  7065. ;; rouge is licensed under expat
  7066. license:expat
  7067. ;; pygments is licensed under bsd-2
  7068. license:bsd-2))))
  7069. (define-public ruby-rouge-2
  7070. (package
  7071. (inherit ruby-rouge)
  7072. (version "2.2.1")
  7073. (source (origin
  7074. (method url-fetch)
  7075. (uri (rubygems-uri "rouge" version))
  7076. (sha256
  7077. (base32
  7078. "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
  7079. (define-public ruby-hashie
  7080. (package
  7081. (name "ruby-hashie")
  7082. (version "3.6.0")
  7083. (source (origin
  7084. (method url-fetch)
  7085. (uri (rubygems-uri "hashie" version))
  7086. (sha256
  7087. (base32
  7088. "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
  7089. (build-system ruby-build-system)
  7090. (native-inputs
  7091. `(("bundler" ,bundler)))
  7092. (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
  7093. (home-page "https://github.com/intridea/hashie")
  7094. (synopsis "Extensions to Ruby Hashes")
  7095. (description "Hashie is a collection of classes and mixins that make Ruby
  7096. hashes more powerful.")
  7097. (license license:expat)))
  7098. (define-public ruby-heredoc-unindent
  7099. (package
  7100. (name "ruby-heredoc-unindent")
  7101. (version "1.2.0")
  7102. (source (origin
  7103. (method url-fetch)
  7104. (uri (rubygems-uri "heredoc_unindent" version))
  7105. (sha256
  7106. (base32
  7107. "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
  7108. (build-system ruby-build-system)
  7109. (native-inputs
  7110. `(("ruby-hoe" ,ruby-hoe)))
  7111. (home-page "https://github.com/adrianomitre/heredoc_unindent")
  7112. (synopsis "Heredoc indentation cleaner")
  7113. (description "This gem removes common margin from indented strings, such
  7114. as the ones produced by indented heredocs. In other words, it strips out
  7115. leading whitespace chars at the beginning of each line, but only as much as
  7116. the line with the smallest margin.
  7117. It is acknowledged that many strings defined by heredocs are just code and
  7118. fact is that most parsers are insensitive to indentation. If, however, the
  7119. strings are to be used otherwise, be it for printing or testing, the extra
  7120. indentation will probably be an issue and hence this gem.")
  7121. (license license:expat)))
  7122. (define-public ruby-safe-yaml
  7123. (package
  7124. (name "ruby-safe-yaml")
  7125. (version "1.0.4")
  7126. (source
  7127. (origin
  7128. ;; TODO Fetch from the git repository so a patch can be applied
  7129. (method git-fetch)
  7130. (uri (git-reference
  7131. (url "https://github.com/dtao/safe_yaml.git")
  7132. (commit version)))
  7133. (file-name (git-file-name name version))
  7134. (sha256
  7135. (base32
  7136. "1wnln8xdy8g6kwdj4amm8773xwffqxpf2sxslk6jjh2wxsy1lrig"))
  7137. (patches
  7138. (search-patches "ruby-safe-yaml-add-require-time.patch"))))
  7139. (build-system ruby-build-system)
  7140. (native-inputs
  7141. `(("ruby-rspec" ,ruby-rspec)
  7142. ("ruby-hashie" ,ruby-hashie)
  7143. ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
  7144. (arguments
  7145. '(#:test-target "spec"
  7146. #:phases
  7147. (modify-phases %standard-phases
  7148. (add-before 'check 'set-TZ
  7149. (lambda _
  7150. ;; This test is dependent on the timezone
  7151. ;; spec/transform/to_date_spec.rb:35
  7152. ;; # SafeYAML::Transform::ToDate converts times to the local
  7153. ;; timezone
  7154. (setenv "TZ" "UTC-11")
  7155. #t)))))
  7156. (home-page "https://github.com/dtao/safe_yaml")
  7157. (synopsis "YAML parser")
  7158. (description "The SafeYAML gem provides an alternative implementation of
  7159. YAML.load suitable for accepting user input in Ruby applications.")
  7160. (license license:expat)))
  7161. (define-public ruby-mercenary
  7162. (package
  7163. (name "ruby-mercenary")
  7164. (version "0.3.6")
  7165. (source (origin
  7166. (method url-fetch)
  7167. (uri (rubygems-uri "mercenary" version))
  7168. (sha256
  7169. (base32
  7170. "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
  7171. (build-system ruby-build-system)
  7172. (arguments `(#:test-target "spec"))
  7173. (native-inputs
  7174. `(("bundler" ,bundler)))
  7175. (home-page "https://github.com/jekyll/mercenary")
  7176. (synopsis "Command-line apps library in Ruby")
  7177. (description "Mercenary is a lightweight and flexible library for writing
  7178. command-line apps in Ruby.")
  7179. (license license:expat)))
  7180. (define-public ruby-liquid
  7181. (package
  7182. (name "ruby-liquid")
  7183. (version "4.0.0")
  7184. (source (origin
  7185. (method url-fetch)
  7186. (uri (rubygems-uri "liquid" version))
  7187. (sha256
  7188. (base32
  7189. "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
  7190. (build-system ruby-build-system)
  7191. (arguments `(#:tests? #f)); No rakefile
  7192. (home-page "https://shopify.github.io/liquid/")
  7193. (synopsis "Template language")
  7194. (description "Liquid is a template language written in Ruby. It is used
  7195. to load dynamic content on storefronts.")
  7196. (license license:expat)))
  7197. (define-public ruby-forwardable-extended
  7198. (package
  7199. (name "ruby-forwardable-extended")
  7200. (version "2.6.0")
  7201. (source (origin
  7202. (method url-fetch)
  7203. (uri (rubygems-uri "forwardable-extended" version))
  7204. (sha256
  7205. (base32
  7206. "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
  7207. (build-system ruby-build-system)
  7208. (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
  7209. (home-page "https://github.com/envygeeks/forwardable-extended")
  7210. (synopsis "Delegation to hashes and instance variables in Forwardable")
  7211. (description "Forwardable Extended provides more @code{Forwardable}
  7212. methods for your source as @code{Forwardable::Extended}.")
  7213. (license license:expat)))
  7214. (define-public ruby-pathutil
  7215. (package
  7216. (name "ruby-pathutil")
  7217. (version "0.16.1")
  7218. (source (origin
  7219. (method url-fetch)
  7220. (uri (rubygems-uri "pathutil" version))
  7221. (sha256
  7222. (base32
  7223. "0wc18ms1rzi44lpjychyw2a96jcmgxqdvy2949r4vvb5f4p0lgvz"))))
  7224. (build-system ruby-build-system)
  7225. (propagated-inputs
  7226. `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
  7227. (native-inputs
  7228. `(("bundler" ,bundler)
  7229. ("ruby-rspec" ,ruby-rspec)))
  7230. ;; Fails with: cannot load such file --
  7231. ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
  7232. (arguments `(#:tests? #f))
  7233. (home-page "https://github.com/envygeeks/pathutil")
  7234. (synopsis "Extended implementation of Pathname")
  7235. (description "Pathutil tries to be a faster pure Ruby implementation of
  7236. Pathname.")
  7237. (license license:expat)))
  7238. (define-public jekyll
  7239. (package
  7240. (name "jekyll")
  7241. (version "3.8.3")
  7242. (source (origin
  7243. (method url-fetch)
  7244. (uri (rubygems-uri "jekyll" version))
  7245. (sha256
  7246. (base32
  7247. "1iw90wihk9dscgmppf5v6lysg3kjmnx50mjyl4gghkdb4spw97xk"))))
  7248. (build-system ruby-build-system)
  7249. (arguments
  7250. ;; No rakefile, but a test subdirectory
  7251. `(#:tests? #f
  7252. #:phases
  7253. (modify-phases %standard-phases
  7254. (add-before 'build 'fix-i18n
  7255. (lambda _
  7256. (substitute* ".gemspec"
  7257. (("~> 0.7") ">= 0.7"))
  7258. #t)))))
  7259. (propagated-inputs
  7260. `(("ruby-addressable" ,ruby-addressable)
  7261. ("ruby-colorator" ,ruby-colorator)
  7262. ("ruby-em-websocket" ,ruby-em-websocket)
  7263. ("ruby-i18n" ,ruby-i18n)
  7264. ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
  7265. ("ruby-jekyll-watch" ,ruby-jekyll-watch)
  7266. ("ruby-kramdown" ,ruby-kramdown)
  7267. ("ruby-liquid" ,ruby-liquid)
  7268. ("ruby-mercenary" ,ruby-mercenary)
  7269. ("ruby-pathutil" ,ruby-pathutil)
  7270. ("ruby-rouge" ,ruby-rouge-2)
  7271. ("ruby-safe-yaml" ,ruby-safe-yaml)))
  7272. (home-page "https://jekyllrb.com/")
  7273. (synopsis "Static site generator")
  7274. (description "Jekyll is a simple, blog aware, static site generator.")
  7275. (license license:expat)))
  7276. (define-public ruby-jekyll-paginate-v2
  7277. (package
  7278. (name "ruby-jekyll-paginate-v2")
  7279. (version "2.0.0")
  7280. (source (origin
  7281. (method url-fetch)
  7282. (uri (rubygems-uri "jekyll-paginate-v2" version))
  7283. (sha256
  7284. (base32
  7285. "154bfpyml6abxww9868hhyfvxasl8qhsc5zy2q30c7dxaj0igdib"))))
  7286. (build-system ruby-build-system)
  7287. (propagated-inputs
  7288. `(("jekyll" ,jekyll)))
  7289. (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
  7290. (synopsis "Pagination Generator for Jekyll 3")
  7291. (description "The Pagination Generator forms the core of the pagination
  7292. logic in Jekyll. It calculates and generates the pagination pages.")
  7293. (license license:expat)))
  7294. (define-public ruby-faraday
  7295. (package
  7296. (name "ruby-faraday")
  7297. (version "0.15.4")
  7298. (source
  7299. (origin
  7300. (method url-fetch)
  7301. (uri (rubygems-uri "faraday" version))
  7302. (sha256
  7303. (base32
  7304. "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
  7305. (build-system ruby-build-system)
  7306. (arguments
  7307. '(#:tests? #f))
  7308. (propagated-inputs
  7309. `(("ruby-multipart-post" ,ruby-multipart-post)))
  7310. (synopsis "Ruby HTTP/REST API client library")
  7311. (description
  7312. "Faraday is a HTTP/REST API client library which provides a common
  7313. interface over different adapters.")
  7314. (home-page "https://github.com/lostisland/faraday")
  7315. (license license:expat)))
  7316. (define-public ruby-nio4r
  7317. (package
  7318. (name "ruby-nio4r")
  7319. (version "2.3.1")
  7320. (source
  7321. (origin
  7322. (method url-fetch)
  7323. (uri (rubygems-uri "nio4r" version))
  7324. (sha256
  7325. (base32
  7326. "1a41ca1kpdmrypjp9xbgvckpy8g26zxphkja9vk7j5wl4n8yvlyr"))))
  7327. (build-system ruby-build-system)
  7328. (arguments
  7329. '(#:phases
  7330. (modify-phases %standard-phases
  7331. (add-after 'unpack 'remove-unnecessary-dependencies
  7332. (lambda _
  7333. (substitute* "spec/spec_helper.rb"
  7334. ;; Coveralls is for uploading test coverage information to an
  7335. ;; online service, and thus unnecessary for building the Guix
  7336. ;; package
  7337. (("require \"coveralls\"") "")
  7338. (("Coveralls\\.wear!") "")
  7339. ;; Remove rspec/retry as we are not retrying the tests
  7340. (("require \"rspec/retry\"") "")
  7341. (("config\\.display_try_failure_messages = true") "")
  7342. (("config\\.verbose_retry = true") ""))
  7343. #t))
  7344. (add-before 'check 'compile
  7345. (lambda _
  7346. (invoke "rake" "compile")
  7347. #t))
  7348. (replace 'check
  7349. (lambda* (#:key tests? #:allow-other-keys)
  7350. (when tests?
  7351. (invoke "rspec"))
  7352. #t)))))
  7353. (native-inputs
  7354. `(("bundler" ,bundler)
  7355. ("ruby-rake-compiler" ,ruby-rake-compiler)
  7356. ("ruby-rspec" ,ruby-rspec)
  7357. ("ruby-rubocop" ,ruby-rubocop)))
  7358. (synopsis "New I/O for Ruby")
  7359. (description
  7360. "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
  7361. for scalable network clients and servers.")
  7362. (home-page "https://github.com/socketry/nio4r")
  7363. (license license:expat)))
  7364. (define-public ruby-globalid
  7365. (package
  7366. (name "ruby-globalid")
  7367. (version "0.4.2")
  7368. (source
  7369. (origin
  7370. (method url-fetch)
  7371. (uri (rubygems-uri "globalid" version))
  7372. (sha256
  7373. (base32
  7374. "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
  7375. (build-system ruby-build-system)
  7376. (arguments
  7377. '(;; No included tests
  7378. #:tests? #f))
  7379. (propagated-inputs
  7380. `(("ruby-activesupport" ,ruby-activesupport)))
  7381. (synopsis "Generate URIs idenfitying model instances in Ruby")
  7382. (description
  7383. "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
  7384. uniquely identify it.")
  7385. (home-page "https://rubyonrails.org/")
  7386. (license license:expat)))
  7387. (define-public ruby-sprockets
  7388. (package
  7389. (name "ruby-sprockets")
  7390. (version "3.7.2")
  7391. (source
  7392. (origin
  7393. (method url-fetch)
  7394. (uri (rubygems-uri "sprockets" version))
  7395. (sha256
  7396. (base32
  7397. "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
  7398. (build-system ruby-build-system)
  7399. (arguments
  7400. '(;; No included tests
  7401. #:tests? #f))
  7402. (propagated-inputs
  7403. `(("ruby-concurrent" ,ruby-concurrent)
  7404. ("ruby-rack" ,ruby-rack)))
  7405. (synopsis "Sprockets is a Rack-based asset packaging system")
  7406. (description
  7407. "Sprockets is a Rack-based asset packaging system that concatenates and
  7408. serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
  7409. (home-page "https://github.com/rails/sprockets")
  7410. (license license:expat)))