ruby.scm 445 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
  3. ;;; Copyright © 2014, 2015, 2016, 2017, 2021 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 Nikita <nikita@n0.is>
  9. ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
  10. ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  11. ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  12. ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
  13. ;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
  14. ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
  15. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  16. ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
  17. ;;; Copyright © 2019 Mikhail Kirillov <w96k.ru@gmail.com>
  18. ;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
  19. ;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
  20. ;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
  21. ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
  22. ;;; Copyright © 2019 Brett Gilio <brettg@posteo.de>
  23. ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  24. ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  25. ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  26. ;;; Copyright © 2020 Holgr Peters <holger.peters@posteo.de>
  27. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  28. ;;; Copyright © 2021 EuAndreh <eu@euandre.org>
  29. ;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
  30. ;;; Copyright © 2021 Giovanni Biscuolo <g@xelera.eu>
  31. ;;;
  32. ;;; This file is part of GNU Guix.
  33. ;;;
  34. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  35. ;;; under the terms of the GNU General Public License as published by
  36. ;;; the Free Software Foundation; either version 3 of the License, or (at
  37. ;;; your option) any later version.
  38. ;;;
  39. ;;; GNU Guix is distributed in the hope that it will be useful, but
  40. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  41. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  42. ;;; GNU General Public License for more details.
  43. ;;;
  44. ;;; You should have received a copy of the GNU General Public License
  45. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  46. (define-module (gnu packages ruby)
  47. #:use-module ((guix licenses) #:prefix license:)
  48. #:use-module (gnu packages)
  49. #:use-module (gnu packages base)
  50. #:use-module (gnu packages bison)
  51. #:use-module (gnu packages c)
  52. #:use-module (gnu packages check)
  53. #:use-module (gnu packages compression)
  54. #:use-module (gnu packages crypto)
  55. #:use-module (gnu packages curl)
  56. #:use-module (gnu packages databases)
  57. #:use-module (gnu packages dbm)
  58. #:use-module (gnu packages rails)
  59. #:use-module (gnu packages readline)
  60. #:use-module (gnu packages autotools)
  61. #:use-module (gnu packages haskell-xyz)
  62. #:use-module (gnu packages java)
  63. #:use-module (gnu packages libffi)
  64. #:use-module (gnu packages libidn)
  65. #:use-module (gnu packages linux)
  66. #:use-module (gnu packages lsof)
  67. #:use-module (gnu packages maths)
  68. #:use-module (gnu packages ncurses)
  69. #:use-module (gnu packages networking)
  70. #:use-module (gnu packages node)
  71. #:use-module (gnu packages protobuf)
  72. #:use-module (gnu packages python)
  73. #:use-module (gnu packages python-xyz)
  74. #:use-module (gnu packages ragel)
  75. #:use-module (gnu packages rsync)
  76. #:use-module (gnu packages sqlite)
  77. #:use-module (gnu packages tls)
  78. #:use-module (gnu packages version-control)
  79. #:use-module (guix packages)
  80. #:use-module (guix download)
  81. #:use-module (guix git-download)
  82. #:use-module (guix gexp)
  83. #:use-module (guix utils)
  84. #:use-module (guix build-system gnu)
  85. #:use-module (gnu packages xml)
  86. #:use-module (gnu packages web)
  87. #:use-module (guix build-system ruby)
  88. #:use-module ((srfi srfi-1) #:select (alist-delete)))
  89. (define %prawn-project-licenses
  90. ;; This set of licenses applies to most (all?) components of the Prawn
  91. ;; project (it is triple licensed).
  92. (list license:ruby
  93. license:gpl2+
  94. license:gpl3+))
  95. (define-public ruby-2.6
  96. (package
  97. (name "ruby")
  98. (version "2.6.5")
  99. (source
  100. (origin
  101. (method url-fetch)
  102. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  103. (version-major+minor version)
  104. "/ruby-" version ".tar.xz"))
  105. (sha256
  106. (base32
  107. "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
  108. (modules '((guix build utils)))
  109. (snippet `(begin
  110. ;; Remove bundled libffi
  111. (delete-file-recursively "ext/fiddle/libffi-3.2.1")
  112. #t))))
  113. (build-system gnu-build-system)
  114. (arguments
  115. `(#:test-target "test"
  116. #:configure-flags '("--enable-shared") ; dynamic linking
  117. #:phases
  118. (modify-phases %standard-phases
  119. (add-before 'configure 'replace-bin-sh-and-remove-libffi
  120. (lambda _
  121. (substitute* '("Makefile.in"
  122. "ext/pty/pty.c"
  123. "io.c"
  124. "lib/mkmf.rb"
  125. "process.c"
  126. "test/rubygems/test_gem_ext_configure_builder.rb"
  127. "test/rdoc/test_rdoc_parser.rb"
  128. "test/ruby/test_rubyoptions.rb"
  129. "test/ruby/test_process.rb"
  130. "test/ruby/test_system.rb"
  131. "tool/rbinstall.rb")
  132. (("/bin/sh") (which "sh")))
  133. #t)))))
  134. (inputs
  135. `(("readline" ,readline)
  136. ("openssl" ,openssl)
  137. ("libffi" ,libffi)
  138. ("gdbm" ,gdbm)))
  139. (propagated-inputs
  140. `(("zlib" ,zlib)))
  141. (native-search-paths
  142. (list (search-path-specification
  143. (variable "GEM_PATH")
  144. (files (list (string-append "lib/ruby/vendor_ruby"))))))
  145. (synopsis "Programming language interpreter")
  146. (description "Ruby is a dynamic object-oriented programming language with
  147. a focus on simplicity and productivity.")
  148. (home-page "https://www.ruby-lang.org")
  149. (license license:ruby)))
  150. (define-public ruby-2.7
  151. (package
  152. (inherit ruby-2.6)
  153. (version "2.7.4")
  154. (source
  155. (origin
  156. (inherit (package-source ruby-2.6))
  157. (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
  158. (version-major+minor version)
  159. "/ruby-" version ".tar.gz"))
  160. (sha256
  161. (base32
  162. "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))))
  163. (arguments
  164. `(#:test-target "test"
  165. #:configure-flags '("--enable-shared") ; dynamic linking
  166. #:phases
  167. (modify-phases %standard-phases
  168. (add-before 'configure 'replace-bin-sh-and-remove-libffi
  169. (lambda _
  170. (substitute* '("configure.ac"
  171. "template/Makefile.in"
  172. "lib/rubygems/installer.rb"
  173. "ext/pty/pty.c"
  174. "io.c"
  175. "lib/mkmf.rb"
  176. "process.c"
  177. "test/rubygems/test_gem_ext_configure_builder.rb"
  178. "test/rdoc/test_rdoc_parser.rb"
  179. "test/ruby/test_rubyoptions.rb"
  180. "test/ruby/test_process.rb"
  181. "test/ruby/test_system.rb"
  182. "tool/rbinstall.rb")
  183. (("/bin/sh") (which "sh")))
  184. #t)))))
  185. (native-inputs
  186. `(("autoconf" ,autoconf)))))
  187. (define-public ruby-3.0
  188. (package
  189. (inherit ruby-2.7)
  190. (version "3.0.2")
  191. (source
  192. (origin
  193. (method url-fetch)
  194. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  195. (version-major+minor version)
  196. "/ruby-" version ".tar.xz"))
  197. (sha256
  198. (base32
  199. "0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp"))))))
  200. (define-public ruby-2.5
  201. (package
  202. (inherit ruby-2.6)
  203. (version "2.5.9")
  204. (source
  205. (origin
  206. (method url-fetch)
  207. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  208. (version-major+minor version)
  209. "/ruby-" version ".tar.xz"))
  210. (sha256
  211. (base32
  212. "1w2qncacm7h3f3il1whghdabwnv9fvwmz9f1a9vcg32006ljyzx8"))))))
  213. (define-public ruby-2.4
  214. (package
  215. (inherit ruby-2.6)
  216. (version "2.4.10")
  217. (source
  218. (origin
  219. (method url-fetch)
  220. (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
  221. (version-major+minor version)
  222. "/ruby-" version ".tar.xz"))
  223. (sha256
  224. (base32
  225. "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
  226. (modules '((guix build utils)))
  227. (snippet `(begin
  228. ;; Remove bundled libffi
  229. (delete-file-recursively "ext/fiddle/libffi-3.2.1")
  230. #t))))))
  231. (define-public ruby ruby-2.7)
  232. (define-public mruby
  233. (package
  234. (name "mruby")
  235. (version "2.1.2")
  236. (source
  237. (origin
  238. (method git-fetch)
  239. (uri (git-reference
  240. (url "https://github.com/mruby/mruby")
  241. (commit version)))
  242. (file-name (git-file-name name version))
  243. (sha256
  244. (base32
  245. "0fhfv8pi7i8jn2vgk2n2rjnbnfa12nhj514v8i4k353n7q4pmkh3"))))
  246. (build-system gnu-build-system)
  247. (arguments
  248. `(#:test-target "test"
  249. #:phases
  250. (modify-phases %standard-phases
  251. (delete 'configure)
  252. (add-after 'unpack 'enable-verbose-tests
  253. (lambda _
  254. (substitute* "Makefile"
  255. (("ruby ./minirake" m)
  256. (string-append m " --verbose")))
  257. #t))
  258. (add-after 'unpack 'disable-broken-tests
  259. (lambda _
  260. (substitute* "mrbgems/mruby-io/test/io.rb"
  261. (("assert\\('IO.popen.+$" m)
  262. (string-append m "skip \"Hangs in the Guix build environment\"\n"))
  263. (("assert\\('IO#isatty.+$" m)
  264. (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
  265. ;; This one is really weird. The *expected* output is all wrong.
  266. (("assert\\('`cmd`.*" m)
  267. (string-append m "skip \"Disable for Guix\"\n"))
  268. (("echo foo")
  269. (string-append (which "echo") " foo")))
  270. #t))
  271. ;; There is no install target
  272. (replace 'install
  273. (lambda* (#:key outputs #:allow-other-keys)
  274. (let* ((out (assoc-ref outputs "out"))
  275. (bin (string-append out "/bin"))
  276. (lib (string-append out "/lib")))
  277. (mkdir-p bin)
  278. (copy-recursively "build/host/bin" bin)
  279. (mkdir-p lib)
  280. (copy-recursively "build/host/lib" lib))
  281. #t)))))
  282. (native-inputs
  283. `(("ruby" ,ruby)
  284. ("bison" ,bison)))
  285. (home-page "https://github.com/mruby/mruby")
  286. (synopsis "Lightweight Ruby")
  287. (description "mruby is the lightweight implementation of the Ruby
  288. language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
  289. embedded within your application.")
  290. (license license:expat)))
  291. (define-public ruby-commander
  292. (package
  293. (name "ruby-commander")
  294. (version "4.4.7")
  295. (source
  296. (origin
  297. (method url-fetch)
  298. (uri (rubygems-uri "commander" version))
  299. (sha256
  300. (base32
  301. "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
  302. (build-system ruby-build-system)
  303. (arguments
  304. `(#:test-target "spec"
  305. #:phases
  306. (modify-phases %standard-phases
  307. ;; Don't run or require rubocop, the code linting tool, as this is a
  308. ;; bit unnecessary.
  309. (add-after 'unpack 'dont-run-rubocop
  310. (lambda _
  311. (substitute* "Rakefile"
  312. ((".*rubocop.*") "")
  313. ((".*RuboCop.*") ""))
  314. #t)))))
  315. (propagated-inputs
  316. `(("ruby-highline" ,ruby-highline)))
  317. (native-inputs
  318. `(("bundler" ,bundler)
  319. ("ruby-rspec-core" ,ruby-rspec-core)
  320. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  321. ("ruby-rspec-mocks" ,ruby-rspec-mocks)
  322. ("ruby-simplecov" ,ruby-simplecov)))
  323. (home-page "https://github.com/commander-rb/commander")
  324. (synopsis "Library for building Ruby command-line executables")
  325. (description
  326. "Commander aims to be a complete solution for Ruby command-line
  327. executables. Commander bridges the gap between other terminal related
  328. libraries (OptionParser, HighLine), while providing many new features, and an
  329. elegant API.")
  330. (license license:expat)))
  331. (define-public ruby-highline
  332. (package
  333. (name "ruby-highline")
  334. (version "2.0.1")
  335. (source
  336. (origin
  337. (method url-fetch)
  338. (uri (rubygems-uri "highline" version))
  339. (sha256
  340. (base32
  341. "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
  342. (build-system ruby-build-system)
  343. (arguments
  344. `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
  345. (native-inputs
  346. `(("bundler" ,bundler)
  347. ("ruby-code-statistics" ,ruby-code-statistics)))
  348. (synopsis
  349. "HighLine helps you build command-line interfaces")
  350. (description
  351. "HighLine provides a high-level IO library that provides validation,
  352. type conversion, and more for command-line interfaces. HighLine also includes
  353. a menu system for providing multiple options to the user.")
  354. (home-page "https://github.com/JEG2/highline")
  355. (license (list license:gpl2 license:ruby))))
  356. (define-public ruby-hoe
  357. (package
  358. (name "ruby-hoe")
  359. (version "3.21.0")
  360. (source (origin
  361. (method url-fetch)
  362. (uri (rubygems-uri "hoe" version))
  363. (sha256
  364. (base32
  365. "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
  366. (build-system ruby-build-system)
  367. (arguments
  368. '(#:phases
  369. (modify-phases %standard-phases
  370. ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
  371. ;; variable is set, so unset it for the duration of the tests.
  372. ;;
  373. ;; TestHoe#test_possibly_better
  374. ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
  375. ;; Expected: 2019-11-12 00:00:00 UTC
  376. ;; Actual: 1970-01-01 00:00:00 UTC
  377. (add-before 'check 'unset-SOURCE-DATE-EPOCH
  378. (lambda _
  379. (unsetenv "SOURCE_DATE_EPOCH")
  380. #t))
  381. (add-after 'check 'set-SOURCE-DATE-EPOCH-again
  382. (lambda _
  383. (setenv "SOURCE_DATE_EPOCH" "1")
  384. #t)))))
  385. (synopsis "Ruby project management helper")
  386. (description
  387. "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
  388. maintain, and release projects and includes a dynamic plug-in system allowing
  389. for easy extensibility. Hoe ships with plug-ins for all the usual project
  390. tasks including rdoc generation, testing, packaging, deployment, and
  391. announcement.")
  392. (home-page "https://www.zenspider.com/projects/hoe.html")
  393. (license license:expat)))
  394. (define-public ruby-rake-compiler
  395. (package
  396. (name "ruby-rake-compiler")
  397. (version "1.1.1")
  398. (source (origin
  399. (method url-fetch)
  400. (uri (rubygems-uri "rake-compiler" version))
  401. (sha256
  402. (base32
  403. "11sxgw10jrd6a4irb51jjwam9wikixn5kss11pw4b80cmh32yvpf"))))
  404. (build-system ruby-build-system)
  405. (arguments
  406. '(#:tests? #f)) ; needs cucumber
  407. (synopsis "Building and packaging helper for Ruby native extensions")
  408. (description "Rake-compiler provides a framework for building and
  409. packaging native C and Java extensions in Ruby.")
  410. (home-page "https://github.com/rake-compiler/rake-compiler")
  411. (license license:expat)))
  412. (define-public ruby-rsync
  413. (package
  414. (name "ruby-rsync")
  415. (version "1.0.9")
  416. (source
  417. (origin
  418. (method url-fetch)
  419. (uri (rubygems-uri "rsync" version))
  420. (sha256
  421. (base32
  422. "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
  423. (build-system ruby-build-system)
  424. (arguments
  425. '(#:test-target "spec"
  426. #:phases
  427. (modify-phases %standard-phases
  428. (add-after 'unpack 'remove-coveralls-requirement
  429. (lambda _
  430. (substitute* "spec/spec_helper.rb"
  431. (("require 'coveralls'") "")
  432. (("Coveralls.wear!") ""))
  433. #t)))))
  434. (native-inputs
  435. `(("bundler" ,bundler)
  436. ("rsync" ,rsync)
  437. ("ruby-rspec-core" ,ruby-rspec-core)
  438. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  439. ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
  440. (home-page "https://github.com/jbussdieker/ruby-rsync")
  441. (synopsis "Ruby wrapper around rsync")
  442. (description
  443. "Ruby Rsync is a Ruby library that can synchronize files between remote
  444. hosts by wrapping the @file{rsync} binary.")
  445. (license license:expat)))
  446. (define-public ruby-i18n
  447. (package
  448. (name "ruby-i18n")
  449. (version "1.7.0")
  450. (source (origin
  451. (method url-fetch)
  452. (uri (rubygems-uri "i18n" version))
  453. (sha256
  454. (base32
  455. "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
  456. (build-system ruby-build-system)
  457. (arguments
  458. '(#:tests? #f)) ; no tests
  459. (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
  460. (synopsis "Internationalization library for Ruby")
  461. (description "Ruby i18n is an internationalization and localization
  462. solution for Ruby programs. It features translation and localization,
  463. interpolation of values to translations, pluralization, customizable
  464. transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
  465. translation data, custom key/scope separator, custom exception handlers, and
  466. an extensible architecture with a swappable backend.")
  467. (home-page "https://github.com/ruby-i18n/i18n")
  468. (license license:expat)))
  469. (define-public ruby-iruby
  470. (package
  471. (name "ruby-iruby")
  472. (version "0.3")
  473. (source
  474. (origin
  475. (method url-fetch)
  476. (uri (rubygems-uri "iruby" version))
  477. (sha256
  478. (base32
  479. "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
  480. (build-system ruby-build-system)
  481. (arguments
  482. ;; TODO: Tests currently fail.
  483. ;;
  484. ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
  485. ;;
  486. ;; 1) Failure:
  487. ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
  488. ;; In [ expected
  489. ;;
  490. ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
  491. '(#:tests? #f
  492. #:phases
  493. (modify-phases %standard-phases
  494. (add-after 'unpack 'patch-ipython
  495. (lambda* (#:key inputs #:allow-other-keys)
  496. (substitute* "lib/iruby/command.rb"
  497. (("version = `")
  498. (string-append
  499. "version = `"
  500. (assoc-ref inputs "python-ipython")
  501. "/bin/"))
  502. (("Kernel\\.exec\\('")
  503. (string-append
  504. "Kernel.exec('"
  505. (assoc-ref inputs "python-ipython")
  506. "/bin/")))
  507. #t)))))
  508. (inputs
  509. `(("python-ipython" ,python-ipython)))
  510. (propagated-inputs
  511. `(("ruby-bond" ,ruby-bond)
  512. ("ruby-data_uri" ,ruby-data_uri)
  513. ("ruby-mimemagic" ,ruby-mimemagic)
  514. ("ruby-multi-json" ,ruby-multi-json)
  515. ("ruby-cztop" ,ruby-cztop)
  516. ;; Optional inputs
  517. ("ruby-pry" ,ruby-pry)))
  518. (synopsis "Ruby kernel for Jupyter/IPython")
  519. (description
  520. "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
  521. notebook).")
  522. (home-page "https://github.com/SciRuby/iruby")
  523. (license license:expat)))
  524. ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
  525. ;; dependencies use RSpec for their test suites! To avoid these circular
  526. ;; dependencies, we disable tests for all of the RSpec-related packages.
  527. (define-public ruby-rspec-support
  528. (package
  529. (name "ruby-rspec-support")
  530. (version "3.8.0")
  531. (source (origin
  532. (method url-fetch)
  533. (uri (rubygems-uri "rspec-support" version))
  534. (sha256
  535. (base32
  536. "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
  537. (build-system ruby-build-system)
  538. (arguments
  539. '(#:tests? #f)) ; avoid dependency cycles
  540. (synopsis "RSpec support library")
  541. (description "Support utilities for RSpec gems.")
  542. (home-page "https://github.com/rspec/rspec-support")
  543. (license license:expat)))
  544. (define-public ruby-rspec-core
  545. (package
  546. (name "ruby-rspec-core")
  547. (version "3.8.0")
  548. (source (origin
  549. (method url-fetch)
  550. (uri (rubygems-uri "rspec-core" version))
  551. (sha256
  552. (base32
  553. "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
  554. (build-system ruby-build-system)
  555. (arguments
  556. '(#:tests? #f)) ; avoid dependency cycles
  557. (propagated-inputs
  558. `(("ruby-rspec-support" ,ruby-rspec-support)))
  559. (synopsis "RSpec core library")
  560. (description "Rspec-core provides the RSpec test runner and example
  561. groups.")
  562. (home-page "https://github.com/rspec/rspec-core")
  563. (license license:expat)))
  564. (define-public ruby-rspec-core-2
  565. (package (inherit ruby-rspec-core)
  566. (version "2.14.8")
  567. (source (origin
  568. (method url-fetch)
  569. (uri (rubygems-uri "rspec-core" version))
  570. (sha256
  571. (base32
  572. "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
  573. (propagated-inputs `())))
  574. (define-public ruby-diff-lcs
  575. (package
  576. (name "ruby-diff-lcs")
  577. (version "1.3")
  578. (source (origin
  579. (method url-fetch)
  580. (uri (rubygems-uri "diff-lcs" version))
  581. (sha256
  582. (base32
  583. "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
  584. (build-system ruby-build-system)
  585. (arguments
  586. '(#:tests? #f)) ; avoid dependency cycles
  587. (synopsis "Compute the difference between two Enumerable sequences")
  588. (description "Diff::LCS computes the difference between two Enumerable
  589. sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
  590. It includes utilities to create a simple HTML diff output format and a
  591. standard diff-like tool.")
  592. (home-page "https://github.com/halostatue/diff-lcs")
  593. (license license:expat)))
  594. (define-public ruby-rspec-expectations
  595. (package
  596. (name "ruby-rspec-expectations")
  597. (version "3.8.2")
  598. (source (origin
  599. (method url-fetch)
  600. (uri (rubygems-uri "rspec-expectations" version))
  601. (sha256
  602. (base32
  603. "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
  604. (build-system ruby-build-system)
  605. (arguments
  606. '(#:tests? #f)) ; avoid dependency cycles
  607. (propagated-inputs
  608. `(("ruby-rspec-support" ,ruby-rspec-support)
  609. ("ruby-diff-lcs" ,ruby-diff-lcs)))
  610. (synopsis "RSpec expectations library")
  611. (description "Rspec-expectations provides a simple API to express expected
  612. outcomes of a code example.")
  613. (home-page "https://github.com/rspec/rspec-expectations")
  614. (license license:expat)))
  615. (define-public ruby-rspec-expectations-2
  616. (package (inherit ruby-rspec-expectations)
  617. (version "2.14.5")
  618. (source (origin
  619. (method url-fetch)
  620. (uri (rubygems-uri "rspec-expectations" version))
  621. (sha256
  622. (base32
  623. "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
  624. (propagated-inputs
  625. `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
  626. (define-public ruby-sorcerer
  627. (package
  628. (name "ruby-sorcerer")
  629. (version "2.0.1")
  630. (source
  631. (origin
  632. (method url-fetch)
  633. (uri (rubygems-uri "sorcerer" version))
  634. (sha256
  635. (base32
  636. "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
  637. (build-system ruby-build-system)
  638. (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
  639. (description "Sorcerer generates Ruby code from a Ripper-like abstract
  640. syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
  641. snippets of Ruby code, expressible in a single line. Longer examples may be
  642. re-sourced, but they will be rendered in a single-line format.")
  643. (home-page "https://github.com/rspec-given/sorcerer")
  644. (license license:expat)))
  645. (define-public ruby-given-core
  646. (package
  647. (name "ruby-given-core")
  648. (version "3.8.0")
  649. (source
  650. (origin
  651. (method url-fetch)
  652. (uri (rubygems-uri "given_core" version))
  653. (sha256
  654. (base32
  655. "1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
  656. (build-system ruby-build-system)
  657. (arguments '(#:tests? #f)) ;no test suite for the core package
  658. (propagated-inputs
  659. `(("ruby-sorcerer" ,ruby-sorcerer)))
  660. (synopsis "Core abstractions used by rspec-given and minitest-given")
  661. (description "Given_core is the basic functionality behind rspec-given and
  662. minitest-given, extensions that allow the use of Given/When/Then terminology
  663. when defining specifications.")
  664. (home-page "https://github.com/rspec-given/rspec-given")
  665. (license license:expat)))
  666. (define-public ruby-rspec-given
  667. (package
  668. (name "ruby-rspec-given")
  669. (version "3.8.0")
  670. (source
  671. (origin
  672. (method url-fetch)
  673. (uri (rubygems-uri "rspec-given" version))
  674. (sha256
  675. (base32
  676. "1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
  677. (build-system ruby-build-system)
  678. (arguments
  679. `(#:test-target "rs"
  680. #:phases
  681. (modify-phases %standard-phases
  682. (add-after 'unpack 'fix-rakefile
  683. (lambda _
  684. (substitute* '("Rakefile" "rakelib/gemspec.rake")
  685. (("require '\\./lib/given/.*") "")
  686. (("Given::VERSION") (format #f "~s" ,version))
  687. ;; Fix the error: "cannot load such file -- example_helper"
  688. (("sh \"rspec")
  689. "sh \"rspec -Ilib:examples"))
  690. #t))
  691. (add-after 'extract-gemspec 'delete-failing-tests
  692. ;; See: https://github.com/jimweirich/rspec-given/issues/57.
  693. (lambda _
  694. (substitute* ".gemspec"
  695. (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
  696. "")
  697. (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
  698. ""))
  699. (delete-file "spec/lib/given/natural_assertion_spec.rb")
  700. (delete-file "examples/integration/failing_messages_spec.rb")
  701. #t)))))
  702. (native-inputs
  703. `(("ruby-rspec" ,ruby-rspec)
  704. ("ruby-minitest" ,ruby-minitest)))
  705. (propagated-inputs
  706. `(("ruby-given-core" ,ruby-given-core)
  707. ("ruby-rspec" ,ruby-rspec)))
  708. (synopsis "Given/When/Then for RSpec and Minitest")
  709. (description "Given is an RSpec extension that allows the use of
  710. Given/When/Then terminology when defining specifications, in a way similar to
  711. the Cucumber Gherkin language.")
  712. (home-page "https://github.com/rspec-given/rspec-given")
  713. (license license:expat)))
  714. (define-public ruby-rspec-its
  715. (package
  716. (name "ruby-rspec-its")
  717. (version "1.3.0")
  718. (source
  719. (origin
  720. (method git-fetch)
  721. (uri (git-reference
  722. (url "https://github.com/rspec/rspec-its")
  723. (commit (string-append "v" version))))
  724. (file-name (git-file-name name version))
  725. (sha256
  726. (base32
  727. "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
  728. (build-system ruby-build-system)
  729. (arguments
  730. `(#:test-target "spec"
  731. #:phases
  732. (modify-phases %standard-phases
  733. (add-after 'unpack 'dont-install-gems-from-gemfile
  734. (lambda _
  735. (substitute* "Gemfile"
  736. (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
  737. ""))
  738. #t))
  739. (add-before 'build 'loosen-ffi-requirement
  740. (lambda _
  741. ;; Accept any version of ruby-ffi.
  742. (substitute* "Gemfile"
  743. ((" gem 'ffi', '~> 1\\.9\\.25'")
  744. " gem 'ffi'"))
  745. #t))
  746. (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
  747. (lambda _
  748. (substitute* "rspec-its.gemspec"
  749. (("rake.*") "rake'\n")
  750. (("spec.add_development_dependency 'cucumber'.*")
  751. "spec.add_development_dependency 'cucumber'\n")
  752. (("bundler.*") "bundler'\n")
  753. (("\"aruba.*") "'aruba'\n"))
  754. #t)))))
  755. (propagated-inputs
  756. `(("ruby-rspec-core" ,ruby-rspec-core)
  757. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  758. (native-inputs
  759. `(("bundler" ,bundler)
  760. ("ruby-cucumber" ,ruby-cucumber)
  761. ("ruby-ffi" ,ruby-ffi)
  762. ("ruby-aruba" ,ruby-aruba)))
  763. (synopsis "RSpec extension that provides the @code{its} method")
  764. (description
  765. "RSpec::Its provides the its method as a short-hand to specify the expected
  766. value of an attribute. For example, one can use @code{its(:size)\\{should
  767. eq(1)\\}}.")
  768. (home-page "https://github.com/rspec/rspec-its")
  769. (license license:expat)))
  770. ;;; This variant is used to break a cycle with ruby-protobuf.
  771. (define-public ruby-rspec-its-minimal
  772. (hidden-package
  773. (package
  774. (inherit ruby-rspec-its)
  775. (arguments
  776. (substitute-keyword-arguments (package-arguments ruby-rspec-its)
  777. ((#:tests? _ #f) #f)))
  778. (native-inputs '()))))
  779. (define-public ruby-rspec-mocks
  780. (package
  781. (name "ruby-rspec-mocks")
  782. (version "3.8.0")
  783. (source (origin
  784. (method url-fetch)
  785. (uri (rubygems-uri "rspec-mocks" version))
  786. (sha256
  787. (base32
  788. "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
  789. (build-system ruby-build-system)
  790. (arguments
  791. '(#:tests? #f)) ; avoid dependency cycles
  792. (propagated-inputs
  793. `(("ruby-rspec-support" ,ruby-rspec-support)
  794. ("ruby-diff-lcs" ,ruby-diff-lcs)))
  795. (synopsis "RSpec stubbing and mocking library")
  796. (description "Rspec-mocks provides RSpec's \"test double\" framework, with
  797. support for stubbing and mocking.")
  798. (home-page "https://github.com/rspec/rspec-mocks")
  799. (license license:expat)))
  800. (define-public ruby-rspec-mocks-2
  801. (package (inherit ruby-rspec-mocks)
  802. (version "2.14.6")
  803. (source (origin
  804. (method url-fetch)
  805. (uri (rubygems-uri "rspec-mocks" version))
  806. (sha256
  807. (base32
  808. "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
  809. (propagated-inputs
  810. `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
  811. (define-public ruby-rspec-rerun
  812. (package
  813. (name "ruby-rspec-rerun")
  814. (version "1.1.0")
  815. (source
  816. (origin
  817. (method url-fetch)
  818. (uri (rubygems-uri "rspec-rerun" version))
  819. (sha256
  820. (base32
  821. "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
  822. (build-system ruby-build-system)
  823. (arguments
  824. '(;; No included tests
  825. #:tests? #f))
  826. (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
  827. (synopsis "Track failed RSpec tests to re-run them")
  828. (description
  829. "This package provides an automated way to track, and then re-run failed
  830. RSpec tests.")
  831. (home-page "https://github.com/dblock/rspec-rerun")
  832. (license license:expat)))
  833. (define-public ruby-rspec-wait
  834. (package
  835. (name "ruby-rspec-wait")
  836. (version "0.0.9")
  837. (source
  838. (origin
  839. (method url-fetch)
  840. (uri (rubygems-uri "rspec-wait" version))
  841. (sha256
  842. (base32
  843. "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
  844. (build-system ruby-build-system)
  845. (arguments
  846. '(#:phases
  847. (modify-phases %standard-phases
  848. (replace 'check
  849. (lambda _
  850. (invoke "rake" "spec"))))))
  851. (native-inputs
  852. `(("bundler" ,bundler)))
  853. (propagated-inputs
  854. `(("ruby-rspec" ,ruby-rspec)))
  855. (home-page "https://github.com/laserlemon/rspec-wait")
  856. (synopsis "Wait for conditions in RSpec")
  857. (description
  858. "RSpec::Wait strives to make it easier to test asynchronous or slow
  859. interactions.")
  860. (license license:expat)))
  861. (define-public ruby-rspec
  862. (package
  863. (name "ruby-rspec")
  864. (version "3.8.0")
  865. (source (origin
  866. (method url-fetch)
  867. (uri (rubygems-uri "rspec" version))
  868. (sha256
  869. (base32
  870. "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
  871. (build-system ruby-build-system)
  872. (arguments
  873. '(#:tests? #f)) ; avoid dependency cycles
  874. (propagated-inputs
  875. `(("ruby-rspec-core" ,ruby-rspec-core)
  876. ("ruby-rspec-mocks" ,ruby-rspec-mocks)
  877. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  878. (synopsis "Behavior-driven development framework for Ruby")
  879. (description "RSpec is a behavior-driven development (BDD) framework for
  880. Ruby. This meta-package includes the RSpec test runner, along with the
  881. expectations and mocks frameworks.")
  882. (home-page "https://rspec.info/")
  883. (license license:expat)))
  884. (define-public ruby-rspec-2
  885. (package (inherit ruby-rspec)
  886. (version "2.14.1")
  887. (source (origin
  888. (method url-fetch)
  889. (uri (rubygems-uri "rspec" version))
  890. (sha256
  891. (base32
  892. "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
  893. (propagated-inputs
  894. `(("ruby-rspec-core" ,ruby-rspec-core-2)
  895. ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
  896. ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
  897. ;; Bundler is yet another source of circular dependencies, so we must disable
  898. ;; its test suite as well.
  899. (define-public bundler
  900. (package
  901. (name "bundler")
  902. (version "2.1.4")
  903. (source (origin
  904. (method url-fetch)
  905. (uri (rubygems-uri "bundler" version))
  906. (sha256
  907. (base32
  908. "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
  909. (build-system ruby-build-system)
  910. (arguments
  911. '(#:tests? #f)) ; avoid dependency cycles
  912. (synopsis "Ruby gem bundler")
  913. (description "Bundler automatically downloads and installs a list of gems
  914. specified in a \"Gemfile\", as well as their dependencies.")
  915. (home-page "https://bundler.io/")
  916. (license license:expat)))
  917. (define-public ruby-builder
  918. (package
  919. (name "ruby-builder")
  920. (version "3.2.4")
  921. (source (origin
  922. (method url-fetch)
  923. (uri (rubygems-uri "builder" version))
  924. (sha256
  925. (base32
  926. "045wzckxpwcqzrjr353cxnyaxgf0qg22jh00dcx7z38cys5g1jlr"))))
  927. (build-system ruby-build-system)
  928. (arguments
  929. `(#:phases
  930. (modify-phases %standard-phases
  931. (add-after 'unpack 'do-not-use-rvm
  932. (lambda _
  933. (substitute* "rakelib/tags.rake"
  934. (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
  935. #t)))))
  936. (synopsis "Ruby library to create structured data")
  937. (description "Builder provides a number of builder objects that make it
  938. easy to create structured data. Currently the following builder objects are
  939. supported: XML Markup and XML Events.")
  940. (home-page "https://github.com/jimweirich/builder")
  941. (license license:expat)))
  942. (define-public ruby-bump
  943. (package
  944. (name "ruby-bump")
  945. (version "0.7.0")
  946. (source
  947. (origin
  948. (method url-fetch)
  949. (uri (rubygems-uri "bump" version))
  950. (sha256
  951. (base32
  952. "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
  953. (build-system ruby-build-system)
  954. (arguments
  955. '(;; No included tests
  956. #:tests? #f))
  957. (synopsis "Tool for working with Rubygems")
  958. (description
  959. "Bump provides commands to manage Rubygem versioning, updating to the
  960. next patch version for example.")
  961. (home-page "https://github.com/gregorym/bump")
  962. (license license:expat)))
  963. (define-public ruby-rjb
  964. (package
  965. (name "ruby-rjb")
  966. (version "1.5.5")
  967. (source (origin
  968. (method url-fetch)
  969. (uri (rubygems-uri "rjb" version))
  970. (sha256
  971. (base32
  972. "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
  973. (build-system ruby-build-system)
  974. (arguments
  975. `(#:tests? #f ; no rakefile
  976. #:phases
  977. (modify-phases %standard-phases
  978. (add-before 'build 'set-java-home
  979. (lambda* (#:key inputs #:allow-other-keys)
  980. (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
  981. #t)))))
  982. (native-inputs
  983. `(("jdk" ,icedtea "jdk")))
  984. (synopsis "Ruby-to-Java bridge using the Java Native Interface")
  985. (description "RJB is a bridge program that connects Ruby and Java via the
  986. Java Native Interface.")
  987. (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
  988. (license license:lgpl2.1+)))
  989. (define-public ruby-log4r
  990. (package
  991. (name "ruby-log4r")
  992. (version "1.1.10")
  993. (source
  994. (origin
  995. (method url-fetch)
  996. (uri (rubygems-uri "log4r" version))
  997. (sha256
  998. (base32
  999. "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
  1000. (build-system ruby-build-system)
  1001. (arguments
  1002. '(#:tests? #f)) ; no Rakefile in gem
  1003. (synopsis "Flexible logging library for Ruby")
  1004. (description "Comprehensive and flexible logging library written
  1005. in Ruby for use in Ruby programs. It features a hierarchical logging
  1006. system of any number of levels, custom level names, logger
  1007. inheritance, multiple output destinations per log event, execution
  1008. tracing, custom formatting, thread safteyness, XML and YAML
  1009. configuration, and more.")
  1010. (home-page "http://log4r.rubyforge.org/")
  1011. (license license:bsd-3)))
  1012. (define-public ruby-atoulme-antwrap
  1013. (package
  1014. (name "ruby-atoulme-antwrap")
  1015. (version "0.7.5")
  1016. (source (origin
  1017. (method url-fetch)
  1018. (uri (rubygems-uri "atoulme-Antwrap" version))
  1019. (sha256
  1020. (base32
  1021. "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
  1022. (build-system ruby-build-system)
  1023. ;; Test data required for most of the tests are not included.
  1024. (arguments `(#:tests? #f))
  1025. (native-inputs
  1026. `(("ruby-hoe" ,ruby-hoe)))
  1027. (inputs
  1028. `(("ruby-rjb" ,ruby-rjb)))
  1029. (synopsis "Ruby wrapper for the Ant build tool")
  1030. (description "Antwrap is a Ruby module that wraps the Apache Ant build
  1031. tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
  1032. script.")
  1033. (home-page "http://rubyforge.org/projects/antwrap/")
  1034. (license license:expat)))
  1035. (define-public ruby-atoulme-saikuro
  1036. (package
  1037. (name "ruby-atoulme-saikuro")
  1038. (version "1.2.1")
  1039. (source (origin
  1040. (method url-fetch)
  1041. (uri (rubygems-uri "atoulme-Saikuro" version))
  1042. (sha256
  1043. (base32
  1044. "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
  1045. (build-system ruby-build-system)
  1046. ;; FIXME: There are no unit tests. The tests are demonstrations of the
  1047. ;; "saikuro" tool.
  1048. (arguments `(#:tests? #f))
  1049. (synopsis "Cyclomatic complexity analyzer")
  1050. (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
  1051. given Ruby source code Saikuro will generate a report listing the cyclomatic
  1052. complexity of each method found. In addition, Saikuro counts the number of
  1053. lines per method and can generate a listing of the number of tokens on each
  1054. line of code.")
  1055. (home-page "http://www.github.com/atoulme/Saikuro")
  1056. ;; File headers contain the BSD-3 license and the README.rdoc says that
  1057. ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
  1058. ;; of the Expat license.
  1059. (license license:bsd-3)))
  1060. (define-public ruby-awesome-print
  1061. (package
  1062. (name "ruby-awesome-print")
  1063. (version "1.8.0")
  1064. (source
  1065. (origin
  1066. (method url-fetch)
  1067. (uri (rubygems-uri "awesome_print" version))
  1068. (sha256
  1069. (base32
  1070. "14arh1ixfsd6j5md0agyzvksm5svfkvchb90fp32nn7y3avcmc2h"))))
  1071. (build-system ruby-build-system)
  1072. (arguments
  1073. `(#:phases
  1074. (modify-phases %standard-phases
  1075. (replace 'check
  1076. (lambda _
  1077. ;; Remove failing test.
  1078. (for-each delete-file
  1079. '("spec/ext/nokogiri_spec.rb"
  1080. "spec/colors_spec.rb"
  1081. "spec/formats_spec.rb"
  1082. "spec/methods_spec.rb"
  1083. "spec/misc_spec.rb"
  1084. "spec/objects_spec.rb"))
  1085. (invoke "rspec" "-c" "spec"))))))
  1086. (native-inputs
  1087. `(("ruby-nokogiri" ,ruby-nokogiri)
  1088. ("ruby-rspec" ,ruby-rspec)
  1089. ("ruby-simplecov" ,ruby-simplecov)))
  1090. (synopsis "Pretty print Ruby objects to visualize their structure")
  1091. (description
  1092. "Ruby dubugging companion: pretty print Ruby objects to visualize their
  1093. structure. Supports custom object formatting via plugins.")
  1094. (home-page "https://github.com/awesome-print/awesome_print")
  1095. (license license:expat)))
  1096. (define-public ruby-pandoc-ruby
  1097. (package
  1098. (name "ruby-pandoc-ruby")
  1099. (version "2.1.4")
  1100. (source
  1101. (origin
  1102. (method git-fetch) ;the gem lacks many test files
  1103. (uri (git-reference
  1104. (url "https://github.com/xwmx/pandoc-ruby")
  1105. (commit version)))
  1106. (file-name (git-file-name name version))
  1107. (sha256
  1108. (base32
  1109. "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
  1110. (build-system ruby-build-system)
  1111. (arguments
  1112. `(#:tests? #f ; Disable tests since they depend on pandoc behavior
  1113. ; and there are no upstream releases.
  1114. #:phases
  1115. (modify-phases %standard-phases
  1116. (add-after 'unpack 'patch-pandoc-path
  1117. (lambda* (#:key inputs #:allow-other-keys)
  1118. (let ((pandoc (search-input-file inputs "/bin/pandoc")))
  1119. (substitute* "lib/pandoc-ruby.rb"
  1120. (("@@pandoc_path = 'pandoc'")
  1121. (format #f "@@pandoc_path = '~a'" pandoc)))
  1122. (substitute* "test/test_pandoc_ruby.rb"
  1123. (("('|\")pandoc" _ quote)
  1124. (string-append quote pandoc))
  1125. (("\\^pandoc")
  1126. ".*pandoc")))))
  1127. (add-after 'unpack 'adjust-tests
  1128. ;; The tests expect filenames with spaces. Because they don't have
  1129. ;; spaces the quotes around the output are dropped automatically.
  1130. (lambda _
  1131. (substitute* "test/test_pandoc_ruby.rb"
  1132. (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
  1133. (add-after 'extract-gemspec 'remove-Gemfile.lock
  1134. (lambda _
  1135. (delete-file "Gemfile.lock")
  1136. (substitute* "pandoc-ruby.gemspec"
  1137. (("Gemfile\\.lock") "")))))))
  1138. (native-inputs
  1139. `(("ruby-mocha" ,ruby-mocha)))
  1140. (inputs
  1141. `(("pandoc" ,pandoc)))
  1142. (synopsis "Ruby wrapper for Pandoc")
  1143. (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
  1144. command line tools for converting one markup format to another. Pandoc can
  1145. convert documents from a variety of formats including markdown,
  1146. reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
  1147. variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
  1148. ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
  1149. markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
  1150. more.")
  1151. (home-page "https://github.com/xwmx/pandoc-ruby")
  1152. (license license:expat)))
  1153. (define-public ruby-patron
  1154. (package
  1155. (name "ruby-patron")
  1156. (version "0.13.3")
  1157. (source
  1158. (origin
  1159. (method url-fetch)
  1160. (uri (rubygems-uri "patron" version))
  1161. (sha256
  1162. (base32
  1163. "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
  1164. (build-system ruby-build-system)
  1165. (inputs
  1166. `(("curl" ,curl)))
  1167. (arguments
  1168. `(#:tests? #f)) ; no included tests
  1169. (synopsis "Ruby HTTP client library based on @code{libcurl}")
  1170. (description
  1171. "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
  1172. not try to expose the full power (read complexity) of @code{libcurl} but
  1173. instead tries to provide a sane API while taking advantage of @code{libcurl}
  1174. under the hood.")
  1175. (home-page "https://github.com/toland/patron")
  1176. (license license:expat)))
  1177. (define-public ruby-slim
  1178. (package
  1179. (name "ruby-slim")
  1180. (version "4.1.0")
  1181. (source
  1182. (origin
  1183. (method url-fetch)
  1184. (uri (rubygems-uri "slim" version))
  1185. (sha256
  1186. (base32
  1187. "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
  1188. (build-system ruby-build-system)
  1189. (arguments
  1190. `(#:phases
  1191. (modify-phases %standard-phases
  1192. ;; See: https://github.com/slim-template/slim/issues/857 and
  1193. ;; https://github.com/slim-template/slim/issues/858.
  1194. (add-after 'unpack 'skip-broken-tests
  1195. (lambda _
  1196. (substitute* "test/core/test_embedded_engines.rb"
  1197. (("def test_render_with_markdown")
  1198. "def skipped_test_render_with_markdown"))
  1199. (substitute* "test/translator/test_translator.rb"
  1200. (("raise (\"Missing test for.*)" _ tail)
  1201. (string-append "print " tail)))
  1202. #t))
  1203. ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
  1204. ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
  1205. (add-after 'unpack 'prevent-bundler-interference
  1206. (lambda _
  1207. (substitute* "Rakefile"
  1208. (("require 'bundler/setup'") "nil")
  1209. (("Bundler::GemHelper\\.install_tasks") "nil"))
  1210. #t)))))
  1211. (native-inputs
  1212. `(("ruby-rack-test" ,ruby-rack-test)
  1213. ("ruby-sinatra" ,ruby-sinatra)))
  1214. (propagated-inputs
  1215. `(("ruby-temple" ,ruby-temple)
  1216. ("ruby-tilt" ,ruby-tilt)))
  1217. (synopsis "Minimalist template language for Ruby")
  1218. (description "Slim is a template language for Ruby that aims to reduce the
  1219. syntax to the minimum while remaining clear.")
  1220. (home-page "http://slim-lang.com/")
  1221. (license license:expat)))
  1222. (define-public ruby-asciidoctor
  1223. (package
  1224. (name "ruby-asciidoctor")
  1225. (version "2.0.16")
  1226. (source
  1227. (origin
  1228. (method git-fetch) ;the gem release lacks a Rakefile
  1229. (uri (git-reference
  1230. (url "https://github.com/asciidoctor/asciidoctor")
  1231. (commit (string-append "v" version))))
  1232. (file-name (git-file-name name version))
  1233. (sha256
  1234. (base32
  1235. "086i17v9rxx0sxac26xp8c5v75jqba6rqjlk57x94qjvrh8vzyw2"))))
  1236. (build-system ruby-build-system)
  1237. (arguments
  1238. `(#:test-target "test:all"
  1239. #:phases
  1240. (modify-phases %standard-phases
  1241. (add-after 'extract-gemspec 'strip-version-requirements
  1242. (lambda _
  1243. (delete-file "Gemfile")
  1244. (substitute* "asciidoctor.gemspec"
  1245. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  1246. (string-append stripped "\n")))
  1247. #t)))))
  1248. (native-inputs
  1249. `(("ruby-erubi" ,ruby-erubi)
  1250. ("ruby-erubis" ,ruby-erubis)
  1251. ("ruby-minitest" ,ruby-minitest)
  1252. ("ruby-nokogiri" ,ruby-nokogiri)
  1253. ("ruby-asciimath" ,ruby-asciimath)
  1254. ("ruby-coderay" ,ruby-coderay)
  1255. ("ruby-cucumber" ,ruby-cucumber)
  1256. ("ruby-haml" ,ruby-haml)
  1257. ("ruby-rouge" ,ruby-rouge)
  1258. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  1259. ("ruby-simplecov" ,ruby-simplecov)
  1260. ("ruby-slim" ,ruby-slim)
  1261. ("ruby-tilt" ,ruby-tilt)))
  1262. (synopsis "Converter from AsciiDoc content to other formats")
  1263. (description "Asciidoctor is a text processor and publishing toolchain for
  1264. converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
  1265. formats.")
  1266. (home-page "https://asciidoctor.org")
  1267. (license license:expat)))
  1268. (define-public ruby-prawn-icon
  1269. (package
  1270. (name "ruby-prawn-icon")
  1271. (version "2.5.0")
  1272. (source
  1273. (origin
  1274. (method url-fetch)
  1275. (uri (rubygems-uri "prawn-icon" version))
  1276. (sha256
  1277. (base32
  1278. "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
  1279. (build-system ruby-build-system)
  1280. (arguments
  1281. `(#:test-target "spec"
  1282. #:phases (modify-phases %standard-phases
  1283. (add-after 'unpack 'remove-unnecessary-dependencies
  1284. (lambda _
  1285. (substitute* '("Rakefile" "spec/spec_helper.rb")
  1286. ((".*[Bb]undler.*") "")
  1287. (("^require 'rubocop.*") "")
  1288. (("^RuboCop.*") ""))
  1289. #t)))))
  1290. (native-inputs
  1291. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1292. ("ruby-pdf-reader" ,ruby-pdf-reader)
  1293. ("ruby-rspec" ,ruby-rspec)
  1294. ("ruby-simplecov" ,ruby-simplecov)))
  1295. (propagated-inputs
  1296. `(("ruby-prawn" ,ruby-prawn)))
  1297. (synopsis "Icon fonts for use with the Prawn PDF toolkit")
  1298. (description "@code{Prawn::Icon} provides various icon fonts including
  1299. FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
  1300. toolkit.")
  1301. (home-page "https://github.com/jessedoyle/prawn-icon/")
  1302. (license %prawn-project-licenses)))
  1303. (define-public ruby-css-parser
  1304. (package
  1305. (name "ruby-css-parser")
  1306. (version "1.7.1")
  1307. (source
  1308. (origin
  1309. (method url-fetch)
  1310. (uri (rubygems-uri "css_parser" version))
  1311. (sha256
  1312. (base32
  1313. "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
  1314. (build-system ruby-build-system)
  1315. (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
  1316. (propagated-inputs
  1317. `(("ruby-addressable" ,ruby-addressable)))
  1318. (synopsis "Ruby Cascading Style Sheets (CSS) parser")
  1319. (description "This package allows loading, parsing and cascading Cascading
  1320. Style Sheets (CSS) rule sets in Ruby.")
  1321. (home-page "https://github.com/premailer/css_parser")
  1322. (license license:expat)))
  1323. (define-public ruby-prawn-svg
  1324. (package
  1325. (name "ruby-prawn-svg")
  1326. (version "0.30.0")
  1327. (source
  1328. (origin
  1329. (method url-fetch)
  1330. (uri (rubygems-uri "prawn-svg" version))
  1331. (sha256
  1332. (base32
  1333. "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
  1334. (build-system ruby-build-system)
  1335. (arguments
  1336. `(#:phases (modify-phases %standard-phases
  1337. (add-after 'unpack 'do-not-use-bundler
  1338. (lambda _
  1339. (substitute* "spec/spec_helper.rb"
  1340. ((".*[Bb]undler.*") ""))
  1341. #t))
  1342. (replace 'check
  1343. (lambda* (#:key tests? #:allow-other-keys)
  1344. (when tests?
  1345. (invoke "rspec" "-Ilib" "-rprawn-svg"))
  1346. #t)))))
  1347. (native-inputs
  1348. `(("ruby-rspec" ,ruby-rspec)))
  1349. (propagated-inputs
  1350. `(("ruby-css-parser" ,ruby-css-parser)
  1351. ("ruby-prawn" ,ruby-prawn)))
  1352. (synopsis "SVG renderer for the Prawn PDF library")
  1353. (description "This library allows rendering Scalable Vector Graphics (SVG)
  1354. graphics directly into a Portable Document Format (PDF) document using the
  1355. Prawn module.")
  1356. (home-page "https://github.com/mogest/prawn-svg")
  1357. (license license:expat)))
  1358. (define-public ruby-prawn-templates
  1359. (package
  1360. (name "ruby-prawn-templates")
  1361. (version "0.1.2")
  1362. (source
  1363. (origin
  1364. (method git-fetch)
  1365. (uri (git-reference
  1366. (url "https://github.com/prawnpdf/prawn-templates")
  1367. (commit version)))
  1368. (file-name (git-file-name name version))
  1369. (sha256
  1370. (base32
  1371. "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
  1372. (build-system ruby-build-system)
  1373. (arguments
  1374. `(#:phases (modify-phases %standard-phases
  1375. (add-after 'unpack 'do-not-use-bundler
  1376. (lambda _
  1377. (substitute* "spec/spec_helper.rb"
  1378. ((".*[Bb]undler.*") ""))
  1379. #t))
  1380. (replace 'check
  1381. (lambda* (#:key tests? #:allow-other-keys)
  1382. (when tests?
  1383. (invoke "rspec"))
  1384. #t)))))
  1385. (native-inputs
  1386. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1387. ("ruby-rspec" ,ruby-rspec)))
  1388. (propagated-inputs
  1389. `(("ruby-pdf-reader" ,ruby-pdf-reader)
  1390. ("ruby-prawn" ,ruby-prawn)))
  1391. (synopsis "Prawn extension to include or combine PDF documents")
  1392. (description "This @strong{unmaintained} package provides a Prawn
  1393. extension that allows including other Portable Document Format (PDF) documents
  1394. as background or combining several PDF documents into one. This functionality
  1395. used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
  1396. of its many longstanding issues.")
  1397. (home-page "https://github.com/prawnpdf/prawn-templates")
  1398. (license %prawn-project-licenses)))
  1399. (define-public ruby-polyglot
  1400. (package
  1401. (name "ruby-polyglot")
  1402. (version "0.3.5")
  1403. (source
  1404. (origin
  1405. (method url-fetch)
  1406. (uri (rubygems-uri "polyglot" version))
  1407. (sha256
  1408. (base32
  1409. "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
  1410. (build-system ruby-build-system)
  1411. (arguments `(#:tests? #f)) ;no test suite
  1412. (synopsis "Augment @code{require} to load non-Ruby file types")
  1413. (description "The Polyglot library allows a Ruby module to register a
  1414. loader for the file type associated with a filename extension, and it augments
  1415. @code{require} to find and load matching files.")
  1416. (home-page "https://github.com/cjheath/polyglot")
  1417. (license license:expat)))
  1418. (define-public ruby-treetop
  1419. (package
  1420. (name "ruby-treetop")
  1421. (version "1.6.10")
  1422. (source
  1423. (origin
  1424. (method git-fetch) ;no test suite in distributed gem
  1425. (uri (git-reference
  1426. (url "https://github.com/cjheath/treetop")
  1427. (commit (string-append "v" version))))
  1428. (file-name (git-file-name name version))
  1429. (sha256
  1430. (base32
  1431. "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
  1432. (build-system ruby-build-system)
  1433. (arguments
  1434. `(#:test-target "spec"))
  1435. (native-inputs
  1436. `(("ruby-activesupport" ,ruby-activesupport)
  1437. ("ruby-rr" ,ruby-rr)
  1438. ("ruby-rspec" ,ruby-rspec)))
  1439. (propagated-inputs
  1440. `(("ruby-polyglot" ,ruby-polyglot)))
  1441. (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
  1442. (description "This package provides a Ruby-based Parsing Expression
  1443. Grammar (PEG) parser generator Domain Specific Language (DSL).")
  1444. (home-page "https://github.com/cjheath/treetop")
  1445. (license license:expat)))
  1446. (define-public ruby-typhoeus
  1447. (package
  1448. (name "ruby-typhoeus")
  1449. (version "1.4.0")
  1450. (source
  1451. (origin
  1452. (method url-fetch)
  1453. (uri (rubygems-uri "typhoeus" version))
  1454. (sha256
  1455. (base32
  1456. "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
  1457. (build-system ruby-build-system)
  1458. (arguments
  1459. `(#:tests? #f)) ; no included tests
  1460. (propagated-inputs
  1461. `(("ruby-ethon" ,ruby-ethon)))
  1462. (synopsis "@code{libcurl} wrapper in Ruby")
  1463. (description
  1464. "Like a modern code version of the mythical beast with 100 serpent heads,
  1465. Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
  1466. logic.")
  1467. (home-page "https://github.com/typhoeus/typhoeus")
  1468. (license license:expat)))
  1469. (define-public ruby-rubocop-rspec
  1470. (package
  1471. (name "ruby-rubocop-rspec")
  1472. (version "2.2.0")
  1473. (source
  1474. (origin
  1475. (method git-fetch)
  1476. (uri (git-reference
  1477. (url "https://github.com/rubocop-hq/rubocop-rspec")
  1478. (commit (string-append "v" version))))
  1479. (file-name (git-file-name name version))
  1480. (sha256
  1481. (base32
  1482. "0gdpjpympb6qc77bang759z7z6lckf14ghkx8v6614agxg8l3g5y"))))
  1483. (build-system ruby-build-system)
  1484. (arguments
  1485. '(#:test-target "internal_investigation"
  1486. #:phases
  1487. (modify-phases %standard-phases
  1488. (add-before 'check 'set-HOME
  1489. (lambda _
  1490. (setenv "HOME" "/tmp")
  1491. #t)))))
  1492. (propagated-inputs
  1493. `(("ruby-rubocop" ,ruby-rubocop)
  1494. ("ruby-rubocop-ast" ,ruby-rubocop-ast)))
  1495. (native-inputs
  1496. `(("ruby-rack" ,ruby-rack)
  1497. ("ruby-rspec" ,ruby-rspec)
  1498. ("ruby-rubocop-performance" ,ruby-rubocop-performance)
  1499. ("ruby-simplecov" ,ruby-simplecov)
  1500. ("ruby-yard" ,ruby-yard)))
  1501. (synopsis "Code style checking for RSpec files")
  1502. (description "This package provides a plugin for the RuboCop code style
  1503. enforcing & linting tool.")
  1504. (home-page "https://github.com/rubocop-hq/rubocop-rspec")
  1505. (license license:expat)))
  1506. (define-public ruby-rubocop-rspec-minimal
  1507. (hidden-package
  1508. (package
  1509. (inherit ruby-rubocop-rspec)
  1510. (arguments
  1511. (substitute-keyword-arguments (package-arguments ruby-rubocop-rspec)
  1512. ((#:tests? _ #f) #f)))
  1513. (propagated-inputs '())
  1514. (native-inputs '()))))
  1515. (define-public ruby-rubocop-performance
  1516. (package
  1517. (name "ruby-rubocop-performance")
  1518. (version "1.9.2")
  1519. (source
  1520. (origin
  1521. (method git-fetch)
  1522. (uri (git-reference
  1523. (url "https://github.com/rubocop-hq/rubocop-performance")
  1524. (commit (string-append "v" version))))
  1525. (file-name (git-file-name name version))
  1526. (sha256
  1527. (base32
  1528. "04lmkmz6c0ccs5miikrww7lakp7y6xz00g7b47ay7rn7sx5j6qyf"))))
  1529. (build-system ruby-build-system)
  1530. (arguments
  1531. `(#:tests? #f ; tests require a git checkout of rubocop's source code.
  1532. #:phases
  1533. (modify-phases %standard-phases
  1534. (replace 'replace-git-ls-files
  1535. (lambda _
  1536. (substitute* "rubocop-performance.gemspec"
  1537. (("`git ls-files -z config lib LICENSE.txt README.md`")
  1538. "`find config lib LICENSE.txt README.md -type f -print0 |sort -z`"))
  1539. #t))
  1540. (add-before 'check 'set-HOME
  1541. (lambda _
  1542. (setenv "HOME" "/tmp")
  1543. #t)))))
  1544. (propagated-inputs
  1545. `(("ruby-rubocop" ,ruby-rubocop)
  1546. ("ruby-rubocop-ast" ,ruby-rubocop-ast)))
  1547. (native-inputs
  1548. `(("ruby-bump" ,ruby-bump)
  1549. ("ruby-yard" ,ruby-yard)))
  1550. (synopsis "Performance optimizations checkers for Ruby code")
  1551. (description "This package provides a collection of RuboCop cops to check
  1552. for performance optimizations in Ruby code.")
  1553. (home-page "https://docs.rubocop.org/rubocop-performance/")
  1554. (license license:expat)))
  1555. (define-public ruby-rubocop-performance-minimal
  1556. (hidden-package
  1557. (package
  1558. (inherit ruby-rubocop-performance)
  1559. (arguments
  1560. (substitute-keyword-arguments (package-arguments ruby-rubocop-performance)
  1561. ((#:tests? _ #f) #f)))
  1562. (propagated-inputs '())
  1563. (native-inputs '()))))
  1564. (define-public ruby-gimme
  1565. (let ((revision "1")
  1566. (commit "4e71f0236f1271871916dd403261d26533db34c0"))
  1567. (package
  1568. (name "ruby-gimme")
  1569. (version (git-version "0.5.0" revision commit))
  1570. (source
  1571. (origin
  1572. (method git-fetch)
  1573. (uri (git-reference
  1574. (url "https://github.com/searls/gimme")
  1575. (commit commit)))
  1576. (file-name (git-file-name name version))
  1577. (sha256
  1578. (base32
  1579. "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
  1580. (build-system ruby-build-system)
  1581. (native-inputs
  1582. `(("ruby-coveralls" ,ruby-coveralls)
  1583. ("ruby-cucumber" ,ruby-cucumber)
  1584. ("ruby-pry" ,ruby-pry)
  1585. ("ruby-simplecov" ,ruby-simplecov)
  1586. ("ruby-rspec-given" ,ruby-rspec-given)))
  1587. (arguments
  1588. `(;; The cucumber task fails with error: "index 3 out of matches
  1589. ;; (IndexError)", apparently due to our newer Cucumber version.
  1590. ;; TODO: Try the "default" task with a future release.
  1591. #:test-target "spec"
  1592. #:phases
  1593. (modify-phases %standard-phases
  1594. (add-after 'extract-gemspec 'prepare-for-tests
  1595. (lambda _
  1596. ;; Delete failing tests (possibly due to our newer rspec
  1597. ;; version).
  1598. (delete-file "spec/gimme/gives_class_methods_spec.rb")
  1599. (delete-file "spec/gimme/rspec_adapter_spec.rb")
  1600. (delete-file "spec/gimme/verifies_class_methods_spec.rb")
  1601. ;; Fix duplicate version requirements and de-register files.
  1602. (delete-file "Gemfile")
  1603. (delete-file "Gemfile.lock")
  1604. (substitute* "gimme.gemspec"
  1605. ((".*\"Gemfile\".*") "")
  1606. ((".*\"Gemfile\\.lock\",.*") "")
  1607. ((".*(rspec|cucumber).*\">= 0\".*") "")
  1608. (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
  1609. (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
  1610. (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
  1611. ;; All of these gems relate to development, and are
  1612. ;; unnecessary when running the tests.
  1613. ((".*(add|gem).*guard-.*") "")
  1614. ((".*(add|gem).*jeweler.*") "")
  1615. ((".*(add|gem).*pry.*") "")
  1616. ((".*(add|gem).*growl.*") "")
  1617. ((".*(add|gem).*rb-fsevent.*") ""))
  1618. #t)))))
  1619. (synopsis "Lightweight test double library for Ruby")
  1620. (description "Gimme is a very lightweight test double library for Ruby,
  1621. based on Mockito (a mocking framework for Java). It is an opinionated (but
  1622. not noisy) means to facilitate test-driving by enabling the authors to specify
  1623. only what they care about.")
  1624. (home-page "https://github.com/searls/gimme")
  1625. (license license:expat))))
  1626. (define-public ruby-standard
  1627. (package
  1628. (name "ruby-standard")
  1629. (version "0.4.7")
  1630. (source
  1631. (origin
  1632. (method git-fetch) ;no test suite in distributed gem
  1633. (uri (git-reference
  1634. (url "https://github.com/testdouble/standard")
  1635. (commit (string-append "v" version))))
  1636. (file-name (git-file-name name version))
  1637. (sha256
  1638. (base32
  1639. "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
  1640. (build-system ruby-build-system)
  1641. (arguments
  1642. ;; TODO: the tests are currently broken due to using a newer Rubocop.
  1643. `(#:tests? #f
  1644. #:phases
  1645. (modify-phases %standard-phases
  1646. (add-after 'unpack 'relax-version-requiremens
  1647. (lambda _
  1648. (delete-file "Gemfile")
  1649. (delete-file "Gemfile.lock")
  1650. #t)))))
  1651. (native-inputs
  1652. `(("ruby-gimme" ,ruby-gimme)
  1653. ("ruby-pry" ,ruby-pry)
  1654. ("ruby-simplecov" ,ruby-simplecov)))
  1655. (propagated-inputs
  1656. `(("ruby-rubocop" ,ruby-rubocop)
  1657. ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
  1658. (synopsis "Ruby Style Guide, with linter & automatic code fixer")
  1659. (description "Standard is a port of StandardJS. Like StandardJS, it aims
  1660. to save time in the following ways:
  1661. @itemize
  1662. @item No configuration.
  1663. @item Automatically format code.
  1664. @item Catch style issues and programmer errors early.
  1665. @end itemize")
  1666. (home-page "https://github.com/testdouble/standard")
  1667. (license license:expat)))
  1668. (define-public ruby-chunky-png
  1669. (package
  1670. (name "ruby-chunky-png")
  1671. (version "1.3.14")
  1672. (source
  1673. (origin
  1674. (method git-fetch)
  1675. (uri (git-reference
  1676. (url "https://github.com/wvanbergen/chunky_png")
  1677. (commit (string-append "v" version))))
  1678. (file-name (git-file-name name version))
  1679. (sha256
  1680. (base32 "1m7y11ix38h5a2pj5v81qdmvqh980ql9hp62hk2dxwkwsa4nh22h"))))
  1681. (build-system ruby-build-system)
  1682. (arguments
  1683. `(#:test-target "spec"
  1684. #:phases
  1685. (modify-phases %standard-phases
  1686. (add-after 'unpack 'disable-bundler
  1687. (lambda _
  1688. (substitute* (find-files "." "\\.rb$")
  1689. (("require.*bundler/setup.*") ""))
  1690. #t)))))
  1691. (native-inputs
  1692. `(("bundler" ,bundler)
  1693. ("ruby-rspec" ,ruby-rspec)
  1694. ("ruby-standard" ,ruby-standard)
  1695. ("ruby-yard" ,ruby-yard)))
  1696. (synopsis "Ruby library to handle PNG images")
  1697. (description "ChunkyPNG is a pure Ruby library that can read and write
  1698. Portable Network Graphics (PNG) images without depending on an external image
  1699. library. It tries to be memory efficient and reasonably fast. It has
  1700. features such as:
  1701. @itemize
  1702. @item
  1703. Decoding support for any image that the PNG standard allows. This includes all
  1704. standard color modes, all bit depths, all transparency, and interlacing and
  1705. filtering options.
  1706. @item
  1707. Encoding support for images of all color modes (true color, grayscale, and
  1708. indexed) and transparency for all these color modes. The best color mode is
  1709. chosen automatically, based on the amount of used colors.
  1710. @item Read/write access to the image's pixels.
  1711. @item Read/write access to all image metadata that is stored in chunks.
  1712. @item
  1713. Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
  1714. pixel, depending on the hardware).
  1715. @item
  1716. Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
  1717. integer math and a highly optimized saving routine.
  1718. @item Interoperability with RMagick.
  1719. @end itemize
  1720. ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
  1721. loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
  1722. Deal with untrusted images in a separate process, e.g., by using @code{fork}
  1723. or a background processing library.")
  1724. (home-page "https://github.com/wvanbergen/chunky_png/wiki")
  1725. (license license:expat)))
  1726. (define-public ruby-text-hyphen
  1727. (package
  1728. (name "ruby-text-hyphen")
  1729. (version "1.4.1")
  1730. (source
  1731. (origin
  1732. (method url-fetch)
  1733. (uri (rubygems-uri "text-hyphen" version))
  1734. (sha256
  1735. (base32
  1736. "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
  1737. (build-system ruby-build-system)
  1738. (native-inputs
  1739. `(("ruby-hoe" ,ruby-hoe)))
  1740. (synopsis "Ruby library to hyphenate words in various languages")
  1741. (description "Text::Hyphen is a Ruby library to hyphenate words in various
  1742. languages using Ruby-fied versions of TeX hyphenation patterns. It will
  1743. properly hyphenate various words according to the rules of the language the
  1744. word is written in. The algorithm is based on that of the TeX typesetting
  1745. system by Donald E. Knuth.")
  1746. (home-page "https://github.com/halostatue/text-hyphen")
  1747. ;; The whole is licensed under the Expat license, but parts use various
  1748. ;; versions of the LaTeX Project Public License.
  1749. (license license:expat)))
  1750. (define-public ruby-open-uri-cached
  1751. (package
  1752. (name "ruby-open-uri-cached")
  1753. (version "0.0.5")
  1754. (source
  1755. (origin
  1756. (method url-fetch)
  1757. (uri (rubygems-uri "open-uri-cached" version))
  1758. (sha256
  1759. (base32
  1760. "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
  1761. (build-system ruby-build-system)
  1762. (arguments
  1763. `(#:tests? #f)) ;no test suite
  1764. (synopsis "OpenURI with transparent disk caching")
  1765. (description "OpenURI with transparent disk caching, which is
  1766. useful to avoid making excessive queries, for example when scraping
  1767. web pages.")
  1768. (home-page "https://github.com/tigris/open-uri-cached")
  1769. (license license:expat)))
  1770. (define-public ruby-asciidoctor-pdf
  1771. ;; Use the latest commit, as the last tag doesn't build with the
  1772. ;; latest Ruby dependencies in Guix.
  1773. (let ((revision "1")
  1774. (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
  1775. (package
  1776. (name "ruby-asciidoctor-pdf")
  1777. (version (git-version "1.5.3" revision commit))
  1778. (source
  1779. (origin
  1780. (method git-fetch) ;no test suite in the distributed gem
  1781. (uri (git-reference
  1782. (url "https://github.com/asciidoctor/asciidoctor-pdf")
  1783. (commit commit)))
  1784. (file-name (git-file-name name version))
  1785. (sha256
  1786. (base32
  1787. "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
  1788. (build-system ruby-build-system)
  1789. (arguments
  1790. `(#:test-target "spec"
  1791. #:phases
  1792. (modify-phases %standard-phases
  1793. (add-after 'unpack 'remove-failing-tests
  1794. ;; Two tests module fail for unknown reasons, *only* when
  1795. ;; ran in the build container (see:
  1796. ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
  1797. (lambda _
  1798. (delete-file "spec/audio_spec.rb")
  1799. (delete-file "spec/video_spec.rb")
  1800. #t))
  1801. (add-after 'extract-gemspec 'strip-version-requirements
  1802. (lambda _
  1803. (substitute* "asciidoctor-pdf.gemspec"
  1804. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  1805. (string-append stripped "\n")))
  1806. #t))
  1807. ;; The tests rely on the Gem being installed, so move the check phase
  1808. ;; after the install phase.
  1809. (delete 'check)
  1810. (add-after 'install 'check
  1811. (lambda* (#:key outputs tests? #:allow-other-keys)
  1812. (let ((new-gem (string-append (assoc-ref outputs "out")
  1813. "/lib/ruby/vendor_ruby")))
  1814. (setenv "GEM_PATH"
  1815. (string-append (getenv "GEM_PATH") ":" new-gem))
  1816. (when tests?
  1817. (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
  1818. #t))))))
  1819. (native-inputs
  1820. `(("ruby-chunky-png" ,ruby-chunky-png)
  1821. ("ruby-coderay" ,ruby-coderay)
  1822. ("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1823. ("ruby-rouge" ,ruby-rouge)
  1824. ("ruby-rspec" ,ruby-rspec)))
  1825. (propagated-inputs
  1826. `(("ruby-asciidoctor" ,ruby-asciidoctor)
  1827. ("ruby-concurrent-ruby" ,ruby-concurrent)
  1828. ("ruby-open-uri-cached" ,ruby-open-uri-cached)
  1829. ("ruby-prawn" ,ruby-prawn)
  1830. ("ruby-prawn-icon" ,ruby-prawn-icon)
  1831. ("ruby-prawn-svg" ,ruby-prawn-svg)
  1832. ("ruby-prawn-table" ,ruby-prawn-table)
  1833. ("ruby-prawn-templates" ,ruby-prawn-templates)
  1834. ("ruby-safe-yaml" ,ruby-safe-yaml)
  1835. ("ruby-text-hyphen" ,ruby-text-hyphen)
  1836. ("ruby-thread-safe" ,ruby-thread-safe)
  1837. ("ruby-treetop" ,ruby-treetop)
  1838. ("ruby-ttfunk" ,ruby-ttfunk)))
  1839. (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
  1840. (description "Asciidoctor PDF is an extension for Asciidoctor that
  1841. converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
  1842. PDF library. It has features such as:
  1843. @itemize
  1844. @item Direct AsciiDoc to PDF conversion
  1845. @item Configuration-driven theme (style and layout)
  1846. @item Scalable Vector Graphics (SVG) support
  1847. @item PDF document outline (i.e., bookmarks)
  1848. @item Table of contents page(s)
  1849. @item Document metadata (title, authors, subject, keywords, etc.)
  1850. @item Internal cross reference links
  1851. @item Syntax highlighting with Rouge, Pygments, or CodeRay
  1852. @item Page numbering
  1853. @item Customizable running content (header and footer)
  1854. @item
  1855. “Keep together” blocks (i.e., page breaks avoided in certain block content)
  1856. @item Orphaned section titles avoided
  1857. @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
  1858. @item Table border settings honored
  1859. @item Font-based icons
  1860. @item Custom TrueType (TTF) fonts
  1861. @item Double-sided printing mode (margins alternate on recto and verso pages)
  1862. @end itemize")
  1863. (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
  1864. (license license:expat))))
  1865. (define-public ruby-ast
  1866. (package
  1867. (name "ruby-ast")
  1868. (version "2.4.2")
  1869. (source
  1870. (origin
  1871. (method git-fetch) ;no test included in gem from v2.4.1
  1872. (uri (git-reference
  1873. (url "https://github.com/whitequark/ast")
  1874. (commit (string-append "v" version))))
  1875. (file-name (git-file-name name version))
  1876. (sha256
  1877. (base32
  1878. "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
  1879. (build-system ruby-build-system)
  1880. (arguments
  1881. '(#:phases
  1882. (modify-phases %standard-phases
  1883. (add-after 'unpack 'remove-coveralls-requirement
  1884. (lambda _
  1885. (substitute* "test/helper.rb"
  1886. (("require 'coveralls'") "")
  1887. (("Coveralls::SimpleCov::Formatter") ""))
  1888. #t))
  1889. (add-after 'extract-gemspec 'remove-unnecessary-requirements
  1890. (lambda* (#:key inputs #:allow-other-keys)
  1891. (substitute* "ast.gemspec"
  1892. ((".*coveralls.*") "\n")
  1893. (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
  1894. (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
  1895. (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
  1896. (("12\\.3") "13.0"))
  1897. #t)))))
  1898. (native-inputs
  1899. `(("bundler" ,bundler)
  1900. ("ruby-bacon" ,ruby-bacon)
  1901. ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
  1902. ("ruby-json-pure" ,ruby-json-pure)
  1903. ("ruby-kramdown" ,ruby-kramdown)
  1904. ("ruby-mime-types" ,ruby-mime-types)
  1905. ("ruby-racc" ,ruby-racc)
  1906. ("ruby-rest-client" ,ruby-rest-client)
  1907. ("ruby-simplecov" ,ruby-simplecov)
  1908. ("ruby-yard" ,ruby-yard)))
  1909. (synopsis "Library for working with Abstract Syntax Trees")
  1910. (description
  1911. "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
  1912. It does this through immutable data structures.")
  1913. (home-page "https://whitequark.github.io/ast/")
  1914. (license license:expat)))
  1915. (define-public ruby-sporkmonger-rack-mount
  1916. ;; Testing the addressable gem requires a newer commit than that released, so
  1917. ;; use an up to date version.
  1918. (let ((revision "1")
  1919. (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
  1920. (package
  1921. (name "ruby-sporkmonger-rack-mount")
  1922. (version (git-version "0.8.3" revision commit))
  1923. (source (origin
  1924. (method git-fetch)
  1925. (uri (git-reference
  1926. (url "https://github.com/sporkmonger/rack-mount")
  1927. (commit commit)))
  1928. (file-name (git-file-name name version))
  1929. (sha256
  1930. (base32
  1931. "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
  1932. (build-system ruby-build-system)
  1933. (arguments
  1934. ;; Tests currently fail so disable them.
  1935. ;; https://github.com/sporkmonger/rack-mount/pull/1
  1936. `(#:tests? #f))
  1937. (propagated-inputs `(("ruby-rack" ,ruby-rack)))
  1938. (synopsis "Stackable dynamic tree based Rack router")
  1939. (description
  1940. "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
  1941. continue trying routes if the response returns pass. This allows multiple
  1942. routes to be nested or stacked on top of each other.")
  1943. (home-page "https://github.com/sporkmonger/rack-mount")
  1944. (license license:expat))))
  1945. (define-public ruby-ci-reporter
  1946. (package
  1947. (name "ruby-ci-reporter")
  1948. (version "2.0.0")
  1949. (source (origin
  1950. (method url-fetch)
  1951. (uri (rubygems-uri "ci_reporter" version))
  1952. (sha256
  1953. (base32
  1954. "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
  1955. (build-system ruby-build-system)
  1956. (arguments
  1957. `(#:test-target "rspec"))
  1958. (propagated-inputs
  1959. `(("ruby-builder" ,ruby-builder)))
  1960. (native-inputs
  1961. `(("bundler" ,bundler)
  1962. ("ruby-rspec" ,ruby-rspec)))
  1963. (synopsis "Generate XML reports of runs test")
  1964. (description
  1965. "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
  1966. you to generate XML reports of your test runs. The resulting files can be
  1967. read by a continuous integration system that understands Ant's JUnit report
  1968. format.")
  1969. (home-page "https://github.com/nicksieger/ci_reporter")
  1970. (license license:expat)))
  1971. (define-public ruby-contracts
  1972. (package
  1973. (name "ruby-contracts")
  1974. (version "0.16.0")
  1975. (source
  1976. (origin
  1977. (method url-fetch)
  1978. (uri (rubygems-uri "contracts" version))
  1979. (sha256
  1980. (base32
  1981. "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
  1982. (build-system ruby-build-system)
  1983. (arguments
  1984. '(#:test-target "spec"
  1985. #:phases
  1986. (modify-phases %standard-phases
  1987. ;; Don't run or require rubocop, the code linting tool, as this is a
  1988. ;; bit unnecessary.
  1989. (add-after 'unpack 'dont-run-rubocop
  1990. (lambda _
  1991. (substitute* "Rakefile"
  1992. ((".*rubocop.*") "")
  1993. ((".*RuboCop.*") ""))
  1994. #t)))))
  1995. (native-inputs
  1996. `(("ruby-rspec" ,ruby-rspec)))
  1997. (synopsis "Method contracts for Ruby")
  1998. (description
  1999. "This library provides contracts for Ruby. A contract describes the
  2000. correct inputs and output for a method, and will raise an error if a incorrect
  2001. value is found.")
  2002. (home-page "https://github.com/egonSchiele/contracts.ruby")
  2003. (license license:bsd-2)))
  2004. (define-public ruby-crack
  2005. (package
  2006. (name "ruby-crack")
  2007. (version "0.4.5")
  2008. (source
  2009. (origin
  2010. (method url-fetch)
  2011. (uri (rubygems-uri "crack" version))
  2012. (sha256
  2013. (base32
  2014. "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
  2015. (build-system ruby-build-system)
  2016. (arguments
  2017. `(#:phases
  2018. (modify-phases %standard-phases
  2019. (replace 'check
  2020. (lambda* (#:key tests? #:allow-other-keys)
  2021. (when tests?
  2022. (for-each (lambda (file)
  2023. (display file)(display "\n")
  2024. (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
  2025. (find-files "test" ".*rb$")))
  2026. #t)))))
  2027. (synopsis "Simple JSON and XML parsing for Ruby")
  2028. (description
  2029. "@code{crack} provides really simple JSON and XML parsing, extracted from
  2030. code in Merb and Rails.")
  2031. (home-page "https://github.com/jnunemaker/crack")
  2032. (license license:expat)))
  2033. (define-public ruby-cliver
  2034. (package
  2035. (name "ruby-cliver")
  2036. (version "0.3.2")
  2037. (source
  2038. (origin
  2039. (method url-fetch)
  2040. (uri (rubygems-uri "cliver" version))
  2041. (sha256
  2042. (base32
  2043. "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
  2044. (build-system ruby-build-system)
  2045. (arguments
  2046. '(#:phases
  2047. (modify-phases %standard-phases
  2048. ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
  2049. ;; would be nice, but the tests look to be incompatible:
  2050. ;;
  2051. ;; NoMethodError: undefined method `last_comment'
  2052. (replace 'check
  2053. (lambda* (#:key tests? #:allow-other-keys)
  2054. (when tests?
  2055. (invoke "rspec"))
  2056. #t)))))
  2057. (native-inputs
  2058. `(("bundler" ,bundler)
  2059. ("ruby-rspec" ,ruby-rspec-2)))
  2060. (synopsis "Assertions for command-line dependencies in Ruby")
  2061. (description
  2062. "@code{cliver} provides a way to detect missing command-line
  2063. dependencies, including versions.")
  2064. (home-page "https://github.com/yaauie/cliver")
  2065. (license license:expat)))
  2066. (define-public ruby-czmq-ffi-gen
  2067. (package
  2068. (name "ruby-czmq-ffi-gen")
  2069. (version "0.13.0")
  2070. (source
  2071. (origin
  2072. (method url-fetch)
  2073. (uri (rubygems-uri "czmq-ffi-gen" version))
  2074. (sha256
  2075. (base32
  2076. "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
  2077. (build-system ruby-build-system)
  2078. (arguments
  2079. '(#:tests? #f ;; Tests are not included in the release on rubygems.org
  2080. #:phases
  2081. (modify-phases %standard-phases
  2082. (add-after 'unpack 'patch-lib_dirs
  2083. (lambda* (#:key inputs #:allow-other-keys)
  2084. (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
  2085. (("lib\\_dirs = \\[.*\\]")
  2086. (string-append "lib_dirs = ['"
  2087. (assoc-ref inputs "czmq") "/lib"
  2088. "']")))
  2089. (substitute* "lib/czmq-ffi-gen/libzmq.rb"
  2090. (("lib\\_dirs = \\[.*\\]")
  2091. (string-append "lib_dirs = ['"
  2092. (assoc-ref inputs "zeromq") "/lib"
  2093. "']"))))))))
  2094. (inputs
  2095. `(("zeromq" ,zeromq)
  2096. ("czmq" ,czmq)))
  2097. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  2098. (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
  2099. (description
  2100. "These Ruby bindings are not intended to be directly used, but rather
  2101. used by higher level bindings like those provided by CZTop.")
  2102. (home-page
  2103. "https://github.com/paddor/czmq-ffi-gen")
  2104. (license license:isc)))
  2105. (define-public ruby-cztop
  2106. (package
  2107. (name "ruby-cztop")
  2108. (version "0.12.2")
  2109. (source
  2110. (origin
  2111. (method url-fetch)
  2112. (uri (rubygems-uri "cztop" version))
  2113. (sha256
  2114. (base32
  2115. "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
  2116. (build-system ruby-build-system)
  2117. (arguments
  2118. '(#:test-target "spec"
  2119. #:phases
  2120. (modify-phases %standard-phases
  2121. (add-after 'unpack 'patch-lib_paths
  2122. (lambda* (#:key inputs #:allow-other-keys)
  2123. (substitute* "lib/cztop/poller/zmq.rb"
  2124. (("lib\\_paths = \\[.*\\]")
  2125. (string-append "lib_paths = ['"
  2126. (assoc-ref inputs "zeromq") "/lib"
  2127. "']"))))))))
  2128. (native-inputs
  2129. `(("bundler" ,bundler)
  2130. ("ruby-rspec" ,ruby-rspec)))
  2131. (inputs
  2132. `(("zeromq" ,zeromq)))
  2133. (propagated-inputs
  2134. `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
  2135. (synopsis "CZMQ Ruby bindings")
  2136. (description
  2137. "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
  2138. CZMQ. The focus of of CZTop is on being easy to use and providing first class
  2139. support for security mechanisms.")
  2140. (home-page "https://github.com/paddor/cztop")
  2141. (license license:isc)))
  2142. (define-public ruby-saikuro-treemap
  2143. (package
  2144. (name "ruby-saikuro-treemap")
  2145. (version "0.2.0")
  2146. (source (origin
  2147. (method url-fetch)
  2148. (uri (rubygems-uri "saikuro_treemap" version))
  2149. (sha256
  2150. (base32
  2151. "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
  2152. (build-system ruby-build-system)
  2153. ;; Some of the tests fail because the generated JSON has keys in a
  2154. ;; different order. This is a problem with the test suite rather than any
  2155. ;; of the involved libraries.
  2156. (arguments `(#:tests? #f))
  2157. (propagated-inputs
  2158. `(("ruby-json-pure" ,ruby-json-pure)
  2159. ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
  2160. (synopsis "Generate complexity treemap based on saikuro analysis")
  2161. (description
  2162. "This gem generates a treemap showing the complexity of Ruby code on
  2163. which it is run. It uses Saikuro under the covers to analyze Ruby code
  2164. complexity.")
  2165. (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
  2166. (license license:expat)))
  2167. (define-public ruby-oauth2
  2168. (package
  2169. (name "ruby-oauth2")
  2170. (version "1.4.2")
  2171. (source
  2172. (origin
  2173. (method url-fetch)
  2174. (uri (rubygems-uri "oauth2" version))
  2175. (sha256
  2176. (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
  2177. (build-system ruby-build-system)
  2178. (arguments
  2179. '(#:tests? #f)) ; no included tests
  2180. (propagated-inputs
  2181. `(("ruby-faraday" ,ruby-faraday)
  2182. ("ruby-jwt" ,ruby-jwt)
  2183. ("ruby-multi-json" ,ruby-multi-json)
  2184. ("ruby-multi-xml" ,ruby-multi-xml)
  2185. ("ruby-rack" ,ruby-rack)))
  2186. (synopsis "Ruby wrapper for the OAuth 2.0")
  2187. (description
  2188. "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
  2189. with a similar style to the original OAuth spec.")
  2190. (home-page "https://github.com/oauth-xx/oauth2")
  2191. (license license:expat)))
  2192. (define-public ruby-omniauth
  2193. (package
  2194. (name "ruby-omniauth")
  2195. (version "2.0.3")
  2196. (source
  2197. (origin
  2198. (method url-fetch)
  2199. (uri (rubygems-uri "omniauth" version))
  2200. (sha256
  2201. (base32 "105mzgvmn2kjaacxw01h4wqv33r7hfn5z8fxlkk3jcjar14j71bh"))))
  2202. (build-system ruby-build-system)
  2203. (propagated-inputs
  2204. `(("ruby-hashie" ,ruby-hashie)
  2205. ("ruby-rack" ,ruby-rack)
  2206. ("ruby-rack-protection" ,ruby-rack-protection)))
  2207. (native-inputs
  2208. `(("ruby-rspec" ,ruby-rspec)))
  2209. (synopsis "Generalized Rack framework for multiple-provider authentication")
  2210. (description
  2211. "This package provides a generalized Rack framework for multiple-provider
  2212. authentication.")
  2213. (home-page "https://github.com/omniauth/omniauth")
  2214. (license license:expat)))
  2215. (define-public ruby-omniauth-oauth2
  2216. (package
  2217. (name "ruby-omniauth-oauth2")
  2218. (version "1.7.1")
  2219. (source
  2220. (origin
  2221. (method url-fetch)
  2222. (uri (rubygems-uri "omniauth-oauth2" version))
  2223. (sha256
  2224. (base32
  2225. "10fr2b58sp7l6nfdvxpbi67374hkrvsf507cvda89jjs0jacy319"))))
  2226. (build-system ruby-build-system)
  2227. (arguments
  2228. '(#:phases
  2229. (modify-phases %standard-phases
  2230. (add-after 'unpack 'remove-unnecessary-dependencies
  2231. (lambda _
  2232. ;; The coveralls gem submits coverage information to an online
  2233. ;; service, and is unnecessary when running the tests
  2234. (substitute* "Gemfile"
  2235. ((".*coveralls\"") ""))
  2236. (substitute* "spec/helper.rb"
  2237. (("require \"coveralls\"") "")
  2238. (("Coveralls::SimpleCov::Formatter") ""))
  2239. #t)))))
  2240. (propagated-inputs
  2241. `(("ruby-oauth2" ,ruby-oauth2)
  2242. ("ruby-omniauth" ,ruby-omniauth)))
  2243. (native-inputs
  2244. `(("bundler" ,bundler)
  2245. ("ruby-rspec" ,ruby-rspec)
  2246. ("ruby-simplecov" ,ruby-simplecov)
  2247. ("ruby-rack-test" ,ruby-rack-test)
  2248. ("ruby-webmock" ,ruby-webmock)))
  2249. (synopsis "Abstract OAuth2 strategy for OmniAuth")
  2250. (description
  2251. "This library provides a generic OAuth2 strategy for OmniAuth. It
  2252. doesn't provide a way to gather user information, so should be used as a
  2253. building block for authentication strategies.")
  2254. (home-page "https://github.com/omniauth/omniauth-oauth2")
  2255. (license license:expat)))
  2256. (define-public ruby-open4
  2257. (package
  2258. (name "ruby-open4")
  2259. (version "1.3.4")
  2260. (source
  2261. (origin
  2262. (method url-fetch)
  2263. (uri (rubygems-uri "open4" version))
  2264. (sha256
  2265. (base32
  2266. "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
  2267. (build-system ruby-build-system)
  2268. (arguments
  2269. '(#:phases
  2270. (modify-phases %standard-phases
  2271. (add-after 'unpack 'patch
  2272. (lambda _
  2273. (substitute* "rakefile"
  2274. ;; Update the Rakefile so it works
  2275. (("-rubygems") "-rrubygems")
  2276. (("Config") "RbConfig"))
  2277. #t))
  2278. (add-before 'check 'set-LIB
  2279. (lambda _
  2280. ;; This is used in the rakefile when running the tests
  2281. (setenv "LIB" "open4")
  2282. #t)))))
  2283. (synopsis "Open child processes from Ruby and manage them easily")
  2284. (description
  2285. "@code{Open4} is a Ruby library to run child processes and manage their
  2286. input and output.")
  2287. (home-page "https://github.com/ahoward/open4")
  2288. (license license:ruby)))
  2289. (define-public ruby-options
  2290. (package
  2291. (name "ruby-options")
  2292. (version "2.3.2")
  2293. (source
  2294. (origin
  2295. (method url-fetch)
  2296. (uri (rubygems-uri "options" version))
  2297. (sha256
  2298. (base32
  2299. "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
  2300. (build-system ruby-build-system)
  2301. (arguments
  2302. '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
  2303. #:phases
  2304. (modify-phases %standard-phases
  2305. (add-before 'check 'set-LIB
  2306. (lambda _
  2307. ;; This is used in the Rakefile, and setting it avoids an issue
  2308. ;; with running the tests.
  2309. (setenv "LIB" "options")
  2310. #t)))))
  2311. (synopsis "Ruby library to parse options from *args cleanly")
  2312. (description
  2313. "The @code{options} library helps with parsing keyword options in Ruby
  2314. functions.")
  2315. (home-page "https://github.com/ahoward/options")
  2316. (license license:ruby)))
  2317. (define-public ruby-erubi
  2318. (package
  2319. (name "ruby-erubi")
  2320. (version "1.8.0")
  2321. (source
  2322. (origin
  2323. (method url-fetch)
  2324. (uri (rubygems-uri "erubi" version))
  2325. (sha256
  2326. (base32
  2327. "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
  2328. (build-system ruby-build-system)
  2329. (synopsis "ERB template engine for Ruby")
  2330. (description
  2331. "Erubi is a ERB template engine for Ruby. It is a simplified fork of
  2332. Erubis")
  2333. (home-page "https://github.com/jeremyevans/erubi")
  2334. (license license:expat)))
  2335. (define-public ruby-erubis
  2336. (package
  2337. (name "ruby-erubis")
  2338. (version "2.7.0")
  2339. (source
  2340. (origin
  2341. (method url-fetch)
  2342. (uri (rubygems-uri "erubis" version))
  2343. (sha256
  2344. (base32
  2345. "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
  2346. (build-system ruby-build-system)
  2347. (arguments
  2348. '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
  2349. (synopsis "Implementation of embedded Ruby (eRuby)")
  2350. (description
  2351. "Erubis is a fast implementation of embedded Ruby (eRuby) with several
  2352. features such as multi-language support, auto escaping, auto trimming spaces
  2353. around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
  2354. support.")
  2355. (home-page "http://www.kuwata-lab.com/erubis/")
  2356. (license license:expat)))
  2357. (define-public ruby-ethon
  2358. (package
  2359. (name "ruby-ethon")
  2360. (version "0.12.0")
  2361. (source
  2362. (origin
  2363. (method url-fetch)
  2364. (uri (rubygems-uri "ethon" version))
  2365. (sha256
  2366. (base32
  2367. "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
  2368. (build-system ruby-build-system)
  2369. (arguments
  2370. `(#:tests? #f)) ; no included tests
  2371. (inputs
  2372. `(("curl" ,curl)))
  2373. (propagated-inputs
  2374. `(("ruby-ffi" ,ruby-ffi)))
  2375. (synopsis "Very lightweight @code{libcurl} wrapper")
  2376. (description
  2377. "Ethon is a very basic @code{libcurl} wrapper using ffi.")
  2378. (home-page "https://github.com/typhoeus/ethon")
  2379. (license license:expat)))
  2380. (define-public ruby-execjs
  2381. (package
  2382. (name "ruby-execjs")
  2383. (version "2.7.0")
  2384. (source
  2385. (origin
  2386. ;; fetch from github as the gem does not contain testing code
  2387. (method git-fetch)
  2388. (uri (git-reference
  2389. (url "https://github.com/rails/execjs")
  2390. (commit (string-append "v" version))))
  2391. (file-name (git-file-name name version))
  2392. (sha256
  2393. (base32
  2394. "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
  2395. (build-system ruby-build-system)
  2396. (native-inputs
  2397. `(("bundler" ,bundler)
  2398. ;; The test suite tests all the available backends. Currenly, this just
  2399. ;; means the node backend.
  2400. ;;
  2401. ;; PASSED: test:node
  2402. ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
  2403. ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
  2404. ("node" ,node)))
  2405. (synopsis "Run JavaScript code from Ruby")
  2406. (description
  2407. "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
  2408. runtime to evaluate your JavaScript program, then returns the result to you as
  2409. a Ruby object.")
  2410. (home-page "https://github.com/rails/execjs")
  2411. (license license:expat)))
  2412. (define-public ruby-fakefs
  2413. (package
  2414. (name "ruby-fakefs")
  2415. (version "1.2.2")
  2416. (home-page "https://github.com/fakefs/fakefs")
  2417. (source (origin
  2418. ;; The Rubygems release does not contain tests.
  2419. (method git-fetch)
  2420. (uri (git-reference
  2421. (url home-page)
  2422. (commit (string-append "v" version))))
  2423. (file-name (git-file-name name version))
  2424. (sha256
  2425. (base32
  2426. "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
  2427. (build-system ruby-build-system)
  2428. (arguments
  2429. '(#:phases (modify-phases %standard-phases
  2430. (replace 'replace-git-ls-files
  2431. (lambda _
  2432. (substitute* "fakefs.gemspec"
  2433. (("`git ls-files lib README.md LICENSE`")
  2434. "`find lib README.md LICENSE -type f | sort`"))
  2435. #t))
  2436. (add-before 'check 'remove-version-constraints
  2437. (lambda _
  2438. ;; Drop hard version requirements for test dependencies.
  2439. (substitute* "fakefs.gemspec"
  2440. (("(.*add_development_dependency .*), .*" _ dep)
  2441. (string-append dep "\n")))
  2442. #t)))))
  2443. (native-inputs
  2444. `(("ruby-bump" ,ruby-bump)
  2445. ("ruby-maxitest" ,ruby-maxitest)
  2446. ("ruby-rubocop" ,ruby-rubocop)
  2447. ("ruby-rspec" ,ruby-rspec)))
  2448. (synopsis "Fake file system for Ruby")
  2449. (description
  2450. "This package provides a fake file system for use in test suites. It
  2451. avoids the need for manually creating temporary directories, or dealing
  2452. with platform intricacies in @code{File} and @code{FileUtils}.")
  2453. (license license:expat)))
  2454. (define-public ruby-orderedhash
  2455. (package
  2456. (name "ruby-orderedhash")
  2457. (version "0.0.6")
  2458. (source (origin
  2459. (method url-fetch)
  2460. (uri (rubygems-uri "orderedhash" version))
  2461. (sha256
  2462. (base32
  2463. "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
  2464. (build-system ruby-build-system)
  2465. (arguments
  2466. '(#:tests? #f)) ; no test suite
  2467. (synopsis "Ruby library providing an order-preserving hash")
  2468. (description "Orderedhash is a Ruby library providing a hash
  2469. implementation that preserves the order of items and features some array-like
  2470. extensions.")
  2471. (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
  2472. (license license:public-domain)))
  2473. (define-public ruby-libxml
  2474. (package
  2475. (name "ruby-libxml")
  2476. (version "3.0.0")
  2477. (source
  2478. (origin
  2479. (method url-fetch)
  2480. (uri (rubygems-uri "libxml-ruby" version))
  2481. (sha256
  2482. (base32
  2483. "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
  2484. (build-system ruby-build-system)
  2485. (inputs
  2486. `(("zlib" ,zlib)
  2487. ("libxml2" ,libxml2)))
  2488. (arguments
  2489. '(#:tests? #f ; test suite hangs for unknown reason
  2490. #:gem-flags
  2491. (list "--no-document" ; TODO: Re-enable when documentation
  2492. ; generation works
  2493. "--"
  2494. (string-append "--with-xml2-include="
  2495. (assoc-ref %build-inputs "libxml2")
  2496. "/include/libxml2" ))))
  2497. (synopsis "Ruby bindings for GNOME Libxml2")
  2498. (description "The Libxml-Ruby project provides Ruby language bindings for
  2499. the GNOME Libxml2 XML toolkit.")
  2500. (home-page "https://xml4r.github.com/libxml-ruby")
  2501. (license license:expat)))
  2502. (define-public ruby-lino
  2503. (package
  2504. (name "ruby-lino")
  2505. (version "1.1.0")
  2506. (source
  2507. (origin
  2508. (method url-fetch)
  2509. (uri (rubygems-uri "lino" version))
  2510. (sha256
  2511. (base32
  2512. "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
  2513. (build-system ruby-build-system)
  2514. (arguments
  2515. '(#:tests? #f)) ; No included tests
  2516. (propagated-inputs
  2517. `(("ruby-hamster" ,ruby-hamster)
  2518. ("ruby-open4" ,ruby-open4)))
  2519. (synopsis "Build and execute commands in Ruby")
  2520. (description
  2521. "@code{Lino} provides an interface to run external commands. It provides
  2522. an interface to add options as well as managing the standard input, output and
  2523. error streams.")
  2524. (home-page "https://github.com/tobyclemson/lino")
  2525. (license license:expat)))
  2526. (define-public ruby-xml-simple
  2527. (package
  2528. (name "ruby-xml-simple")
  2529. (version "1.1.5")
  2530. (source (origin
  2531. (method url-fetch)
  2532. (uri (rubygems-uri "xml-simple" version))
  2533. (sha256
  2534. (base32
  2535. "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
  2536. (build-system ruby-build-system)
  2537. (arguments
  2538. '(#:tests? #f)) ; no test suite
  2539. (synopsis "Simple Ruby library for XML processing")
  2540. (description "This library provides a simple API for XML processing in
  2541. Ruby.")
  2542. (home-page "https://github.com/maik/xml-simple")
  2543. (license license:ruby)))
  2544. (define-public ruby-thor
  2545. (package
  2546. (name "ruby-thor")
  2547. (version "1.0.1")
  2548. (source (origin
  2549. ;; Pull from git because the gem has no tests.
  2550. (method git-fetch)
  2551. (uri (git-reference
  2552. (url "https://github.com/erikhuda/thor")
  2553. (commit (string-append "v" version))))
  2554. (file-name (git-file-name name version))
  2555. (sha256
  2556. (base32
  2557. "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
  2558. (build-system ruby-build-system)
  2559. (arguments
  2560. '(#:phases (modify-phases %standard-phases
  2561. (add-after 'unpack 'fix-readline-tests
  2562. (lambda _
  2563. ;; Ensure Readline is initialized before running the
  2564. ;; test to avoid a type clash with the mock ::Readline.
  2565. ;; See <https://github.com/erikhuda/thor/pull/717>.
  2566. (substitute* "spec/line_editor/readline_spec.rb"
  2567. (("unless defined\\? ::Readline" all)
  2568. (string-append "Thor::LineEditor::Readline.available?\n"
  2569. all)))
  2570. #t))
  2571. (add-after 'unpack 'remove-coveralls-dependency
  2572. (lambda _
  2573. ;; Do not hook the test suite into the online
  2574. ;; coveralls service.
  2575. (substitute* "Gemfile"
  2576. ((".*coveralls.*") ""))
  2577. (substitute* "spec/helper.rb"
  2578. (("require \"coveralls\"") "")
  2579. (("Coveralls::SimpleCov::Formatter") "")
  2580. ;; Also drop the WebMock dependency which is only
  2581. ;; present to allow a coveralls.io connection, and
  2582. ;; would otherwise introduce a circular dependency.
  2583. (("require \"webmock/rspec\"") "")
  2584. (("WebMock\\.disable_net_connect.*") ""))
  2585. #t))
  2586. (add-after 'unpack 'disable-network-tests
  2587. (lambda _
  2588. ;; These tests attempt to look up example.com.
  2589. (substitute* "spec/actions/file_manipulation_spec.rb"
  2590. (("it \"accepts (https?) remote sources" _ proto)
  2591. (string-append "xit \"accepts " proto " remote sources")))
  2592. #t))
  2593. (add-after 'unpack 'disable-quality-tests
  2594. (lambda _
  2595. ;; These tests attempt to check the git repository for
  2596. ;; tabs vs spaces, double vs single quotes, etc, and
  2597. ;; depend on the git checkout.
  2598. (delete-file "spec/quality_spec.rb")
  2599. #t))
  2600. (add-before 'check 'make-files-writable
  2601. (lambda _
  2602. ;; The tests needs rw access to the test suite.
  2603. (for-each make-file-writable (find-files "spec"))
  2604. #t))
  2605. (replace 'check
  2606. (lambda _
  2607. (invoke "rspec" "spec"))))))
  2608. (native-inputs
  2609. `(("ruby-rspec" ,ruby-rspec)
  2610. ("ruby-simplecov" ,ruby-simplecov)))
  2611. (synopsis "Ruby toolkit for building command-line interfaces")
  2612. (description "Thor is a toolkit for building powerful command-line
  2613. interfaces.")
  2614. (home-page "http://whatisthor.com/")
  2615. (license license:expat)))
  2616. (define-public ruby-lumberjack
  2617. (package
  2618. (name "ruby-lumberjack")
  2619. (version "1.0.13")
  2620. (source (origin
  2621. (method url-fetch)
  2622. (uri (rubygems-uri "lumberjack" version))
  2623. (sha256
  2624. (base32
  2625. "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
  2626. (build-system ruby-build-system)
  2627. (native-inputs
  2628. `(("ruby-rspec" ,ruby-rspec)
  2629. ("ruby-timecop" ,ruby-timecop)))
  2630. (synopsis "Logging utility library for Ruby")
  2631. (description "Lumberjack is a simple logging utility that can be a drop in
  2632. replacement for Logger or ActiveSupport::BufferedLogger. It provides support
  2633. for automatically rolling log files even with multiple processes writing the
  2634. same log file.")
  2635. (home-page "https://github.com/bdurand/lumberjack")
  2636. (license license:expat)))
  2637. (define-public ruby-rbnacl
  2638. (package
  2639. (name "ruby-rbnacl")
  2640. (version "6.0.1")
  2641. (source
  2642. (origin
  2643. (method url-fetch)
  2644. (uri (rubygems-uri "rbnacl" version))
  2645. (sha256
  2646. (base32
  2647. "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
  2648. (build-system ruby-build-system)
  2649. (arguments
  2650. `(#:phases
  2651. (modify-phases %standard-phases
  2652. (add-after 'unpack 'remove-unnecessary-dependencies
  2653. (lambda _
  2654. ;; Coveralls relates to a network service, and Rubocop to code
  2655. ;; linting and both are unnecessary to run the tests
  2656. (substitute* "Gemfile"
  2657. ((".*rubocop.*") "\n")
  2658. ((".*guard-rspec.*") "\n")
  2659. ((".*coveralls.*") "\n"))
  2660. (substitute* "spec/spec_helper.rb"
  2661. (("require \"coveralls\"") "")
  2662. (("Coveralls.wear!") ""))
  2663. #t))
  2664. (add-after 'unpack 'use-libsodium-from-store
  2665. (lambda* (#:key inputs #:allow-other-keys)
  2666. (substitute* '("lib/rbnacl/init.rb"
  2667. "lib/rbnacl/sodium.rb")
  2668. (("ffi_lib \\[.+\\]")
  2669. (string-append "ffi_lib [\""
  2670. (assoc-ref inputs "libsodium") "/lib/libsodium.so"
  2671. "\"]")))
  2672. #t))
  2673. ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
  2674. (replace 'check
  2675. (lambda* (#:key tests? #:allow-other-keys)
  2676. (when tests?
  2677. (invoke "rspec"))
  2678. #t)))))
  2679. (propagated-inputs
  2680. `(("ruby-ffi" ,ruby-ffi)))
  2681. (inputs
  2682. `(("libsodium" ,libsodium)))
  2683. (native-inputs
  2684. `(("bundler" ,bundler)
  2685. ("ruby-rspec" ,ruby-rspec)))
  2686. (synopsis "Ruby FFI binding to libsodium")
  2687. (description
  2688. "This package provides Ruby FFI bindings to the Networking and
  2689. Cryptography (NaCl) library, also known as libsodium. This provides a
  2690. high-level toolkit for building cryptographic systems and protocols.")
  2691. (home-page "https://github.com/crypto-rb/rbnacl")
  2692. (license license:expat)))
  2693. (define-public ruby-hkdf
  2694. (package
  2695. (name "ruby-hkdf")
  2696. (version "1.0.0")
  2697. (source
  2698. (origin
  2699. (method git-fetch)
  2700. (uri (git-reference
  2701. (url "https://github.com/jtdowney/hkdf")
  2702. (commit (string-append "v" version))))
  2703. (file-name (git-file-name name version))
  2704. (sha256
  2705. (base32
  2706. "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
  2707. (build-system ruby-build-system)
  2708. (arguments
  2709. `(#:test-target "default"))
  2710. (native-inputs
  2711. `(("ruby-rspec" ,ruby-rspec)))
  2712. (synopsis "HMAC-based Key Derivation Function")
  2713. (description
  2714. "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
  2715. HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
  2716. take some source key material and generate suitable cryptographic keys from it.")
  2717. (home-page "https://github.com/jtdowney/hkdf")
  2718. (license license:expat)))
  2719. (define-public ruby-nenv
  2720. (package
  2721. (name "ruby-nenv")
  2722. (version "0.3.0")
  2723. (source (origin
  2724. (method url-fetch)
  2725. (uri (rubygems-uri "nenv" version))
  2726. (sha256
  2727. (base32
  2728. "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
  2729. (build-system ruby-build-system)
  2730. (arguments
  2731. `(#:tests? #f)) ; no tests included
  2732. (native-inputs
  2733. `(("ruby-rspec" ,ruby-rspec)
  2734. ("bundler" ,bundler)))
  2735. (synopsis "Ruby interface for modifying the environment")
  2736. (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
  2737. and inspect the environment.")
  2738. (home-page "https://github.com/e2/nenv")
  2739. (license license:expat)))
  2740. (define-public ruby-ptools
  2741. (package
  2742. (name "ruby-ptools")
  2743. (version "1.3.5")
  2744. (source (origin
  2745. (method url-fetch)
  2746. (uri (rubygems-uri "ptools" version))
  2747. (sha256
  2748. (base32
  2749. "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
  2750. (build-system ruby-build-system)
  2751. (arguments
  2752. '(#:phases (modify-phases %standard-phases
  2753. (add-after 'unpack 'patch-/bin/ls
  2754. (lambda _
  2755. (substitute* "test/test_binary.rb"
  2756. (("/bin/ls")
  2757. (which "ls")))
  2758. #t))
  2759. (add-before 'install 'create-gem
  2760. (lambda _
  2761. ;; Do not attempt to sign the gem.
  2762. (substitute* "Rakefile"
  2763. (("spec\\.signing_key = .*")
  2764. ""))
  2765. (invoke "rake" "gem:create"))))))
  2766. (synopsis "Extra methods for Ruby's @code{File} class")
  2767. (description
  2768. "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
  2769. class with many additional methods modelled after common POSIX tools, such as
  2770. @code{File.which} for finding executables, @code{File.tail} to print the last
  2771. lines of a file, @code{File.wc} to count words, and so on.")
  2772. (home-page "https://github.com/djberg96/ptools")
  2773. (license license:artistic2.0)))
  2774. (define-public ruby-permutation
  2775. (package
  2776. (name "ruby-permutation")
  2777. (version "0.1.8")
  2778. (source (origin
  2779. (method url-fetch)
  2780. (uri (rubygems-uri "permutation" version))
  2781. (sha256
  2782. (base32
  2783. "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
  2784. (build-system ruby-build-system)
  2785. (arguments
  2786. `(#:phases
  2787. (modify-phases %standard-phases
  2788. (add-after 'unpack 'fix-rakefile
  2789. (lambda _
  2790. (substitute* "Rakefile"
  2791. (("require 'rake/gempackagetask'")
  2792. "require 'rubygems/package_task'")
  2793. (("include Config") ""))
  2794. #t))
  2795. (replace 'check
  2796. (lambda _
  2797. (invoke "ruby" "-Ilib" "test/test.rb"))))))
  2798. (synopsis "Library to perform operations with sequence permutations")
  2799. (description "This package provides a Ruby library to perform different
  2800. operations with permutations of sequences, such as strings and arrays.")
  2801. (home-page "https://flori.github.io/permutation")
  2802. (license license:gpl2))) ; GPL 2 only
  2803. (define-public ruby-shellany
  2804. (package
  2805. (name "ruby-shellany")
  2806. (version "0.0.1")
  2807. (source (origin
  2808. (method url-fetch)
  2809. (uri (rubygems-uri "shellany" version))
  2810. (sha256
  2811. (base32
  2812. "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
  2813. (build-system ruby-build-system)
  2814. (arguments
  2815. `(#:test-target "default"
  2816. #:phases
  2817. (modify-phases %standard-phases
  2818. (add-after 'unpack 'fix-version-test
  2819. (lambda _
  2820. (substitute* "spec/shellany_spec.rb"
  2821. (("^RSpec") "require \"shellany\"\nRSpec"))
  2822. #t)))))
  2823. (native-inputs
  2824. `(("ruby-rspec" ,ruby-rspec)
  2825. ("ruby-nenv" ,ruby-nenv)
  2826. ("bundler" ,bundler)))
  2827. (synopsis "Capture command output")
  2828. (description "Shellany is a Ruby library providing functions to capture
  2829. the output produced by running shell commands.")
  2830. (home-page "https://rubygems.org/gems/shellany")
  2831. (license license:expat)))
  2832. (define-public ruby-notiffany
  2833. (package
  2834. (name "ruby-notiffany")
  2835. (version "0.1.3")
  2836. (source (origin
  2837. (method url-fetch)
  2838. (uri (rubygems-uri "notiffany" version))
  2839. (sha256
  2840. (base32
  2841. "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
  2842. (build-system ruby-build-system)
  2843. ;; Tests are not included in the gem.
  2844. (arguments `(#:tests? #f))
  2845. (propagated-inputs
  2846. `(("ruby-shellany" ,ruby-shellany)
  2847. ("ruby-nenv" ,ruby-nenv)))
  2848. (native-inputs
  2849. `(("bundler" ,bundler)))
  2850. (synopsis "Wrapper library for notification libraries")
  2851. (description "Notiffany is a Ruby wrapper library for notification
  2852. libraries such as Libnotify.")
  2853. (home-page "https://github.com/guard/notiffany")
  2854. (license license:expat)))
  2855. (define-public ruby-forking-test-runner
  2856. (package
  2857. (name "ruby-forking-test-runner")
  2858. (version "1.6.0")
  2859. (home-page "https://github.com/grosser/forking_test_runner")
  2860. (source (origin
  2861. (method git-fetch)
  2862. (uri (git-reference (url home-page)
  2863. (commit (string-append "v" version))))
  2864. (file-name (git-file-name name version))
  2865. (sha256
  2866. (base32
  2867. "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
  2868. (build-system ruby-build-system)
  2869. (arguments
  2870. '(#:test-target "spec"
  2871. ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
  2872. ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
  2873. #:tests? #f
  2874. #:phases (modify-phases %standard-phases
  2875. (replace 'replace-git-ls-files
  2876. (lambda _
  2877. (substitute* "forking_test_runner.gemspec"
  2878. (("`git ls-files lib/ bin/ MIT-LICENSE`")
  2879. "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
  2880. #t))
  2881. (add-before 'check 'remove-version-constraints
  2882. (lambda _
  2883. ;; Ignore hard coded version constraints for the tests.
  2884. (delete-file "Gemfile.lock")
  2885. #t))
  2886. (add-before 'check 'set-HOME
  2887. (lambda _
  2888. ;; Many tests invoke Bundler, and fails when Bundler
  2889. ;; warns that /homeless-shelter does not exist.
  2890. (setenv "HOME" "/tmp")
  2891. #t)))))
  2892. (native-inputs
  2893. `(("ruby-activerecord" ,ruby-activerecord)
  2894. ("ruby-bump" ,ruby-bump)
  2895. ("ruby-rspec" ,ruby-rspec)
  2896. ("ruby-sqlite3" ,ruby-sqlite3)
  2897. ("ruby-wwtd" ,ruby-wwtd)))
  2898. (propagated-inputs
  2899. `(("ruby-parallel-tests" ,ruby-parallel-tests)))
  2900. (synopsis "Run every test in a fork")
  2901. (description
  2902. "This package is a wrapper around @code{parallel_tests} that runs every
  2903. test in a fork to avoid pollution and get clean output per test.")
  2904. (license license:expat)))
  2905. (define-public ruby-formatador
  2906. (package
  2907. (name "ruby-formatador")
  2908. (version "0.2.5")
  2909. (source (origin
  2910. (method url-fetch)
  2911. (uri (rubygems-uri "formatador" version))
  2912. (sha256
  2913. (base32
  2914. "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
  2915. (build-system ruby-build-system)
  2916. ;; Circular dependency: Tests require ruby-shindo, which requires
  2917. ;; ruby-formatador at runtime.
  2918. (arguments `(#:tests? #f))
  2919. (synopsis "Ruby library to format text on stdout")
  2920. (description "Formatador is a Ruby library to format text printed to the
  2921. standard output stream.")
  2922. (home-page "https://github.com/geemus/formatador")
  2923. (license license:expat)))
  2924. (define-public ruby-fuubar
  2925. (package
  2926. (name "ruby-fuubar")
  2927. (version "2.3.2")
  2928. (source
  2929. (origin
  2930. ;; Fetch from the git repository, as the gem package doesn't include
  2931. ;; the tests.
  2932. (method git-fetch)
  2933. (uri (git-reference
  2934. (url "https://github.com/thekompanee/fuubar")
  2935. (commit (string-append "releases/v" version))))
  2936. (file-name (git-file-name name version))
  2937. (sha256
  2938. (base32
  2939. "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
  2940. (build-system ruby-build-system)
  2941. (arguments
  2942. '(;; TODO: Some tests fail, unsure why.
  2943. ;; 21 examples, 7 failures
  2944. #:tests? #f
  2945. #:phases
  2946. (modify-phases %standard-phases
  2947. (add-before 'build 'delete-certificate
  2948. (lambda _
  2949. ;; Remove 's.cert_chain' as we do not build with a private key
  2950. (substitute* "fuubar.gemspec"
  2951. ((".*cert_chain.*") "")
  2952. ((".*signing_key.*") ""))
  2953. #t))
  2954. (replace 'check
  2955. (lambda* (#:key tests? #:allow-other-keys)
  2956. (when tests?
  2957. (invoke "rspec"))
  2958. #t)))))
  2959. (native-inputs
  2960. `(("bundler" ,bundler)))
  2961. (propagated-inputs
  2962. `(("ruby-rspec-core" ,ruby-rspec-core)
  2963. ("ruby-progressbar" ,ruby-progressbar)))
  2964. (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
  2965. (description
  2966. "Fuubar is an RSpec formatter that uses a progress bar instead of a
  2967. string of letters and dots as feedback. It also stops on the first test
  2968. failure.")
  2969. (home-page "https://github.com/thekompanee/fuubar")
  2970. (license license:expat)))
  2971. (define-public ruby-haml
  2972. (package
  2973. (name "ruby-haml")
  2974. (version "5.0.4")
  2975. (source
  2976. (origin
  2977. (method url-fetch)
  2978. (uri (rubygems-uri "haml" version))
  2979. (sha256
  2980. (base32
  2981. "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
  2982. (build-system ruby-build-system)
  2983. (arguments
  2984. '(#:tests? #f)) ; No included tests
  2985. (propagated-inputs
  2986. `(("ruby-tilt" ,ruby-tilt)
  2987. ("ruby-temple" ,ruby-temple)))
  2988. (synopsis "Haml is a Ruby library to generate HTML documents")
  2989. (description
  2990. "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
  2991. HTML or XML that is designed to express the structure of documents using
  2992. indentation rather than closing tags. It was originally envisioned as a
  2993. plugin for Ruby on Rails, but it can function as a stand-alone templating
  2994. engine.")
  2995. (home-page "https://haml.info/")
  2996. (license license:expat)))
  2997. (define-public ruby-hamster
  2998. (package
  2999. (name "ruby-hamster")
  3000. (version "3.0.0")
  3001. (source
  3002. (origin
  3003. (method url-fetch)
  3004. (uri (rubygems-uri "hamster" version))
  3005. (sha256
  3006. (base32
  3007. "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
  3008. (build-system ruby-build-system)
  3009. (arguments
  3010. '(#:phases
  3011. (modify-phases %standard-phases
  3012. (add-after 'unpack 'remove-unnecessary-dependencies
  3013. (lambda _
  3014. ;; pry is a debugging tool, and is unnecessary when running the
  3015. ;; tests
  3016. (substitute* "spec/lib/hamster/vector/insert_spec.rb"
  3017. (("require 'pry'") ""))
  3018. (substitute* "spec/spec_helper.rb"
  3019. (("require \"pry\"") "")
  3020. ;; CodeClimate is an online service, and is unnecessary for
  3021. ;; running the tests
  3022. (("require \"codeclimate-test-reporter\"") "")
  3023. (("CodeClimate.*\n") ""))
  3024. #t))
  3025. ;; No Rakefile is included, so run rspec directly.
  3026. (replace 'check
  3027. (lambda* (#:key tests? #:allow-other-keys)
  3028. (when tests?
  3029. (invoke "rspec"))
  3030. #t)))))
  3031. (propagated-inputs
  3032. `(("ruby-concurrent" ,ruby-concurrent)))
  3033. (native-inputs
  3034. `(("ruby-rspec" ,ruby-rspec)))
  3035. (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
  3036. (description
  3037. "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
  3038. @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
  3039. immutable queue or stack).")
  3040. (home-page "https://github.com/hamstergem/hamster")
  3041. (license license:expat)))
  3042. (define-public ruby-hashdiff
  3043. (package
  3044. (name "ruby-hashdiff")
  3045. (version "1.0.1")
  3046. (source
  3047. (origin
  3048. (method url-fetch)
  3049. (uri (rubygems-uri "hashdiff" version))
  3050. (sha256
  3051. (base32
  3052. "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
  3053. (build-system ruby-build-system)
  3054. (arguments
  3055. '(#:phases
  3056. (modify-phases %standard-phases
  3057. ;; Run tests directly via rspec to avoid depending on rubocop.
  3058. (replace 'check
  3059. (lambda* (#:key tests? #:allow-other-keys)
  3060. (when tests?
  3061. (invoke "rspec"))
  3062. #t)))))
  3063. (native-inputs
  3064. `(("bundler" ,bundler)
  3065. ("ruby-rspec" ,ruby-rspec-2)))
  3066. (synopsis "HashDiff computes the smallest difference between two hashes")
  3067. (description
  3068. "HashDiff is a Ruby library to compute the smallest difference between
  3069. two hashes.")
  3070. (home-page "https://github.com/liufengyun/hashdiff")
  3071. (license license:expat)))
  3072. (define-public ruby-hydra
  3073. ;; No releases yet.
  3074. (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
  3075. (revision "0"))
  3076. (package
  3077. (name "ruby-hydra")
  3078. (version (git-version "0.0" revision commit))
  3079. (home-page "https://github.com/hyphenation/hydra")
  3080. (source (origin
  3081. (method git-fetch)
  3082. (uri (git-reference (url home-page) (commit commit)))
  3083. (file-name (git-file-name name version))
  3084. (sha256
  3085. (base32
  3086. "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
  3087. (build-system ruby-build-system)
  3088. (arguments
  3089. '(#:phases (modify-phases %standard-phases
  3090. (add-after 'unpack 'make-files-writable
  3091. (lambda _
  3092. (for-each make-file-writable (find-files "."))
  3093. #t))
  3094. (replace 'check
  3095. (lambda _
  3096. (invoke "rspec"))))))
  3097. (native-inputs
  3098. `(("ruby-rspec" ,ruby-rspec)))
  3099. (propagated-inputs
  3100. `(("ruby-byebug" ,ruby-byebug)))
  3101. (synopsis "Ruby hyphenation patterns")
  3102. (description
  3103. "ruby-hydra is a Ruby library for working with hyphenation patterns.")
  3104. (license license:expat))))
  3105. (define-public ruby-shindo
  3106. (package
  3107. (name "ruby-shindo")
  3108. (version "0.3.8")
  3109. (source (origin
  3110. (method url-fetch)
  3111. (uri (rubygems-uri "shindo" version))
  3112. (sha256
  3113. (base32
  3114. "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
  3115. (build-system ruby-build-system)
  3116. (arguments
  3117. `(#:test-target "shindo_tests"
  3118. #:phases
  3119. (modify-phases %standard-phases
  3120. (add-after 'unpack 'fix-tests
  3121. (lambda _
  3122. (substitute* "tests/tests_helper.rb"
  3123. (("-rubygems") ""))
  3124. (substitute* "Rakefile"
  3125. (("system \"shindo") "system \"./bin/shindo")
  3126. ;; This test doesn't work, so we disable it.
  3127. (("fail \"The build_error test should fail") "#")
  3128. ((" -rubygems") ""))
  3129. #t)))))
  3130. (propagated-inputs
  3131. `(("ruby-formatador" ,ruby-formatador)))
  3132. (synopsis "Simple depth first Ruby testing")
  3133. (description "Shindo is a simple depth first testing library for Ruby.")
  3134. (home-page "https://github.com/geemus/shindo")
  3135. (license license:expat)))
  3136. (define-public ruby-rubygems-tasks
  3137. (package
  3138. (name "ruby-rubygems-tasks")
  3139. (version "0.2.5")
  3140. (source (origin
  3141. (method url-fetch)
  3142. (uri (rubygems-uri "rubygems-tasks" version))
  3143. (sha256
  3144. (base32
  3145. "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
  3146. (build-system ruby-build-system)
  3147. ;; Tests need Internet access.
  3148. (arguments `(#:tests? #f))
  3149. (native-inputs
  3150. `(("ruby-rspec" ,ruby-rspec)
  3151. ("ruby-yard" ,ruby-yard)))
  3152. (synopsis "Rake tasks for managing and releasing Ruby Gems")
  3153. (description "Rubygems-task provides Rake tasks for managing and releasing
  3154. Ruby Gems.")
  3155. (home-page "https://github.com/postmodern/rubygems-tasks")
  3156. (license license:expat)))
  3157. (define-public ruby-rubyzip
  3158. (package
  3159. (name "ruby-rubyzip")
  3160. (version "1.2.1")
  3161. (source
  3162. (origin
  3163. (method url-fetch)
  3164. (uri (rubygems-uri "rubyzip" version))
  3165. (sha256
  3166. (base32
  3167. "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
  3168. (build-system ruby-build-system)
  3169. (arguments
  3170. '(#:phases
  3171. (modify-phases %standard-phases
  3172. (add-before 'check 'patch-tests
  3173. (lambda* (#:key inputs #:allow-other-keys)
  3174. (substitute* "test/gentestfiles.rb"
  3175. (("/usr/bin/zip")
  3176. (string-append
  3177. (assoc-ref inputs "zip") "/bin/zip")))
  3178. (substitute* "test/input_stream_test.rb"
  3179. (("/usr/bin/env ruby") (which "ruby")))
  3180. #t)))))
  3181. (native-inputs
  3182. `(("bundler" ,bundler)
  3183. ("ruby-simplecov" ,ruby-simplecov)
  3184. ("zip" ,zip)
  3185. ("unzip" ,unzip)))
  3186. (synopsis "Ruby module is for reading and writing zip files")
  3187. (description
  3188. "The rubyzip module provides ways to read from and create zip files.")
  3189. (home-page "https://github.com/rubyzip/rubyzip")
  3190. (license license:bsd-2)))
  3191. (define-public ruby-simplecov-html
  3192. (package
  3193. (name "ruby-simplecov-html")
  3194. (version "0.10.2")
  3195. (source (origin
  3196. (method url-fetch)
  3197. (uri (rubygems-uri "simplecov-html" version))
  3198. (sha256
  3199. (base32
  3200. "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
  3201. (build-system ruby-build-system)
  3202. (arguments `(#:tests? #f)) ; there are no tests
  3203. (native-inputs
  3204. `(("bundler" ,bundler)))
  3205. (synopsis "Default HTML formatter for SimpleCov code coverage tool")
  3206. (description "This package provides the default HTML formatter for
  3207. the SimpleCov code coverage tool for Ruby version 1.9 and above.")
  3208. (home-page "https://github.com/colszowka/simplecov-html")
  3209. (license license:expat)))
  3210. (define-public ruby-simplecov
  3211. (package
  3212. (name "ruby-simplecov")
  3213. (version "0.17.1")
  3214. (source (origin
  3215. (method url-fetch)
  3216. (uri (rubygems-uri "simplecov" version))
  3217. (sha256
  3218. (base32
  3219. "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
  3220. (build-system ruby-build-system)
  3221. ;; Simplecov depends on rubocop for code style checking at build time.
  3222. ;; Rubocop needs simplecov at build time.
  3223. (arguments `(#:tests? #f))
  3224. (propagated-inputs
  3225. `(("ruby-json" ,ruby-json)
  3226. ("ruby-docile" ,ruby-docile)
  3227. ("ruby-simplecov-html" ,ruby-simplecov-html)))
  3228. (native-inputs
  3229. `(("bundler" ,bundler)))
  3230. (synopsis "Code coverage framework for Ruby")
  3231. (description "SimpleCov is a code coverage framework for Ruby with a
  3232. powerful configuration library and automatic merging of coverage across test
  3233. suites.")
  3234. (home-page "https://github.com/colszowka/simplecov")
  3235. (license license:expat)))
  3236. (define-public ruby-useragent
  3237. (package
  3238. (name "ruby-useragent")
  3239. (version "0.16.10")
  3240. (source (origin
  3241. (method url-fetch)
  3242. (uri (rubygems-uri "useragent" version))
  3243. (sha256
  3244. (base32
  3245. "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
  3246. (build-system ruby-build-system)
  3247. (arguments
  3248. '(#:tests? #f)) ; no test suite
  3249. (synopsis "HTTP user agent parser for Ruby")
  3250. (description "UserAgent is a Ruby library that parses and compares HTTP
  3251. User Agents.")
  3252. (home-page "https://github.com/gshutler/useragent")
  3253. (license license:expat)))
  3254. (define-public ruby-backports
  3255. (package
  3256. (name "ruby-backports")
  3257. (version "3.11.4")
  3258. (source
  3259. (origin
  3260. (method url-fetch)
  3261. (uri (rubygems-uri "backports" version))
  3262. (sha256
  3263. (base32
  3264. "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
  3265. (build-system ruby-build-system)
  3266. (arguments
  3267. '(;; TODO: This should be default, but there is one test failure
  3268. #:test-target "all_spec"))
  3269. (native-inputs
  3270. `(("ruby-mspec" ,ruby-mspec)
  3271. ("ruby-activesupport" ,ruby-activesupport)))
  3272. (synopsis "Backports of the features in newer Ruby versions")
  3273. (description
  3274. "Backports enables more compatibility across Ruby versions by providing
  3275. backports of some features.")
  3276. (home-page "https://github.com/marcandre/backports")
  3277. (license license:expat)))
  3278. (define-public ruby-bacon
  3279. (package
  3280. (name "ruby-bacon")
  3281. (version "1.2.0")
  3282. (source (origin
  3283. (method url-fetch)
  3284. (uri (rubygems-uri "bacon" version))
  3285. (sha256
  3286. (base32
  3287. "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
  3288. (build-system ruby-build-system)
  3289. (synopsis "Small RSpec clone")
  3290. (description "Bacon is a small RSpec clone providing all essential
  3291. features.")
  3292. (home-page "https://github.com/chneukirchen/bacon")
  3293. (license license:expat)))
  3294. (define-public ruby-bacon-bits
  3295. (package
  3296. (name "ruby-bacon-bits")
  3297. (version "0.1.0")
  3298. (source
  3299. (origin
  3300. (method url-fetch)
  3301. (uri (rubygems-uri "bacon-bits" version))
  3302. (sha256
  3303. (base32
  3304. "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
  3305. (build-system ruby-build-system)
  3306. (arguments
  3307. ;; No tests
  3308. '(#:tests? #f))
  3309. (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
  3310. (synopsis "Extensions to Bacon, for disabling tests, before and after
  3311. blocks and more")
  3312. (description
  3313. "This extends the bacon testing framework with useful extensions to
  3314. disable tests, have before and after blocks that run once and more.")
  3315. (home-page "https://github.com/cldwalker/bacon-bits")
  3316. (license license:expat)))
  3317. (define-public ruby-bacon-colored-output
  3318. (package
  3319. (name "ruby-bacon-colored-output")
  3320. (version "1.1.1")
  3321. (source
  3322. (origin
  3323. (method url-fetch)
  3324. (uri (rubygems-uri "bacon-colored_output" version))
  3325. (sha256
  3326. (base32
  3327. "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
  3328. (build-system ruby-build-system)
  3329. (arguments
  3330. '(;; No included tests
  3331. #:tests? #f))
  3332. (propagated-inputs
  3333. `(("ruby-bacon" ,ruby-bacon)))
  3334. (synopsis "Colored output for Bacon test framework")
  3335. (description
  3336. "This package adds color through ANSI escape codes to Bacon test
  3337. output.")
  3338. (home-page "https://github.com/whitequark/bacon-colored_output")
  3339. (license license:expat)))
  3340. (define-public ruby-connection-pool
  3341. (package
  3342. (name "ruby-connection-pool")
  3343. (version "2.2.2")
  3344. (source (origin
  3345. (method url-fetch)
  3346. (uri (rubygems-uri "connection_pool" version))
  3347. (sha256
  3348. (base32
  3349. "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
  3350. (build-system ruby-build-system)
  3351. (native-inputs
  3352. `(("bundler" ,bundler)))
  3353. (synopsis "Generic connection pool for Ruby")
  3354. (description "Connection_pool provides a generic connection pooling
  3355. interface for Ruby programs.")
  3356. (home-page "https://github.com/mperham/connection_pool")
  3357. (license license:expat)))
  3358. (define-public ruby-fast-gettext
  3359. (package
  3360. (name "ruby-fast-gettext")
  3361. (version "2.0.3")
  3362. (home-page "https://github.com/grosser/fast_gettext")
  3363. (source (origin
  3364. (method git-fetch)
  3365. (uri (git-reference (url home-page)
  3366. (commit (string-append "v" version))))
  3367. (file-name (git-file-name name version))
  3368. (sha256
  3369. (base32
  3370. "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
  3371. (build-system ruby-build-system)
  3372. (arguments
  3373. '(#:test-target "spec"
  3374. #:phases (modify-phases %standard-phases
  3375. (add-before 'check 'remove-version-constraints
  3376. (lambda _
  3377. (delete-file "Gemfile.lock")
  3378. #t))
  3379. (add-before 'check 'remove-activerecord-test
  3380. (lambda _
  3381. ;; FIXME: This test fails because ActiveRecord depends on
  3382. ;; a different version of ruby-sqlite than the currently
  3383. ;; available one.
  3384. (delete-file
  3385. "spec/fast_gettext/translation_repository/db_spec.rb")
  3386. #t))
  3387. (add-before 'check 'disable-i18n-test
  3388. (lambda _
  3389. ;; XXX: This test checks i18n intricasies with Rails 3 and
  3390. ;; automatically disables itself for Rails 4.0, but does
  3391. ;; not know about newer versions as it has not been updated
  3392. ;; since 2014. Disable for later versions of Rails too.
  3393. (substitute* "spec/fast_gettext/vendor/string_spec.rb"
  3394. (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
  3395. "ActiveRecord::VERSION::MINOR == 0"))
  3396. "ActiveRecord::VERSION::MAJOR >= 4"))
  3397. #t)))))
  3398. (native-inputs
  3399. `(;; For tests.
  3400. ("ruby-activerecord" ,ruby-activerecord)
  3401. ("ruby-activesupport" ,ruby-activesupport)
  3402. ("ruby-bump" ,ruby-bump)
  3403. ("ruby-forking-test-runner" ,ruby-forking-test-runner)
  3404. ("ruby-i18n" ,ruby-i18n)
  3405. ("ruby-rubocop" ,ruby-rubocop)
  3406. ("ruby-rspec" ,ruby-rspec)
  3407. ("ruby-single-cov" ,ruby-single-cov)
  3408. ("ruby-sqlite3" ,ruby-sqlite3)
  3409. ("ruby-wwtd" ,ruby-wwtd)))
  3410. (synopsis "Fast implementation of @code{GetText}")
  3411. (description
  3412. "This package provides an alternative implementation of the Ruby
  3413. @code{GetText} library that is approximately 12x faster yet thread safe.")
  3414. ;; Some parts are covered by the Ruby license, see file headers.
  3415. (license (list license:expat license:ruby))))
  3416. (define-public ruby-net-http-persistent
  3417. (package
  3418. (name "ruby-net-http-persistent")
  3419. (version "3.0.0")
  3420. (source (origin
  3421. (method url-fetch)
  3422. (uri (rubygems-uri "net-http-persistent" version))
  3423. (sha256
  3424. (base32
  3425. "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
  3426. (build-system ruby-build-system)
  3427. (native-inputs
  3428. `(("ruby-connection-pool" ,ruby-connection-pool)
  3429. ("ruby-hoe" ,ruby-hoe)))
  3430. (synopsis "Persistent HTTP connection manager")
  3431. (description "Net::HTTP::Persistent manages persistent HTTP connections
  3432. using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
  3433. (home-page "https://github.com/drbrain/net-http-persistent")
  3434. (license license:expat)))
  3435. (define-public ruby-power-assert
  3436. (package
  3437. (name "ruby-power-assert")
  3438. (version "1.1.5")
  3439. (source (origin
  3440. (method url-fetch)
  3441. (uri (rubygems-uri "power_assert" version))
  3442. (sha256
  3443. (base32
  3444. "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
  3445. (build-system ruby-build-system)
  3446. (arguments
  3447. '(#:tests? #f)) ; No included tests
  3448. (native-inputs
  3449. `(("bundler" ,bundler)))
  3450. (synopsis "Assert library with descriptive assertion messages")
  3451. (description "Power-assert is an assertion library providing descriptive
  3452. assertion messages for tests.")
  3453. (home-page "https://github.com/k-tsj/power_assert")
  3454. (license (list license:bsd-2 license:ruby))))
  3455. (define-public ruby-powerpack
  3456. (package
  3457. (name "ruby-powerpack")
  3458. (version "0.1.2")
  3459. (source
  3460. (origin
  3461. (method url-fetch)
  3462. (uri (rubygems-uri "powerpack" version))
  3463. (sha256
  3464. (base32
  3465. "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
  3466. (build-system ruby-build-system)
  3467. (arguments
  3468. '(#:test-target "spec"))
  3469. (native-inputs
  3470. `(("bundler" ,bundler)
  3471. ("ruby-rspec" ,ruby-rspec)
  3472. ("ruby-yard" ,ruby-yard)))
  3473. (synopsis "Useful extensions to core Ruby classes")
  3474. (description
  3475. "This package provides a few useful extensions to core Ruby classes,
  3476. including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
  3477. @code{String}.")
  3478. (home-page "https://github.com/bbatsov/powerpack")
  3479. (license license:expat)))
  3480. (define-public ruby-locale
  3481. (package
  3482. (name "ruby-locale")
  3483. (version "2.1.2")
  3484. (source (origin
  3485. (method url-fetch)
  3486. (uri (rubygems-uri "locale" version))
  3487. (sha256
  3488. (base32
  3489. "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
  3490. (build-system ruby-build-system)
  3491. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  3492. ;; which needs ruby-gettext, which needs ruby-locale. To break the
  3493. ;; dependency cycle we disable tests.
  3494. (arguments `(#:tests? #f))
  3495. (native-inputs
  3496. `(("bundler" ,bundler)
  3497. ("ruby-yard" ,ruby-yard)))
  3498. (synopsis "Ruby library providing basic localization APIs")
  3499. (description
  3500. "Ruby-Locale is the pure ruby library which provides basic APIs for
  3501. localization.")
  3502. (home-page "https://github.com/ruby-gettext/locale")
  3503. (license (list license:lgpl3+ license:ruby))))
  3504. (define-public ruby-temple
  3505. (package
  3506. (name "ruby-temple")
  3507. (version "0.8.2")
  3508. (source
  3509. (origin
  3510. (method url-fetch)
  3511. (uri (rubygems-uri "temple" version))
  3512. (sha256
  3513. (base32
  3514. "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
  3515. (build-system ruby-build-system)
  3516. (native-inputs
  3517. `(("ruby-tilt" ,ruby-tilt)
  3518. ("ruby-bacon" ,ruby-bacon)
  3519. ("ruby-erubis" ,ruby-erubis)))
  3520. (synopsis "Template compilation framework in Ruby")
  3521. (description
  3522. "Temple is an abstraction and framework for compiling templates to pure
  3523. Ruby.")
  3524. (home-page "https://github.com/judofyr/temple")
  3525. (license license:expat)))
  3526. (define-public ruby-text
  3527. (package
  3528. (name "ruby-text")
  3529. (version "1.3.1")
  3530. (source (origin
  3531. (method url-fetch)
  3532. (uri (rubygems-uri "text" version))
  3533. (sha256
  3534. (base32
  3535. "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
  3536. (build-system ruby-build-system)
  3537. (synopsis "Collection of text algorithms for Ruby")
  3538. (description
  3539. "This package provides a collection of text algorithms: Levenshtein,
  3540. Soundex, Metaphone, Double Metaphone, Porter Stemming.")
  3541. (home-page "https://github.com/threedaymonk/text")
  3542. (license license:expat)))
  3543. (define-public ruby-gettext
  3544. (package
  3545. (name "ruby-gettext")
  3546. (version "3.1.7")
  3547. (source (origin
  3548. (method url-fetch)
  3549. (uri (rubygems-uri "gettext" version))
  3550. (sha256
  3551. (base32
  3552. "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
  3553. (build-system ruby-build-system)
  3554. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  3555. ;; which needs ruby-gettext. To break the dependency cycle we disable
  3556. ;; tests.
  3557. (arguments `(#:tests? #f))
  3558. (propagated-inputs
  3559. `(("ruby-locale" ,ruby-locale)
  3560. ("ruby-text" ,ruby-text)))
  3561. (native-inputs
  3562. `(("bundler" ,bundler)
  3563. ("ruby-yard" ,ruby-yard)))
  3564. (synopsis "GNU gettext-like program for Ruby")
  3565. (description
  3566. "Gettext is a GNU gettext-like program for Ruby. The catalog
  3567. file (po-file) used is the same as that used by GNU gettext, allowing you to
  3568. use GNU gettext tools for maintenance.")
  3569. (home-page "https://ruby-gettext.github.com/")
  3570. (license (list license:lgpl3+ license:ruby))))
  3571. (define-public ruby-packnga
  3572. (package
  3573. (name "ruby-packnga")
  3574. (version "1.0.4")
  3575. (source (origin
  3576. (method url-fetch)
  3577. (uri (rubygems-uri "packnga" version))
  3578. (sha256
  3579. (base32
  3580. "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
  3581. (build-system ruby-build-system)
  3582. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
  3583. ;; To break the dependency cycle we disable tests.
  3584. (arguments `(#:tests? #f))
  3585. (propagated-inputs
  3586. `(("ruby-gettext" ,ruby-gettext)
  3587. ("ruby-yard" ,ruby-yard)))
  3588. (native-inputs
  3589. `(("bundler" ,bundler)))
  3590. (synopsis "Utility library to package internationalized libraries")
  3591. (description
  3592. "Packnga is a library to translate to many languages using YARD.")
  3593. (home-page "http://ranguba.org/packnga/")
  3594. (license license:lgpl2.0+)))
  3595. (define-public ruby-test-construct
  3596. (package
  3597. (name "ruby-test-construct")
  3598. (version "2.0.1")
  3599. (source
  3600. (origin
  3601. (method url-fetch)
  3602. (uri (rubygems-uri "test_construct" version))
  3603. (sha256
  3604. (base32
  3605. "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
  3606. (build-system ruby-build-system)
  3607. (native-inputs
  3608. `(("bundler" ,bundler)
  3609. ("ruby-mocha" ,ruby-mocha)
  3610. ("ruby-rspec" ,ruby-rspec)))
  3611. (synopsis "Creates temporary files and directories for testing")
  3612. (description
  3613. "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
  3614. temporary files and directories during tests.")
  3615. (home-page "https://github.com/bhb/test_construct")
  3616. (license license:expat)))
  3617. (define-public ruby-test-unit
  3618. (package
  3619. (name "ruby-test-unit")
  3620. (version "3.4.4")
  3621. (source (origin
  3622. (method url-fetch)
  3623. (uri (rubygems-uri "test-unit" version))
  3624. (sha256
  3625. (base32
  3626. "15isy7vhppbfd0032klirj9gxp65ygkzjdwrmm28xpirlcsk6qpd"))))
  3627. (build-system ruby-build-system)
  3628. (propagated-inputs
  3629. `(("ruby-power-assert" ,ruby-power-assert)))
  3630. (native-inputs
  3631. `(("bundler" ,bundler)
  3632. ("ruby-packnga" ,ruby-packnga)
  3633. ("ruby-yard" ,ruby-yard)))
  3634. (synopsis "Unit testing framework for Ruby")
  3635. (description "@code{Test::Unit} is unit testing framework for Ruby, based
  3636. on xUnit principles. These were originally designed by Kent Beck, creator of
  3637. extreme programming software development methodology, for Smalltalk's SUnit.
  3638. It allows writing tests, checking results and automated testing in Ruby.")
  3639. (home-page "https://test-unit.github.io/")
  3640. (license (list license:psfl license:ruby))))
  3641. (define-public ruby-markaby
  3642. (package
  3643. (name "ruby-markaby")
  3644. (version "0.9.0")
  3645. (source
  3646. (origin
  3647. (method url-fetch)
  3648. (uri (rubygems-uri "markaby" version))
  3649. (sha256
  3650. (base32
  3651. "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
  3652. (build-system ruby-build-system)
  3653. (arguments
  3654. '(#:phases
  3655. (modify-phases %standard-phases
  3656. ;; Run rspec manually without using the Rakefile, as the versions of
  3657. ;; Rake and RSpec 2 are incompatible:
  3658. ;;
  3659. ;; NoMethodError: undefined method `last_comment'
  3660. (replace 'check
  3661. (lambda* (#:key tests? #:allow-other-keys)
  3662. (when tests?
  3663. (invoke "rspec"))
  3664. #t)))))
  3665. (propagated-inputs
  3666. `(("ruby-builder" ,ruby-builder)))
  3667. (native-inputs
  3668. `(("bundler" ,bundler)
  3669. ("ruby-rspec" ,ruby-rspec-2)))
  3670. (synopsis "Write HTML pages in pure Ruby")
  3671. (description
  3672. "Markaby allows writing HTML packages in pure Ruby. This is similar to
  3673. the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
  3674. mixture of HTML and additional ERB syntax.")
  3675. (home-page "https://markaby.github.io/")
  3676. (license license:expat)))
  3677. (define-public ruby-maruku
  3678. (package
  3679. (name "ruby-maruku")
  3680. (version "0.7.3")
  3681. (source
  3682. (origin
  3683. (method url-fetch)
  3684. (uri (rubygems-uri "maruku" version))
  3685. (sha256
  3686. (base32
  3687. "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
  3688. (build-system ruby-build-system)
  3689. (arguments
  3690. '(;; TODO: 3 tests seem to fail due to HTML encoding issues
  3691. #:tests? #f
  3692. #:phases
  3693. (modify-phases %standard-phases
  3694. (replace 'check
  3695. (lambda* (#:key tests? #:allow-other-keys)
  3696. (when tests?
  3697. (invoke "rspec"))
  3698. #t)))))
  3699. (native-inputs
  3700. `(("ruby-rspec" ,ruby-rspec)
  3701. ("ruby-simplecov" ,ruby-simplecov)
  3702. ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
  3703. (synopsis "Markdown interpreter in Ruby")
  3704. (description
  3705. "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
  3706. HTML, and PDF through LaTeX.")
  3707. (home-page "https://github.com/bhollis/maruku")
  3708. (license license:expat)))
  3709. (define-public ruby-metaclass
  3710. (package
  3711. (name "ruby-metaclass")
  3712. (version "0.0.4")
  3713. (source (origin
  3714. (method url-fetch)
  3715. (uri (rubygems-uri "metaclass" version))
  3716. (sha256
  3717. (base32
  3718. "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
  3719. (build-system ruby-build-system)
  3720. (arguments
  3721. `(#:phases
  3722. (modify-phases %standard-phases
  3723. (add-after 'unpack 'add-test-unit-to-search-path
  3724. (lambda* (#:key inputs #:allow-other-keys)
  3725. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  3726. (substitute* "Rakefile"
  3727. (("t\\.libs << \"test\"" line)
  3728. (string-append line "; t.libs << \""
  3729. test-unit "/lib/ruby/vendor_ruby"
  3730. "/gems/test-unit-"
  3731. ,(package-version ruby-test-unit)
  3732. "/lib\""))))
  3733. #t)))))
  3734. (native-inputs
  3735. `(("bundler" ,bundler)
  3736. ("ruby-test-unit" ,ruby-test-unit)))
  3737. (synopsis "Ruby library adding metaclass method to all objects")
  3738. (description
  3739. "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
  3740. objects.")
  3741. (home-page "https://github.com/floehopper/metaclass")
  3742. (license license:expat)))
  3743. (define-public ruby-mkmf-lite
  3744. (package
  3745. (name "ruby-mkmf-lite")
  3746. (version "0.3.2")
  3747. (source (origin
  3748. (method url-fetch)
  3749. (uri (rubygems-uri "mkmf-lite" version))
  3750. (sha256
  3751. (base32
  3752. "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
  3753. (build-system ruby-build-system)
  3754. (propagated-inputs
  3755. `(("ruby-ptools" ,ruby-ptools)))
  3756. (synopsis "Lightweight alternative to @code{mkmf}")
  3757. (description
  3758. "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
  3759. for use as a library. It does not create packages, builds, or log files of
  3760. any kind. Instead, it provides mixin methods that you can use in FFI or tests
  3761. to check for the presence of header files, constants, and so on.")
  3762. (home-page "https://github.com/djberg96/mkmf-lite")
  3763. (license license:asl2.0)))
  3764. (define-public ruby-mspec
  3765. (package
  3766. (name "ruby-mspec")
  3767. (version "1.9.1")
  3768. (source
  3769. (origin
  3770. (method url-fetch)
  3771. (uri (rubygems-uri "mspec" version))
  3772. (sha256
  3773. (base32
  3774. "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
  3775. (build-system ruby-build-system)
  3776. (arguments
  3777. '(;; TODO: 3 test failures
  3778. ;; ./spec/mocks/mock_spec.rb:82
  3779. ;; ./spec/utils/name_map_spec.rb:151
  3780. ;; ./spec/utils/name_map_spec.rb:155
  3781. #:tests? #f
  3782. #:phases
  3783. (modify-phases %standard-phases
  3784. (add-after 'extract-gemspec 'change-dependency-constraints
  3785. (lambda _
  3786. (substitute* "mspec.gemspec"
  3787. (("rake.*") "rake>)\n")
  3788. (("rspec.*") "rspec>)\n"))
  3789. #t))
  3790. (replace 'check
  3791. (lambda* (#:key tests? #:allow-other-keys)
  3792. (when tests?
  3793. (invoke "rspec" "spec"))
  3794. #t)))))
  3795. (native-inputs
  3796. `(("bundler" ,bundler)
  3797. ("ruby-rake" ,ruby-rake)
  3798. ("ruby-rspec" ,ruby-rspec)))
  3799. (synopsis "MSpec is a specialized framework for RubySpec")
  3800. (description
  3801. "MSpec is a specialized framework that is syntax-compatible with RSpec 2
  3802. for basic features. MSpec contains additional features that assist in writing
  3803. specs for Ruby implementations in ruby/spec.")
  3804. (home-page "http://rubyspec.org")
  3805. (license license:expat)))
  3806. (define-public ruby-mysql2
  3807. (package
  3808. (name "ruby-mysql2")
  3809. (version "0.5.2")
  3810. (source
  3811. (origin
  3812. (method git-fetch)
  3813. (uri (git-reference
  3814. (url "https://github.com/brianmario/mysql2")
  3815. (commit version)))
  3816. (file-name (git-file-name name version))
  3817. (sha256
  3818. (base32
  3819. "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
  3820. (build-system ruby-build-system)
  3821. (arguments
  3822. '(;; TODO: Tests require a running MySQL/MariaDB service
  3823. #:tests? #f
  3824. #:phases
  3825. (modify-phases %standard-phases
  3826. (replace 'replace-git-ls-files
  3827. (lambda _
  3828. (substitute* "mysql2.gemspec"
  3829. (("git ls-files .*`") "find . -type f |sort`"))
  3830. #t))
  3831. (add-before 'install 'set-MAKEFLAGS
  3832. (lambda* (#:key outputs #:allow-other-keys)
  3833. (setenv "MAKEFLAGS"
  3834. (string-append
  3835. "V=1 "
  3836. "prefix=" (assoc-ref outputs "out")))
  3837. #t))
  3838. ;; Move the 'check phase to after 'install, as then you can test
  3839. ;; using the installed mysql2 gem in the store.
  3840. (delete 'check)
  3841. (add-after 'install 'check
  3842. (lambda* (#:key outputs tests? #:allow-other-keys)
  3843. (setenv "GEM_PATH"
  3844. (string-append
  3845. (getenv "GEM_PATH")
  3846. ":"
  3847. (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
  3848. (when tests?
  3849. (invoke "rspec"))
  3850. #t)))))
  3851. (inputs
  3852. `(("mariadb-dev" ,mariadb "dev")
  3853. ("zlib" ,zlib)))
  3854. (native-inputs
  3855. `(("ruby-rspec" ,ruby-rspec)
  3856. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  3857. (synopsis "MySQL library for Ruby, binding to libmysql")
  3858. (description
  3859. "This package provides a simple, fast MySQL library for Ruby, binding to
  3860. libmysql.")
  3861. (home-page "https://github.com/brianmario/mysql2")
  3862. (license license:expat)))
  3863. (define-public ruby-blankslate
  3864. (package
  3865. (name "ruby-blankslate")
  3866. (version "3.1.3")
  3867. (source (origin
  3868. (method url-fetch)
  3869. (uri (rubygems-uri "blankslate" version))
  3870. (sha256
  3871. (base32
  3872. "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
  3873. (build-system ruby-build-system)
  3874. (arguments
  3875. `(#:phases
  3876. (modify-phases %standard-phases
  3877. (replace 'check
  3878. (lambda _ (invoke "rspec" "spec/"))))))
  3879. (native-inputs
  3880. `(("bundler" ,bundler)
  3881. ("ruby-rspec" ,ruby-rspec)))
  3882. (synopsis "Abstract base class with no predefined methods")
  3883. (description
  3884. "BlankSlate provides an abstract base class with no predefined
  3885. methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
  3886. as a base class when writing classes that depend upon
  3887. @code{method_missing} (e.g. dynamic proxies).")
  3888. (home-page "https://github.com/masover/blankslate")
  3889. (license license:expat)))
  3890. (define-public ruby-bond
  3891. (package
  3892. (name "ruby-bond")
  3893. (version "0.5.1")
  3894. (source
  3895. (origin
  3896. (method url-fetch)
  3897. (uri (rubygems-uri "bond" version))
  3898. (sha256
  3899. (base32
  3900. "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
  3901. (build-system ruby-build-system)
  3902. (arguments
  3903. ;; The test suite fails (see:
  3904. ;; https://github.com/cldwalker/bond/issues/46).
  3905. `(#:tests? #f))
  3906. (native-inputs
  3907. `(("ruby-bacon" ,ruby-bacon)
  3908. ("ruby-bacon-bits" ,ruby-bacon-bits)
  3909. ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
  3910. (synopsis "Bond can provide custom autocompletion for arguments, methods
  3911. and more")
  3912. (description
  3913. "Bond can autocomplete argument(s) to methods, uniquely completing per
  3914. module, per method and per argument. Bond provides a configuration system and
  3915. a DSL for creating custom completions and completion rules. Bond can also
  3916. load completions that ship with gems. Bond is able to offer more than irb's
  3917. completion since it uses the full line of input when completing as opposed to
  3918. irb's last-word approach.")
  3919. (home-page "http://tagaholic.me/bond/")
  3920. (license license:expat)))
  3921. (define-public ruby-idn-ruby
  3922. (package
  3923. (name "ruby-idn-ruby")
  3924. (version "0.1.0")
  3925. (source
  3926. (origin
  3927. (method url-fetch)
  3928. (uri (rubygems-uri "idn-ruby" version))
  3929. (sha256
  3930. (base32
  3931. "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
  3932. (build-system ruby-build-system)
  3933. (arguments
  3934. '(#:phases
  3935. (modify-phases %standard-phases
  3936. (delete 'check)
  3937. (add-after 'install 'check
  3938. (lambda* (#:key tests? outputs #:allow-other-keys)
  3939. (when tests?
  3940. (let* ((gem-file (cadr (find-files "." "\\.gem")))
  3941. (name-and-version (basename gem-file ".gem")))
  3942. (apply invoke
  3943. "ruby" "--verbose"
  3944. (string-append "-I"
  3945. (assoc-ref outputs "out")
  3946. "/lib/ruby/vendor_ruby/gems/"
  3947. name-and-version
  3948. "/lib")
  3949. (find-files "./test" ".*\\.rb"))))
  3950. #t)))))
  3951. (inputs
  3952. `(("libidn" ,libidn)))
  3953. (synopsis "Ruby Bindings for the GNU LibIDN library")
  3954. (description
  3955. "Ruby Bindings for the GNU LibIDN library, an implementation of the
  3956. Stringprep, Punycode and IDNA specifications. These are used to encode and
  3957. decode internationalized domain + names according to the IDNA2003
  3958. specifications.
  3959. Included are the most important parts of the Stringprep, Punycode and IDNA
  3960. APIs like performing Stringprep processings, encoding to and decoding from
  3961. Punycode strings and converting entire domain names to and from the ACE
  3962. encoded form.")
  3963. (home-page "https://github.com/deepfryed/idn-ruby")
  3964. (license license:asl2.0)))
  3965. (define-public ruby-instantiator
  3966. (package
  3967. (name "ruby-instantiator")
  3968. (version "0.0.7")
  3969. (source (origin
  3970. (method url-fetch)
  3971. (uri (rubygems-uri "instantiator" version))
  3972. (sha256
  3973. (base32
  3974. "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
  3975. (build-system ruby-build-system)
  3976. (arguments
  3977. `(#:phases
  3978. (modify-phases %standard-phases
  3979. (add-after 'unpack 'add-test-unit-to-search-path
  3980. (lambda* (#:key inputs #:allow-other-keys)
  3981. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  3982. (substitute* "Rakefile"
  3983. (("t\\.libs << \"test\"" line)
  3984. (string-append line "; t.libs << \""
  3985. test-unit "/lib/ruby/vendor_ruby"
  3986. "/gems/test-unit-"
  3987. ,(package-version ruby-test-unit)
  3988. "/lib\""))))
  3989. #t)))))
  3990. (propagated-inputs
  3991. `(("ruby-blankslate" ,ruby-blankslate)))
  3992. (native-inputs
  3993. `(("bundler" ,bundler)
  3994. ("ruby-test-unit" ,ruby-test-unit)))
  3995. (synopsis "Instantiate an arbitrary Ruby class")
  3996. (description
  3997. "Instantiator lets you instantiate an arbitrary Ruby class without
  3998. knowing anything about the constructor.")
  3999. (home-page "https://github.com/floehopper/instantiator")
  4000. (license license:expat)))
  4001. (define-public ruby-introspection
  4002. (package
  4003. (name "ruby-introspection")
  4004. (version "0.0.4")
  4005. (source (origin
  4006. (method url-fetch)
  4007. (uri (rubygems-uri "introspection" version))
  4008. (sha256
  4009. (base32
  4010. "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
  4011. (build-system ruby-build-system)
  4012. (arguments
  4013. `(#:phases
  4014. (modify-phases %standard-phases
  4015. (add-after 'unpack 'add-test-unit-to-search-path
  4016. (lambda* (#:key inputs #:allow-other-keys)
  4017. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  4018. (substitute* "Rakefile"
  4019. (("t\\.libs << \"test\"" line)
  4020. (string-append line "; t.libs << \""
  4021. test-unit "/lib/ruby/vendor_ruby"
  4022. "/gems/test-unit-"
  4023. ,(package-version ruby-test-unit)
  4024. "/lib\""))))
  4025. #t)))))
  4026. (propagated-inputs
  4027. `(("ruby-instantiator" ,ruby-instantiator)
  4028. ("ruby-metaclass" ,ruby-metaclass)))
  4029. (native-inputs
  4030. `(("bundler" ,bundler)
  4031. ("ruby-blankslate" ,ruby-blankslate)
  4032. ("ruby-test-unit" ,ruby-test-unit)))
  4033. (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
  4034. (description
  4035. "Introspection provides tools to inspect the hierarchy of method
  4036. definitions on a Ruby object.")
  4037. (home-page "https://github.com/floehopper/introspection")
  4038. (license license:expat)))
  4039. (define-public ruby-redcarpet
  4040. (package
  4041. (name "ruby-redcarpet")
  4042. (version "3.5.0")
  4043. (source (origin
  4044. (method url-fetch)
  4045. (uri (rubygems-uri "redcarpet" version))
  4046. (sha256
  4047. (base32
  4048. "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
  4049. (build-system ruby-build-system)
  4050. (arguments
  4051. `(#:phases
  4052. (modify-phases %standard-phases
  4053. ;; The gem archive does not include the conformance tests.
  4054. (add-after 'unpack 'disable-conformance-tests
  4055. (lambda _
  4056. (substitute* "Rakefile"
  4057. (("task :test => %w\\[test:unit test:conformance\\]")
  4058. "task :test => %w[test:unit]"))
  4059. #t)))))
  4060. (native-inputs
  4061. `(("bundler" ,bundler)
  4062. ("ruby-test-unit" ,ruby-test-unit)
  4063. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  4064. (synopsis "Extensible Markdown to (X)HTML converter")
  4065. (description
  4066. "Redcarpet is an extensible Ruby library for Markdown processing and
  4067. conversion to (X)HTML.")
  4068. (home-page "https://github.com/vmg/redcarpet")
  4069. (license license:expat)))
  4070. (define-public ruby-rerun
  4071. (package
  4072. (name "ruby-rerun")
  4073. (version "0.13.0")
  4074. (source
  4075. (origin
  4076. (method url-fetch)
  4077. (uri (rubygems-uri "rerun" version))
  4078. (sha256
  4079. (base32
  4080. "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
  4081. (build-system ruby-build-system)
  4082. (arguments
  4083. '(#:tests? #f)) ; No included tests
  4084. (propagated-inputs
  4085. `(("ruby-listen" ,ruby-listen)))
  4086. (synopsis "Run a process, and restart when some monitored files change")
  4087. (description
  4088. "Rerun is a tool to launch programs, then monitor the file system, and
  4089. restart the program when any of the monitored files change. It's written in
  4090. Ruby, but can be used for all programs.")
  4091. (home-page "https://github.com/alexch/rerun/")
  4092. (license license:expat)))
  4093. (define-public ruby-maxitest
  4094. (package
  4095. (name "ruby-maxitest")
  4096. (version "3.6.0")
  4097. (home-page "https://github.com/grosser/maxitest")
  4098. (source (origin
  4099. ;; Pull from git because the gem does not contain tests.
  4100. (method git-fetch)
  4101. (uri (git-reference
  4102. (url home-page)
  4103. (commit (string-append "v" version))))
  4104. (file-name (git-file-name name version))
  4105. (sha256
  4106. (base32
  4107. "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
  4108. (build-system ruby-build-system)
  4109. (arguments
  4110. '(#:test-target "default"
  4111. #:phases (modify-phases %standard-phases
  4112. (replace 'replace-git-ls-files
  4113. (lambda _
  4114. (substitute* "maxitest.gemspec"
  4115. (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
  4116. "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
  4117. #t))
  4118. (add-before 'check 'remove-version-constraints
  4119. (lambda _
  4120. ;; Don't use specific versions of dependencies, instead
  4121. ;; take whatever is available in Guix.
  4122. (delete-file "Gemfile.lock")
  4123. #t))
  4124. (add-before 'check 'add-mtest-on-PATH
  4125. (lambda _
  4126. ;; Tests use 'mtest' which is not automatically added on
  4127. ;; PATH.
  4128. (setenv "PATH" (string-append (getcwd) "/bin:"
  4129. (getenv "PATH")))
  4130. #t)))))
  4131. (native-inputs
  4132. `(("ps" ,procps)
  4133. ("ruby-bump" ,ruby-bump)
  4134. ("ruby-byebug" ,ruby-byebug)
  4135. ("ruby-rspec" ,ruby-rspec)
  4136. ("ruby-wwtd" ,ruby-wwtd)))
  4137. (propagated-inputs
  4138. `(("ruby-minitest" ,ruby-minitest)))
  4139. (synopsis "Minitest with extra features")
  4140. (description
  4141. "Maxitest is a wrapper around Minitest with extra functionality such
  4142. as timeouts, an @command{mtest} executable that can run tests by line
  4143. number, support for interrupted tests, better backtraces, and more.")
  4144. (license license:expat)))
  4145. (define-public ruby-mocha
  4146. (package
  4147. (name "ruby-mocha")
  4148. (version "1.13.0")
  4149. (source (origin
  4150. (method url-fetch)
  4151. (uri (rubygems-uri "mocha" version))
  4152. (sha256
  4153. (base32
  4154. "15s53ggsykk69kxqvs4416s8yxdhz6caggva55n8sjgy4ixzwp10"))))
  4155. (build-system ruby-build-system)
  4156. (arguments
  4157. `(#:phases
  4158. (modify-phases %standard-phases
  4159. (add-before 'check 'remove-rubocop-dependency
  4160. (lambda _
  4161. ;; Disable dependency on Rubocop, which is just a linter,
  4162. ;; and would introduce a circular dependency.
  4163. (substitute* "mocha.gemspec"
  4164. ((".*rubocop.*")
  4165. "true\n"))
  4166. #t)))))
  4167. (native-inputs
  4168. `(("ruby-introspection" ,ruby-introspection)))
  4169. (synopsis "Mocking and stubbing library for Ruby")
  4170. (description
  4171. "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
  4172. allows mocking and stubbing of methods on real (non-mock) classes.")
  4173. (home-page "https://mocha.jamesmead.org/")
  4174. ;; Mocha can be used with either license at the users choice.
  4175. (license (list license:expat license:ruby))))
  4176. (define-public ruby-mocha-on-bacon
  4177. (package
  4178. (name "ruby-mocha-on-bacon")
  4179. (version "0.2.3")
  4180. (source
  4181. (origin
  4182. (method url-fetch)
  4183. (uri (rubygems-uri "mocha-on-bacon" version))
  4184. (sha256
  4185. (base32
  4186. "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
  4187. (build-system ruby-build-system)
  4188. (arguments
  4189. ;; rubygems.org release missing tests
  4190. '(#:tests? #f))
  4191. (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
  4192. (synopsis "Mocha adapter for Bacon")
  4193. (description
  4194. "This package provides a Mocha adapter for Bacon, allowing you to use the
  4195. Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
  4196. (home-page
  4197. "https://github.com/alloy/mocha-on-bacon")
  4198. (license license:expat)))
  4199. (define-public ruby-net-ssh
  4200. (package
  4201. (name "ruby-net-ssh")
  4202. (version "4.2.0")
  4203. (source (origin
  4204. (method url-fetch)
  4205. (uri (rubygems-uri "net-ssh" version))
  4206. (sha256
  4207. (base32
  4208. "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
  4209. (build-system ruby-build-system)
  4210. (native-inputs
  4211. `(("bundler" ,bundler)
  4212. ("ruby-mocha" ,ruby-mocha)
  4213. ("ruby-test-unit" ,ruby-test-unit)))
  4214. (synopsis "Ruby implementation of the SSH2 client protocol")
  4215. (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
  4216. client protocol. It allows you to write programs that invoke and interact
  4217. with processes on remote servers, via SSH2.")
  4218. (home-page "https://github.com/net-ssh/net-ssh")
  4219. (license license:expat)))
  4220. (define-public ruby-net-scp
  4221. (package
  4222. (name "ruby-net-scp")
  4223. ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
  4224. (version "1.2.2.rc2")
  4225. (source
  4226. (origin
  4227. (method git-fetch)
  4228. (uri (git-reference
  4229. (url "https://github.com/net-ssh/net-scp")
  4230. (commit (string-append "v" version))))
  4231. (file-name (git-file-name name version))
  4232. (sha256
  4233. (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
  4234. (build-system ruby-build-system)
  4235. (native-inputs
  4236. `(("bundler" ,bundler)
  4237. ("ruby-test-unit" ,ruby-test-unit)
  4238. ("ruby-mocha" ,ruby-mocha)))
  4239. (propagated-inputs
  4240. `(("ruby-net-ssh" ,ruby-net-ssh)))
  4241. (synopsis "Pure-Ruby SCP client library")
  4242. (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
  4243. client protocol.")
  4244. (home-page "https://github.com/net-ssh/net-scp")
  4245. (license license:expat)))
  4246. (define-public ruby-minitest
  4247. (package
  4248. (name "ruby-minitest")
  4249. (version "5.14.4")
  4250. (source (origin
  4251. (method url-fetch)
  4252. (uri (rubygems-uri "minitest" version))
  4253. (sha256
  4254. (base32
  4255. "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"))))
  4256. (build-system ruby-build-system)
  4257. (native-inputs
  4258. `(("ruby-hoe" ,ruby-hoe)))
  4259. (synopsis "Small test suite library for Ruby")
  4260. (description "Minitest provides a complete suite of Ruby testing
  4261. facilities supporting TDD, BDD, mocking, and benchmarking.")
  4262. (home-page "https://github.com/seattlerb/minitest")
  4263. (license license:expat)))
  4264. ;; This is the last release of Minitest 4, which is used by some packages.
  4265. (define-public ruby-minitest-4
  4266. (package (inherit ruby-minitest)
  4267. (version "4.7.5")
  4268. (source (origin
  4269. (method url-fetch)
  4270. (uri (rubygems-uri "minitest" version))
  4271. (sha256
  4272. (base32
  4273. "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
  4274. (arguments
  4275. `(#:phases
  4276. (modify-phases %standard-phases
  4277. (add-after 'unpack 'remove-unsupported-method
  4278. (lambda _
  4279. (substitute* "Rakefile"
  4280. (("self\\.rubyforge_name = .*") ""))
  4281. #t))
  4282. (add-after 'build 'exclude-failing-tests
  4283. (lambda _
  4284. ;; Some tests are failing on Ruby 2.4 due to the deprecation of
  4285. ;; Fixnum.
  4286. (delete-file "test/minitest/test_minitest_spec.rb")
  4287. #t)))))))
  4288. (define-public ruby-minitest-around
  4289. (package
  4290. (name "ruby-minitest-around")
  4291. (version "0.5.0")
  4292. (source
  4293. (origin
  4294. (method url-fetch)
  4295. (uri (rubygems-uri "minitest-around" version))
  4296. (sha256
  4297. (base32
  4298. "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
  4299. (build-system ruby-build-system)
  4300. (arguments
  4301. '(#:phases
  4302. (modify-phases %standard-phases
  4303. (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
  4304. (lambda _
  4305. (substitute* "minitest-around.gemspec"
  4306. (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
  4307. #t)))))
  4308. (propagated-inputs
  4309. `(("ruby-minitest" ,ruby-minitest)))
  4310. (native-inputs
  4311. `(("bundler" ,bundler)
  4312. ("ruby-cucumber" ,ruby-cucumber)
  4313. ("ruby-bump" ,ruby-bump)
  4314. ("ruby-test-construct" ,ruby-test-construct)))
  4315. (synopsis "Run code around tests in Minitest")
  4316. (description
  4317. "This library provides a way to run code around tests in Minitest,
  4318. written using either the unit test or spec style.")
  4319. (home-page "https://github.com/splattael/minitest-around")
  4320. (license license:expat)))
  4321. (define-public ruby-minitest-sprint
  4322. (package
  4323. (name "ruby-minitest-sprint")
  4324. (version "1.1.0")
  4325. (source (origin
  4326. (method url-fetch)
  4327. (uri (rubygems-uri "minitest-sprint" version))
  4328. (sha256
  4329. (base32
  4330. "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
  4331. (build-system ruby-build-system)
  4332. (native-inputs
  4333. `(("ruby-hoe" ,ruby-hoe)
  4334. ("ruby-minitest" ,ruby-minitest)))
  4335. (synopsis "Fast test suite runner for minitest")
  4336. (description "Minitest-sprint is a test runner for minitest that makes it
  4337. easier to re-run individual failing tests.")
  4338. (home-page "https://github.com/seattlerb/minitest-sprint")
  4339. (license license:expat)))
  4340. (define-public ruby-minitest-bacon
  4341. (package
  4342. (name "ruby-minitest-bacon")
  4343. (version "1.0.3")
  4344. (source (origin
  4345. (method url-fetch)
  4346. (uri (rubygems-uri "minitest-bacon" version))
  4347. (sha256
  4348. (base32
  4349. "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
  4350. (build-system ruby-build-system)
  4351. (native-inputs
  4352. `(("ruby-hoe" ,ruby-hoe)))
  4353. (inputs
  4354. `(("ruby-minitest" ,ruby-minitest)))
  4355. (synopsis "Bacon compatibility library for minitest")
  4356. (description "Minitest-bacon extends minitest with bacon-like
  4357. functionality, making it easier to migrate test suites from bacon to minitest.")
  4358. (home-page "https://github.com/seattlerb/minitest-bacon")
  4359. (license license:expat)))
  4360. (define-public ruby-minitest-focus
  4361. (package
  4362. (name "ruby-minitest-focus")
  4363. (version "1.1.2")
  4364. (source
  4365. (origin
  4366. (method url-fetch)
  4367. (uri (rubygems-uri "minitest-focus" version))
  4368. (sha256
  4369. (base32
  4370. "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
  4371. (build-system ruby-build-system)
  4372. (propagated-inputs
  4373. `(("ruby-minitest" ,ruby-minitest)))
  4374. (native-inputs
  4375. `(("ruby-hoe" ,ruby-hoe)))
  4376. (synopsis "Allows a few specific tests to be focused on")
  4377. (description
  4378. "@code{minitest-focus} gives the ability focus on a few tests with ease
  4379. without having to use command-line arguments. It introduces a @code{focus}
  4380. class method for use in testing classes, specifying that the next defined test
  4381. is to be run.")
  4382. (home-page "https://github.com/seattlerb/minitest-focus")
  4383. (license license:expat)))
  4384. (define-public ruby-minitest-pretty-diff
  4385. ;; Use git reference because gem is out of date and does not contain testing
  4386. ;; script. There are no releases on GitHub.
  4387. (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
  4388. (package
  4389. (name "ruby-minitest-pretty-diff")
  4390. (version (string-append "0.1-1." (string-take commit 8)))
  4391. (source (origin
  4392. (method git-fetch)
  4393. (uri (git-reference
  4394. (url "https://github.com/adammck/minitest-pretty_diff")
  4395. (commit commit)))
  4396. (file-name (string-append name "-" version "-checkout"))
  4397. (sha256
  4398. (base32
  4399. "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
  4400. (build-system ruby-build-system)
  4401. (arguments
  4402. `(#:phases
  4403. (modify-phases %standard-phases
  4404. (replace 'check
  4405. (lambda _
  4406. (invoke "script/test"))))))
  4407. (native-inputs
  4408. `(("bundler" ,bundler)
  4409. ("ruby-turn" ,ruby-turn)))
  4410. (synopsis "Pretty-print hashes and arrays in MiniTest")
  4411. (description
  4412. "@code{minitest-pretty_diff} monkey-patches
  4413. @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
  4414. diffing them. This makes it easier to spot differences between nested
  4415. structures when tests fail.")
  4416. (home-page "https://github.com/adammck/minitest-pretty_diff")
  4417. (license license:expat))))
  4418. (define-public ruby-minitest-moar
  4419. (package
  4420. (name "ruby-minitest-moar")
  4421. (version "0.0.4")
  4422. (source
  4423. (origin
  4424. (method url-fetch)
  4425. (uri (rubygems-uri "minitest-moar" version))
  4426. (sha256
  4427. (base32
  4428. "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
  4429. (build-system ruby-build-system)
  4430. (arguments
  4431. `(#:phases
  4432. (modify-phases %standard-phases
  4433. (add-before 'check 'clean-dependencies
  4434. (lambda _
  4435. ;; Remove all gems defined in the Gemfile because these are not
  4436. ;; truly needed.
  4437. (substitute* "Gemfile"
  4438. (("gem .*") ""))
  4439. ;; Remove byebug as not needed to run tests.
  4440. (substitute* "test/test_helper.rb"
  4441. (("require 'byebug'") ""))
  4442. #t)))))
  4443. (native-inputs
  4444. `(("bundler" ,bundler)
  4445. ("ruby-minitest" ,ruby-minitest)))
  4446. (synopsis "Extra features and changes to MiniTest")
  4447. (description "@code{MiniTest Moar} add some additional features and
  4448. changes some default behaviours in MiniTest. For instance, Moar replaces the
  4449. MiniTest @code{Object#stub} with a global @code{stub} method.")
  4450. (home-page "https://github.com/dockyard/minitest-moar")
  4451. (license license:expat)))
  4452. (define-public ruby-minitest-bonus-assertions
  4453. (package
  4454. (name "ruby-minitest-bonus-assertions")
  4455. (version "3.0")
  4456. (source
  4457. (origin
  4458. (method url-fetch)
  4459. (uri (rubygems-uri "minitest-bonus-assertions" version))
  4460. (sha256
  4461. (base32
  4462. "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
  4463. (build-system ruby-build-system)
  4464. (arguments
  4465. `(#:tests? #f ; Test suite has bitrotted.
  4466. #:phases
  4467. (modify-phases %standard-phases
  4468. (add-before 'check 'clean-dependencies
  4469. (lambda _
  4470. ;; Remove unneeded require statement that would entail another
  4471. ;; dependency.
  4472. (substitute* "test/minitest_config.rb"
  4473. (("require 'minitest/bisect'") ""))
  4474. #t)))))
  4475. (native-inputs
  4476. `(("ruby-hoe" ,ruby-hoe)
  4477. ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
  4478. ("ruby-minitest-focus" ,ruby-minitest-focus)
  4479. ("ruby-minitest-moar" ,ruby-minitest-moar)))
  4480. (synopsis "Bonus assertions for @code{Minitest}")
  4481. (description
  4482. "Minitest bonus assertions provides extra MiniTest assertions. For
  4483. instance, it provides @code{assert_true}, @code{assert_false} and
  4484. @code{assert_set_equal}.")
  4485. (home-page "https://github.com/halostatue/minitest-bonus-assertions")
  4486. (license license:expat)))
  4487. (define-public ruby-minitest-reporters
  4488. (package
  4489. (name "ruby-minitest-reporters")
  4490. (version "1.3.6")
  4491. (source
  4492. (origin
  4493. (method url-fetch)
  4494. (uri (rubygems-uri "minitest-reporters" version))
  4495. (sha256
  4496. (base32
  4497. "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
  4498. (build-system ruby-build-system)
  4499. (arguments
  4500. '(#:phases
  4501. (modify-phases %standard-phases
  4502. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  4503. ;; including it as an input can lead to circular dependencies.
  4504. (add-after 'unpack 'remove-rubocop-from-Rakefile
  4505. (lambda _
  4506. (substitute* "Rakefile"
  4507. (("require 'rubocop/rake\\_task'") "")
  4508. (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
  4509. #t))
  4510. (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
  4511. (lambda _
  4512. (substitute* "minitest-reporters.gemspec"
  4513. ((".*%q<rubocop>.*") "\n"))
  4514. #t)))))
  4515. (propagated-inputs
  4516. `(("ruby-ansi" ,ruby-ansi)
  4517. ("ruby-builder" ,ruby-builder)
  4518. ("ruby-minitest" ,ruby-minitest)
  4519. ("ruby-progressbar" ,ruby-progressbar)))
  4520. (native-inputs
  4521. `(("bundler" ,bundler)
  4522. ("ruby-maruku" ,ruby-maruku)))
  4523. (synopsis "Enhanced reporting for Minitest tests")
  4524. (description
  4525. "@code{minitest/reporters} provides a custom Minitest runner to improve
  4526. how the test state is reported. A number of different reporters are
  4527. available, including a spec reporter, progress bar reporter, a HTML
  4528. reporter.")
  4529. (home-page "https://github.com/kern/minitest-reporters")
  4530. (license license:expat)))
  4531. (define-public ruby-minitest-rg
  4532. (package
  4533. (name "ruby-minitest-rg")
  4534. (version "5.2.0")
  4535. (source
  4536. (origin
  4537. (method url-fetch)
  4538. (uri (rubygems-uri "minitest-rg" version))
  4539. (sha256
  4540. (base32
  4541. "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
  4542. (build-system ruby-build-system)
  4543. (arguments
  4544. ;; Some tests fail even outside Guix, so disable tests.
  4545. ;; https://github.com/blowmage/minitest-rg/issues/12
  4546. ;; https://github.com/blowmage/minitest-rg/pull/13
  4547. `(#:tests? #f))
  4548. (propagated-inputs
  4549. `(("ruby-minitest" ,ruby-minitest)))
  4550. (synopsis "Coloured output for Minitest")
  4551. (description
  4552. "@code{minitest-rg} changes the colour of the output from Minitest.")
  4553. (home-page "https://blowmage.com/minitest-rg/")
  4554. (license license:expat)))
  4555. (define-public ruby-minitest-global-expectations
  4556. (package
  4557. (name "ruby-minitest-global-expectations")
  4558. (version "1.0.1")
  4559. (source
  4560. (origin
  4561. (method url-fetch)
  4562. (uri (rubygems-uri "minitest-global_expectations"
  4563. version))
  4564. (sha256
  4565. (base32
  4566. "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
  4567. (build-system ruby-build-system)
  4568. (propagated-inputs
  4569. `(("ruby-minitest" ,ruby-minitest)))
  4570. (synopsis "Adjust minitest behaviour for calling expectation methods")
  4571. (description
  4572. "Minitest-global_expectations allows continued use of expectation methods
  4573. on all objects. Calling expectation methods on all objects was deprecated in
  4574. minitest 5.12, and is planned to be removed from minitest 6.")
  4575. (home-page "https://github.com/jeremyevans/minitest-global_expectations")
  4576. (license license:expat)))
  4577. (define-public ruby-minitest-hooks
  4578. (package
  4579. (name "ruby-minitest-hooks")
  4580. (version "1.5.0")
  4581. (source
  4582. (origin
  4583. (method url-fetch)
  4584. (uri (rubygems-uri "minitest-hooks" version))
  4585. (sha256
  4586. (base32
  4587. "05z8r6sw3fz4s44fs1150ndlcmcy82vlxmhps5nncg8vk59k3gmf"))))
  4588. (build-system ruby-build-system)
  4589. (arguments
  4590. '(#:test-target "spec"
  4591. ;; Test suite is incompatible with ruby-2.7.
  4592. ;; https://github.com/jeremyevans/minitest-hooks/issues/19
  4593. #:tests? #f))
  4594. (native-inputs
  4595. `(("ruby-sequel" ,ruby-sequel)
  4596. ("ruby-sqlite3" ,ruby-sqlite3)))
  4597. (synopsis "Hooks for the minitest framework")
  4598. (description
  4599. "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
  4600. @code{around_all} hooks for Minitest. This allows, for instance, running each
  4601. suite of specs inside a database transaction, running each spec inside its own
  4602. savepoint inside that transaction. This can significantly speed up testing
  4603. for specs that share expensive database setup code.")
  4604. (home-page "https://github.com/jeremyevans/minitest-hooks")
  4605. (license license:expat)))
  4606. (define-public ruby-daemons
  4607. (package
  4608. (name "ruby-daemons")
  4609. (version "1.2.5")
  4610. (source (origin
  4611. (method url-fetch)
  4612. (uri (rubygems-uri "daemons" version))
  4613. (sha256
  4614. (base32
  4615. "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
  4616. (build-system ruby-build-system)
  4617. (arguments
  4618. `(#:tests? #f)) ; no test suite
  4619. (synopsis "Daemonize Ruby programs")
  4620. (description "Daemons provides a way to wrap existing Ruby scripts to be
  4621. run as a daemon and to be controlled by simple start/stop/restart commands.")
  4622. (home-page "https://github.com/thuehlinger/daemons")
  4623. (license license:expat)))
  4624. (define-public ruby-data_uri
  4625. (package
  4626. (name "ruby-data_uri")
  4627. (version "0.1.0")
  4628. (source
  4629. (origin
  4630. (method url-fetch)
  4631. (uri (rubygems-uri "data_uri" version))
  4632. (sha256
  4633. (base32
  4634. "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
  4635. (build-system ruby-build-system)
  4636. (synopsis "URI class for parsing data URIs")
  4637. (description
  4638. "Data @acronym{URI, universal resource idenfitier}s allow resources to be
  4639. embedded inside a URI. The URI::Data class provides support for parsing these
  4640. URIs using the normal URI.parse method.")
  4641. (home-page "https://github.com/dball/data_uri")
  4642. (license license:expat)))
  4643. (define-public ruby-deep-merge
  4644. (package
  4645. (name "ruby-deep-merge")
  4646. (version "1.2.1")
  4647. (home-page "https://github.com/danielsdeleo/deep_merge")
  4648. ;; The Rubygem source does not contain the gemspec required for tests.
  4649. (source (origin
  4650. (method git-fetch)
  4651. (uri (git-reference (url home-page) (commit version)))
  4652. (file-name (git-file-name name version))
  4653. (sha256
  4654. (base32
  4655. "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
  4656. (build-system ruby-build-system)
  4657. (native-inputs
  4658. `(("ruby-minitest" ,ruby-minitest)))
  4659. (synopsis "Recursively merge hashes")
  4660. (description
  4661. "Deep Merge is a set of utility functions for @code{Hash}. It permits
  4662. you to merge elements inside a hash together recursively.")
  4663. (license license:expat)))
  4664. (define-public ruby-git
  4665. (package
  4666. (name "ruby-git")
  4667. (version "1.3.0")
  4668. (source (origin
  4669. (method url-fetch)
  4670. (uri (rubygems-uri "git" version))
  4671. (sha256
  4672. (base32
  4673. "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
  4674. (build-system ruby-build-system)
  4675. (arguments
  4676. `(#:tests? #f ; no tests
  4677. #:phases (modify-phases %standard-phases
  4678. (add-after 'install 'patch-git-binary
  4679. (lambda* (#:key inputs outputs #:allow-other-keys)
  4680. ;; Make the default git binary an absolute path to the
  4681. ;; store.
  4682. (let ((git (search-input-file inputs "/bin/git"))
  4683. (config (string-append
  4684. (assoc-ref outputs "out")
  4685. "/lib/ruby/vendor_ruby/gems/git-"
  4686. ,version "/lib/git/config.rb")))
  4687. (substitute* (list config)
  4688. (("'git'")
  4689. (string-append "'" git "'")))
  4690. #t))))))
  4691. (inputs
  4692. `(("git" ,git)))
  4693. (synopsis "Ruby wrappers for Git")
  4694. (description "Ruby/Git is a Ruby library that can be used to create, read
  4695. and manipulate Git repositories by wrapping system calls to the git binary.")
  4696. (home-page "https://github.com/schacon/ruby-git")
  4697. (license license:expat)))
  4698. (define-public ruby-hocon
  4699. (package
  4700. (name "ruby-hocon")
  4701. (version "1.3.1")
  4702. (home-page "https://github.com/puppetlabs/ruby-hocon")
  4703. (source (origin
  4704. (method git-fetch)
  4705. (uri (git-reference (url home-page) (commit version)))
  4706. (file-name (git-file-name name version))
  4707. (sha256
  4708. (base32
  4709. "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
  4710. (build-system ruby-build-system)
  4711. (arguments
  4712. '(#:phases (modify-phases %standard-phases
  4713. (replace 'check
  4714. (lambda* (#:key tests? #:allow-other-keys)
  4715. (if tests?
  4716. (invoke "rspec")
  4717. (format #t "test suite not run~%"))
  4718. #t)))))
  4719. (native-inputs
  4720. `(("bundler" ,bundler)
  4721. ("ruby-rspec" ,ruby-rspec)))
  4722. (synopsis "HOCON config library")
  4723. (description
  4724. "This package provides Ruby support for the @acronym{HOCON,
  4725. Human-Optimized Config Object Notation} configuration file format. It
  4726. supports parsing and modifying HOCON and JSON files, and rendering parsed
  4727. objects back to a @code{String}.")
  4728. (license license:asl2.0)))
  4729. (define-public ruby-slop
  4730. (package
  4731. (name "ruby-slop")
  4732. (version "4.5.0")
  4733. (source (origin
  4734. (method url-fetch)
  4735. (uri (rubygems-uri "slop" version))
  4736. (sha256
  4737. (base32
  4738. "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
  4739. (build-system ruby-build-system)
  4740. (native-inputs
  4741. `(("ruby-minitest" ,ruby-minitest)))
  4742. (synopsis "Ruby command line option parser")
  4743. (description "Slop provides a Ruby domain specific language for gathering
  4744. options and parsing command line flags.")
  4745. (home-page "https://github.com/leejarvis/slop")
  4746. (license license:expat)))
  4747. (define-public ruby-slop-3
  4748. (package (inherit ruby-slop)
  4749. (version "3.6.0")
  4750. (source (origin
  4751. (method url-fetch)
  4752. (uri (rubygems-uri "slop" version))
  4753. (sha256
  4754. (base32
  4755. "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
  4756. (define-public ruby-multi-xml
  4757. (package
  4758. (name "ruby-multi-xml")
  4759. (version "0.6.0")
  4760. (source
  4761. (origin
  4762. (method url-fetch)
  4763. (uri (rubygems-uri "multi_xml" version))
  4764. (sha256
  4765. (base32
  4766. "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
  4767. (build-system ruby-build-system)
  4768. (arguments
  4769. '(#:tests? #f)) ; No included tests
  4770. (synopsis "Swappable XML backends for Ruby")
  4771. (description
  4772. "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
  4773. Nokogiri, Ox, or REXML.")
  4774. (home-page "https://github.com/sferik/multi_xml")
  4775. (license license:expat)))
  4776. (define-public ruby-multipart-post
  4777. (package
  4778. (name "ruby-multipart-post")
  4779. (version "2.0.0")
  4780. (source (origin
  4781. (method url-fetch)
  4782. (uri (rubygems-uri "multipart-post" version))
  4783. (sha256
  4784. (base32
  4785. "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
  4786. (build-system ruby-build-system)
  4787. (native-inputs
  4788. `(("bundler" ,bundler)))
  4789. (synopsis "Multipart POST library for Ruby")
  4790. (description "Multipart-Post Adds multipart POST capability to Ruby's
  4791. net/http library.")
  4792. (home-page "https://github.com/nicksieger/multipart-post")
  4793. (license license:expat)))
  4794. (define-public ruby-multi-json
  4795. (package
  4796. (name "ruby-multi-json")
  4797. (version "1.15.0")
  4798. (source
  4799. (origin
  4800. (method git-fetch)
  4801. ;; Tests are not distributed at rubygems.org so download from GitHub
  4802. ;; instead.
  4803. (uri (git-reference
  4804. (url "https://github.com/intridea/multi_json")
  4805. (commit (string-append "v" version))))
  4806. (file-name (git-file-name name version))
  4807. (sha256
  4808. (base32
  4809. "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
  4810. (build-system ruby-build-system)
  4811. (arguments
  4812. `(#:phases
  4813. (modify-phases %standard-phases
  4814. (add-before 'check 'pre-check
  4815. (lambda _
  4816. ;; As seen in the .travis.yml file.
  4817. (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
  4818. (native-inputs
  4819. `(("ruby-rspec" ,ruby-rspec)
  4820. ("ruby-json-pure" ,ruby-json-pure)
  4821. ("ruby-oj" ,ruby-oj)
  4822. ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
  4823. (synopsis "Common interface to multiple JSON libraries for Ruby")
  4824. (description
  4825. "This package provides a common interface to multiple JSON libraries,
  4826. including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
  4827. NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
  4828. (home-page "https://github.com/intridea/multi_json")
  4829. (license license:expat)))
  4830. (define-public ruby-multi-test
  4831. (package
  4832. (name "ruby-multi-test")
  4833. (version "0.1.2")
  4834. (source
  4835. (origin
  4836. (method url-fetch)
  4837. (uri (rubygems-uri "multi_test" version))
  4838. (sha256
  4839. (base32
  4840. "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
  4841. (build-system ruby-build-system)
  4842. (arguments
  4843. '(;; Tests require different sets of specific gem versions to be available,
  4844. ;; and there is no gemfile that specifies the newest versions of
  4845. ;; dependencies to be tested.
  4846. #:tests? #f))
  4847. (synopsis
  4848. "Interface to testing libraries loaded into a running Ruby process")
  4849. (description
  4850. "@code{multi_test} provides a uniform interface onto whatever testing
  4851. libraries that have been loaded into a running Ruby process to help control
  4852. rogue test/unit/autorun requires.")
  4853. (home-page "https://github.com/cucumber/multi_test")
  4854. (license license:expat)))
  4855. (define-public ruby-arel
  4856. (package
  4857. (name "ruby-arel")
  4858. (version "9.0.0")
  4859. (source (origin
  4860. (method url-fetch)
  4861. (uri (rubygems-uri "arel" version))
  4862. (sha256
  4863. (base32
  4864. "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
  4865. (build-system ruby-build-system)
  4866. (arguments '(#:tests? #f)) ; no tests
  4867. (home-page "https://github.com/rails/arel")
  4868. (synopsis "SQL AST manager for Ruby")
  4869. (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
  4870. Ruby. It simplifies the generation of complex SQL queries and adapts to
  4871. various relational database implementations.")
  4872. (license license:expat)))
  4873. (define-public ruby-marcel
  4874. (package
  4875. (name "ruby-marcel")
  4876. (version "0.3.3")
  4877. (source
  4878. (origin
  4879. (method url-fetch)
  4880. (uri (rubygems-uri "marcel" version))
  4881. (sha256
  4882. (base32
  4883. "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
  4884. (build-system ruby-build-system)
  4885. (arguments
  4886. '(;; No included tests
  4887. #:tests? #f))
  4888. (propagated-inputs
  4889. `(("ruby-mimemagic" ,ruby-mimemagic)))
  4890. (synopsis "MIME type detection using magic numbers, filenames and extensions")
  4891. (description
  4892. "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
  4893. Extensions} type detection using magic numbers, filenames, and extensions")
  4894. (home-page "https://github.com/basecamp/marcel")
  4895. (license license:expat)))
  4896. (define-public ruby-minitar
  4897. ;; We package from the GitHub source to fix the security issue reported at
  4898. ;; https://github.com/halostatue/minitar/issues/16.
  4899. (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
  4900. (package
  4901. (name "ruby-minitar")
  4902. (version (string-append "0.5.4-1." (string-take commit 8)))
  4903. (source
  4904. (origin
  4905. (method git-fetch)
  4906. (uri (git-reference
  4907. (url "https://github.com/halostatue/minitar")
  4908. (commit commit)))
  4909. (file-name (string-append name "-" version "-checkout"))
  4910. (sha256
  4911. (base32
  4912. "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
  4913. (build-system ruby-build-system)
  4914. (arguments
  4915. '(#:tests? #f)) ; missing a gemspec
  4916. (synopsis "Ruby library and utility for handling tar archives")
  4917. (description
  4918. "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
  4919. that provides the ability to deal with POSIX tar archive files.")
  4920. (home-page "http://www.github.com/atoulme/minitar")
  4921. (license (list license:gpl2+ license:ruby)))))
  4922. (define-public ruby-mini-portile
  4923. (package
  4924. (name "ruby-mini-portile")
  4925. (version "0.6.2")
  4926. (source
  4927. (origin
  4928. (method url-fetch)
  4929. (uri (rubygems-uri "mini_portile" version))
  4930. (sha256
  4931. (base32
  4932. "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
  4933. (build-system ruby-build-system)
  4934. (arguments
  4935. '(#:tests? #f)) ; tests require network access
  4936. (synopsis "Ports system for Ruby developers")
  4937. (description "Mini-portile is a port/recipe system for Ruby developers.
  4938. It provides a standard way to compile against specific versions of libraries
  4939. to reproduce user environments.")
  4940. (home-page "https://github.com/flavorjones/mini_portile")
  4941. (license license:expat)))
  4942. (define-public ruby-mini-portile-2
  4943. (package (inherit ruby-mini-portile)
  4944. (version "2.4.0")
  4945. (source (origin
  4946. (method url-fetch)
  4947. (uri (rubygems-uri "mini_portile2" version))
  4948. (sha256
  4949. (base32
  4950. "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
  4951. (define-public ruby-nokogiri
  4952. (package
  4953. (name "ruby-nokogiri")
  4954. (version "1.10.9")
  4955. (source (origin
  4956. (method url-fetch)
  4957. (uri (rubygems-uri "nokogiri" version))
  4958. (sha256
  4959. (base32
  4960. "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
  4961. (build-system ruby-build-system)
  4962. (arguments
  4963. ;; Tests fail because Nokogiri can only test with an installed extension,
  4964. ;; and also because many test framework dependencies are missing.
  4965. `(#:tests? #f
  4966. #:gem-flags (list "--" "--use-system-libraries"
  4967. (string-append "--with-xml2-include="
  4968. (assoc-ref %build-inputs "libxml2")
  4969. "/include/libxml2" ))
  4970. #:phases
  4971. (modify-phases %standard-phases
  4972. (add-before 'build 'patch-extconf
  4973. ;; 'pkg-config' is not included in the GEM_PATH during
  4974. ;; installation, so we add it directly to the load path.
  4975. (lambda* (#:key inputs #:allow-other-keys)
  4976. (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
  4977. (substitute* "ext/nokogiri/extconf.rb"
  4978. (("gem 'pkg-config'.*")
  4979. (string-append "$:.unshift '"
  4980. pkg-config "/lib/ruby/vendor_ruby"
  4981. "/gems/pkg-config-"
  4982. ,(package-version ruby-pkg-config)
  4983. "/lib'\n"))))
  4984. #t)))))
  4985. (native-inputs
  4986. `(("ruby-hoe" ,ruby-hoe)))
  4987. (inputs
  4988. `(("zlib" ,zlib)
  4989. ("libxml2" ,libxml2)
  4990. ("libxslt" ,libxslt)))
  4991. (propagated-inputs
  4992. `(("ruby-mini-portile" ,ruby-mini-portile-2)
  4993. ("ruby-pkg-config" ,ruby-pkg-config)))
  4994. (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
  4995. (description "Nokogiri (鋸) parses and searches XML/HTML, and features
  4996. both CSS3 selector and XPath 1.0 support.")
  4997. (home-page "http://www.nokogiri.org/")
  4998. (license license:expat)))
  4999. (define-public ruby-method-source
  5000. (package
  5001. (name "ruby-method-source")
  5002. (version "1.0.0")
  5003. (source
  5004. (origin
  5005. (method url-fetch)
  5006. (uri (rubygems-uri "method_source" version))
  5007. (sha256
  5008. (base32
  5009. "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
  5010. (build-system ruby-build-system)
  5011. (arguments
  5012. `(#:test-target "spec"
  5013. #:phases
  5014. (modify-phases %standard-phases
  5015. (add-after 'unpack 'remove-git-ls-files
  5016. (lambda* (#:key outputs #:allow-other-keys)
  5017. (substitute* "Rakefile"
  5018. (("git ls-files") "find . -type f"))
  5019. #t)))))
  5020. (native-inputs
  5021. `(("ruby-rspec" ,ruby-rspec)))
  5022. (synopsis "Retrieve the source code for Ruby methods")
  5023. (description "Method_source retrieves the source code for Ruby methods.
  5024. Additionally, it can extract source code from Proc and Lambda objects or just
  5025. extract comments.")
  5026. (home-page "https://github.com/banister/method_source")
  5027. (license license:expat)))
  5028. (define-public ruby-coderay
  5029. (package
  5030. (name "ruby-coderay")
  5031. (version "1.1.2")
  5032. (source
  5033. (origin
  5034. (method url-fetch)
  5035. (uri (rubygems-uri "coderay" version))
  5036. (sha256
  5037. (base32
  5038. "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
  5039. (build-system ruby-build-system)
  5040. (arguments
  5041. '(#:tests? #f)) ; missing test files
  5042. (synopsis "Ruby syntax highlighting library")
  5043. (description "Coderay is a Ruby library that provides syntax highlighting
  5044. for select languages.")
  5045. (home-page "http://coderay.rubychan.de")
  5046. (license license:expat)))
  5047. (define-public ruby-cuke-modeler
  5048. (package
  5049. (name "ruby-cuke-modeler")
  5050. (version "3.1.0")
  5051. (source
  5052. (origin
  5053. (method url-fetch)
  5054. (uri (rubygems-uri "cuke_modeler" version))
  5055. (sha256
  5056. (base32
  5057. "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
  5058. (build-system ruby-build-system)
  5059. (arguments `(#:tests? #f)) ;no test suite in gem
  5060. (propagated-inputs
  5061. `(("ruby-gherkin" ,ruby-gherkin)))
  5062. (synopsis "Gherkin test suite analysis tool")
  5063. (description "CukeModeler facilitates modeling a test suite that is
  5064. written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
  5065. providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
  5066. the @code{cucumber-gherkin} generates when parsing features, as well as
  5067. providing models for feature files and directories in order to be able to have
  5068. a fully traversable model tree of a test suite's structure. These models can
  5069. then be analyzed or manipulated more easily than the underlying AST layer.")
  5070. (home-page "https://github.com/enkessler/cuke_modeler")
  5071. (license license:expat)))
  5072. (define-public ruby-parallel-tests
  5073. (package
  5074. (name "ruby-parallel-tests")
  5075. (version "3.0.0")
  5076. (home-page "https://github.com/grosser/parallel_tests")
  5077. (source (origin
  5078. (method git-fetch)
  5079. (uri (git-reference
  5080. (url home-page)
  5081. (commit (string-append "v" version))))
  5082. (file-name (string-append name version))
  5083. (sha256
  5084. (base32
  5085. "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
  5086. (build-system ruby-build-system)
  5087. (arguments
  5088. '(#:test-target "default"
  5089. #:phases (modify-phases %standard-phases
  5090. (add-after 'patch-source-shebangs 'patch-shell-invokations
  5091. (lambda _
  5092. (substitute* '("lib/parallel_tests/tasks.rb"
  5093. "spec/parallel_tests/tasks_spec.rb")
  5094. (("/bin/sh") (which "sh"))
  5095. (("/bin/bash") (which "bash")))
  5096. #t))
  5097. (add-before 'check 'remove-version-constraints
  5098. (lambda _
  5099. ;; Remove hard coded version constraints, instead just
  5100. ;; use whatever versions are available in Guix.
  5101. (delete-file "Gemfile.lock")
  5102. (substitute* "Gemfile"
  5103. (("'minitest',.*")
  5104. "'minitest'\n")
  5105. (("'cucumber',.*")
  5106. "'cucumber'\n"))
  5107. #t))
  5108. (add-before 'check 'disable-rails-test
  5109. (lambda _
  5110. ;; XXX: This test attempts to download and run the test
  5111. ;; suites of multiple Rails versions(!) directly.
  5112. (delete-file "spec/rails_spec.rb")
  5113. #t))
  5114. (add-before 'check 'set-HOME
  5115. (lambda _
  5116. ;; Some tests check the output of Bundler, and fail when
  5117. ;; Bundler warns that /homeless-shelter does not exist.
  5118. (setenv "HOME" "/tmp")
  5119. #t)))))
  5120. (native-inputs
  5121. `(("ruby-bump" ,ruby-bump)
  5122. ("ruby-cucumber" ,ruby-cucumber)
  5123. ("ruby-cuke-modeler" ,ruby-cuke-modeler)
  5124. ("ruby-minitest" ,ruby-minitest)
  5125. ("ruby-rake" ,ruby-rake)
  5126. ("ruby-rspec" ,ruby-rspec)
  5127. ("ruby-spinach" ,ruby-spinach)))
  5128. (propagated-inputs
  5129. `(("ruby-parallel" ,ruby-parallel)))
  5130. (synopsis "Run tests in parallel")
  5131. (description
  5132. "This package can speed up @code{Test::Unit}, @code{RSpec},
  5133. @code{Cucumber}, and @code{Spinach} tests by running them concurrently
  5134. across multiple CPU cores.")
  5135. (license license:expat)))
  5136. (define-public ruby-parser
  5137. (package
  5138. (name "ruby-parser")
  5139. (version "3.0.0.0")
  5140. (source
  5141. (origin
  5142. (method url-fetch)
  5143. (uri (rubygems-uri "parser" version))
  5144. (sha256
  5145. (base32
  5146. "1jixakyzmy0j5c1rb0fjrrdhgnyryvrr6vgcybs14jfw09akv5ml"))))
  5147. (build-system ruby-build-system)
  5148. (arguments
  5149. '(#:tests? #f)) ; tests not included in gem
  5150. (native-inputs
  5151. `(("bundler" ,bundler)
  5152. ("ruby-cliver" ,ruby-cliver)
  5153. ("ruby-simplecov" ,ruby-simplecov)
  5154. ("ruby-racc" ,ruby-racc)))
  5155. (inputs
  5156. `(("ragel" ,ragel)))
  5157. (propagated-inputs
  5158. `(("ruby-ast" ,ruby-ast)))
  5159. (synopsis "Ruby parser written in pure Ruby")
  5160. (description
  5161. "This package provides a Ruby parser written in pure Ruby.")
  5162. (home-page "https://github.com/whitequark/parser")
  5163. (license license:expat)))
  5164. (define-public ruby-sexp-processor
  5165. (package
  5166. (name "ruby-sexp-processor")
  5167. (version "4.15.0")
  5168. (source
  5169. (origin
  5170. (method url-fetch)
  5171. (uri (rubygems-uri "sexp_processor" version))
  5172. (sha256
  5173. (base32
  5174. "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
  5175. (build-system ruby-build-system)
  5176. (native-inputs
  5177. ;; TODO: Add ruby-minitest-proveit once available.
  5178. `(("hoe" ,ruby-hoe)))
  5179. (synopsis "ParseTree fork which includes generic S-exp processing tools")
  5180. (description "The sexp_processor package is derived from ParseTree, but
  5181. contrary to ParseTree, it includes all the generic S-exp processing tools.
  5182. Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
  5183. @code{Environment}")
  5184. (home-page "https://github.com/seattlerb/sexp_processor")
  5185. (license license:expat)))
  5186. (define-public ruby-ruby-parser
  5187. (package
  5188. (name "ruby-ruby-parser")
  5189. (version "3.14.2")
  5190. (source
  5191. (origin
  5192. (method url-fetch)
  5193. (uri (rubygems-uri "ruby_parser" version))
  5194. (sha256
  5195. (base32
  5196. "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
  5197. (build-system ruby-build-system)
  5198. (native-inputs
  5199. `(("hoe" ,ruby-hoe)
  5200. ("racc" ,ruby-racc)
  5201. ("unifdef" ,unifdef)))
  5202. (propagated-inputs
  5203. `(("ruby-sexp-processor" ,ruby-sexp-processor)))
  5204. (home-page "https://github.com/seattlerb/ruby_parser/")
  5205. (synopsis "Ruby parser written in pure Ruby")
  5206. (description "The ruby_parser (RP) package provides a Ruby parser written
  5207. in pure Ruby. It outputs S-expressions which can be manipulated and converted
  5208. back to Ruby via the @code{ruby2ruby} library.")
  5209. (license license:expat)))
  5210. (define-public ruby-prawn-manual-builder
  5211. (package
  5212. (name "ruby-prawn-manual-builder")
  5213. (version "0.3.1")
  5214. (source
  5215. (origin
  5216. (method url-fetch)
  5217. (uri (rubygems-uri "prawn-manual_builder" version))
  5218. (sha256
  5219. (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
  5220. (build-system ruby-build-system)
  5221. (arguments
  5222. '(#:tests? #f ; no included tests
  5223. #:phases
  5224. (modify-phases %standard-phases
  5225. (add-after 'extract-gemspec 'patch-gemspec
  5226. (lambda _
  5227. (substitute* ".gemspec"
  5228. ;; Loosen the requirement for pdf-inspector
  5229. (("~> 1\\.0\\.7") ">= 0")))))))
  5230. (propagated-inputs
  5231. `(("ruby-coderay" ,ruby-coderay)))
  5232. (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
  5233. (description
  5234. "This package provides a tool for writing manuals for Prawn and Prawn
  5235. accessories")
  5236. (home-page "https://github.com/prawnpdf/prawn-manual_builder")
  5237. (license %prawn-project-licenses)))
  5238. (define-public ruby-progress_bar
  5239. (package
  5240. (name "ruby-progress_bar")
  5241. (version "1.1.0")
  5242. (source
  5243. (origin
  5244. (method url-fetch)
  5245. (uri (rubygems-uri "progress_bar" version))
  5246. (sha256
  5247. (base32
  5248. "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
  5249. (build-system ruby-build-system)
  5250. (arguments
  5251. '(#:test-target "spec"))
  5252. (propagated-inputs
  5253. `(("ruby-highline" ,ruby-highline)
  5254. ("ruby-options" ,ruby-options)))
  5255. (native-inputs
  5256. `(("bundler" ,bundler)
  5257. ("ruby-rspec" ,ruby-rspec)
  5258. ("ruby-timecop" ,ruby-timecop)))
  5259. (synopsis
  5260. "Ruby library for displaying progress bars")
  5261. (description
  5262. "ProgressBar is a simple library for displaying progress bars. The
  5263. maximum value is configurable, and additional information can be displayed
  5264. like the percentage completion, estimated time remaining, elapsed time and
  5265. rate.")
  5266. (home-page "https://github.com/paul/progress_bar")
  5267. (license license:wtfpl2)))
  5268. (define-public ruby-dep
  5269. (package
  5270. (name "ruby-dep")
  5271. (version "1.5.0")
  5272. (source
  5273. (origin
  5274. (method url-fetch)
  5275. (uri (rubygems-uri "ruby_dep" version))
  5276. (sha256
  5277. (base32
  5278. "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
  5279. (build-system ruby-build-system)
  5280. (arguments
  5281. '(#:tests? #f)) ; No included tests
  5282. (synopsis "Creates a version constraint of supported Rubies")
  5283. (description
  5284. "This package helps create a version constraint of supported Rubies,
  5285. suitable for a gemspec file.")
  5286. (home-page "https://github.com/e2/ruby_dep")
  5287. (license license:expat)))
  5288. (define-public ruby-progressbar
  5289. (package
  5290. (name "ruby-progressbar")
  5291. (version "1.10.1")
  5292. (source
  5293. (origin
  5294. (method url-fetch)
  5295. (uri (rubygems-uri "ruby-progressbar" version))
  5296. (sha256
  5297. (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
  5298. (build-system ruby-build-system)
  5299. (arguments
  5300. '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
  5301. #:tests? #f))
  5302. (synopsis "Text progress bar library for Ruby")
  5303. (description
  5304. "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
  5305. The output can be customized with a formatting system.")
  5306. (home-page "https://github.com/jfelchner/ruby-progressbar")
  5307. (license license:expat)))
  5308. (define-public ruby-pry
  5309. (package
  5310. (name "ruby-pry")
  5311. (version "0.13.1")
  5312. (source
  5313. (origin
  5314. (method url-fetch)
  5315. (uri (rubygems-uri "pry" version))
  5316. (sha256
  5317. (base32
  5318. "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
  5319. (build-system ruby-build-system)
  5320. (arguments
  5321. '(#:tests? #f)) ; no tests
  5322. (propagated-inputs
  5323. `(("ruby-coderay" ,ruby-coderay)
  5324. ("ruby-method-source" ,ruby-method-source)))
  5325. (synopsis "Ruby REPL")
  5326. (description "Pry is an IRB alternative and runtime developer console for
  5327. Ruby. It features syntax highlighting, a plugin architecture, runtime
  5328. invocation, and source and documentation browsing.")
  5329. (home-page "https://cobaltbluemedia.com/pryrepl/")
  5330. (license license:expat)))
  5331. (define-public ruby-single-cov
  5332. (package
  5333. (name "ruby-single-cov")
  5334. (version "1.3.2")
  5335. (home-page "https://github.com/grosser/single_cov")
  5336. (source (origin
  5337. (method git-fetch)
  5338. (uri (git-reference (url home-page)
  5339. (commit (string-append "v" version))))
  5340. (file-name (git-file-name name version))
  5341. (sha256
  5342. (base32
  5343. "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
  5344. (build-system ruby-build-system)
  5345. (arguments
  5346. '(#:test-target "default"
  5347. #:phases (modify-phases %standard-phases
  5348. (replace 'replace-git-ls-files
  5349. (lambda _
  5350. (substitute* "single_cov.gemspec"
  5351. (("`git ls-files lib/ bin/ MIT-LICENSE`")
  5352. "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
  5353. #t))
  5354. (add-before 'check 'remove-version-constraints
  5355. (lambda _
  5356. (delete-file "Gemfile.lock")
  5357. #t))
  5358. (add-before 'check 'make-files-writable
  5359. (lambda _
  5360. ;; Tests need to create local directories and open files
  5361. ;; with write permissions.
  5362. (for-each make-file-writable
  5363. (find-files "specs" #:directories? #t))
  5364. #t))
  5365. (add-before 'check 'disable-failing-test
  5366. (lambda _
  5367. ;; XXX: This test copies assets from minitest, but can
  5368. ;; not cope with the files being read-only. Just skip
  5369. ;; it for now.
  5370. (substitute* "specs/single_cov_spec.rb"
  5371. (("it \"complains when coverage is bad\"")
  5372. "xit \"complains when coverage is bad\""))
  5373. #t)))))
  5374. (native-inputs
  5375. `(("ruby-bump" ,ruby-bump)
  5376. ("ruby-minitest" ,ruby-minitest)
  5377. ("ruby-rspec" ,ruby-rspec)
  5378. ("ruby-simplecov" ,ruby-simplecov)))
  5379. (synopsis "Code coverage reporting tool")
  5380. (description
  5381. "This package provides actionable code coverage reports for Ruby
  5382. projects. It has very little overhead and can be easily integrated with
  5383. development tools to catch coverage problems early.")
  5384. (license license:expat)))
  5385. (define-public ruby-oedipus-lex
  5386. (package
  5387. (name "ruby-oedipus-lex")
  5388. (version "2.5.2")
  5389. (source
  5390. (origin
  5391. (method url-fetch)
  5392. (uri (rubygems-uri "oedipus_lex" version))
  5393. (sha256
  5394. (base32
  5395. "1v1rk78khwq87ar300lwll570zxpkq9rjnpgc9mgsyd6mm9qjz4w"))))
  5396. (build-system ruby-build-system)
  5397. (native-inputs
  5398. `(("ruby-hoe" ,ruby-hoe)))
  5399. (synopsis "Ruby lexer")
  5400. (description
  5401. "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
  5402. It is based primarily on generating code much like you would a hand-written
  5403. lexer. It uses StrScanner within a multi-level case statement. As such,
  5404. Oedipus matches on the first match, not the longest.")
  5405. (home-page "https://github.com/seattlerb/oedipus_lex")
  5406. (license license:expat)))
  5407. (define-public ruby-guard
  5408. (package
  5409. (name "ruby-guard")
  5410. (version "2.13.0")
  5411. (source (origin
  5412. (method git-fetch)
  5413. ;; The gem does not include a Rakefile, nor does it contain a
  5414. ;; gemspec file, nor does it come with the tests. This is why
  5415. ;; we fetch the tarball from Github.
  5416. (uri (git-reference
  5417. (url "https://github.com/guard/guard")
  5418. (commit (string-append "v" version))))
  5419. (file-name (git-file-name name version))
  5420. (sha256
  5421. (base32
  5422. "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
  5423. (build-system ruby-build-system)
  5424. (arguments
  5425. `(#:tests? #f ; tests require cucumber
  5426. #:phases
  5427. (modify-phases %standard-phases
  5428. (add-after 'unpack 'remove-git-ls-files
  5429. (lambda* (#:key outputs #:allow-other-keys)
  5430. (substitute* "guard.gemspec"
  5431. (("git ls-files -z") "find . -type f -print0"))
  5432. #t))
  5433. (replace 'build
  5434. (lambda _
  5435. (invoke "gem" "build" "guard.gemspec"))))))
  5436. (propagated-inputs
  5437. `(("ruby-formatador" ,ruby-formatador)
  5438. ("ruby-listen" ,ruby-listen)
  5439. ("ruby-lumberjack" ,ruby-lumberjack)
  5440. ("ruby-nenv" ,ruby-nenv)
  5441. ("ruby-notiffany" ,ruby-notiffany)
  5442. ("ruby-pry" ,ruby-pry)
  5443. ("ruby-shellany" ,ruby-shellany)
  5444. ("ruby-thor" ,ruby-thor)))
  5445. (native-inputs
  5446. `(("bundler" ,bundler)
  5447. ("ruby-rspec" ,ruby-rspec)))
  5448. (synopsis "Tool to handle events on file system modifications")
  5449. (description
  5450. "Guard is a command line tool to easily handle events on file system
  5451. modifications. Guard automates various tasks by running custom rules whenever
  5452. file or directories are modified.")
  5453. (home-page "https://guardgem.org/")
  5454. (license license:expat)))
  5455. (define-public ruby-spinach
  5456. (package
  5457. (name "ruby-spinach")
  5458. (version "0.11.0")
  5459. (home-page "https://github.com/codegram/spinach")
  5460. (source (origin
  5461. (method url-fetch)
  5462. (uri (rubygems-uri "spinach" version))
  5463. (sha256
  5464. (base32
  5465. "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
  5466. (build-system ruby-build-system)
  5467. (arguments
  5468. ;; FIXME: Disable tests altogether because they depend on 'capybara'
  5469. ;; which in turn depends on many other unpackaged gems. Enable once
  5470. ;; capybara is available.
  5471. '(#:tests? #f))
  5472. (propagated-inputs
  5473. `(("ruby-colorize" ,ruby-colorize)
  5474. ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
  5475. ("ruby-json" ,ruby-json)))
  5476. (synopsis "Gherkin-based BDD framework")
  5477. (description
  5478. "Spinach is a high-level @acronym{BDD, Behavior-driven development}
  5479. framework that leverages the expressive @code{Gherkin} language to help you
  5480. define executable specifications of your code.")
  5481. (license license:expat)))
  5482. (define-public ruby-tilt
  5483. (package
  5484. (name "ruby-tilt")
  5485. (version "2.0.10")
  5486. (source
  5487. (origin
  5488. (method git-fetch) ;the distributed gem lacks tests
  5489. (uri (git-reference
  5490. (url "https://github.com/rtomayko/tilt")
  5491. (commit (string-append "v" version))))
  5492. (file-name (git-file-name name version))
  5493. (sha256
  5494. (base32
  5495. "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
  5496. (build-system ruby-build-system)
  5497. (arguments
  5498. '(#:phases
  5499. (modify-phases %standard-phases
  5500. (add-after 'unpack 'remove-some-dependencies
  5501. (lambda _
  5502. (substitute* "Gemfile"
  5503. ;; TODO ronn is used for generating the manual
  5504. (("gem 'ronn'.*") "\n")
  5505. ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
  5506. ;; pass it in as a native-input
  5507. (("gem 'haml'.*") "\n")
  5508. ;; TODO Not all of these gems are packaged for Guix yet:
  5509. ;; less, coffee-script, livescript, babel-transpiler,
  5510. ;; typescript-node
  5511. (("if can_execjs") "if false")
  5512. ;; Disable the secondary group to reduce the number of
  5513. ;; dependencies. None of the normal approaches work, so patch
  5514. ;; the Gemfile instead.
  5515. (("group :secondary") "[].each"))
  5516. #t)))))
  5517. (propagated-inputs
  5518. `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
  5519. ("ruby-sassc" ,ruby-sassc)))
  5520. (native-inputs
  5521. `(("bundler" ,bundler)
  5522. ("ruby-yard" ,ruby-yard)
  5523. ("ruby-builder" ,ruby-builder)
  5524. ("ruby-erubis" ,ruby-erubis)
  5525. ("ruby-markaby" ,ruby-markaby)))
  5526. (synopsis "Generic interface to multiple Ruby template engines")
  5527. (description
  5528. "Tilt is a thin interface over a number of different Ruby template
  5529. engines in an attempt to make their usage as generic as possible.")
  5530. (home-page "https://github.com/rtomayko/tilt/")
  5531. (license license:expat)))
  5532. (define-public ruby-thread-safe
  5533. (package
  5534. (name "ruby-thread-safe")
  5535. (version "0.3.6")
  5536. (source
  5537. (origin
  5538. (method url-fetch)
  5539. (uri (rubygems-uri "thread_safe" version))
  5540. (sha256
  5541. (base32
  5542. "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
  5543. (build-system ruby-build-system)
  5544. (arguments
  5545. '(#:tests? #f)) ; needs simplecov, among others
  5546. (synopsis "Thread-safe utilities for Ruby")
  5547. (description "The thread_safe library provides thread-safe collections and
  5548. utilities for Ruby.")
  5549. (home-page "https://github.com/ruby-concurrency/thread_safe")
  5550. (license license:asl2.0)))
  5551. (define-public ruby-tzinfo
  5552. (package
  5553. (name "ruby-tzinfo")
  5554. (version "2.0.4")
  5555. (source
  5556. (origin
  5557. (method git-fetch)
  5558. (uri (git-reference
  5559. ;; Pull from git because the gem has no tests.
  5560. (url "https://github.com/tzinfo/tzinfo")
  5561. (commit (string-append "v" version))))
  5562. (file-name (git-file-name name version))
  5563. (sha256
  5564. (base32
  5565. "0jaq1givdaz5jxz47xngyj3j315n872rk97mnpm5njwm48wy45yh"))))
  5566. (build-system ruby-build-system)
  5567. (arguments
  5568. '(#:phases
  5569. (modify-phases %standard-phases
  5570. (add-after 'unpack 'skip-safe-tests
  5571. (lambda _
  5572. (substitute* "test/test_utils.rb"
  5573. (("def safe_test\\(options = \\{\\}\\)")
  5574. "def safe_test(options = {})
  5575. skip('The Guix build environment has an unsafe load path')"))
  5576. #t))
  5577. (add-before 'check 'pre-check
  5578. (lambda _
  5579. (setenv "HOME" (getcwd))
  5580. (substitute* "Gemfile"
  5581. (("simplecov.*") "simplecov'\n"))
  5582. #t))
  5583. (replace 'check
  5584. (lambda* (#:key tests? test-target #:allow-other-keys)
  5585. (when tests?
  5586. (invoke "bundler" "exec" "rake" test-target))
  5587. #t)))))
  5588. (propagated-inputs
  5589. `(("ruby-concurrent-ruby" ,ruby-concurrent)))
  5590. (native-inputs
  5591. `(("ruby-simplecov" ,ruby-simplecov)))
  5592. (synopsis "Time zone library for Ruby")
  5593. (description "TZInfo is a Ruby library that provides daylight savings
  5594. aware transformations between times in different time zones.")
  5595. (home-page "https://tzinfo.github.io")
  5596. (license license:expat)))
  5597. (define-public ruby-tzinfo-data
  5598. (package
  5599. (name "ruby-tzinfo-data")
  5600. (version "1.2021.1")
  5601. (source
  5602. (origin
  5603. (method git-fetch)
  5604. ;; Download from GitHub because the rubygems version does not contain
  5605. ;; Rakefile or tests.
  5606. (uri (git-reference
  5607. (url "https://github.com/tzinfo/tzinfo-data")
  5608. (commit (string-append "v" version))))
  5609. (file-name (git-file-name name version))
  5610. (sha256
  5611. (base32
  5612. "0yzyr3rf8qaw6kxfc0gwpxsb7gl3rhfpx9g1c2z15vapyminhi60"))))
  5613. (build-system ruby-build-system)
  5614. (arguments
  5615. `(#:phases
  5616. (modify-phases %standard-phases
  5617. (add-after 'unpack 'patch-source
  5618. (lambda* (#:key inputs #:allow-other-keys)
  5619. (substitute* "Rakefile"
  5620. (("https://data.iana.org/time-zones/releases")
  5621. (assoc-ref inputs "tzdata")))
  5622. #t))
  5623. (add-before 'check 'pre-check
  5624. (lambda _
  5625. (setenv "HOME" (getcwd))
  5626. (substitute* "Rakefile"
  5627. ;; Don't need gpg, and it may break after a time.
  5628. (("gpg ") "echo ")
  5629. ((" sh\\(\\\"make -C" text)
  5630. (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
  5631. " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
  5632. (setenv "cc" ,(cc-for-target))
  5633. #t)))))
  5634. (propagated-inputs
  5635. `(("ruby-tzinfo" ,ruby-tzinfo)))
  5636. (native-inputs
  5637. `(("tzdata"
  5638. ,(file-union "tzdata-for-ruby-tzdata-info"
  5639. `(("tzdata2021a.tar.gz"
  5640. ,(origin
  5641. (method url-fetch)
  5642. (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz")
  5643. (sha256
  5644. (base32
  5645. "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
  5646. ("tzdata2021a.tar.gz.asc"
  5647. ,(origin
  5648. (method url-fetch)
  5649. (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz.asc")
  5650. (sha256
  5651. (base32
  5652. "0n7h2w8ji1lrxpk0d44wyfshlhr7c9jmwj6lqbxlyvqnfi3gbicx"))))
  5653. ("tzcode2021a.tar.gz"
  5654. ,(origin
  5655. (method url-fetch)
  5656. (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz")
  5657. (sha256
  5658. (base32
  5659. "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))
  5660. ("tzcode2021a.tar.gz.asc"
  5661. ,(origin
  5662. (method url-fetch)
  5663. (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz.asc")
  5664. (sha256
  5665. (base32
  5666. "1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g")))))))))
  5667. (synopsis "Data from the IANA Time Zone database")
  5668. (description
  5669. "This library provides @code{TZInfo::Data}, which contains data from the
  5670. IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
  5671. (home-page "https://tzinfo.github.io")
  5672. (license license:expat)))
  5673. (define-public ruby-rb-inotify
  5674. (package
  5675. (name "ruby-rb-inotify")
  5676. (version "0.9.10")
  5677. (source
  5678. (origin
  5679. (method url-fetch)
  5680. (uri (rubygems-uri "rb-inotify" version))
  5681. (sha256
  5682. (base32
  5683. "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
  5684. (build-system ruby-build-system)
  5685. (arguments
  5686. '(#:tests? #f ; there are no tests
  5687. #:phases
  5688. (modify-phases %standard-phases
  5689. ;; Building the gemspec with rake is not working here since it is
  5690. ;; generated with Jeweler. It is also unnecessary because the
  5691. ;; existing gemspec does not use any development tools to generate a
  5692. ;; list of files.
  5693. (replace 'build
  5694. (lambda _
  5695. (invoke "gem" "build" "rb-inotify.gemspec"))))))
  5696. (propagated-inputs
  5697. `(("ruby-ffi" ,ruby-ffi)))
  5698. (native-inputs
  5699. `(("ruby-yard" ,ruby-yard)))
  5700. (synopsis "Ruby wrapper for Linux's inotify")
  5701. (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
  5702. kernel subsystem for monitoring changes to files and directories.")
  5703. (home-page "https://github.com/nex3/rb-inotify")
  5704. (license license:expat)))
  5705. (define-public ruby-pry-editline
  5706. (package
  5707. (name "ruby-pry-editline")
  5708. (version "1.1.2")
  5709. (source (origin
  5710. (method url-fetch)
  5711. (uri (rubygems-uri "pry-editline" version))
  5712. (sha256
  5713. (base32
  5714. "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
  5715. (build-system ruby-build-system)
  5716. (arguments `(#:tests? #f)) ; no tests included
  5717. (native-inputs
  5718. `(("bundler" ,bundler)))
  5719. (synopsis "Open the current REPL line in an editor")
  5720. (description
  5721. "This gem provides a plugin for the Ruby REPL to enable opening the
  5722. current line in an external editor.")
  5723. (home-page "https://github.com/tpope/pry-editline")
  5724. (license license:expat)))
  5725. (define-public ruby-sdoc
  5726. (package
  5727. (name "ruby-sdoc")
  5728. (version "1.1.0")
  5729. (source (origin
  5730. (method url-fetch)
  5731. (uri (rubygems-uri "sdoc" version))
  5732. (sha256
  5733. (base32
  5734. "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
  5735. (build-system ruby-build-system)
  5736. (arguments
  5737. `(#:phases
  5738. (modify-phases %standard-phases
  5739. (add-before 'check 'set-rubylib-and-patch-gemfile
  5740. (lambda _
  5741. (setenv "RUBYLIB" "lib")
  5742. (substitute* "sdoc.gemspec"
  5743. (("s.add_runtime_dependency.*") "\n")
  5744. (("s.add_dependency.*") "\n"))
  5745. (substitute* "Gemfile"
  5746. (("gem \"rake\".*")
  5747. "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
  5748. #t)))))
  5749. (propagated-inputs
  5750. `(("ruby-json" ,ruby-json)))
  5751. (native-inputs
  5752. `(("bundler" ,bundler)
  5753. ("ruby-minitest" ,ruby-minitest)
  5754. ("ruby-hoe" ,ruby-hoe)))
  5755. (synopsis "Generate searchable RDoc documentation")
  5756. (description
  5757. "SDoc is an RDoc documentation generator to build searchable HTML
  5758. documentation for Ruby code.")
  5759. (home-page "https://github.com/voloko/sdoc")
  5760. (license license:expat)))
  5761. (define-public ruby-tins
  5762. (package
  5763. (name "ruby-tins")
  5764. (version "1.29.1")
  5765. (source (origin
  5766. (method url-fetch)
  5767. (uri (rubygems-uri "tins" version))
  5768. (sha256
  5769. (base32
  5770. "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
  5771. (build-system ruby-build-system)
  5772. ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
  5773. ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
  5774. ;; the gemspec.
  5775. (arguments
  5776. `(#:tests? #f ; there are no tests
  5777. #:phases
  5778. (modify-phases %standard-phases
  5779. (replace 'build
  5780. (lambda _
  5781. ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
  5782. ;; causes an error.
  5783. (substitute* "tins.gemspec"
  5784. (("\"lib/spruz\", ") ""))
  5785. (invoke "gem" "build" "tins.gemspec"))))))
  5786. (propagated-inputs
  5787. `(("ruby-sync" ,ruby-sync)))
  5788. (synopsis "Assorted tools for Ruby")
  5789. (description "Tins is a Ruby library providing assorted tools.")
  5790. (home-page "https://github.com/flori/tins")
  5791. (license license:expat)))
  5792. (define-public ruby-gem-hadar
  5793. (package
  5794. (name "ruby-gem-hadar")
  5795. (version "1.11.0")
  5796. (source (origin
  5797. (method url-fetch)
  5798. (uri (rubygems-uri "gem_hadar" version))
  5799. (sha256
  5800. (base32
  5801. "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
  5802. (build-system ruby-build-system)
  5803. ;; This gem needs itself at development time. We disable rebuilding of the
  5804. ;; gemspec to avoid this loop.
  5805. (arguments
  5806. `(#:tests? #f ; there are no tests
  5807. #:phases
  5808. (modify-phases %standard-phases
  5809. (replace 'build
  5810. (lambda _
  5811. (invoke "gem" "build" "gem_hadar.gemspec"))))))
  5812. (propagated-inputs
  5813. `(("git" ,git)
  5814. ("ruby-tins" ,ruby-tins)
  5815. ("ruby-yard" ,ruby-yard)))
  5816. (synopsis "Library for the development of Ruby gems")
  5817. (description
  5818. "This library contains some useful functionality to support the
  5819. development of Ruby gems.")
  5820. (home-page "https://github.com/flori/gem_hadar")
  5821. (license license:expat)))
  5822. (define-public ruby-minitest-tu-shim
  5823. (package
  5824. (name "ruby-minitest-tu-shim")
  5825. (version "1.3.3")
  5826. (source (origin
  5827. (method url-fetch)
  5828. (uri (rubygems-uri "minitest_tu_shim" version))
  5829. (sha256
  5830. (base32
  5831. "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
  5832. (build-system ruby-build-system)
  5833. (arguments
  5834. `(#:phases
  5835. (modify-phases %standard-phases
  5836. (add-after 'unpack 'fix-test-include-path
  5837. (lambda* (#:key inputs #:allow-other-keys)
  5838. (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
  5839. (substitute* "Rakefile"
  5840. (("Hoe\\.add_include_dirs .*")
  5841. (string-append "Hoe.add_include_dirs \""
  5842. minitest "/lib/ruby/vendor_ruby"
  5843. "/gems/minitest-"
  5844. ,(package-version ruby-minitest-4)
  5845. "/lib" "\""))))
  5846. #t))
  5847. (add-before 'check 'fix-test-assumptions
  5848. (lambda _
  5849. ;; The test output includes the file name, so a couple of tests
  5850. ;; fail. Changing the regular expressions slightly fixes this
  5851. ;; problem.
  5852. (substitute* "test/test_mini_test.rb"
  5853. (("output.sub!\\(.*, 'FILE:LINE'\\)")
  5854. "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
  5855. (("gsub\\(/.*, 'FILE:LINE'\\)")
  5856. "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
  5857. #t)))))
  5858. (propagated-inputs
  5859. `(("ruby-minitest-4" ,ruby-minitest-4)))
  5860. (native-inputs
  5861. `(("ruby-hoe" ,ruby-hoe)))
  5862. (synopsis "Adapter library between minitest and test/unit")
  5863. (description
  5864. "This library bridges the gap between the small and fast minitest and
  5865. Ruby's large and slower test/unit.")
  5866. (home-page "https://rubygems.org/gems/minitest_tu_shim")
  5867. (license license:expat)))
  5868. (define-public ruby-term-ansicolor
  5869. (package
  5870. (name "ruby-term-ansicolor")
  5871. (version "1.7.1")
  5872. (source (origin
  5873. (method url-fetch)
  5874. (uri (rubygems-uri "term-ansicolor" version))
  5875. (sha256
  5876. (base32
  5877. "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
  5878. (build-system ruby-build-system)
  5879. ;; Rebuilding the gemspec seems to require git, even though this is not a
  5880. ;; git repository, so we just build the gem from the existing gemspec.
  5881. (arguments
  5882. `(#:phases
  5883. (modify-phases %standard-phases
  5884. (add-after 'unpack 'fix-test
  5885. (lambda -
  5886. (substitute* "tests/hsl_triple_test.rb"
  5887. (("0\\\\\\.0%")
  5888. "0\\.?0?%"))))
  5889. (replace 'build
  5890. (lambda _
  5891. (invoke "gem" "build" "term-ansicolor.gemspec"))))))
  5892. (propagated-inputs
  5893. `(("ruby-tins" ,ruby-tins)))
  5894. (native-inputs
  5895. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5896. ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
  5897. (synopsis "Ruby library to control the attributes of terminal output")
  5898. (description
  5899. "This Ruby library uses ANSI escape sequences to control the attributes
  5900. of terminal output.")
  5901. (home-page "https://flori.github.io/term-ansicolor/")
  5902. ;; There is no mention of the "or later" clause.
  5903. (license license:gpl2)))
  5904. (define-public ruby-terraform
  5905. (package
  5906. (name "ruby-terraform")
  5907. (version "0.22.0")
  5908. (source
  5909. (origin
  5910. (method url-fetch)
  5911. (uri (rubygems-uri "ruby-terraform" version))
  5912. (sha256
  5913. (base32
  5914. "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
  5915. (build-system ruby-build-system)
  5916. (arguments
  5917. '(#:tests? #f)) ; No included tests
  5918. (propagated-inputs
  5919. `(("ruby-lino" ,ruby-lino)))
  5920. (synopsis "Ruby wrapper around the Terraform command line interface")
  5921. (description
  5922. "This package provides a Ruby wrapper around the Terraform command line
  5923. interface so that Terraform can be more easily invoked from Ruby code.")
  5924. (home-page "https://github.com/infrablocks/ruby_terraform")
  5925. (license license:expat)))
  5926. (define-public ruby-pstree
  5927. (package
  5928. (name "ruby-pstree")
  5929. (version "0.3.0")
  5930. (source (origin
  5931. (method url-fetch)
  5932. (uri (rubygems-uri "pstree" version))
  5933. (sha256
  5934. (base32
  5935. "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
  5936. (build-system ruby-build-system)
  5937. (native-inputs
  5938. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5939. ("bundler" ,bundler)))
  5940. (synopsis "Create a process tree data structure")
  5941. (description
  5942. "This library uses the output of the @code{ps} command to create a
  5943. process tree data structure for the current host.")
  5944. (home-page "https://github.com/flori/pstree")
  5945. ;; There is no mention of the "or later" clause.
  5946. (license license:gpl2)))
  5947. (define-public ruby-utils
  5948. (package
  5949. (name "ruby-utils")
  5950. (version "0.9.0")
  5951. (source (origin
  5952. (method url-fetch)
  5953. (uri (rubygems-uri "utils" version))
  5954. (sha256
  5955. (base32
  5956. "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
  5957. (build-system ruby-build-system)
  5958. (propagated-inputs
  5959. `(("ruby-tins" ,ruby-tins)
  5960. ("ruby-term-ansicolor" ,ruby-term-ansicolor)
  5961. ("ruby-pstree" ,ruby-pstree)
  5962. ("ruby-pry-editline" ,ruby-pry-editline)))
  5963. (native-inputs
  5964. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5965. ("bundler" ,bundler)))
  5966. (synopsis "Command line tools for working with Ruby")
  5967. (description
  5968. "This package provides assorted command line tools that may be useful
  5969. when working with Ruby code.")
  5970. (home-page "https://github.com/flori/utils")
  5971. ;; There is no mention of the "or later" clause.
  5972. (license license:gpl2)))
  5973. (define-public ruby-jaro-winkler
  5974. (package
  5975. (name "ruby-jaro-winkler")
  5976. (version "1.5.4")
  5977. (source
  5978. (origin
  5979. (method url-fetch)
  5980. (uri (rubygems-uri "jaro_winkler" version))
  5981. (sha256
  5982. (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
  5983. (build-system ruby-build-system)
  5984. (arguments
  5985. '(#:tests? #f)) ; no included tests
  5986. (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
  5987. (description
  5988. "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
  5989. algorithm. It is written as a C extension and will fallback to a pure Ruby
  5990. implementation on platforms where this is unsupported.")
  5991. (home-page "https://github.com/tonytonyjan/jaro_winkler")
  5992. (license license:expat)))
  5993. (define-public ruby-json
  5994. (package
  5995. (name "ruby-json")
  5996. (version "2.1.0")
  5997. (source
  5998. (origin
  5999. (method url-fetch)
  6000. (uri (rubygems-uri "json" version))
  6001. (sha256
  6002. (base32
  6003. "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
  6004. (build-system ruby-build-system)
  6005. (arguments '(#:tests? #f)) ; dependency cycle with sdoc
  6006. (synopsis "JSON library for Ruby")
  6007. (description "This Ruby library provides a JSON implementation written as
  6008. a native C extension.")
  6009. (home-page "http://json-jruby.rubyforge.org/")
  6010. (license (list license:ruby license:gpl2)))) ; GPL2 only
  6011. (define-public ruby-json-pure
  6012. (package
  6013. (name "ruby-json-pure")
  6014. (version "2.3.1")
  6015. (source (origin
  6016. (method url-fetch)
  6017. (uri (rubygems-uri "json_pure" version))
  6018. (sha256
  6019. (base32
  6020. "00pziwkfqwk8vj19s65sdki31q1wvmf5v9b3sfglxm94qfvas1lx"))))
  6021. (build-system ruby-build-system)
  6022. (arguments
  6023. `(#:phases
  6024. (modify-phases %standard-phases
  6025. (add-after 'unpack 'fix-rakefile
  6026. (lambda _
  6027. (substitute* "Rakefile"
  6028. ;; Since this is not a git repository, do not call 'git'.
  6029. (("`git ls-files`") "`find . -type f |sort`")))))))
  6030. (native-inputs
  6031. `(("bundler" ,bundler)
  6032. ("ragel" ,ragel)
  6033. ("ruby-simplecov" ,ruby-simplecov)
  6034. ("ruby-test-unit" ,ruby-test-unit)
  6035. ("which" ,which)))
  6036. (synopsis "JSON implementation in pure Ruby")
  6037. (description
  6038. "This package provides a JSON implementation written in pure Ruby.")
  6039. (home-page "https://flori.github.com/json/")
  6040. (license license:ruby)))
  6041. (define-public ruby-jwt
  6042. (package
  6043. (name "ruby-jwt")
  6044. (version "2.1.0")
  6045. (source
  6046. (origin
  6047. (method url-fetch)
  6048. (uri (rubygems-uri "jwt" version))
  6049. (sha256
  6050. (base32
  6051. "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
  6052. (build-system ruby-build-system)
  6053. (arguments
  6054. '(#:test-target "test"
  6055. #:phases
  6056. (modify-phases %standard-phases
  6057. (add-after 'unpack 'remove-unnecessary-dependencies
  6058. (lambda _
  6059. (substitute* "spec/spec_helper.rb"
  6060. (("require 'simplecov.*") "\n")
  6061. ;; Use [].each to disable running the SimpleCov configuration
  6062. ;; block
  6063. (("SimpleCov\\.configure") "[].each")
  6064. (("require 'codeclimate-test-reporter'") "")
  6065. (("require 'codacy-coverage'") "")
  6066. (("Codacy::Reporter\\.start") ""))
  6067. #t)))))
  6068. (native-inputs
  6069. `(("bundler" ,bundler)
  6070. ("ruby-rspec" ,ruby-rspec)
  6071. ("ruby-rbnacl" ,ruby-rbnacl)))
  6072. (synopsis "Ruby implementation of the JSON Web Token standard")
  6073. (description
  6074. "This package provides a pure Ruby implementation of the RFC 7519 OAuth
  6075. @acronym{JWT, JSON Web Token} standard.")
  6076. (home-page "https://github.com/jwt/ruby-jwt")
  6077. (license license:expat)))
  6078. ;; Even though this package only provides bindings for a Mac OSX API it is
  6079. ;; required by "ruby-listen" at runtime.
  6080. (define-public ruby-rb-fsevent
  6081. (package
  6082. (name "ruby-rb-fsevent")
  6083. (version "0.10.3")
  6084. (source (origin
  6085. (method url-fetch)
  6086. (uri (rubygems-uri "rb-fsevent" version))
  6087. (sha256
  6088. (base32
  6089. "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
  6090. (build-system ruby-build-system)
  6091. ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
  6092. ;; "listen", which needs "rb-fsevent" at runtime.
  6093. (arguments `(#:tests? #f))
  6094. (synopsis "FSEvents API with signals catching")
  6095. (description
  6096. "This library provides Ruby bindings for the Mac OSX FSEvents API.")
  6097. (home-page "https://rubygems.org/gems/rb-fsevent")
  6098. (license license:expat)))
  6099. (define-public ruby-listen
  6100. (package
  6101. (name "ruby-listen")
  6102. (version "3.2.0")
  6103. (source
  6104. (origin
  6105. ;; The gem does not include a Rakefile, so fetch from the Git
  6106. ;; repository.
  6107. (method git-fetch)
  6108. (uri (git-reference
  6109. (url "https://github.com/guard/listen")
  6110. (commit (string-append "v" version))))
  6111. (file-name (git-file-name name version))
  6112. (sha256
  6113. (base32
  6114. "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
  6115. (build-system ruby-build-system)
  6116. (arguments
  6117. `(#:test-target "spec"
  6118. #:phases
  6119. (modify-phases %standard-phases
  6120. (add-after 'unpack 'fix-files-in-gemspec
  6121. (lambda _
  6122. (substitute* "listen.gemspec"
  6123. (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
  6124. #t))
  6125. (add-before 'check 'remove-unnecessary-dependencies'
  6126. (lambda _
  6127. (substitute* "Rakefile"
  6128. ;; Rubocop is for code linting, and is unnecessary for running
  6129. ;; the tests.
  6130. ((".*rubocop.*") ""))
  6131. #t)))))
  6132. (native-inputs
  6133. `(("bundler" ,bundler)
  6134. ("ruby-rspec" ,ruby-rspec)))
  6135. (inputs
  6136. `(;; ruby-thor is used for the command line interface, and is referenced
  6137. ;; in the wrapper, and therefore just needs to be an input.
  6138. ("ruby-thor" ,ruby-thor)))
  6139. (propagated-inputs
  6140. `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
  6141. ("ruby-rb-inotify" ,ruby-rb-inotify)
  6142. ("ruby-dep" ,ruby-dep)))
  6143. (synopsis "Listen to file modifications")
  6144. (description "The Listen gem listens to file modifications and notifies
  6145. you about the changes.")
  6146. (home-page "https://github.com/guard/listen")
  6147. (license license:expat)))
  6148. (define-public ruby-loofah
  6149. (package
  6150. (name "ruby-loofah")
  6151. (version "2.3.1")
  6152. (source
  6153. (origin
  6154. (method url-fetch)
  6155. (uri (rubygems-uri "loofah" version))
  6156. (sha256
  6157. (base32
  6158. "0npqav026zd7r4qdidq9x5nxcp2dzg71bnp421xxx7sngbxf2xbd"))))
  6159. (build-system ruby-build-system)
  6160. (arguments
  6161. '(#:phases
  6162. (modify-phases %standard-phases
  6163. (add-after 'unpack 'remove-unnecessary-dependencies
  6164. (lambda _
  6165. ;; concourse is a development tool which is unused, so remove it
  6166. ;; so it's not required.
  6167. (substitute* "Rakefile"
  6168. (("require \"concourse\"") "")
  6169. (("Concourse\\.new.*") "task :concourse do\n"))
  6170. #t)))))
  6171. (native-inputs
  6172. `(("ruby-hoe" ,ruby-hoe)
  6173. ("ruby-rr" ,ruby-rr)))
  6174. (propagated-inputs
  6175. `(("ruby-nokogiri" ,ruby-nokogiri)
  6176. ("ruby-crass" ,ruby-crass)))
  6177. (synopsis "Ruby library for manipulating and transforming HTML/XML")
  6178. (description
  6179. "Loofah is a general library for manipulating and transforming HTML/XML
  6180. documents and fragments. It's built on top of Nokogiri and libxml2.")
  6181. (home-page "https://github.com/flavorjones/loofah")
  6182. (license license:expat)))
  6183. (define-public ruby-activesupport
  6184. (package
  6185. (name "ruby-activesupport")
  6186. (version "6.1.3")
  6187. (source
  6188. (origin
  6189. (method url-fetch)
  6190. (uri (rubygems-uri "activesupport" version))
  6191. (sha256
  6192. (base32
  6193. "00a4db64g8w5yyk6hzak2nqrmdfvyh5zc9cvnm9gglwbi87ss28h"))))
  6194. (build-system ruby-build-system)
  6195. (arguments
  6196. `(#:phases
  6197. (modify-phases %standard-phases
  6198. (replace 'check
  6199. (lambda _
  6200. ;; There are no tests, instead attempt to load the library.
  6201. (invoke "ruby" "-Ilib" "-r" "active_support"))))))
  6202. (propagated-inputs
  6203. `(("ruby-concurrent" ,ruby-concurrent)
  6204. ("ruby-i18n" ,ruby-i18n)
  6205. ("ruby-minitest" ,ruby-minitest)
  6206. ("ruby-tzinfo" ,ruby-tzinfo)
  6207. ("ruby-tzinfo-data" ,ruby-tzinfo-data)
  6208. ("ruby-zeitwerk" ,ruby-zeitwerk)))
  6209. (synopsis "Ruby on Rails utility library")
  6210. (description "ActiveSupport is a toolkit of support libraries and Ruby
  6211. core extensions extracted from the Rails framework. It includes support for
  6212. multibyte strings, internationalization, time zones, and testing.")
  6213. (home-page "https://www.rubyonrails.org")
  6214. (license license:expat)))
  6215. (define-public ruby-crass
  6216. (package
  6217. (name "ruby-crass")
  6218. (version "1.0.6")
  6219. (home-page "https://github.com/rgrove/crass")
  6220. (source (origin
  6221. ;; The gem does not contain tests, so pull from git.
  6222. (method git-fetch)
  6223. (uri (git-reference
  6224. (url home-page)
  6225. (commit (string-append "v" version))))
  6226. (file-name (git-file-name name version))
  6227. (sha256
  6228. (base32
  6229. "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
  6230. (build-system ruby-build-system)
  6231. (synopsis "Pure Ruby CSS parser")
  6232. (description
  6233. "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
  6234. (license license:expat)))
  6235. (define-public ruby-nokogumbo
  6236. (package
  6237. (name "ruby-nokogumbo")
  6238. (version "2.0.2")
  6239. (source (origin
  6240. ;; We use the git reference, because there's no Rakefile in the
  6241. ;; published gem and the tarball on Github is outdated.
  6242. (method git-fetch)
  6243. (uri (git-reference
  6244. (url "https://github.com/rubys/nokogumbo")
  6245. (commit (string-append "v" version))))
  6246. (file-name (string-append name "-" version "-checkout"))
  6247. (sha256
  6248. (base32
  6249. "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
  6250. (build-system ruby-build-system)
  6251. (native-inputs
  6252. `(("ruby-rake-compiler" ,ruby-rake-compiler)))
  6253. (inputs
  6254. `(("gumbo-parser" ,gumbo-parser)))
  6255. (propagated-inputs
  6256. `(("ruby-nokogiri" ,ruby-nokogiri)))
  6257. (synopsis "Ruby bindings to the Gumbo HTML5 parser")
  6258. (description
  6259. "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
  6260. access the result as a Nokogiri parsed document.")
  6261. (home-page "https://github.com/rubys/nokogumbo/")
  6262. (license license:asl2.0)))
  6263. (define-public ruby-sanitize
  6264. (package
  6265. (name "ruby-sanitize")
  6266. (version "5.1.0")
  6267. (home-page "https://github.com/rgrove/sanitize")
  6268. (source (origin
  6269. (method git-fetch)
  6270. ;; The gem does not include the Rakefile, so we download the
  6271. ;; source from Github.
  6272. (uri (git-reference
  6273. (url home-page)
  6274. (commit (string-append "v" version))))
  6275. (file-name (git-file-name name version))
  6276. (patches (search-patches "ruby-sanitize-system-libxml.patch"))
  6277. (sha256
  6278. (base32
  6279. "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
  6280. (build-system ruby-build-system)
  6281. (propagated-inputs
  6282. `(("ruby-crass" ,ruby-crass)
  6283. ("ruby-nokogiri" ,ruby-nokogiri)
  6284. ("ruby-nokogumbo" ,ruby-nokogumbo)))
  6285. (native-inputs
  6286. `(("ruby-minitest" ,ruby-minitest)))
  6287. (synopsis "Whitelist-based HTML and CSS sanitizer")
  6288. (description
  6289. "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
  6290. acceptable elements, attributes, and CSS properties, Sanitize will remove all
  6291. unacceptable HTML and/or CSS from a string.")
  6292. (license license:expat)))
  6293. (define-public ruby-sync
  6294. (package
  6295. (name "ruby-sync")
  6296. (version "0.5.0")
  6297. (source
  6298. (origin
  6299. (method url-fetch)
  6300. (uri (rubygems-uri "sync" version))
  6301. (sha256
  6302. (base32
  6303. "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
  6304. (build-system ruby-build-system)
  6305. (synopsis "Ruby module with a two-phase lock and counter")
  6306. (description "This package provides a Ruby module that provides a two-phase
  6307. lock with a counter.")
  6308. (home-page "https://github.com/ruby/sync")
  6309. (license license:bsd-2)))
  6310. (define-public ruby-oj
  6311. (package
  6312. (name "ruby-oj")
  6313. (version "3.10.1")
  6314. (source
  6315. (origin
  6316. (method git-fetch)
  6317. ;; Version on rubygems.org does not contain Rakefile, so download from
  6318. ;; GitHub instead.
  6319. (uri (git-reference
  6320. (url "https://github.com/ohler55/oj")
  6321. (commit (string-append "v" version))))
  6322. (file-name (git-file-name name version))
  6323. (sha256
  6324. (base32
  6325. "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
  6326. (build-system ruby-build-system)
  6327. (arguments
  6328. '(#:test-target "test_all"
  6329. #:phases
  6330. (modify-phases %standard-phases
  6331. (add-before 'check 'disable-bundler
  6332. (lambda _
  6333. (substitute* "Rakefile"
  6334. (("Bundler\\.with_clean_env") "1.times")
  6335. (("bundle exec ") "")))))))
  6336. (native-inputs
  6337. `(("bundler" ,bundler)
  6338. ("ruby-rspec" ,ruby-rspec)
  6339. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  6340. (synopsis "JSON parser for Ruby optimized for speed")
  6341. (description
  6342. "Oj is a JSON parser and generator for Ruby, where the encoding and
  6343. decoding of JSON is implemented as a C extension to Ruby.")
  6344. (home-page "http://www.ohler.com/oj/")
  6345. (license (list license:expat ; Ruby code
  6346. license:bsd-3)))) ; extension code
  6347. (define-public ruby-ox
  6348. (package
  6349. (name "ruby-ox")
  6350. (version "2.6.0")
  6351. (source
  6352. (origin
  6353. (method url-fetch)
  6354. (uri (rubygems-uri "ox" version))
  6355. (sha256
  6356. (base32
  6357. "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
  6358. (build-system ruby-build-system)
  6359. (arguments
  6360. '(#:tests? #f)) ; no tests
  6361. (synopsis "Optimized XML library for Ruby")
  6362. (description
  6363. "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
  6364. written as a native C extension. It was designed to be an alternative to
  6365. Nokogiri and other Ruby XML parsers for generic XML parsing and as an
  6366. alternative to Marshal for Object serialization. ")
  6367. (home-page "http://www.ohler.com/ox")
  6368. (license license:expat)))
  6369. (define-public ruby-redcloth
  6370. (package
  6371. (name "ruby-redcloth")
  6372. (version "4.3.2")
  6373. (source (origin
  6374. (method url-fetch)
  6375. (uri (rubygems-uri "RedCloth" version))
  6376. (sha256
  6377. (base32
  6378. "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
  6379. (build-system ruby-build-system)
  6380. (arguments
  6381. `(#:tests? #f ; no tests
  6382. #:phases
  6383. (modify-phases %standard-phases
  6384. ;; Redcloth has complicated rake tasks to build various versions for
  6385. ;; multiple targets using RVM. We don't want this so we just use the
  6386. ;; existing gemspec.
  6387. (replace 'build
  6388. (lambda _
  6389. (invoke "gem" "build" "redcloth.gemspec"))))))
  6390. (native-inputs
  6391. `(("bundler" ,bundler)
  6392. ("ruby-diff-lcs" ,ruby-diff-lcs)
  6393. ("ruby-rspec-2" ,ruby-rspec-2)))
  6394. (synopsis "Textile markup language parser for Ruby")
  6395. (description
  6396. "RedCloth is a Ruby parser for the Textile markup language.")
  6397. (home-page "http://redcloth.org")
  6398. (license license:expat)))
  6399. (define-public ruby-pg
  6400. (package
  6401. (name "ruby-pg")
  6402. (version "1.2.3")
  6403. (source
  6404. (origin
  6405. (method url-fetch)
  6406. (uri (rubygems-uri "pg" version))
  6407. (sha256
  6408. (base32
  6409. "13mfrysrdrh8cka1d96zm0lnfs59i5x2g6ps49r2kz5p3q81xrzj"))))
  6410. (build-system ruby-build-system)
  6411. (arguments
  6412. '(#:test-target "spec"))
  6413. (native-inputs
  6414. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  6415. ("ruby-hoe" ,ruby-hoe)
  6416. ("ruby-rspec" ,ruby-rspec)))
  6417. (inputs
  6418. `(("postgresql" ,postgresql)))
  6419. (synopsis "Ruby interface to PostgreSQL")
  6420. (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
  6421. with PostgreSQL 9.0 and later.")
  6422. (home-page "https://bitbucket.org/ged/ruby-pg")
  6423. (license license:ruby)))
  6424. (define-public ruby-byebug
  6425. (package
  6426. (name "ruby-byebug")
  6427. (version "11.1.3")
  6428. (source
  6429. (origin
  6430. (method git-fetch)
  6431. (uri (git-reference
  6432. (url "https://github.com/deivid-rodriguez/byebug")
  6433. (commit (string-append "v" version))))
  6434. (file-name (git-file-name name version))
  6435. (sha256
  6436. (base32
  6437. "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
  6438. (modules '((guix build utils)))
  6439. (snippet
  6440. '(begin
  6441. ;; Remove wrappers that try to setup a bundle environment.
  6442. (with-directory-excursion "bin"
  6443. (for-each delete-file '("bundle" "rake" "rubocop"))
  6444. ;; ruby-minitest doesn't come with a launcher, so fix the one
  6445. ;; provided.
  6446. (substitute* "minitest"
  6447. (("load File\\.expand_path\\(\"bundle\".*") "")
  6448. (("require \"bundler/setup\".*") "")))
  6449. #t))))
  6450. (build-system ruby-build-system)
  6451. (arguments
  6452. `(#:phases
  6453. (modify-phases %standard-phases
  6454. (add-after 'unpack 'skip-tmp-path-sensitive-test
  6455. (lambda _
  6456. (substitute* "test/commands/where_test.rb"
  6457. (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
  6458. "unless true\n"))
  6459. #t))
  6460. (add-before 'build 'compile
  6461. (lambda _
  6462. (invoke "rake" "compile")))
  6463. (add-before 'check 'disable-misbehaving-test
  6464. ;; Expects 5, gets 162. From a file containing ~10 lines.
  6465. (lambda _
  6466. (substitute* "test/commands/finish_test.rb"
  6467. (("test_finish_inside_autoloaded_files")
  6468. "finish_inside_autoloaded_files"))))
  6469. (add-before 'check 'set-home
  6470. (lambda _
  6471. (setenv "HOME" (getcwd))
  6472. #t)))))
  6473. (native-inputs
  6474. `(("bundler" ,bundler)
  6475. ("ruby-chandler" ,ruby-chandler)
  6476. ("ruby-minitest" ,ruby-minitest)
  6477. ("ruby-pry" ,ruby-pry)
  6478. ("ruby-rake-compiler" ,ruby-rake-compiler)
  6479. ("ruby-rubocop" ,ruby-rubocop)
  6480. ("ruby-yard" ,ruby-yard)))
  6481. (synopsis "Debugger for Ruby 2")
  6482. (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
  6483. TracePoint C API for execution control and the Debug Inspector C API for call
  6484. stack navigation. The core component provides support that front-ends can
  6485. build on. It provides breakpoint handling and bindings for stack frames among
  6486. other things and it comes with a command line interface.")
  6487. (home-page "https://github.com/deivid-rodriguez/byebug")
  6488. (license license:bsd-2)))
  6489. (define-public ruby-netrc
  6490. (package
  6491. (name "ruby-netrc")
  6492. (version "0.11.0")
  6493. (source (origin
  6494. (method url-fetch)
  6495. (uri (rubygems-uri "netrc" version))
  6496. (sha256
  6497. (base32
  6498. "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
  6499. (build-system ruby-build-system)
  6500. (arguments
  6501. `(#:phases
  6502. (modify-phases %standard-phases
  6503. (replace 'check
  6504. ;; There is no Rakefile and minitest can only run one file at once,
  6505. ;; so we have to iterate over all test files.
  6506. (lambda _
  6507. (for-each (lambda (file)
  6508. (invoke "ruby" "-Itest" file))
  6509. (find-files "./test" "test_.*\\.rb"))))
  6510. (add-before 'check 'patch-tests-for-newer-ruby
  6511. (lambda _
  6512. (substitute* "test/test_netrc.rb"
  6513. (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
  6514. (native-inputs
  6515. `(("ruby-minitest" ,ruby-minitest)))
  6516. (synopsis "Library to read and update netrc files")
  6517. (description
  6518. "This library can read and update netrc files, preserving formatting
  6519. including comments and whitespace.")
  6520. (home-page "https://github.com/geemus/netrc")
  6521. (license license:expat)))
  6522. (define-public ruby-unf-ext
  6523. (package
  6524. (name "ruby-unf-ext")
  6525. (version "0.0.7.6")
  6526. (source (origin
  6527. (method url-fetch)
  6528. (uri (rubygems-uri "unf_ext" version))
  6529. (sha256
  6530. (base32
  6531. "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
  6532. (build-system ruby-build-system)
  6533. (arguments
  6534. `(#:phases
  6535. (modify-phases %standard-phases
  6536. (add-after 'build 'build-ext
  6537. (lambda _ (invoke "rake" "compile:unf_ext")))
  6538. (add-before 'check 'lose-rake-compiler-dock-dependency
  6539. (lambda _
  6540. ;; rake-compiler-dock is listed in the gemspec, but only
  6541. ;; required when cross-compiling.
  6542. (substitute* "unf_ext.gemspec"
  6543. ((".*rake-compiler-dock.*") ""))
  6544. #t)))))
  6545. (native-inputs
  6546. `(("bundler" ,bundler)
  6547. ("ruby-rake-compiler" ,ruby-rake-compiler)
  6548. ("ruby-test-unit" ,ruby-test-unit)))
  6549. (synopsis "Unicode normalization form support library")
  6550. (description
  6551. "This package provides unicode normalization form support for Ruby.")
  6552. (home-page "https://github.com/knu/ruby-unf_ext")
  6553. (license license:expat)))
  6554. (define-public ruby-tdiff
  6555. ;; Use a newer than released snapshot so that rspec-2 is not required.
  6556. (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
  6557. (package
  6558. (name "ruby-tdiff")
  6559. (version (string-append "0.3.3-1." (string-take commit 8)))
  6560. (source (origin
  6561. (method git-fetch)
  6562. (uri (git-reference
  6563. (url "https://github.com/postmodern/tdiff")
  6564. (commit commit)))
  6565. (file-name (string-append name "-" version "-checkout"))
  6566. (sha256
  6567. (base32
  6568. "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
  6569. (build-system ruby-build-system)
  6570. (native-inputs
  6571. `(("ruby-rspec" ,ruby-rspec)
  6572. ("ruby-yard" ,ruby-yard)
  6573. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  6574. (synopsis "Calculate the differences between two tree-like structures")
  6575. (description
  6576. "This library provides functions to calculate the differences between two
  6577. tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
  6578. (home-page "https://github.com/postmodern/tdiff")
  6579. (license license:expat))))
  6580. (define-public ruby-nokogiri-diff
  6581. ;; Use a newer than released snapshot so that rspec-2 is not required.
  6582. (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
  6583. (package
  6584. (name "ruby-nokogiri-diff")
  6585. (version (string-append "0.2.0-1." (string-take commit 8)))
  6586. (source (origin
  6587. (method git-fetch)
  6588. (uri (git-reference
  6589. (url "https://github.com/postmodern/nokogiri-diff")
  6590. (commit commit)))
  6591. (file-name (string-append name "-" version "-checkout"))
  6592. (sha256
  6593. (base32
  6594. "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
  6595. (build-system ruby-build-system)
  6596. (propagated-inputs
  6597. `(("ruby-tdiff" ,ruby-tdiff)
  6598. ("ruby-nokogiri" ,ruby-nokogiri)))
  6599. (native-inputs
  6600. `(("ruby-rspec" ,ruby-rspec)
  6601. ("ruby-yard" ,ruby-yard)
  6602. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  6603. (synopsis "Calculate the differences between two XML/HTML documents")
  6604. (description
  6605. "@code{Nokogiri::Diff} adds the ability to calculate the
  6606. differences (added or removed nodes) between two XML/HTML documents.")
  6607. (home-page "https://github.com/postmodern/nokogiri-diff")
  6608. (license license:expat))))
  6609. (define-public ruby-racc
  6610. (package
  6611. (name "ruby-racc")
  6612. (version "1.5.2")
  6613. (source
  6614. (origin
  6615. (method url-fetch)
  6616. (uri (rubygems-uri "racc" version))
  6617. (sha256
  6618. (base32
  6619. "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
  6620. (build-system ruby-build-system)
  6621. (arguments
  6622. `(#:tests? #f)) ; Fails while parsing test instructions.
  6623. (native-inputs
  6624. `(("ruby-hoe" ,ruby-hoe)
  6625. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  6626. (synopsis "LALR(1) parser generator for Ruby")
  6627. (description
  6628. "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
  6629. generates Ruby program.")
  6630. (home-page "https://i.loveruby.net/en/projects/racc/")
  6631. (license (list
  6632. ;; Generally licensed under the LGPL2.1, and some files also
  6633. ;; available under the same license as Ruby.
  6634. license:lgpl2.1
  6635. license:ruby))))
  6636. (define-public ruby-rack
  6637. (package
  6638. (name "ruby-rack")
  6639. (version "2.2.3")
  6640. (source
  6641. (origin
  6642. (method git-fetch)
  6643. ;; Download from GitHub so that the snippet can be applied and tests run.
  6644. (uri (git-reference
  6645. (url "https://github.com/rack/rack")
  6646. (commit version)))
  6647. (file-name (git-file-name name version))
  6648. (sha256
  6649. (base32
  6650. "1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4"))
  6651. ;; Ignore test which fails inside the build environment but works
  6652. ;; outside.
  6653. (modules '((guix build utils)))
  6654. (snippet
  6655. '(begin (substitute* "test/spec_files.rb"
  6656. (("res.body.must_equal expected_body") ""))
  6657. #t))))
  6658. (build-system ruby-build-system)
  6659. (arguments
  6660. '(#:phases
  6661. (modify-phases %standard-phases
  6662. (add-before 'check 'fix-tests
  6663. (lambda _
  6664. ;; A few of the tests use the length of a file on disk for
  6665. ;; Content-Length and Content-Range headers. However, this file
  6666. ;; has a shebang in it which an earlier phase patches, growing
  6667. ;; the file size from 193 to 239 bytes when the store prefix is
  6668. ;; "/gnu/store".
  6669. (let ((size-diff (- (string-length (which "ruby"))
  6670. (string-length "/usr/bin/env ruby"))))
  6671. (substitute* '("test/spec_files.rb")
  6672. (("208" bytes)
  6673. (number->string (+ (string->number bytes) size-diff)))
  6674. (("bytes(.)22-33" all delimiter)
  6675. (string-append "bytes"
  6676. delimiter
  6677. (number->string (+ 22 size-diff))
  6678. "-"
  6679. (number->string (+ 33 size-diff))))))
  6680. #t)))))
  6681. (native-inputs
  6682. `(("ruby-minitest" ,ruby-minitest)
  6683. ("ruby-minitest-global-expectations" ,ruby-minitest-global-expectations)))
  6684. (synopsis "Unified web application interface for Ruby")
  6685. (description "Rack provides a minimal, modular and adaptable interface for
  6686. developing web applications in Ruby. By wrapping HTTP requests and responses,
  6687. it unifies the API for web servers, web frameworks, and software in between
  6688. into a single method call.")
  6689. (home-page "https://rack.github.io/")
  6690. (license license:expat)))
  6691. (define-public ruby-rack-test
  6692. (package
  6693. (name "ruby-rack-test")
  6694. (version "0.8.3")
  6695. (source
  6696. (origin
  6697. (method url-fetch)
  6698. (uri (rubygems-uri "rack-test" version))
  6699. (sha256
  6700. (base32
  6701. "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
  6702. (build-system ruby-build-system)
  6703. (arguments
  6704. ;; Disable tests because of circular dependencies: requires sinatra,
  6705. ;; which requires rack-protection, which requires rack-test. Instead
  6706. ;; simply require the library.
  6707. `(#:phases
  6708. (modify-phases %standard-phases
  6709. (replace 'check
  6710. (lambda _
  6711. (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
  6712. (propagated-inputs
  6713. `(("ruby-rack" ,ruby-rack)))
  6714. (synopsis "Testing API for Rack applications")
  6715. (description
  6716. "Rack::Test is a small, simple testing API for Rack applications. It can
  6717. be used on its own or as a reusable starting point for Web frameworks and
  6718. testing libraries to build on.")
  6719. (home-page "https://github.com/rack-test/rack-test")
  6720. (license license:expat)))
  6721. (define-public ruby-rack-protection
  6722. (package
  6723. (name "ruby-rack-protection")
  6724. (version "2.0.8.1")
  6725. (source
  6726. (origin
  6727. (method url-fetch)
  6728. (uri (rubygems-uri "rack-protection" version))
  6729. (sha256
  6730. (base32
  6731. "1zyj97bfr1shfgwk4ddmdbw0mdkm4qdyh9s1hl0k7accf3kxx1yi"))))
  6732. (build-system ruby-build-system)
  6733. (arguments
  6734. '(;; Tests missing from the gem.
  6735. #:tests? #f))
  6736. (propagated-inputs
  6737. `(("ruby-rack" ,ruby-rack)))
  6738. (native-inputs
  6739. `(("bundler" ,bundler)
  6740. ("ruby-rspec" ,ruby-rspec-2)
  6741. ("ruby-rack-test" ,ruby-rack-test)))
  6742. (synopsis "Rack middleware that protects against typical web attacks")
  6743. (description "Rack middleware that can be used to protect against typical
  6744. web attacks. It can protect all Rack apps, including Rails. For instance, it
  6745. protects against cross site request forgery, cross site scripting,
  6746. clickjacking, directory traversal, session hijacking and IP spoofing.")
  6747. (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
  6748. (license license:expat)))
  6749. (define-public ruby-rainbow
  6750. (package
  6751. (name "ruby-rainbow")
  6752. (version "3.0.0")
  6753. (source
  6754. (origin
  6755. (method url-fetch)
  6756. (uri (rubygems-uri "rainbow" version))
  6757. (sha256
  6758. (base32
  6759. "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
  6760. (build-system ruby-build-system)
  6761. (arguments
  6762. '(#:phases
  6763. (modify-phases %standard-phases
  6764. ;; Run rspec directly, to avoid requiring Rubocop which is used from
  6765. ;; the Rakefile.
  6766. (replace 'check
  6767. (lambda* (#:key tests? #:allow-other-keys)
  6768. (when tests?
  6769. (invoke "rspec"))
  6770. #t)))))
  6771. (native-inputs
  6772. `(("bundler" ,bundler)
  6773. ("ruby-rspec" ,ruby-rspec)))
  6774. (synopsis "Colorize printed text on ANSI terminals")
  6775. (description
  6776. "@code{rainbow} provides a string presenter object to colorize strings by
  6777. wrapping them in ANSI escape codes.")
  6778. (home-page "https://github.com/sickill/rainbow")
  6779. (license license:expat)))
  6780. (define-public ruby-rr
  6781. (package
  6782. (name "ruby-rr")
  6783. (version "1.2.1")
  6784. (source
  6785. (origin
  6786. (method url-fetch)
  6787. (uri (rubygems-uri "rr" version))
  6788. (sha256
  6789. (base32
  6790. "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
  6791. (build-system ruby-build-system)
  6792. (arguments
  6793. '(#:tests? #f)) ; test files not included
  6794. (native-inputs
  6795. `(("bundler" ,bundler)
  6796. ("ruby-rspec" ,ruby-rspec)))
  6797. (synopsis "Ruby test double framework")
  6798. (description
  6799. "RR is a test double framework that features a rich selection of double
  6800. techniques and a terse syntax.")
  6801. (home-page "https://rr.github.io/rr/")
  6802. (license license:expat)))
  6803. (define-public ruby-rest-client
  6804. (package
  6805. (name "ruby-rest-client")
  6806. (version "2.0.2")
  6807. (source
  6808. (origin
  6809. (method url-fetch)
  6810. (uri (rubygems-uri "rest-client" version))
  6811. (sha256
  6812. (base32
  6813. "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
  6814. (build-system ruby-build-system)
  6815. (arguments
  6816. '(#:phases
  6817. (modify-phases %standard-phases
  6818. (add-before 'check 'remove-unnecessary-development-dependencies
  6819. (lambda _
  6820. (substitute* "rest-client.gemspec"
  6821. ;; Remove rubocop as it's unused. Rubocop also indirectly
  6822. ;; depends on this package through ruby-parser and ruby-ast so
  6823. ;; this avoids a dependency loop.
  6824. ((".*rubocop.*") "\n")
  6825. ;; Remove pry as it's unused, it's a debugging tool
  6826. ((".*pry.*") "\n")
  6827. ;; Remove an unnecessarily strict rdoc dependency
  6828. ((".*rdoc.*") "\n"))
  6829. #t))
  6830. (add-before 'check 'delete-network-dependent-tests
  6831. (lambda _
  6832. (delete-file "spec/integration/request_spec.rb")
  6833. (delete-file "spec/integration/httpbin_spec.rb")
  6834. #t)))))
  6835. (propagated-inputs
  6836. `(("ruby-http-cookie" ,ruby-http-cookie)
  6837. ("ruby-mime-types" ,ruby-mime-types)
  6838. ("ruby-netrc" ,ruby-netrc)))
  6839. (native-inputs
  6840. `(("bundler" ,bundler)
  6841. ("ruby-webmock" ,ruby-webmock-2)
  6842. ("ruby-rspec" ,ruby-rspec)))
  6843. (synopsis "Simple HTTP and REST client for Ruby")
  6844. (description
  6845. "@code{rest-client} provides a simple HTTP and REST client for Ruby,
  6846. inspired by the Sinatra microframework style of specifying actions:
  6847. @code{get}, @code{put}, @code{post}, @code{delete}.")
  6848. (home-page "https://github.com/rest-client/rest-client")
  6849. (license license:expat)))
  6850. (define-public ruby-rubocop-ast
  6851. (package
  6852. (name "ruby-rubocop-ast")
  6853. (version "1.4.1")
  6854. (source
  6855. (origin
  6856. (method git-fetch) ;no test suite in distributed gem
  6857. (uri (git-reference
  6858. (url "https://github.com/rubocop-hq/rubocop-ast")
  6859. (commit (string-append "v" version))))
  6860. (file-name (git-file-name name version))
  6861. (sha256
  6862. (base32
  6863. "1x2m7k4bn4zvvwmj7imzmv0dav6xnrbcvssad1m5lkprx7h5lzkq"))))
  6864. (build-system ruby-build-system)
  6865. (arguments
  6866. `(#:test-target "spec"
  6867. #:phases (modify-phases %standard-phases
  6868. (add-before 'build 'generate-lexer
  6869. (lambda _
  6870. (setenv "RUBOCOP_VERSION" "none")
  6871. (invoke "rake" "generate")))
  6872. (replace 'replace-git-ls-files
  6873. (lambda _
  6874. (substitute* "rubocop-ast.gemspec"
  6875. (("`git ls-files(.*)`" _ files)
  6876. (format #f "`find ~a -type f| sort`" files)))
  6877. #t)))))
  6878. (native-inputs
  6879. `(("ruby-bump" ,ruby-bump)
  6880. ("ruby-oedipus-lex" ,ruby-oedipus-lex)
  6881. ("ruby-pry" ,ruby-pry)
  6882. ("ruby-racc" ,ruby-racc)
  6883. ("ruby-rake" ,ruby-rake)
  6884. ("ruby-rspec" ,ruby-rspec)
  6885. ("ruby-simplecov" ,ruby-simplecov)))
  6886. (propagated-inputs
  6887. `(("ruby-parser" ,ruby-parser)))
  6888. (synopsis "RuboCop's AST extensions and NodePattern functionality")
  6889. (description "Rubocop::AST extends @code{ruby-parser} with classes used
  6890. by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
  6891. @itemize
  6892. @item @code{RuboCop::AST::Node}
  6893. @item @code{RuboCop::AST::NodePattern}
  6894. @end itemize")
  6895. (home-page "https://rubocop.org/")
  6896. (license license:expat)))
  6897. (define-public ruby-rexml
  6898. (package
  6899. (name "ruby-rexml")
  6900. (version "3.2.5")
  6901. (source
  6902. (origin
  6903. (method git-fetch) ;no tests in distributed gem
  6904. (uri (git-reference
  6905. (url "https://github.com/ruby/rexml")
  6906. (commit (string-append "v" version))))
  6907. (file-name (git-file-name name version))
  6908. (sha256
  6909. (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
  6910. (build-system ruby-build-system)
  6911. (synopsis "XML toolkit for Ruby")
  6912. (description "Inspired by Electric XML library for Java, REXML aims to be
  6913. easy-to-use API, small and fast. It supports both tree and stream document
  6914. parsing.")
  6915. (home-page "https://github.com/ruby/rexml")
  6916. (license license:bsd-2)))
  6917. (define-public ruby-character-set
  6918. (package
  6919. (name "ruby-character-set")
  6920. (version "1.4.0")
  6921. (source
  6922. (origin
  6923. (method url-fetch)
  6924. (uri (rubygems-uri "character_set" version))
  6925. (sha256
  6926. (base32
  6927. "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
  6928. (build-system ruby-build-system)
  6929. (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
  6930. (synopsis "Ruby library to manipulate Unicode")
  6931. (description "CharacterSet is a C-extended Ruby library to work with sets
  6932. of Unicode code points. It can read and write these sets in various formats
  6933. and implements the @code{stdlib} @code{Set} interface for them. It also
  6934. offers an alternate paradigm of @code{String} processing which grants much
  6935. better performance than @code{Regexp} and @code{String} methods from the
  6936. @code{stdlib} where applicable. Many parts can be used independently, e.g.:
  6937. @itemize
  6938. @item @code{CharacterSet::Character}
  6939. @item @code{CharacterSet::Parser}
  6940. @item @code{CharacterSet::Writer}
  6941. @item @code{RangeCompressor}
  6942. @end itemize")
  6943. (home-page "https://github.com/jaynetics/character_set")
  6944. (license license:expat)))
  6945. (define-public ruby-range-compressor
  6946. (package
  6947. (name "ruby-range-compressor")
  6948. (version "1.0.0")
  6949. (source
  6950. (origin
  6951. (method git-fetch)
  6952. (uri (git-reference
  6953. (url "https://github.com/janosch-x/range_compressor")
  6954. (commit (string-append "v" version))))
  6955. (file-name (git-file-name name version))
  6956. (sha256
  6957. (base32
  6958. "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
  6959. (build-system ruby-build-system)
  6960. (arguments
  6961. `(#:test-target "spec"
  6962. #:phases (modify-phases %standard-phases
  6963. (add-after 'extract-gemspec 'strip-version-requirements
  6964. (lambda _
  6965. (substitute* "range_compressor.gemspec"
  6966. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  6967. (string-append stripped "\n")))
  6968. #t)))))
  6969. (native-inputs
  6970. `(("ruby-rspec" ,ruby-rspec)))
  6971. (synopsis "Simple arrays of objects to arrays of ranges compressor")
  6972. (description "RangeCompresses is a tiny library that allows compressing
  6973. arrays of objects into arrays of ranges. For example, it can turn the
  6974. following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
  6975. (home-page "https://github.com/janosch-x/range_compressor")
  6976. (license license:expat)))
  6977. (define-public ruby-regexp-property-values
  6978. (let ((commit "03007a66c912949a7130b973cc0eca109c20811f")
  6979. (revision "1"))
  6980. (package
  6981. (name "ruby-regexp-property-values")
  6982. (version (git-version "1.0.0" revision commit))
  6983. (source
  6984. (origin
  6985. (method git-fetch)
  6986. (uri (git-reference ;no test suite in distributed gem
  6987. (url "https://github.com/jaynetics/regexp_property_values")
  6988. (commit commit)))
  6989. (file-name (git-file-name name version))
  6990. (sha256
  6991. (base32
  6992. "1zsax784p16zdkf60lyq9z924zvsafhx9ckxx9srsgkyiqrifi1s"))))
  6993. (build-system ruby-build-system)
  6994. (arguments
  6995. '(#:test-target "default"))
  6996. (native-inputs
  6997. `(("ruby-character-set" ,ruby-character-set)
  6998. ("ruby-rake" ,ruby-rake)
  6999. ("ruby-rake-compiler" ,ruby-rake-compiler)
  7000. ("ruby-range-compressor" ,ruby-range-compressor)
  7001. ("ruby-rspec" ,ruby-rspec)))
  7002. (synopsis "Inspect Ruby's regex engine property values")
  7003. (description "This small library lets you see which property values are
  7004. supported by the regular expression engine of the Ruby version you are running
  7005. and can directly read out their code point ranges. In other words, it
  7006. determines all supported values for @code{\\p{value}} expressions and what
  7007. they match.")
  7008. (home-page "https://github.com/jaynetics/regexp_property_values")
  7009. (license license:expat))))
  7010. (define-public ruby-regexp-parser
  7011. (package
  7012. (name "ruby-regexp-parser")
  7013. (version "2.0.0")
  7014. (source
  7015. (origin
  7016. (method git-fetch) ;bin/test missing from gem
  7017. (uri (git-reference
  7018. (url "https://github.com/ammar/regexp_parser")
  7019. (commit (string-append "v" version))))
  7020. (file-name (git-file-name name version))
  7021. (sha256
  7022. (base32
  7023. "09ddxdwlml30q6j4rqf06bbjj1mwx00rs0bksnyblhv85anrqz3k"))))
  7024. (build-system ruby-build-system)
  7025. (arguments
  7026. '(#:test-target "default"
  7027. #:phases (modify-phases %standard-phases
  7028. (add-before 'build 'compile-scanner.rb
  7029. (lambda _
  7030. (invoke "rake" "build")
  7031. ;; XXX: This is needed otherwise the install
  7032. ;; phase fails to delete the installed cached
  7033. ;; gem file.
  7034. (delete-file-recursively "pkg")
  7035. #t)))))
  7036. (native-inputs
  7037. `(("ragel" ,ragel)
  7038. ("ruby-regexp-property-values" ,ruby-regexp-property-values)
  7039. ("ruby-rspec" ,ruby-rspec)))
  7040. (synopsis "A regular expression parser library for Ruby ")
  7041. (description "A Ruby gem for tokenizing, parsing, and transforming regular
  7042. expressions. It comprises the following components:
  7043. @itemize
  7044. @item A scanner/tokenizer based on Ragel,
  7045. @item A lexer that produces a stream of token objects,
  7046. @item A parser that produces a tree of Expression objects.
  7047. @end itemize")
  7048. (home-page "https://github.com/ammar/regexp_parser")
  7049. (license license:expat)))
  7050. (define-public ruby-test-queue
  7051. (package
  7052. (name "ruby-test-queue")
  7053. (version "0.4.2")
  7054. (source
  7055. (origin
  7056. (method url-fetch)
  7057. (uri (rubygems-uri "test-queue" version))
  7058. (sha256
  7059. (base32
  7060. "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
  7061. (build-system ruby-build-system)
  7062. (arguments
  7063. '(#:phases
  7064. (modify-phases %standard-phases
  7065. (replace 'check
  7066. (lambda* (#:key tests? #:allow-other-keys)
  7067. (when tests?
  7068. (invoke "rspec"))
  7069. #t)))))
  7070. (native-inputs
  7071. `(("ruby-rspec" ,ruby-rspec)))
  7072. (synopsis "Minitest/RSpec parallel test runner for CI environments")
  7073. (description "The test-queue module is a parallel test runner,
  7074. built using a centralized queue to ensure optimal distribution of
  7075. tests between workers. It is specifically optimized for Continuous
  7076. Integration (CI) environments: build statistics from each run are
  7077. stored locally and used to sort the queue at the beginning of the next
  7078. run.")
  7079. (home-page "https://github.com/tmm1/test-queue")
  7080. (license license:expat)))
  7081. (define-public ruby-rubocop
  7082. (package
  7083. (name "ruby-rubocop")
  7084. (version "1.10.0")
  7085. (source
  7086. (origin
  7087. (method git-fetch) ;no tests in distributed gem
  7088. (uri (git-reference
  7089. (url "https://github.com/rubocop-hq/rubocop")
  7090. (commit (string-append "v" version))))
  7091. (file-name (git-file-name name version))
  7092. (sha256
  7093. (base32
  7094. "0wjw9vpzr4f3nf1zf010bag71w4hdi0haybdn7r5rlmw45pmim29"))))
  7095. (build-system ruby-build-system)
  7096. (arguments
  7097. '(#:test-target "default"
  7098. #:phases
  7099. (modify-phases %standard-phases
  7100. (add-before 'check 'set-home
  7101. (lambda _
  7102. (setenv "HOME" (getcwd))
  7103. #t))
  7104. ;; Rubocop depends on itself for tests, directly and indirectly. By
  7105. ;; regenerating the TODO list we test rubocop against itself and
  7106. ;; forgo adjusting the test suite to our environment each release.
  7107. (replace 'check
  7108. (lambda* (#:key tests? #:allow-other-keys)
  7109. (when tests?
  7110. (make-file-writable ".rubocop_todo.yml")
  7111. (invoke "./exe/rubocop" "--auto-gen-config"))
  7112. #t))
  7113. (add-before 'check 'make-adoc-files-writable
  7114. (lambda _
  7115. (let ((adoc-files (find-files "docs/modules/ROOT/pages"
  7116. "\\.adoc$")))
  7117. (for-each make-file-writable adoc-files))
  7118. #t)))))
  7119. (native-inputs
  7120. `(("ruby-bump" ,ruby-bump)
  7121. ("ruby-pry" ,ruby-pry)
  7122. ("ruby-rake" ,ruby-rake)
  7123. ("ruby-rspec" ,ruby-rspec)
  7124. ("ruby-rubocop-minimal" ,ruby-rubocop-minimal)
  7125. ("ruby-rubocop-performance-minimal" ,ruby-rubocop-performance-minimal)
  7126. ("ruby-rubocop-rspec-minimal" ,ruby-rubocop-rspec-minimal)
  7127. ("ruby-simplecov" ,ruby-simplecov)
  7128. ("ruby-stackprof" ,ruby-stackprof)
  7129. ("ruby-test-queue" ,ruby-test-queue)
  7130. ("ruby-webmock" ,ruby-webmock)
  7131. ("ruby-yard" ,ruby-yard)))
  7132. (propagated-inputs
  7133. `(("ruby-parallel" ,ruby-parallel)
  7134. ("ruby-parser" ,ruby-parser)
  7135. ("ruby-rainbow" ,ruby-rainbow)
  7136. ("ruby-regexp-parser" ,ruby-regexp-parser)
  7137. ("ruby-rubocop-ast" ,ruby-rubocop-ast)
  7138. ("ruby-progressbar" ,ruby-progressbar)
  7139. ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
  7140. (synopsis "Ruby code style checking tool")
  7141. (description
  7142. "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
  7143. the community-driven Ruby Style Guide.")
  7144. (home-page "https://github.com/rubocop-hq/rubocop")
  7145. (license license:expat)))
  7146. (define-public ruby-rubocop-minimal
  7147. (hidden-package
  7148. (package
  7149. (inherit ruby-rubocop)
  7150. (arguments
  7151. (substitute-keyword-arguments (package-arguments ruby-rubocop)
  7152. ((#:tests? _ #f) #f)))
  7153. (propagated-inputs '())
  7154. (native-inputs '()))))
  7155. (define-public ruby-contest
  7156. (package
  7157. (name "ruby-contest")
  7158. (version "0.1.3")
  7159. (source
  7160. (origin
  7161. (method url-fetch)
  7162. (uri (rubygems-uri "contest" version))
  7163. (sha256
  7164. (base32
  7165. "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
  7166. (build-system ruby-build-system)
  7167. (synopsis "Write declarative tests using nested contexts")
  7168. (description
  7169. "Contest allows writing declarative @code{Test::Unit} tests using nested
  7170. contexts without performance penalties.")
  7171. (home-page "https://github.com/citrusbyte/contest")
  7172. (license license:expat)))
  7173. (define-public ruby-creole
  7174. (package
  7175. (name "ruby-creole")
  7176. (version "0.5.0")
  7177. (source
  7178. (origin
  7179. (method url-fetch)
  7180. (uri (rubygems-uri "creole" version))
  7181. (sha256
  7182. (base32
  7183. "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
  7184. (build-system ruby-build-system)
  7185. (native-inputs
  7186. `(("ruby-bacon" ,ruby-bacon)))
  7187. (synopsis "Creole markup language converter")
  7188. (description
  7189. "Creole is a lightweight markup language and this library for converting
  7190. creole to @code{HTML}.")
  7191. (home-page "https://github.com/minad/creole")
  7192. (license license:ruby)))
  7193. (define-public ruby-docile
  7194. (package
  7195. (name "ruby-docile")
  7196. (version "1.1.5")
  7197. (source
  7198. (origin
  7199. (method url-fetch)
  7200. (uri (rubygems-uri "docile" version))
  7201. (sha256
  7202. (base32
  7203. "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
  7204. (build-system ruby-build-system)
  7205. (arguments
  7206. '(#:tests? #f)) ; needs github-markup, among others
  7207. (synopsis "Ruby EDSL helper library")
  7208. (description "Docile is a Ruby library that provides an interface for
  7209. creating embedded domain specific languages (EDSLs) that manipulate existing
  7210. Ruby classes.")
  7211. (home-page "https://ms-ati.github.io/docile/")
  7212. (license license:expat)))
  7213. (define-public ruby-middleware
  7214. (package
  7215. (name "ruby-middleware")
  7216. (version "0.1.0")
  7217. (source
  7218. (origin
  7219. (method url-fetch)
  7220. (uri (rubygems-uri "middleware" version))
  7221. (sha256
  7222. (base32
  7223. "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
  7224. (build-system ruby-build-system)
  7225. (arguments '(#:tests? #f)) ;no test suite
  7226. (synopsis "Implementation of a middleware abstraction for Ruby")
  7227. (description "Middleware is a generalized implementation of a middleware
  7228. abstraction for Ruby.")
  7229. (home-page "https://github.com/mitchellh/middleware")
  7230. (license license:expat)))
  7231. (define-public ruby-benchmark-ips
  7232. (package
  7233. (name "ruby-benchmark-ips")
  7234. (version "2.8.2")
  7235. (source
  7236. (origin
  7237. (method url-fetch)
  7238. (uri (rubygems-uri "benchmark-ips" version))
  7239. (sha256
  7240. (base32
  7241. "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
  7242. (build-system ruby-build-system)
  7243. (native-inputs
  7244. `(("ruby-hoe" ,ruby-hoe)))
  7245. (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
  7246. (description "Benchmark-ips enhances the Ruby Benchmark module with the
  7247. iterations per second count. For short snippets of code, it can automatically
  7248. figure out how many times to run the code to get interesting data.")
  7249. (home-page "https://github.com/evanphx/benchmark-ips")
  7250. (license license:expat)))
  7251. (define-public ruby-ffi-rzmq-core
  7252. (package
  7253. (name "ruby-ffi-rzmq-core")
  7254. (version "1.0.7")
  7255. (source
  7256. (origin
  7257. (method url-fetch)
  7258. (uri (rubygems-uri "ffi-rzmq-core" version))
  7259. (sha256
  7260. (base32
  7261. "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
  7262. (build-system ruby-build-system)
  7263. (arguments
  7264. `(#:phases
  7265. (modify-phases %standard-phases
  7266. (add-after 'unpack 'patch-libzmq-search-path
  7267. (lambda* (#:key inputs #:allow-other-keys)
  7268. (let ((zeromq (assoc-ref inputs "zeromq")))
  7269. (substitute* "lib/ffi-rzmq-core/libzmq.rb"
  7270. (("/usr/local/lib")
  7271. (string-append zeromq "/lib")))
  7272. #t)))
  7273. (replace 'check
  7274. (lambda _
  7275. (invoke "rspec"))))))
  7276. (native-inputs
  7277. `(("ruby-rspec" ,ruby-rspec)))
  7278. (inputs
  7279. `(("zeromq" ,zeromq)))
  7280. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  7281. (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
  7282. (description "This library only provides the FFI wrapper for the ZeroMQ
  7283. networking library. It can be used to implement a Ruby API for the ZeroMQ
  7284. library.")
  7285. (home-page "https://github.com/chuckremes/ffi-rzmq-core")
  7286. (license license:expat)))
  7287. (define-public ruby-ffi-rzmq
  7288. (package
  7289. (name "ruby-ffi-rzmq")
  7290. (version "2.0.7")
  7291. (source
  7292. (origin
  7293. (method url-fetch)
  7294. (uri (rubygems-uri "ffi-rzmq" version))
  7295. (sha256
  7296. (base32
  7297. "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
  7298. (build-system ruby-build-system)
  7299. (arguments '(#:tests? #t
  7300. #:phases (modify-phases %standard-phases
  7301. (replace 'check
  7302. (lambda _
  7303. (invoke "rspec"))))))
  7304. (native-inputs
  7305. `(("ruby-rspec" ,ruby-rspec)))
  7306. (propagated-inputs
  7307. `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
  7308. (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
  7309. (description "This library provides a high-level API that wraps the ZeroMQ
  7310. networking library using the Ruby foreign function interface (FFI). It is a
  7311. pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
  7312. for FFI.")
  7313. (home-page "https://github.com/chuckremes/ffi-rzmq")
  7314. (license license:expat)))
  7315. (define-public ruby-sawyer
  7316. (package
  7317. (name "ruby-sawyer")
  7318. (version "0.8.2")
  7319. (source
  7320. (origin
  7321. (method url-fetch)
  7322. (uri (rubygems-uri "sawyer" version))
  7323. (sha256
  7324. (base32
  7325. "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
  7326. (build-system ruby-build-system)
  7327. (propagated-inputs
  7328. `(("ruby-addressable" ,ruby-addressable)
  7329. ("ruby-faraday" ,ruby-faraday)))
  7330. (synopsis "Experimental hypermedia agent for Ruby")
  7331. (description "Sawyer is an experimental hypermedia agent for Ruby built on
  7332. top of Faraday.")
  7333. (home-page "https://github.com/lostisland/sawyer")
  7334. (license license:expat)))
  7335. (define-public ruby-octokit
  7336. (package
  7337. (name "ruby-octokit")
  7338. (version "4.18.0")
  7339. (source
  7340. (origin
  7341. (method url-fetch)
  7342. (uri (rubygems-uri "octokit" version))
  7343. (sha256
  7344. (base32
  7345. "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
  7346. (build-system ruby-build-system)
  7347. (arguments '(#:tests? #f)) ;no test suite in the gem release
  7348. (propagated-inputs
  7349. `(("ruby-faraday" ,ruby-faraday)
  7350. ("ruby-sawyer" ,ruby-sawyer)))
  7351. (synopsis "Ruby toolkit for the GitHub API")
  7352. (description "Octokit wraps the GitHub API in a flat API client that
  7353. follows Ruby conventions and requires little knowledge of REST.")
  7354. (home-page "https://github.com/octokit/octokit.rb")
  7355. (license license:expat)))
  7356. (define-public ruby-chandler
  7357. (package
  7358. (name "ruby-chandler")
  7359. (version "0.9.0")
  7360. (source
  7361. (origin
  7362. (method url-fetch)
  7363. (uri (rubygems-uri "chandler" version))
  7364. (sha256
  7365. (base32
  7366. "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
  7367. (build-system ruby-build-system)
  7368. (native-inputs
  7369. `(("ruby-rubocop" ,ruby-rubocop)))
  7370. (propagated-inputs
  7371. `(("ruby-netrc" ,ruby-netrc)
  7372. ("ruby-octokit" ,ruby-octokit)))
  7373. (synopsis "Sync CHANGELOG entries to GitHub's release notes")
  7374. (description "Chandler syncs a project's CHANGELOG file entries to
  7375. GitHub's release notes to remove the need of manually entering release
  7376. notes.")
  7377. (home-page "https://github.com/mattbrictson/chandler")
  7378. (license license:expat)))
  7379. (define-public ruby-pry-byebug
  7380. (package
  7381. (name "ruby-pry-byebug")
  7382. (version "3.9.0")
  7383. (source
  7384. (origin
  7385. (method git-fetch)
  7386. (uri (git-reference
  7387. (url "https://github.com/deivid-rodriguez/pry-byebug")
  7388. (commit (string-append "v" version))))
  7389. (file-name (git-file-name name version))
  7390. (sha256
  7391. (base32
  7392. "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
  7393. (build-system ruby-build-system)
  7394. (arguments
  7395. `(#:phases (modify-phases %standard-phases
  7396. (add-before 'check 'set-home
  7397. (lambda _
  7398. (setenv "HOME" (getcwd))
  7399. #t)))))
  7400. (native-inputs
  7401. `(("ruby-chandler" ,ruby-chandler)
  7402. ("ruby-rubocop" ,ruby-rubocop)
  7403. ("ruby-simplecov" ,ruby-simplecov)))
  7404. (propagated-inputs
  7405. `(("ruby-byebug" ,ruby-byebug)
  7406. ("ruby-pry" ,ruby-pry)))
  7407. (synopsis "Step-by-step debugging and stack navigation in Pry")
  7408. (description "This package adds step-by-step debugging and stack
  7409. navigation capabilities to @code{pry}, using @code{byebug}.")
  7410. (home-page "https://github.com/deivid-rodriguez/pry-byebug")
  7411. (license license:expat)))
  7412. (define-public ruby-stackprof
  7413. (package
  7414. (name "ruby-stackprof")
  7415. (version "0.2.17")
  7416. (source
  7417. (origin
  7418. (method url-fetch)
  7419. (uri (rubygems-uri "stackprof" version))
  7420. (sha256
  7421. (base32 "06lz70k8c0r7fyxk1nc3idh14x7nvsr21ydm1bsmbj00jyhmfzsn"))))
  7422. (build-system ruby-build-system)
  7423. (arguments
  7424. `(#:phases
  7425. (modify-phases %standard-phases
  7426. (add-before 'check 'skip-dubious-test
  7427. ;; This unreliable test can fail with "Expected 0 to be >= 1."
  7428. (lambda _
  7429. (substitute* "test/test_stackprof.rb"
  7430. (("def test_(cputime)" _ name)
  7431. (string-append "def skip_" name)))))
  7432. (add-before 'check 'build-tests
  7433. (lambda _
  7434. (invoke "rake" "compile"))))))
  7435. (native-inputs
  7436. `(("ruby-mocha" ,ruby-mocha)
  7437. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  7438. (synopsis "Sampling profiler for Ruby code")
  7439. (description
  7440. "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
  7441. wallclock and object allocation samplers.")
  7442. (home-page "https://github.com/tmm1/stackprof")
  7443. (license license:expat)))
  7444. (define-public ruby-binding-of-caller
  7445. (package
  7446. (name "ruby-binding-of-caller")
  7447. (version "0.8.0")
  7448. (source
  7449. (origin
  7450. (method url-fetch)
  7451. (uri (rubygems-uri "binding_of_caller" version))
  7452. (sha256
  7453. (base32
  7454. "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
  7455. (build-system ruby-build-system)
  7456. ;; Attempting to run the test suite fails with a rake deprecation error
  7457. ;; (see: https://github.com/banister/binding_of_caller/issues/76).
  7458. (arguments '(#:tests? #f))
  7459. (propagated-inputs
  7460. `(("ruby-debug-inspector" ,ruby-debug-inspector)))
  7461. (synopsis "Retrieve the binding of a method's caller")
  7462. (description "The @code{binding_of_caller} module provides the
  7463. @code{Binding#of_caller} method. It allows accessing bindings from upper
  7464. frames in the call stack and can evaluate code in that context.")
  7465. (home-page "https://github.com/banister/binding_of_caller")
  7466. (license license:expat)))
  7467. (define-public ruby-pry-stack-explorer
  7468. (package
  7469. (name "ruby-pry-stack-explorer")
  7470. (version "0.5.1")
  7471. (source
  7472. (origin
  7473. (method url-fetch)
  7474. (uri (rubygems-uri "pry-stack_explorer" version))
  7475. (sha256
  7476. (base32
  7477. "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
  7478. (build-system ruby-build-system)
  7479. (arguments '(#:tests? #f)) ;no test suite in gem release
  7480. (propagated-inputs
  7481. `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
  7482. ("ruby-pry" ,ruby-pry)))
  7483. (synopsis "Call-stack navigation plugin for the Pry REPL")
  7484. (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
  7485. add support to navigate the call-stack.")
  7486. (home-page "https://github.com/pry/pry-stack_explorer")
  7487. (license license:expat)))
  7488. (define-public ruby-varint
  7489. (package
  7490. (name "ruby-varint")
  7491. (version "0.1.1")
  7492. (source
  7493. (origin
  7494. (method url-fetch)
  7495. (uri (rubygems-uri "varint" version))
  7496. (sha256
  7497. (base32
  7498. "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
  7499. (build-system ruby-build-system)
  7500. (arguments '(#:tests? #f)) ;no test suite
  7501. (synopsis "Variable length integers (varint) C extension for Ruby")
  7502. (description "This package provides a small C extension to speed up
  7503. variable length integers (varint) in Ruby Protocol Buffers.")
  7504. (home-page "https://github.com/liquidm/varint")
  7505. (license license:bsd-3)))
  7506. (define-public ruby-ruby-prof
  7507. (package
  7508. (name "ruby-ruby-prof")
  7509. (version "1.4.3")
  7510. (source
  7511. (origin
  7512. (method url-fetch)
  7513. (uri (rubygems-uri "ruby-prof" version))
  7514. (sha256
  7515. (base32
  7516. "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m"))))
  7517. (build-system ruby-build-system)
  7518. (arguments
  7519. `(#:phases
  7520. (modify-phases %standard-phases
  7521. (add-after 'unpack 'patch-rakefile
  7522. ;; This fixes the following error: "NameError: uninitialized
  7523. ;; constant Bundler::GemHelper" (see:
  7524. ;; https://github.com/ruby-prof/ruby-prof/issues/274).
  7525. (lambda _
  7526. (substitute* "Rakefile"
  7527. ((".*require \"bundler/setup\".*" all)
  7528. (string-append all " require 'bundler/gem_tasks'\n")))
  7529. #t))
  7530. ;; The LineNumbersTest test fails non-deterministically (see:
  7531. ;; https://github.com/ruby-prof/ruby-prof/issues/276).
  7532. (add-after 'extract-gemspec 'delete-flaky-test
  7533. (lambda _
  7534. (delete-file "test/line_number_test.rb")
  7535. (substitute* "ruby-prof.gemspec"
  7536. (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
  7537. #t))
  7538. (add-before 'check 'compile
  7539. (lambda _
  7540. (invoke "rake" "compile"))))))
  7541. (native-inputs
  7542. `(("bundler" ,bundler)
  7543. ("ruby-minitest" ,ruby-minitest)
  7544. ("ruby-rake-compiler" ,ruby-rake-compiler)
  7545. ("ruby-rdoc" ,ruby-rdoc)))
  7546. (synopsis "Fast code profiler for Ruby")
  7547. (description "RubyProf is a fast code profiler for Ruby. Its features
  7548. include:
  7549. @table @asis
  7550. @item Speed
  7551. Being a C extension, it is many times faster than the standard Ruby profiler.
  7552. @item Measurement Modes
  7553. It can measure program wall time, process time, object allocations and memory
  7554. usage.
  7555. @item Reports
  7556. A variety of text and cross-referenced HTML reports can be generated.
  7557. @item Threads
  7558. Profiling multiple threads simultaneously is supported.
  7559. @end table")
  7560. (home-page "https://github.com/ruby-prof/ruby-prof")
  7561. (license license:bsd-2)))
  7562. (define-public ruby-memory-profiler
  7563. (package
  7564. (name "ruby-memory-profiler")
  7565. (version "1.0.0")
  7566. (source
  7567. (origin
  7568. (method git-fetch)
  7569. (uri (git-reference
  7570. (url "https://github.com/SamSaffron/memory_profiler")
  7571. (commit (string-append "v" version))))
  7572. (file-name (git-file-name name version))
  7573. (sha256
  7574. (base32
  7575. "07yqv11q68xg2fqkrhs6ysngryk8b9zq6qzh24rgx9xqv6qfnj0w"))))
  7576. (build-system ruby-build-system)
  7577. (synopsis "Memory profiling routines for Ruby")
  7578. (description
  7579. "This package provides memory profiling routines for Ruby.")
  7580. (home-page "https://github.com/SamSaffron/memory_profiler")
  7581. (license license:expat)))
  7582. (define-public ruby-cucumber-messages
  7583. (package
  7584. (name "ruby-cucumber-messages")
  7585. (version "12.2.0")
  7586. (source (origin
  7587. (method git-fetch)
  7588. (uri (git-reference
  7589. (url "https://github.com/cucumber/messages-ruby")
  7590. (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
  7591. (file-name (git-file-name name version))
  7592. (sha256
  7593. (base32
  7594. "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
  7595. (build-system ruby-build-system)
  7596. (arguments
  7597. `(#:phases (modify-phases %standard-phases
  7598. (add-after 'unpack 'patch-protobuf.rb
  7599. (lambda _
  7600. (substitute* "rake/protobuf.rb"
  7601. (("load 'protobuf/tasks/compile.rake'")
  7602. "require 'protobuf/tasks'"))
  7603. #t))
  7604. (add-before 'build 'compile
  7605. (lambda _
  7606. (substitute* "Makefile"
  7607. (("bundle exec ") "")
  7608. (("include default.mk.*" all)
  7609. (string-append "#" all)))
  7610. (invoke "make")))
  7611. (replace 'check
  7612. (lambda _
  7613. (invoke "rspec"))))))
  7614. (propagated-inputs
  7615. `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
  7616. (native-inputs
  7617. `(("ruby-rspec" ,ruby-rspec)))
  7618. (home-page "https://github.com/cucumber/messages-ruby")
  7619. (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
  7620. (description "Cucumber Messages for Ruby is a library which allows
  7621. serialization and deserialization of the protocol buffer messages used in
  7622. Cucumber.")
  7623. (license license:expat)))
  7624. (define-public ruby-gherkin
  7625. (package
  7626. (name "ruby-gherkin")
  7627. (version "14.0.1")
  7628. (source (origin
  7629. (method git-fetch)
  7630. (uri (git-reference
  7631. (url "https://github.com/cucumber/gherkin-ruby")
  7632. (commit (string-append "v" version))))
  7633. (file-name (git-file-name name version))
  7634. (sha256
  7635. (base32
  7636. "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
  7637. (build-system ruby-build-system)
  7638. (native-inputs
  7639. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7640. ("ruby-rspec" ,ruby-rspec)))
  7641. (arguments
  7642. `(#:test-target "spec"))
  7643. (synopsis "Gherkin parser for Ruby")
  7644. (description "Gherkin is a parser and compiler for the Gherkin language.
  7645. It is intended be used by all Cucumber implementations to parse
  7646. @file{.feature} files.")
  7647. (home-page "https://github.com/cucumber/gherkin-ruby")
  7648. (license license:expat)))
  7649. (define-public ruby-gherkin-ruby
  7650. (package
  7651. (name "ruby-gherkin-ruby")
  7652. (version "0.3.2")
  7653. (home-page "https://github.com/codegram/gherkin-ruby")
  7654. (source (origin
  7655. (method url-fetch)
  7656. (uri (rubygems-uri "gherkin-ruby" version))
  7657. (sha256
  7658. (base32
  7659. "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
  7660. (build-system ruby-build-system)
  7661. (synopsis "Pure Ruby Gherkin parser")
  7662. (description
  7663. "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
  7664. 200 lines of code.")
  7665. ;; XXX: No license information anywhere but Readme.md.
  7666. (license license:expat)))
  7667. (define-public ruby-aruba
  7668. (package
  7669. (name "ruby-aruba")
  7670. (version "0.14.14")
  7671. (source
  7672. (origin
  7673. (method url-fetch)
  7674. (uri (rubygems-uri "aruba" version))
  7675. (sha256
  7676. (base32
  7677. "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
  7678. (build-system ruby-build-system)
  7679. (arguments
  7680. '(#:test-target "spec"
  7681. #:phases
  7682. (modify-phases %standard-phases
  7683. (add-after 'unpack 'patch
  7684. (lambda _
  7685. (substitute* "spec/aruba/api_spec.rb"
  7686. ;; This resolves some errors in the specs
  7687. ;;
  7688. ;; undefined method `parse' for Time:Class
  7689. (("require 'spec_helper'")
  7690. "require 'spec_helper'\nrequire 'time'"))
  7691. ;; Avoid shebang issues in this spec file
  7692. (substitute* "spec/aruba/matchers/command_spec.rb"
  7693. (("/usr/bin/env bash")
  7694. (which "bash")))
  7695. #t))
  7696. (add-before 'check 'remove-unnecessary-dependencies
  7697. (lambda _
  7698. (substitute* "Gemfile"
  7699. ((".*byebug.*") "\n")
  7700. ((".*pry.*") "\n")
  7701. ((".*yaml.*") "\n")
  7702. ((".*bcat.*") "\n")
  7703. ((".*kramdown.*") "\n")
  7704. ((".*rubocop.*") "\n")
  7705. ((".*cucumber-pro.*") "\n")
  7706. ((".*cucumber.*") "\n")
  7707. ((".*license_finder.*") "\n")
  7708. ((".*rake.*") "gem 'rake'\n")
  7709. ((".*relish.*") "\n"))
  7710. (substitute* "aruba.gemspec"
  7711. (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
  7712. "spec.add_runtime_dependency 'cucumber'"))
  7713. #t))
  7714. (add-before 'check 'set-home
  7715. (lambda _ (setenv "HOME" "/tmp") #t)))))
  7716. (native-inputs
  7717. `(("bundler" ,bundler)
  7718. ("ruby-rspec" ,ruby-rspec)
  7719. ("ruby-fuubar" ,ruby-fuubar)
  7720. ("ruby-simplecov" ,ruby-simplecov)))
  7721. (propagated-inputs
  7722. `(("ruby-childprocess" ,ruby-childprocess)
  7723. ("ruby-contracts" ,ruby-contracts)
  7724. ("ruby-cucumber" ,ruby-cucumber)
  7725. ("ruby-ffi" ,ruby-ffi)
  7726. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  7727. ("ruby-thor" ,ruby-thor)
  7728. ("ruby-yard" ,ruby-yard)))
  7729. (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
  7730. (description
  7731. "Aruba is an extension for Cucumber, RSpec and Minitest for testing
  7732. command-line applications. It supports applications written in any
  7733. language.")
  7734. (home-page "https://github.com/cucumber/aruba")
  7735. (license license:expat)))
  7736. ;; A version of ruby-aruba without tests run so that circular dependencies can
  7737. ;; be avoided.
  7738. (define ruby-aruba-without-tests
  7739. (package
  7740. (inherit ruby-aruba)
  7741. (arguments '(#:tests? #f))
  7742. (propagated-inputs
  7743. `(("ruby-cucumber" ,ruby-cucumber-without-tests)
  7744. ,@(alist-delete "ruby-cucumber"
  7745. (package-propagated-inputs ruby-aruba))))
  7746. (native-inputs '())))
  7747. (define-public ruby-sys-uname
  7748. (package
  7749. (name "ruby-sys-uname")
  7750. (version "1.2.1")
  7751. (source
  7752. (origin
  7753. (method url-fetch)
  7754. (uri (rubygems-uri "sys-uname" version))
  7755. (sha256
  7756. (base32
  7757. "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
  7758. (build-system ruby-build-system)
  7759. (arguments
  7760. `(#:test-target "spec"))
  7761. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  7762. (native-inputs `(("ruby-rspec" ,ruby-rspec)))
  7763. (synopsis "Ruby interface for gathering system information")
  7764. (description "The sys-uname library provides an interface for gathering
  7765. information about your current platform. It allows retrieving information
  7766. such as the OS name, OS version, system name, etc.")
  7767. (home-page "https://github.com/djberg96/sys-uname")
  7768. (license license:asl2.0)))
  7769. (define-public ruby-cucumber-create-meta
  7770. (package
  7771. (name "ruby-cucumber-create-meta")
  7772. (version "1.0.0")
  7773. (source
  7774. (origin
  7775. (method url-fetch)
  7776. (uri (rubygems-uri "cucumber-create-meta" version))
  7777. (sha256
  7778. (base32
  7779. "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
  7780. (build-system ruby-build-system)
  7781. (arguments
  7782. `(#:phases (modify-phases %standard-phases
  7783. (add-after 'extract-gemspec 'relax-version-requirements
  7784. (lambda _
  7785. (substitute* ".gemspec"
  7786. ((" 12\\.2")
  7787. " 12.1"))
  7788. #t))
  7789. (replace 'check
  7790. (lambda _
  7791. (invoke "rspec"))))))
  7792. (native-inputs
  7793. `(("ruby-rspec" ,ruby-rspec)))
  7794. (propagated-inputs
  7795. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7796. ("ruby-sys-uname" ,ruby-sys-uname)))
  7797. (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
  7798. (description "The @code{createMeta} utility function allows generating
  7799. system-specific @code{Meta} messages for Cucumber Ruby.")
  7800. (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
  7801. (license license:expat)))
  7802. (define-public ruby-cucumber-html-formatter
  7803. (package
  7804. (name "ruby-cucumber-html-formatter")
  7805. (version "7.0.0")
  7806. (source
  7807. (origin
  7808. (method url-fetch)
  7809. (uri (rubygems-uri "cucumber-html-formatter" version))
  7810. (sha256
  7811. (base32
  7812. "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
  7813. (build-system ruby-build-system)
  7814. (arguments
  7815. `(#:phases (modify-phases %standard-phases
  7816. (replace 'check
  7817. (lambda _
  7818. (invoke "rspec"))))))
  7819. (native-inputs
  7820. `(("ruby-rspec" ,ruby-rspec)))
  7821. (propagated-inputs
  7822. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
  7823. (synopsis "HTML formatter for Cucumber")
  7824. (description "Cucumber HTML Formatter produces a HTML report for Cucumber
  7825. runs. It is built on top of cucumber-react and works with any Cucumber
  7826. implementation with a protocol buffer formatter that outputs Cucumber
  7827. messages.")
  7828. (home-page "https://github.com/cucumber/cucumber/tree/\
  7829. master/html-formatter/ruby")
  7830. (license license:expat)))
  7831. (define-public ruby-cucumber
  7832. (package
  7833. (name "ruby-cucumber")
  7834. (version "4.1.0")
  7835. (source
  7836. (origin
  7837. (method git-fetch)
  7838. (uri (git-reference
  7839. (url "https://github.com/cucumber/cucumber-ruby")
  7840. (commit (string-append "v" version))))
  7841. (file-name (git-file-name name version))
  7842. (sha256
  7843. (base32
  7844. "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
  7845. (build-system ruby-build-system)
  7846. (arguments
  7847. '(#:test-target "default"
  7848. #:phases
  7849. (modify-phases %standard-phases
  7850. (add-after 'unpack 'disable-rubocop
  7851. ;; Rubocop lint check fails with our more recent version.
  7852. (lambda _
  7853. (substitute* "Rakefile"
  7854. (("spec cucumber rubocop")
  7855. "spec cucumber"))
  7856. #t))
  7857. (add-after 'extract-gemspec 'strip-version-requirements
  7858. (lambda _
  7859. (delete-file "Gemfile") ;do not use Bundler
  7860. (substitute* "cucumber.gemspec"
  7861. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  7862. (string-append stripped "\n")))
  7863. #t))
  7864. (add-before 'check 'set-home
  7865. (lambda _
  7866. (setenv "HOME" (getcwd))
  7867. #t)))))
  7868. (propagated-inputs
  7869. `(("ruby-builder" ,ruby-builder)
  7870. ("ruby-cucumber-core" ,ruby-cucumber-core)
  7871. ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
  7872. ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
  7873. ("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7874. ("ruby-cucumber-wire" ,ruby-cucumber-wire)
  7875. ("ruby-diff-lcs" ,ruby-diff-lcs)
  7876. ("ruby-gherkin" ,ruby-gherkin)
  7877. ("ruby-multi-json" ,ruby-multi-json)
  7878. ("ruby-multi-test" ,ruby-multi-test)))
  7879. (native-inputs
  7880. `(;; Use a untested version of aruba, to avoid a circular dependency, as
  7881. ;; ruby-aruba depends on ruby-cucumber.
  7882. ("ruby-aruba" ,ruby-aruba-without-tests)
  7883. ("ruby-rspec" ,ruby-rspec)
  7884. ("ruby-pry" ,ruby-pry)
  7885. ("ruby-nokogiri" ,ruby-nokogiri)
  7886. ("ruby-rubocop" ,ruby-rubocop)))
  7887. (synopsis "Describe automated tests in plain language")
  7888. (description "Cucumber is a tool for running automated tests written in
  7889. plain language. It's designed to support a Behaviour Driven Development (BDD)
  7890. software development workflow.")
  7891. (home-page "https://cucumber.io/")
  7892. (license license:expat)))
  7893. (define ruby-cucumber-without-tests
  7894. (package (inherit ruby-cucumber)
  7895. (arguments
  7896. '(#:tests? #f))
  7897. (native-inputs
  7898. '())))
  7899. (define-public ruby-coveralls
  7900. (package
  7901. (name "ruby-coveralls")
  7902. (version "0.8.23")
  7903. (source
  7904. (origin
  7905. (method url-fetch)
  7906. (uri (rubygems-uri "coveralls" version))
  7907. (sha256
  7908. (base32
  7909. "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
  7910. (build-system ruby-build-system)
  7911. ;; The test suite depends on ruby-vcr, which cannot be included in Guix
  7912. ;; because of its nonfree, Hippocratic-derived license.
  7913. (arguments
  7914. `(#:tests? #f
  7915. #:phases (modify-phases %standard-phases
  7916. (add-after 'extract-gemspec 'strip-version-requirements
  7917. ;; Keeping strict version requirements can cause problems
  7918. ;; to users of the library, such as: Gem::ConflictError:
  7919. ;; Unable to activate coveralls-0.8.23, because
  7920. ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
  7921. (lambda _
  7922. (substitute* "coveralls-ruby.gemspec"
  7923. (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
  7924. (string-append stripped ")\n")))
  7925. #t)))))
  7926. (propagated-inputs
  7927. `(("ruby-json" ,ruby-json)
  7928. ("ruby-term-ansicolor" ,ruby-term-ansicolor)
  7929. ("ruby-thor" ,ruby-thor)
  7930. ("ruby-tins" ,ruby-tins)))
  7931. (synopsis "Ruby implementation of the Coveralls API")
  7932. (description "This package provides a Ruby implementation of the Coveralls
  7933. API.")
  7934. (home-page "https://coveralls.io")
  7935. (license license:expat)))
  7936. (define-public ruby-unindent
  7937. (package
  7938. (name "ruby-unindent")
  7939. (version "1.0")
  7940. (source
  7941. (origin
  7942. (method url-fetch)
  7943. (uri (rubygems-uri "unindent" version))
  7944. (sha256
  7945. (base32
  7946. "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
  7947. (build-system ruby-build-system)
  7948. (synopsis "Ruby method to unindent strings")
  7949. (description "This module provides a @code{String#unindent} Ruby method to
  7950. unindent strings, which can be useful to unindent multiline strings embedded
  7951. in already-indented code.")
  7952. (home-page "https://github.com/mynyml/unindent")
  7953. (license license:expat)))
  7954. (define-public ruby-cucumber-core
  7955. (package
  7956. (name "ruby-cucumber-core")
  7957. (version "7.1.0")
  7958. (source
  7959. (origin
  7960. (method git-fetch)
  7961. (uri (git-reference
  7962. (url "https://github.com/cucumber/cucumber-ruby-core")
  7963. (commit (string-append "v" version))))
  7964. (file-name (git-file-name name version))
  7965. (sha256
  7966. (base32
  7967. "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
  7968. (build-system ruby-build-system)
  7969. (arguments
  7970. `(#:test-target "spec"
  7971. #:phases
  7972. (modify-phases %standard-phases
  7973. (add-after 'extract-gemspec 'relax-version-requirements
  7974. (lambda _
  7975. (substitute* "cucumber-core.gemspec"
  7976. (("'cucumber-tag-expressions',.*")
  7977. "'cucumber-tag-expressions', '>=2.0.0'\n"))
  7978. #t)))))
  7979. (native-inputs
  7980. `(("ruby-rspec" ,ruby-rspec)
  7981. ("ruby-coveralls" ,ruby-coveralls)
  7982. ("ruby-rubocop" ,ruby-rubocop)
  7983. ("ruby-simplecov" ,ruby-simplecov)
  7984. ("ruby-unindent" ,ruby-unindent)))
  7985. (propagated-inputs
  7986. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7987. ("ruby-gherkin" ,ruby-gherkin)
  7988. ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
  7989. (synopsis "Core library for the Cucumber BDD app")
  7990. (description "Cucumber is a tool for running automated tests
  7991. written in plain language. Because they're written in plain language,
  7992. they can be read by anyone on your team. Because they can be read by
  7993. anyone, you can use them to help improve communication, collaboration
  7994. and trust on your team.")
  7995. (home-page "https://cucumber.io/")
  7996. (license license:expat)))
  7997. (define-public ruby-cucumber-expressions
  7998. (package
  7999. (name "ruby-cucumber-expressions")
  8000. (version "10.2.0")
  8001. (source
  8002. (origin
  8003. (method git-fetch)
  8004. (uri (git-reference
  8005. (url "https://github.com/cucumber/cucumber-expressions-ruby")
  8006. (commit (string-append "v" version))))
  8007. (file-name (git-file-name name version))
  8008. (sha256
  8009. (base32
  8010. "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
  8011. (build-system ruby-build-system)
  8012. (arguments
  8013. '(#:test-target "spec"))
  8014. (native-inputs
  8015. `(("ruby-rspec" ,ruby-rspec)
  8016. ("ruby-simplecov" ,ruby-simplecov)))
  8017. (synopsis "Simpler alternative to Regular Expressions")
  8018. (description "Cucumber Expressions offer similar functionality to Regular
  8019. Expressions, with a syntax that is easier to read and write. Cucumber
  8020. Expressions are extensible with parameter types.")
  8021. (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
  8022. (license license:expat)))
  8023. (define-public ruby-cucumber-wire
  8024. (package
  8025. (name "ruby-cucumber-wire")
  8026. (version "3.1.0")
  8027. (source
  8028. (origin
  8029. (method url-fetch)
  8030. (uri (rubygems-uri "cucumber-wire" version))
  8031. (sha256
  8032. (base32
  8033. "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
  8034. (build-system ruby-build-system)
  8035. (arguments
  8036. '(#:tests? #f ;tests use cucumber, causing a cycle
  8037. #:phases
  8038. (modify-phases %standard-phases
  8039. (add-after 'extract-gemspec 'relax-version-requirements
  8040. (lambda _
  8041. (substitute* ".gemspec"
  8042. ((" 10\\.1") " 10.2"))
  8043. #t)))))
  8044. (propagated-inputs
  8045. `(("ruby-cucumber-core" ,ruby-cucumber-core)
  8046. ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
  8047. ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
  8048. (synopsis "Cucumber wire protocol plugin")
  8049. (description "Cucumber's wire protocol allows step definitions to be
  8050. implemented and invoked on any platform.")
  8051. (home-page "https://github.com/cucumber/cucumber-ruby-wire")
  8052. (license license:expat)))
  8053. (define-public ruby-cucumber-tag-expressions
  8054. (package
  8055. (name "ruby-cucumber-tag-expressions")
  8056. (version "3.0.0")
  8057. (source
  8058. (origin
  8059. (method git-fetch)
  8060. (uri (git-reference
  8061. (url "https://github.com/cucumber/tag-expressions-ruby")
  8062. (commit (string-append "v" version))))
  8063. (file-name (git-file-name name version))
  8064. (sha256
  8065. (base32
  8066. "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
  8067. (build-system ruby-build-system)
  8068. (arguments
  8069. `(#:test-target "spec"))
  8070. (native-inputs
  8071. `(("ruby-rspec" ,ruby-rspec)))
  8072. (synopsis "Cucumber tag expressions for Ruby")
  8073. (description "Cucumber tag expression parser for Ruby. A tag expression
  8074. is an infix boolean expression used by Cucumber.")
  8075. (home-page "https://github.com/cucumber/tag-expressions-ruby")
  8076. (license license:expat)))
  8077. (define-public ruby-bindex
  8078. (package
  8079. (name "ruby-bindex")
  8080. (version "0.5.0")
  8081. (source
  8082. (origin
  8083. (method url-fetch)
  8084. (uri (rubygems-uri "bindex" version))
  8085. (sha256
  8086. (base32
  8087. "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
  8088. (build-system ruby-build-system)
  8089. (arguments
  8090. '(#:test-target "default"))
  8091. (native-inputs
  8092. `(("bundler" ,bundler)
  8093. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  8094. (synopsis "Provides access for bindings relating to Ruby exceptions")
  8095. (description
  8096. "@code{bindex} provides a way to access the bindings that relate to
  8097. exceptions in Ruby, providing more information about the context in which the
  8098. exception occurred.")
  8099. (home-page "https://github.com/gsamokovarov/bindex")
  8100. (license license:expat)))
  8101. (define-public ruby-bio-logger
  8102. (package
  8103. (name "ruby-bio-logger")
  8104. (version "1.0.1")
  8105. (source
  8106. (origin
  8107. (method url-fetch)
  8108. (uri (rubygems-uri "bio-logger" version))
  8109. (sha256
  8110. (base32
  8111. "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
  8112. (build-system ruby-build-system)
  8113. (arguments
  8114. `(#:tests? #f)) ; rake errors, missing shoulda
  8115. (propagated-inputs
  8116. `(("ruby-log4r" ,ruby-log4r)))
  8117. (synopsis "Log4r wrapper for Ruby")
  8118. (description "Bio-logger is a wrapper around Log4r adding extra logging
  8119. features such as filtering and fine grained logging.")
  8120. (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
  8121. (license license:expat)))
  8122. (define-public ruby-yajl-ruby
  8123. (package
  8124. (name "ruby-yajl-ruby")
  8125. (version "1.4.1")
  8126. (source
  8127. (origin
  8128. (method url-fetch)
  8129. (uri (rubygems-uri "yajl-ruby" version))
  8130. (sha256
  8131. (base32
  8132. "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
  8133. (build-system ruby-build-system)
  8134. (arguments
  8135. '(#:test-target "spec"
  8136. #:phases
  8137. (modify-phases %standard-phases
  8138. (add-before 'check 'patch-test-to-update-load-path
  8139. (lambda _
  8140. (substitute* "spec/parsing/large_number_spec.rb"
  8141. (("require \"yajl\"")
  8142. "$LOAD_PATH << 'lib'; require 'yajl'"))
  8143. #t)))))
  8144. (native-inputs
  8145. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  8146. ("ruby-rspec" ,ruby-rspec)))
  8147. (synopsis "Streaming JSON parsing and encoding library for Ruby")
  8148. (description
  8149. "Ruby C bindings to the Yajl JSON stream-based parser library. The API
  8150. is compatible with the JSON gem, so yajl-ruby can act as a drop in
  8151. replacement.
  8152. A modified copy of yajl is used, and included in the package.")
  8153. (home-page "https://github.com/brianmario/yajl-ruby")
  8154. (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
  8155. license:bsd-3)))) ; Included, modified copy of yajl
  8156. (define-public ruby-yard
  8157. (package
  8158. (name "ruby-yard")
  8159. (version "0.9.25")
  8160. (source
  8161. (origin
  8162. (method git-fetch)
  8163. ;; Tests do not pass if we build from the distributed gem.
  8164. (uri (git-reference
  8165. (url "https://github.com/lsegal/yard")
  8166. (commit (string-append "v" version))))
  8167. (file-name (git-file-name name version))
  8168. (sha256
  8169. (base32
  8170. "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
  8171. (build-system ruby-build-system)
  8172. (arguments
  8173. ;; Note: Tests are willfully disabled to alleviate dependency cycle
  8174. ;; problems.
  8175. `(#:tests? #f
  8176. #:phases (modify-phases %standard-phases
  8177. (add-after 'unpack 'do-not-set-date-in-gemspec
  8178. ;; Fix a reproducibility issue (see:
  8179. ;; https://github.com/lsegal/yard/issues/1343).
  8180. (lambda _
  8181. (substitute* "yard.gemspec"
  8182. ((".*s\\.date.*") ""))
  8183. #t)))))
  8184. (synopsis "Documentation generation tool for Ruby")
  8185. (description "YARD is a documentation generation tool for the Ruby
  8186. programming language. It enables the user to generate consistent, usable
  8187. documentation that can be exported to a number of formats very easily, and
  8188. also supports extending for custom Ruby constructs such as custom class level
  8189. definitions.")
  8190. (home-page "https://yardoc.org")
  8191. (license license:expat)))
  8192. (define-public ruby-yard-with-tests
  8193. (package
  8194. (inherit ruby-yard)
  8195. (name "ruby-yard-with-tests")
  8196. (arguments
  8197. (substitute-keyword-arguments (package-arguments ruby-yard)
  8198. ((#:tests? _ #t) #t)
  8199. ((#:test-target _ "default") "default")
  8200. ((#:phases phases '%standard-phases)
  8201. `(modify-phases ,phases
  8202. (add-before 'check 'prepare-for-tests
  8203. (lambda* (#:key tests? #:allow-other-keys)
  8204. (when tests?
  8205. (substitute* "Rakefile"
  8206. ((".*[Ss]amus.*") ""))
  8207. ;; Delete the Gemfile to avoid errors relating to it.
  8208. (delete-file "Gemfile")
  8209. ;; $HOME needs to be set to somewhere writeable for tests to
  8210. ;; run.
  8211. (setenv "HOME" "/tmp"))
  8212. #t))))))
  8213. (native-inputs
  8214. `(("ruby-rspec" ,ruby-rspec)
  8215. ("ruby-rack" ,ruby-rack)
  8216. ("ruby-redcloth" ,ruby-redcloth)
  8217. ("ruby-asciidoc" ,ruby-asciidoctor)))))
  8218. (define-public ruby-spectroscope
  8219. (package
  8220. (name "ruby-spectroscope")
  8221. (version "0.1.0")
  8222. (source
  8223. (origin
  8224. (method url-fetch)
  8225. (uri (rubygems-uri "spectroscope" version))
  8226. (sha256
  8227. (base32
  8228. "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
  8229. (build-system ruby-build-system)
  8230. (arguments
  8231. `(#:phases
  8232. (modify-phases %standard-phases
  8233. (replace 'check
  8234. (lambda _
  8235. (with-output-to-file ".test"
  8236. (lambda _
  8237. (display
  8238. "\
  8239. require 'ae/should'
  8240. require 'rspec'
  8241. include RSpec
  8242. Test.run :default do |run|
  8243. run.files << 'spec/*_spec.rb'
  8244. end")))
  8245. (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
  8246. (native-inputs
  8247. `(("ruby-ae" ,ruby-ae)
  8248. ("ruby-rspec" ,ruby-rspec)))
  8249. (propagated-inputs
  8250. `(("ruby-rubytest" ,ruby-rubytest)))
  8251. (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
  8252. (description "Spectroscope is a Behavior-Driven Development (BDD)
  8253. framework built on RubyTest, designed to emulate RSpec in most respects. It
  8254. is assertion framework independent so any number of assertion systems can be
  8255. used, such as Assay or AE.")
  8256. (home-page "http://rubyworks.github.com/spectroscope/")
  8257. (license license:bsd-2)))
  8258. (define-public ruby-tomparse
  8259. (package
  8260. (name "ruby-tomparse")
  8261. (version "0.4.2")
  8262. (source
  8263. (origin
  8264. (method url-fetch)
  8265. (uri (rubygems-uri "tomparse" version))
  8266. (sha256
  8267. (base32
  8268. "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
  8269. (build-system ruby-build-system)
  8270. ;; TODO: Tests require citron and rulebow, not yet packaged.
  8271. (arguments '(#:tests? #f))
  8272. (synopsis "TomDoc parser for Ruby")
  8273. (description "TomParse is a TomDoc parser for Ruby. It takes a code
  8274. comment as input and parses it into a convenient object-oriented structure in
  8275. accordance with the TomDoc standard. See
  8276. @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
  8277. TomDoc format.")
  8278. (home-page "http://rubyworks.github.com/tomparse/")
  8279. (license license:bsd-2)))
  8280. (define-public ruby-yard-tomdoc
  8281. (package
  8282. (name "ruby-yard-tomdoc")
  8283. (version "0.7.1")
  8284. (source
  8285. (origin
  8286. (method url-fetch)
  8287. (uri (rubygems-uri "yard-tomdoc" version))
  8288. (sha256
  8289. (base32
  8290. "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
  8291. (build-system ruby-build-system)
  8292. (arguments
  8293. `(#:phases (modify-phases %standard-phases
  8294. (replace 'check
  8295. (lambda _
  8296. (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
  8297. (native-inputs
  8298. `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
  8299. ("ruby-spectroscope" ,ruby-spectroscope)
  8300. ("ruby-ae" ,ruby-ae)))
  8301. (propagated-inputs
  8302. `(("ruby-tomparse" ,ruby-tomparse)
  8303. ("ruby-yard" ,ruby-yard)))
  8304. (synopsis "TomDoc syntax for YARD")
  8305. (description "This module adds support for the TomDoc documentation format
  8306. to YARD, a documentation generation tool for Ruby.")
  8307. (home-page "http://rubyworks.github.com/yard-tomdoc/")
  8308. (license license:expat)))
  8309. (define-public ruby-clap
  8310. (package
  8311. (name "ruby-clap")
  8312. (version "1.0.0")
  8313. (source (origin
  8314. (method url-fetch)
  8315. (uri (rubygems-uri "clap" version))
  8316. (sha256
  8317. (base32
  8318. "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
  8319. (build-system ruby-build-system)
  8320. ;; Clap needs cutest for running tests, but cutest needs clap.
  8321. (arguments `(#:tests? #f))
  8322. (synopsis "Command line argument parsing for simple applications")
  8323. (description
  8324. "Clap provides command line argument parsing features. It covers the
  8325. simple case of executing code based on the flags or parameters passed.")
  8326. (home-page "https://github.com/djanowski/cutest")
  8327. (license license:expat)))
  8328. (define-public ruby-cutest
  8329. (package
  8330. (name "ruby-cutest")
  8331. (version "1.2.2")
  8332. (source (origin
  8333. (method url-fetch)
  8334. (uri (rubygems-uri "cutest" version))
  8335. (sha256
  8336. (base32
  8337. "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
  8338. (build-system ruby-build-system)
  8339. (propagated-inputs
  8340. `(("ruby-clap" ,ruby-clap)))
  8341. (synopsis "Run tests in separate processes")
  8342. (description
  8343. "Cutest runs tests in separate processes to avoid shared state.")
  8344. (home-page "https://github.com/djanowski/cutest")
  8345. (license license:expat)))
  8346. (define-public ruby-pygmentize
  8347. (package
  8348. (name "ruby-pygmentize")
  8349. (version "0.0.3")
  8350. (source (origin
  8351. (method url-fetch)
  8352. (uri (rubygems-uri "pygmentize" version))
  8353. (sha256
  8354. (base32
  8355. "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
  8356. (build-system ruby-build-system)
  8357. (arguments
  8358. `(#:phases
  8359. (modify-phases %standard-phases
  8360. (add-after 'unpack 'fix-pygmentize-path
  8361. (lambda _
  8362. (substitute* "lib/pygmentize.rb"
  8363. (("\"/usr/bin/env python.*")
  8364. (string-append "\"" (which "pygmentize") "\"\n")))
  8365. #t))
  8366. (add-after 'build 'do-not-use-vendor-directory
  8367. (lambda _
  8368. ;; Remove bundled pygments sources
  8369. ;; FIXME: ruby-build-system does not support snippets.
  8370. (delete-file-recursively "vendor")
  8371. (substitute* "pygmentize.gemspec"
  8372. (("\"vendor/\\*\\*/\\*\",") ""))
  8373. #t)))))
  8374. (inputs
  8375. `(("pygments" ,python-pygments)))
  8376. (native-inputs
  8377. `(("ruby-cutest" ,ruby-cutest)
  8378. ("ruby-nokogiri" ,ruby-nokogiri)))
  8379. (synopsis "Thin Ruby wrapper around pygmentize")
  8380. (description
  8381. "Pygmentize provides a simple way to call pygmentize from within a Ruby
  8382. application.")
  8383. (home-page "https://github.com/djanowski/pygmentize")
  8384. (license license:expat)))
  8385. (define-public ruby-eventmachine
  8386. (package
  8387. (name "ruby-eventmachine")
  8388. (version "1.2.7")
  8389. (source
  8390. (origin
  8391. (method url-fetch)
  8392. (uri (rubygems-uri "eventmachine" version))
  8393. (sha256
  8394. (base32
  8395. "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
  8396. (build-system ruby-build-system)
  8397. (arguments
  8398. '(#:tests? #f)) ; test suite tries to connect to google.com
  8399. (native-inputs
  8400. `(("ruby-rake-compiler" ,ruby-rake-compiler)))
  8401. (synopsis "Single-threaded network event framework for Ruby")
  8402. (description
  8403. "EventMachine implements a single-threaded engine for arbitrary network
  8404. communications. EventMachine wraps all interactions with sockets, allowing
  8405. programs to concentrate on the implementation of network protocols. It can be
  8406. used to create both network servers and clients.")
  8407. ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
  8408. (home-page "https://github.com/eventmachine/eventmachine")
  8409. (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
  8410. (define-public ruby-ruby-engine
  8411. (package
  8412. (name "ruby-ruby-engine")
  8413. (version "2.0.0")
  8414. (source
  8415. (origin
  8416. (method url-fetch)
  8417. (uri (rubygems-uri "ruby_engine" version))
  8418. (sha256
  8419. (base32
  8420. "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
  8421. (build-system ruby-build-system)
  8422. (arguments
  8423. `(#:phases
  8424. (modify-phases %standard-phases
  8425. (add-after 'extract-gemspec 'clean-up
  8426. (lambda _
  8427. (delete-file "Gemfile.lock")
  8428. (substitute* "ruby_engine.gemspec"
  8429. ;; Remove unnecessary imports that would entail further
  8430. ;; dependencies.
  8431. ((".*<rdoc.*") "")
  8432. ((".*<rubygems-tasks.*") "")
  8433. ;; Remove extraneous .gem file
  8434. (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
  8435. (("\"Gemfile.lock\".freeze, ") "")
  8436. ;; Soften rake dependency
  8437. (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
  8438. "%q<rake>.freeze, [\">= 10.0\"]")
  8439. ;; Soften the rspec dependency
  8440. (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
  8441. "%q<rspec>.freeze, [\">= 2.4\"]"))
  8442. (substitute* "Rakefile"
  8443. (("require 'rubygems/tasks'") "")
  8444. (("Gem::Tasks.new") ""))
  8445. ;; Remove extraneous .gem file that otherwise gets installed.
  8446. (delete-file-recursively "pkg")
  8447. #t)))))
  8448. (native-inputs
  8449. `(("bundler" ,bundler)
  8450. ("ruby-rake" ,ruby-rake)
  8451. ("ruby-rspec" ,ruby-rspec)))
  8452. (synopsis "Simplifies checking for Ruby implementation")
  8453. (description
  8454. "@code{ruby_engine} provides an RubyEngine class that can be used to
  8455. check which implementation of Ruby is in use. It can provide the interpreter
  8456. name and provides query methods such as @{RubyEngine.mri?}.")
  8457. (home-page "https://github.com/janlelis/ruby_engine")
  8458. (license license:expat)))
  8459. (define-public ruby-turn
  8460. (package
  8461. (name "ruby-turn")
  8462. (version "0.9.7")
  8463. (source
  8464. (origin
  8465. (method url-fetch)
  8466. (uri (rubygems-uri "turn" version))
  8467. (sha256
  8468. (base32
  8469. "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
  8470. (build-system ruby-build-system)
  8471. (arguments
  8472. `(#:phases
  8473. (modify-phases %standard-phases
  8474. ;; Tests fail because turn changes its environment so can no longer
  8475. ;; find test/unit. Instead simply test if the executable runs
  8476. ;; without issue.
  8477. (replace 'check
  8478. (lambda _
  8479. (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
  8480. (propagated-inputs
  8481. `(("ruby-ansi" ,ruby-ansi)
  8482. ("ruby-minitest" ,ruby-minitest-4)))
  8483. (synopsis "Alternate set of alternative runners for MiniTest")
  8484. (description
  8485. "TURN provides a set of alternative runners for MiniTest which are both
  8486. colorful and informative. TURN displays each test on a separate line with
  8487. failures being displayed immediately instead of at the end of the tests. Note
  8488. that TURN is no longer being maintained.")
  8489. (home-page "https://rubygems.org/gems/turn")
  8490. (license license:expat)))
  8491. (define-public ruby-mimemagic
  8492. (package
  8493. (name "ruby-mimemagic")
  8494. (version "0.3.3")
  8495. (source
  8496. (origin
  8497. (method url-fetch)
  8498. (uri (rubygems-uri "mimemagic" version))
  8499. (sha256
  8500. (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
  8501. (build-system ruby-build-system)
  8502. (arguments
  8503. '(#:phases
  8504. (modify-phases %standard-phases
  8505. ;; This phase breaks the tests, as it patches some of the test data.
  8506. (delete 'patch-source-shebangs))))
  8507. (native-inputs
  8508. `(("ruby-bacon" ,ruby-bacon)))
  8509. (synopsis "Ruby library for MIME detection by extension or content")
  8510. (description
  8511. "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
  8512. extension or content, using the freedesktop.org.xml shared-mime-info
  8513. database.")
  8514. (home-page "https://github.com/minad/mimemagic")
  8515. (license license:expat)))
  8516. (define-public ruby-mime-types-data
  8517. (package
  8518. (name "ruby-mime-types-data")
  8519. (version "3.2016.0521")
  8520. (source
  8521. (origin
  8522. (method url-fetch)
  8523. (uri (rubygems-uri "mime-types-data" version))
  8524. (sha256
  8525. (base32
  8526. "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
  8527. (build-system ruby-build-system)
  8528. (native-inputs
  8529. `(("ruby-hoe" ,ruby-hoe)))
  8530. (synopsis "Registry for information about MIME media type definitions")
  8531. (description
  8532. "@code{mime-types-data} provides a registry for information about
  8533. Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
  8534. be used with the Ruby mime-types library or other software to determine
  8535. defined filename extensions for MIME types, or to use filename extensions to
  8536. look up the likely MIME type definitions.")
  8537. (home-page "https://github.com/mime-types/mime-types-data/")
  8538. (license license:expat)))
  8539. (define-public ruby-mime-types
  8540. (package
  8541. (name "ruby-mime-types")
  8542. (version "3.1")
  8543. (source
  8544. (origin
  8545. (method url-fetch)
  8546. (uri (rubygems-uri "mime-types" version))
  8547. (sha256
  8548. (base32
  8549. "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
  8550. (build-system ruby-build-system)
  8551. (propagated-inputs
  8552. `(("ruby-mime-types-data" ,ruby-mime-types-data)))
  8553. (native-inputs
  8554. `(("ruby-hoe" ,ruby-hoe)
  8555. ("ruby-fivemat" ,ruby-fivemat)
  8556. ("ruby-minitest-focus" ,ruby-minitest-focus)
  8557. ("ruby-minitest-rg" ,ruby-minitest-rg)
  8558. ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
  8559. ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
  8560. (synopsis "Library and registry for MIME content type definitions")
  8561. (description "The mime-types library provides a library and registry for
  8562. information about Multipurpose Internet Mail Extensions (MIME) content type
  8563. definitions. It can be used to determine defined filename extensions for MIME
  8564. types, or to use filename extensions to look up the likely MIME type
  8565. definitions.")
  8566. (home-page "https://github.com/mime-types/ruby-mime-types")
  8567. (license license:expat)))
  8568. (define-public ruby-mini-mime
  8569. (package
  8570. (name "ruby-mini-mime")
  8571. (version "1.0.2")
  8572. (source
  8573. (origin
  8574. (method url-fetch)
  8575. (uri (rubygems-uri "mini_mime" version))
  8576. (sha256
  8577. (base32
  8578. "1axm0rxyx3ss93wbmfkm78a6x03l8y4qy60rhkkiq0aza0vwq3ha"))))
  8579. (build-system ruby-build-system)
  8580. (synopsis "Lightweight mime type lookup toy")
  8581. (description "This package provides a lightweight mime type lookup toy.")
  8582. (home-page "https://github.com/discourse/mini_mime")
  8583. (license license:expat)))
  8584. (define-public ruby-fivemat
  8585. (package
  8586. (name "ruby-fivemat")
  8587. (version "1.3.7")
  8588. (source
  8589. (origin
  8590. (method url-fetch)
  8591. (uri (rubygems-uri "fivemat" version))
  8592. (sha256
  8593. (base32
  8594. "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
  8595. (build-system ruby-build-system)
  8596. (arguments
  8597. `(#:tests? #f)) ; no tests
  8598. (synopsis "Each test file given its own line of dots")
  8599. (description
  8600. "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
  8601. its own line of dots during testing. It aims to provide test output that is
  8602. neither too verbose nor too minimal.")
  8603. (home-page "https://github.com/tpope/fivemat")
  8604. (license license:expat)))
  8605. (define-public ruby-sqlite3
  8606. (package
  8607. (name "ruby-sqlite3")
  8608. (version "1.4.2")
  8609. (source
  8610. (origin
  8611. (method url-fetch)
  8612. (uri (rubygems-uri "sqlite3" version))
  8613. (sha256
  8614. (base32
  8615. "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
  8616. (build-system ruby-build-system)
  8617. (arguments
  8618. `(#:phases
  8619. (modify-phases %standard-phases
  8620. (add-before 'check 'add-gemtest-file
  8621. ;; This file exists in the repository but is not distributed.
  8622. (lambda _ (invoke "touch" ".gemtest"))))))
  8623. (inputs
  8624. `(("sqlite" ,sqlite)))
  8625. (native-inputs
  8626. `(("ruby-hoe" ,ruby-hoe)
  8627. ("ruby-rake-compiler" ,ruby-rake-compiler)
  8628. ("ruby-mini-portile" ,ruby-mini-portile)))
  8629. (synopsis "Interface with SQLite3 databases")
  8630. (description
  8631. "This module allows Ruby programs to interface with the SQLite3 database
  8632. engine.")
  8633. (home-page
  8634. "https://github.com/sparklemotion/sqlite3-ruby")
  8635. (license license:bsd-3)))
  8636. (define-public ruby-shoulda-context
  8637. (package
  8638. (name "ruby-shoulda-context")
  8639. (version "1.2.2")
  8640. (source
  8641. (origin
  8642. (method url-fetch)
  8643. (uri (rubygems-uri "shoulda-context" version))
  8644. (sha256
  8645. (base32
  8646. "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
  8647. (build-system ruby-build-system)
  8648. (arguments
  8649. `(#:phases
  8650. (modify-phases %standard-phases
  8651. (replace 'check
  8652. (lambda _
  8653. ;; Do not run tests to avoid circular dependence with rails.
  8654. ;; Instead just import the library to test.
  8655. (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
  8656. (synopsis "Test::Unit context framework extracted from Shoulda")
  8657. (description
  8658. "@code{shoulda-context} is the context framework extracted from Shoulda.
  8659. Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
  8660. context, setup, and should blocks combine to produce natural test method
  8661. names.")
  8662. (home-page "https://github.com/thoughtbot/shoulda-context")
  8663. (license license:expat)))
  8664. (define-public ruby-shoulda-matchers
  8665. (package
  8666. (name "ruby-shoulda-matchers")
  8667. (version "3.1.2")
  8668. (source
  8669. (origin
  8670. (method url-fetch)
  8671. (uri (rubygems-uri "shoulda-matchers" version))
  8672. (sha256
  8673. (base32
  8674. "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
  8675. (build-system ruby-build-system)
  8676. (arguments
  8677. `(#:phases
  8678. (modify-phases %standard-phases
  8679. (replace 'check
  8680. (lambda _
  8681. ;; Do not run tests to avoid circular dependence with rails. Instead
  8682. ;; just import the library to test.
  8683. (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
  8684. (propagated-inputs
  8685. `(("ruby-activesupport" ,ruby-activesupport)))
  8686. (synopsis "Collection of testing matchers extracted from Shoulda")
  8687. (description
  8688. "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
  8689. test common Rails functionality. These tests would otherwise be much longer,
  8690. more complex, and error-prone.")
  8691. (home-page "https://github.com/thoughtbot/shoulda-matchers")
  8692. (license license:expat)))
  8693. (define-public ruby-shoulda-matchers-2
  8694. (package
  8695. (inherit ruby-shoulda-matchers)
  8696. (version "2.8.0")
  8697. (source (origin
  8698. (method url-fetch)
  8699. (uri (rubygems-uri "shoulda-matchers" version))
  8700. (sha256
  8701. (base32
  8702. "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
  8703. (define-public ruby-shoulda
  8704. (package
  8705. (name "ruby-shoulda")
  8706. (version "3.5.0")
  8707. (source
  8708. (origin
  8709. (method url-fetch)
  8710. (uri (rubygems-uri "shoulda" version))
  8711. (sha256
  8712. (base32
  8713. "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
  8714. (build-system ruby-build-system)
  8715. (arguments
  8716. `(#:phases
  8717. (modify-phases %standard-phases
  8718. (replace 'check
  8719. ;; Don't run tests to avoid circular dependence with rails. Instead
  8720. ;; just import the library to test.
  8721. (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
  8722. (propagated-inputs
  8723. `(("ruby-shoulda-context" ,ruby-shoulda-context)
  8724. ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
  8725. (synopsis "Context framework and matchers for testing")
  8726. (description
  8727. "@code{shoulda} is a meta-package combining @code{shoulda-context} and
  8728. @code{shoulda-matchers} providing tools for writing tests.")
  8729. (home-page "https://github.com/thoughtbot/shoulda")
  8730. (license license:expat)))
  8731. (define-public ruby-unf
  8732. (package
  8733. (name "ruby-unf")
  8734. (version "0.1.4")
  8735. (source
  8736. (origin
  8737. (method url-fetch)
  8738. (uri (rubygems-uri "unf" version))
  8739. (sha256
  8740. (base32
  8741. "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
  8742. (build-system ruby-build-system)
  8743. (arguments
  8744. `(#:phases
  8745. (modify-phases %standard-phases
  8746. (add-before 'check 'add-dependency-to-bundler
  8747. (lambda _
  8748. ;; test-unit is required but not provided by the bundler
  8749. ;; environment. This is fixed in the upstream repository but fix
  8750. ;; has not been released.
  8751. (substitute* "Gemfile"
  8752. (("^gemspec") "gem 'test-unit'\ngemspec"))
  8753. #t)))))
  8754. (propagated-inputs
  8755. `(("ruby-unf-ext" ,ruby-unf-ext)))
  8756. (native-inputs
  8757. `(("ruby-shoulda" ,ruby-shoulda)
  8758. ("bundler" ,bundler)
  8759. ("ruby-test-unit" ,ruby-test-unit)))
  8760. (synopsis "Unicode Normalization Form support to Ruby and JRuby")
  8761. (description
  8762. "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
  8763. support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
  8764. @code{java.text.Normalizer} on JRuby.")
  8765. (home-page "https://github.com/knu/ruby-unf")
  8766. (license license:bsd-2)))
  8767. (define-public ruby-warden
  8768. (package
  8769. (name "ruby-warden")
  8770. (version "1.2.8")
  8771. (source
  8772. (origin
  8773. (method url-fetch)
  8774. (uri (rubygems-uri "warden" version))
  8775. (sha256
  8776. (base32
  8777. "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
  8778. (build-system ruby-build-system)
  8779. (arguments
  8780. '(#:tests? #f)) ; No included tests
  8781. (propagated-inputs
  8782. `(("ruby-rack" ,ruby-rack)))
  8783. (synopsis "Rack middleware providing authentication")
  8784. (description
  8785. "Warden is a Rack-based middleware that provides a mechanism for
  8786. authentication in Ruby web applications.")
  8787. (home-page "https://github.com/wardencommunity/warden")
  8788. (license license:expat)))
  8789. (define-public ruby-warden-oauth2
  8790. (package
  8791. (name "ruby-warden-oauth2")
  8792. (version "0.0.1")
  8793. (source
  8794. (origin
  8795. (method url-fetch)
  8796. (uri (rubygems-uri "warden-oauth2" version))
  8797. (sha256
  8798. (base32
  8799. "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
  8800. (build-system ruby-build-system)
  8801. (arguments
  8802. '(#:test-target "spec"
  8803. #:phases
  8804. (modify-phases %standard-phases
  8805. (add-after 'unpack 'remove-unnecessary-dependencies
  8806. (lambda _
  8807. (substitute* "Gemfile"
  8808. ;; All of these gems relate to development, and are unnecessary
  8809. ;; when running the tests
  8810. (("gem 'guard-bundler'") "")
  8811. (("gem 'guard'") "")
  8812. (("gem 'guard-rspec'") "")
  8813. (("gem 'rb-fsevent'") "")
  8814. (("gem 'pry'") "")
  8815. (("gem 'growl'") ""))
  8816. #t))
  8817. ;; The test suite doesn't work with rspec@2, and this is incompatible
  8818. ;; with the current version of Rake, so invoke Rspec directly
  8819. (replace 'check
  8820. (lambda* (#:key tests? #:allow-other-keys)
  8821. (when tests?
  8822. (invoke "bundle" "exec" "rspec"))
  8823. #t)))))
  8824. (propagated-inputs
  8825. `(("ruby-warden" ,ruby-warden)))
  8826. (native-inputs
  8827. `(("bundler" ,bundler)
  8828. ("ruby-rspec" ,ruby-rspec-2)
  8829. ("ruby-rack-test" ,ruby-rack-test)))
  8830. (synopsis "OAuth 2.0 strategies for Warden")
  8831. (description
  8832. "This library extends Warden to support OAuth 2.0 authorized API
  8833. requests.")
  8834. (home-page "https://github.com/opperator/warden-oauth2")
  8835. (license license:expat)))
  8836. (define-public ruby-webmock
  8837. (package
  8838. (name "ruby-webmock")
  8839. (version "3.11.2")
  8840. (source
  8841. (origin
  8842. (method url-fetch)
  8843. (uri (rubygems-uri "webmock" version))
  8844. (sha256
  8845. (base32
  8846. "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
  8847. (build-system ruby-build-system)
  8848. (native-inputs
  8849. `(("bundler" ,bundler)
  8850. ("ruby-rspec" ,ruby-rspec)))
  8851. (propagated-inputs
  8852. `(("ruby-addressable" ,ruby-addressable)
  8853. ("ruby-crack" ,ruby-crack)
  8854. ("ruby-hashdiff" ,ruby-hashdiff)))
  8855. (synopsis "Allows stubbing and setting expectations on HTTP requests")
  8856. (description
  8857. "WebMock allows stubbing HTTP requests and setting expectations on HTTP
  8858. requests. This is useful when testing software.")
  8859. (home-page "https://github.com/bblimke/webmock")
  8860. (license license:expat)))
  8861. (define-public ruby-webmock-2
  8862. (package
  8863. (inherit ruby-webmock)
  8864. (name "ruby-webmock")
  8865. (version "2.3.2")
  8866. (source
  8867. (origin
  8868. (method url-fetch)
  8869. (uri (rubygems-uri "webmock" version))
  8870. (sha256
  8871. (base32
  8872. "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
  8873. (define-public ruby-unicode-display-width
  8874. (package
  8875. (name "ruby-unicode-display-width")
  8876. (version "1.6.0")
  8877. (source
  8878. (origin
  8879. (method url-fetch)
  8880. (uri (rubygems-uri "unicode-display_width" version))
  8881. (sha256
  8882. (base32
  8883. "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
  8884. (build-system ruby-build-system)
  8885. (arguments
  8886. '(;; Test data not included.
  8887. #:tests? #f))
  8888. (synopsis "Determine the monospace display width of Ruby strings")
  8889. (description
  8890. "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
  8891. display width of strings in Ruby.")
  8892. (home-page "https://github.com/janlelis/unicode-display_width")
  8893. (license license:expat)))
  8894. ;; There is another gem called 'ruby-version' so we use an underscore in this
  8895. ;; name
  8896. (define-public ruby_version
  8897. (package
  8898. (name "ruby_version")
  8899. (version "1.0.2")
  8900. (source
  8901. (origin
  8902. (method url-fetch)
  8903. (uri (rubygems-uri "ruby_version" version))
  8904. (sha256
  8905. (base32
  8906. "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
  8907. (build-system ruby-build-system)
  8908. (arguments
  8909. `(#:phases
  8910. (modify-phases %standard-phases
  8911. (add-before 'check 'fix-dependencies
  8912. (lambda _
  8913. ;; Remove the Gemfile.lock, as we want to use Guix packages at
  8914. ;; whatever versions.
  8915. (delete-file "Gemfile.lock")
  8916. ;; Remove the included gem files as they unnecessary.
  8917. (delete-file-recursively "pkg/")
  8918. ;; Accept any version of rake, rdoc and rspec
  8919. (substitute* "ruby_version.gemspec"
  8920. (("%q<rake.*") "%q<rake>)\n")
  8921. (("%q<rdoc.*") "%q<rdoc>)\n")
  8922. (("%q<rspec.*") "%q<rspec>)\n"))
  8923. ;; Do not use bundler.
  8924. (substitute* "Rakefile"
  8925. (("Bundler\\.setup.*") "nil\n"))
  8926. #t)))))
  8927. (native-inputs
  8928. `(("ruby-rdoc" ,ruby-rdoc)
  8929. ("ruby-rspec" ,ruby-rspec)
  8930. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  8931. (synopsis "Ruby library to help check the Ruby version")
  8932. (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
  8933. checking for the right Ruby version in software.")
  8934. (home-page "https://github.com/janlelis/ruby_version")
  8935. (license license:expat)))
  8936. (define-public ruby-websocket-driver
  8937. (package
  8938. (name "ruby-websocket-driver")
  8939. (version "0.7.1")
  8940. (source
  8941. (origin
  8942. (method url-fetch)
  8943. (uri (rubygems-uri "websocket-driver" version))
  8944. (sha256
  8945. (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
  8946. (build-system ruby-build-system)
  8947. (arguments
  8948. '(#:tests? #f)) ; no included tests
  8949. (propagated-inputs
  8950. `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
  8951. (synopsis "WebSocket protocol handler with pluggable I/O")
  8952. (description
  8953. "@code{websocket-driver} provides a complete implementation of the
  8954. WebSocket protocols that can be hooked up to any TCP library")
  8955. (home-page "https://github.com/faye/websocket-driver-ruby")
  8956. (license license:expat)))
  8957. (define-public ruby-websocket-extensions
  8958. (package
  8959. (name "ruby-websocket-extensions")
  8960. (version "0.1.3")
  8961. (source
  8962. (origin
  8963. (method url-fetch)
  8964. (uri (rubygems-uri "websocket-extensions" version))
  8965. (sha256
  8966. (base32
  8967. "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
  8968. (build-system ruby-build-system)
  8969. (arguments
  8970. '(;; No included tests
  8971. #:tests? #f))
  8972. (synopsis "Generic extension manager for WebSocket connections")
  8973. (description
  8974. "@code{websocket-extensions} provides a container for registering
  8975. extension plugins.")
  8976. (home-page "https://github.com/faye/websocket-extensions-ruby")
  8977. (license license:expat)))
  8978. (define-public ruby-domain-name
  8979. (package
  8980. (name "ruby-domain-name")
  8981. (version "0.5.20190701")
  8982. (source
  8983. (origin
  8984. (method url-fetch)
  8985. (uri (rubygems-uri "domain_name" version))
  8986. (sha256
  8987. (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
  8988. (build-system ruby-build-system)
  8989. (arguments
  8990. `(#:phases
  8991. (modify-phases %standard-phases
  8992. (add-before 'check 'fix-versions
  8993. (lambda _
  8994. ;; Fix NameError that appears to already be fixed upstream.
  8995. (substitute* "Rakefile"
  8996. (("DomainName::VERSION")
  8997. "Bundler::GemHelper.gemspec.version"))
  8998. ;; Loosen unnecessarily strict test-unit version specification.
  8999. (substitute* "domain_name.gemspec"
  9000. (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
  9001. #t)))))
  9002. (propagated-inputs
  9003. `(("ruby-unf" ,ruby-unf)))
  9004. (native-inputs
  9005. `(("ruby-shoulda" ,ruby-shoulda)
  9006. ("bundler" ,bundler)
  9007. ("ruby-test-unit" ,ruby-test-unit)))
  9008. (synopsis "Domain name manipulation library")
  9009. (description
  9010. "@code{domain_name} is a Domain name manipulation library. It parses a
  9011. domain name ready for extracting the registered domain and TLD (Top Level
  9012. Domain). It can also be used for cookie domain validation based on the Public
  9013. Suffix List.")
  9014. (home-page "https://github.com/knu/ruby-domain_name")
  9015. (license license:bsd-2)))
  9016. (define-public ruby-http-cookie
  9017. (package
  9018. (name "ruby-http-cookie")
  9019. (version "1.0.3")
  9020. (source
  9021. (origin
  9022. (method url-fetch)
  9023. (uri (rubygems-uri "http-cookie" version))
  9024. (sha256
  9025. (base32
  9026. "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
  9027. (build-system ruby-build-system)
  9028. (arguments
  9029. `(#:phases
  9030. (modify-phases %standard-phases
  9031. (add-before 'check 'add-dependency-to-bundler
  9032. (lambda _
  9033. ;; Fix NameError
  9034. (substitute* "Rakefile"
  9035. (("HTTP::Cookie::VERSION")
  9036. "Bundler::GemHelper.gemspec.version"))
  9037. #t)))))
  9038. (propagated-inputs
  9039. `(("ruby-domain-name" ,ruby-domain-name)))
  9040. (native-inputs
  9041. `(("rubysimplecov" ,ruby-simplecov)
  9042. ("bundler" ,bundler)
  9043. ("ruby-sqlite3" ,ruby-sqlite3)
  9044. ("ruby-test-unit" ,ruby-test-unit)))
  9045. (synopsis "Handle HTTP Cookies based on RFC 6265")
  9046. (description
  9047. "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
  9048. RFC 6265. It has been designed with security, standards compliance and
  9049. compatibility in mind, to behave just the same as today's major web browsers.
  9050. It has built-in support for the legacy @code{cookies.txt} and
  9051. @code{cookies.sqlite} formats of Mozilla Firefox.")
  9052. (home-page "https://github.com/sparklemotion/http-cookie")
  9053. (license license:expat)))
  9054. (define-public ruby-httpclient
  9055. (package
  9056. (name "ruby-httpclient")
  9057. (version "2.8.3")
  9058. (source
  9059. (origin
  9060. (method url-fetch)
  9061. (uri (rubygems-uri "httpclient" version))
  9062. (sha256
  9063. (base32
  9064. "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
  9065. (build-system ruby-build-system)
  9066. (arguments
  9067. '(;; TODO: Some tests currently fail
  9068. ;; ------
  9069. ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
  9070. ;; 2 omissions, 0 notifications
  9071. ;; 91.866% passed
  9072. ;; ------
  9073. ;; 6.49 tests/s, 22.41 assertions/s
  9074. #:tests? #f
  9075. #:phases
  9076. (modify-phases %standard-phases
  9077. (replace 'check
  9078. (lambda* (#:key tests? #:allow-other-keys)
  9079. (if tests?
  9080. (invoke "ruby"
  9081. "-Ilib"
  9082. "test/runner.rb")
  9083. #t))))))
  9084. (native-inputs
  9085. `(("ruby-rack" ,ruby-rack)))
  9086. (synopsis
  9087. "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
  9088. (description
  9089. "The @code{httpclient} ruby library provides functionality related to
  9090. HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
  9091. Cookie, multithreading and authentication (digest, NTLM) support.
  9092. Also provided is a @command{httpclient} command, which can perform HTTP
  9093. requests either using arguments or with an interactive prompt.")
  9094. (home-page "https://github.com/nahi/httpclient")
  9095. (license license:ruby)))
  9096. (define-public ruby-ansi
  9097. (package
  9098. (name "ruby-ansi")
  9099. (version "1.5.0")
  9100. (source
  9101. (origin
  9102. (method git-fetch)
  9103. ;; Fetch from GitHub as the gem does not contain testing code.
  9104. (uri (git-reference
  9105. (url "https://github.com/rubyworks/ansi")
  9106. (commit version)))
  9107. (file-name (git-file-name name version))
  9108. (sha256
  9109. (base32
  9110. "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
  9111. (build-system ruby-build-system)
  9112. (arguments
  9113. `(#:phases
  9114. (modify-phases %standard-phases
  9115. ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
  9116. ;; cycle ansi, qed, ansi. Instead simply test that the library can
  9117. ;; be require'd.
  9118. (replace 'check
  9119. (lambda _
  9120. (invoke "ruby" "-Ilib" "-r" "ansi")))
  9121. (add-before 'validate-runpath 'replace-broken-symlink
  9122. (lambda* (#:key outputs #:allow-other-keys)
  9123. (let* ((out (assoc-ref outputs "out"))
  9124. (file (string-append
  9125. out "/lib/ruby/vendor_ruby/gems/ansi-"
  9126. ,version "/lib/ansi.yml")))
  9127. ;; XXX: This symlink is broken since ruby 2.4.
  9128. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  9129. (delete-file file)
  9130. (symlink "../.index" file)
  9131. #t))))))
  9132. (synopsis "ANSI escape code related libraries")
  9133. (description
  9134. "This package is a collection of ANSI escape code related libraries
  9135. enabling ANSI colorization and stylization of console output. Included in the
  9136. library are the @code{Code} module, which defines ANSI codes as constants and
  9137. methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
  9138. @code{ProgressBar}, and a @code{String} subclass. The library also includes a
  9139. @code{Terminal} module which provides information about the current output
  9140. device.")
  9141. (home-page "https://rubyworks.github.io/ansi/")
  9142. (license license:bsd-2)))
  9143. (define-public ruby-systemu
  9144. (package
  9145. (name "ruby-systemu")
  9146. (version "2.6.5")
  9147. (source
  9148. (origin
  9149. (method url-fetch)
  9150. (uri (rubygems-uri "systemu" version))
  9151. (sha256
  9152. (base32
  9153. "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
  9154. (build-system ruby-build-system)
  9155. (arguments
  9156. `(#:phases
  9157. (modify-phases %standard-phases
  9158. (add-before 'check 'set-version
  9159. (lambda _
  9160. (setenv "VERSION" ,version)
  9161. #t)))))
  9162. (synopsis "Capture of stdout/stderr and handling of child processes")
  9163. (description
  9164. "Systemu can be used on any platform to return status, stdout, and stderr
  9165. of any command. Unlike other methods like @code{open3} and @code{popen4}
  9166. there is no danger of full pipes or threading issues hanging your process or
  9167. subprocess.")
  9168. (home-page "https://github.com/ahoward/systemu")
  9169. (license license:ruby)))
  9170. (define-public ruby-bio-commandeer
  9171. (package
  9172. (name "ruby-bio-commandeer")
  9173. (version "0.4.0")
  9174. (source
  9175. (origin
  9176. (method url-fetch)
  9177. (uri (rubygems-uri "bio-commandeer" version))
  9178. (sha256
  9179. (base32
  9180. "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
  9181. (build-system ruby-build-system)
  9182. (arguments
  9183. `(#:phases
  9184. (modify-phases %standard-phases
  9185. (replace 'check
  9186. ;; Run test without calling 'rake' so that jeweler is
  9187. ;; not required as an input.
  9188. (lambda _
  9189. (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
  9190. (propagated-inputs
  9191. `(("ruby-bio-logger" ,ruby-bio-logger)
  9192. ("ruby-systemu" ,ruby-systemu)))
  9193. (native-inputs
  9194. `(("bundler" ,bundler)
  9195. ("ruby-rspec" ,ruby-rspec)))
  9196. (synopsis "Simplified running of shell commands from within Ruby")
  9197. (description
  9198. "Bio-commandeer provides an opinionated method of running shell commands
  9199. from within Ruby. The advantage of bio-commandeer over other methods of
  9200. running external commands is that when something goes wrong, messages printed
  9201. to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
  9202. detail to ease debugging.")
  9203. (home-page "https://github.com/wwood/bioruby-commandeer")
  9204. (license license:expat)))
  9205. (define-public ruby-rubytest
  9206. (package
  9207. (name "ruby-rubytest")
  9208. (version "0.8.1")
  9209. (source
  9210. (origin
  9211. (method url-fetch)
  9212. (uri (rubygems-uri "rubytest" version))
  9213. (sha256
  9214. (base32
  9215. "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
  9216. (build-system ruby-build-system)
  9217. (arguments
  9218. ;; Disable regular testing to break the cycle rubytest, qed, brass,
  9219. ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
  9220. ;; simply test that the library can be require'd.
  9221. `(#:phases
  9222. (modify-phases %standard-phases
  9223. (replace 'check
  9224. (lambda _
  9225. (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
  9226. (propagated-inputs
  9227. `(("ruby-ansi" ,ruby-ansi)))
  9228. (synopsis "Universal test harness for Ruby")
  9229. (description
  9230. "Rubytest is a testing meta-framework for Ruby. It can handle any
  9231. compliant test framework and can run tests from multiple frameworks in a
  9232. single pass.")
  9233. (home-page "https://rubyworks.github.io/rubytest")
  9234. (license license:bsd-2)))
  9235. (define-public ruby-brass
  9236. (package
  9237. (name "ruby-brass")
  9238. (version "1.2.1")
  9239. (source
  9240. (origin
  9241. (method url-fetch)
  9242. (uri (rubygems-uri "brass" version))
  9243. (sha256
  9244. (base32
  9245. "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
  9246. (build-system ruby-build-system)
  9247. (arguments
  9248. ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
  9249. ;; Instead simply test that the library can be require'd.
  9250. `(#:phases
  9251. (modify-phases %standard-phases
  9252. (replace 'check
  9253. (lambda _
  9254. (invoke "ruby" "-Ilib" "-r" "brass"))))))
  9255. (synopsis "Basic foundational assertions framework")
  9256. (description
  9257. "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
  9258. foundational assertions framework for other assertion and test frameworks to
  9259. make use of.")
  9260. (home-page "https://rubyworks.github.io/brass")
  9261. (license license:bsd-2)))
  9262. (define-public ruby-qed
  9263. (package
  9264. (name "ruby-qed")
  9265. (version "2.9.2")
  9266. (source
  9267. (origin
  9268. (method url-fetch)
  9269. (uri (rubygems-uri "qed" version))
  9270. (sha256
  9271. (base32
  9272. "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
  9273. (build-system ruby-build-system)
  9274. (arguments
  9275. ;; Disable testing to break the cycle qed, ansi, qed, among others.
  9276. ;; Instead simply test that the executable runs using --copyright.
  9277. `(#:phases
  9278. (modify-phases %standard-phases
  9279. (replace 'check
  9280. (lambda _
  9281. (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
  9282. (propagated-inputs
  9283. `(("ruby-ansi" ,ruby-ansi)
  9284. ("ruby-brass" ,ruby-brass)))
  9285. (synopsis "Test framework utilizing literate programming techniques")
  9286. (description
  9287. "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
  9288. @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
  9289. Development} (BDD) utilizing Literate Programming techniques. QED sits
  9290. somewhere between lower-level testing tools like @code{Test::Unit} and
  9291. requirement specifications systems like Cucumber.")
  9292. (home-page "https://rubyworks.github.io/qed")
  9293. (license license:bsd-2)))
  9294. (define-public ruby-que
  9295. (package
  9296. (name "ruby-que")
  9297. (version "1.0.0.beta3")
  9298. (source
  9299. (origin
  9300. (method url-fetch)
  9301. (uri (rubygems-uri "que" version))
  9302. (sha256
  9303. (base32
  9304. "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
  9305. (build-system ruby-build-system)
  9306. (arguments
  9307. '(#:tests? #f)) ; No included tests
  9308. (synopsis "Job queue using PostgreSQL written in Ruby")
  9309. (description
  9310. "This package provides a job queue that uses PostgreSQL for storing jobs
  9311. and locking between worker processes.")
  9312. (home-page "https://github.com/chanks/que")
  9313. (license license:expat)))
  9314. (define-public ruby-ae
  9315. (package
  9316. (name "ruby-ae")
  9317. (version "1.8.2")
  9318. (source
  9319. (origin
  9320. (method git-fetch)
  9321. ;; Fetch from github so tests are included.
  9322. (uri (git-reference
  9323. (url "https://github.com/rubyworks/ae")
  9324. (commit version)))
  9325. (file-name (git-file-name name version))
  9326. (sha256
  9327. (base32
  9328. "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
  9329. (build-system ruby-build-system)
  9330. (arguments
  9331. `(#:phases
  9332. (modify-phases %standard-phases
  9333. (replace 'check
  9334. (lambda _ (invoke "qed")))
  9335. (add-before 'validate-runpath 'replace-broken-symlink
  9336. (lambda* (#:key outputs #:allow-other-keys)
  9337. (let* ((out (assoc-ref outputs "out"))
  9338. (file (string-append
  9339. out "/lib/ruby/vendor_ruby/gems/ae-"
  9340. ,version "/lib/ae.yml")))
  9341. ;; XXX: This symlink is broken since ruby 2.4.
  9342. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  9343. (delete-file file)
  9344. (symlink "../.index" file)
  9345. #t))))))
  9346. (propagated-inputs
  9347. `(("ruby-ansi" ,ruby-ansi)))
  9348. (native-inputs
  9349. `(("ruby-qed" ,ruby-qed)))
  9350. (synopsis "Assertions library")
  9351. (description
  9352. "Assertive Expressive (AE) is an assertions library specifically designed
  9353. for reuse by other test frameworks.")
  9354. (home-page "https://rubyworks.github.io/ae/")
  9355. (license license:bsd-2)))
  9356. (define-public ruby-lemon
  9357. (package
  9358. (name "ruby-lemon")
  9359. (version "0.9.1")
  9360. (source
  9361. (origin
  9362. (method url-fetch)
  9363. (uri (rubygems-uri "lemon" version))
  9364. (sha256
  9365. (base32
  9366. "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
  9367. (build-system ruby-build-system)
  9368. (arguments
  9369. `(#:phases
  9370. (modify-phases %standard-phases
  9371. (replace 'check (lambda _ (invoke "qed"))))))
  9372. (propagated-inputs
  9373. `(("ruby-ae" ,ruby-ae)
  9374. ("ruby-ansi" ,ruby-ansi)
  9375. ("ruby-rubytest" ,ruby-rubytest)))
  9376. (native-inputs
  9377. `(("ruby-qed" ,ruby-qed)))
  9378. (synopsis "Test framework correlating code structure and test unit")
  9379. (description
  9380. "Lemon is a unit testing framework that enforces highly formal
  9381. case-to-class and unit-to-method test construction. This enforcement can help
  9382. focus concern on individual units of behavior.")
  9383. (home-page "https://rubyworks.github.io/lemon")
  9384. (license license:bsd-2)))
  9385. (define-public ruby-rubytest-cli
  9386. (package
  9387. (name "ruby-rubytest-cli")
  9388. (version "0.2.0")
  9389. (source
  9390. (origin
  9391. (method url-fetch)
  9392. (uri (rubygems-uri "rubytest-cli" version))
  9393. (sha256
  9394. (base32
  9395. "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
  9396. (build-system ruby-build-system)
  9397. (arguments
  9398. `(#:tests? #f)) ; no tests
  9399. (propagated-inputs
  9400. `(("ruby-ansi" ,ruby-ansi)
  9401. ("ruby-rubytest" ,ruby-rubytest)))
  9402. (synopsis "Command-line interface for rubytest")
  9403. (description
  9404. "Rubytest CLI is a command-line interface for running tests for
  9405. Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
  9406. (home-page "https://rubyworks.github.io/rubytest-cli")
  9407. (license license:bsd-2)))
  9408. (define-public ruby-hashery
  9409. (package
  9410. (name "ruby-hashery")
  9411. (version "2.1.2")
  9412. (source
  9413. (origin
  9414. (method url-fetch)
  9415. (uri (rubygems-uri "hashery" version))
  9416. (sha256
  9417. (base32
  9418. "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
  9419. (build-system ruby-build-system)
  9420. (arguments
  9421. `(#:phases
  9422. (modify-phases %standard-phases
  9423. (replace 'check
  9424. (lambda _
  9425. (invoke "qed")
  9426. (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
  9427. (native-inputs
  9428. `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
  9429. ("ruby-qed" ,ruby-qed)
  9430. ("ruby-lemon" ,ruby-lemon)))
  9431. (synopsis "Hash-like classes with extra features")
  9432. (description
  9433. "The Hashery is a tight collection of @code{Hash}-like classes.
  9434. Included are the auto-sorting @code{Dictionary} class, the efficient
  9435. @code{LRUHash}, the flexible @code{OpenHash} and the convenient
  9436. @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
  9437. defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
  9438. standard @code{Hash} making it possible to subclass and augment to fit any
  9439. specific use case.")
  9440. (home-page "https://rubyworks.github.io/hashery")
  9441. (license license:bsd-2)))
  9442. (define-public ruby-rc4
  9443. (package
  9444. (name "ruby-rc4")
  9445. (version "0.1.5")
  9446. (source
  9447. (origin
  9448. (method url-fetch)
  9449. (uri (rubygems-uri "ruby-rc4" version))
  9450. (sha256
  9451. (base32
  9452. "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
  9453. (build-system ruby-build-system)
  9454. (arguments
  9455. `(#:phases
  9456. (modify-phases %standard-phases
  9457. (replace 'check
  9458. (lambda _
  9459. (invoke "rspec" "spec/rc4_spec.rb"))))))
  9460. (native-inputs
  9461. `(("ruby-rspec" ,ruby-rspec-2)))
  9462. (synopsis "Implementation of the RC4 algorithm")
  9463. (description
  9464. "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
  9465. (home-page "https://github.com/caiges/Ruby-RC4")
  9466. (license license:expat)))
  9467. (define-public ruby-afm
  9468. (package
  9469. (name "ruby-afm")
  9470. (version "0.2.2")
  9471. (source
  9472. (origin
  9473. (method url-fetch)
  9474. (uri (rubygems-uri "afm" version))
  9475. (sha256
  9476. (base32
  9477. "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
  9478. (build-system ruby-build-system)
  9479. (native-inputs
  9480. `(("bundler" ,bundler)))
  9481. (synopsis "Read Adobe Font Metrics (afm) files")
  9482. (description
  9483. "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
  9484. files and use the data therein.")
  9485. (home-page "https://github.com/halfbyte/afm")
  9486. (license license:expat)))
  9487. (define-public ruby-ascii85
  9488. (package
  9489. (name "ruby-ascii85")
  9490. (version "1.0.3")
  9491. (source
  9492. (origin
  9493. (method url-fetch)
  9494. (uri (rubygems-uri "Ascii85" version))
  9495. (sha256
  9496. (base32
  9497. "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
  9498. (build-system ruby-build-system)
  9499. (native-inputs
  9500. `(("bundler" ,bundler)))
  9501. (synopsis "Encode and decode Ascii85 binary-to-text encoding")
  9502. (description
  9503. "This library provides methods to encode and decode Ascii85
  9504. binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
  9505. @dfn{Portable Document Format} (PDF) file formats.")
  9506. (home-page "https://github.com/datawraith/ascii85gem")
  9507. (license license:expat)))
  9508. (define-public ruby-ttfunk
  9509. (package
  9510. (name "ruby-ttfunk")
  9511. (version "1.6.2.1")
  9512. (source
  9513. (origin
  9514. (method git-fetch)
  9515. ;; fetch from github as the gem does not contain testing code
  9516. (uri (git-reference
  9517. (url "https://github.com/prawnpdf/ttfunk")
  9518. (commit version)))
  9519. (file-name (git-file-name name version))
  9520. (sha256
  9521. (base32
  9522. "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
  9523. (build-system ruby-build-system)
  9524. (arguments
  9525. `(#:test-target "spec"
  9526. #:phases
  9527. (modify-phases %standard-phases
  9528. (add-before 'build 'remove-ssh
  9529. (lambda _
  9530. ;; remove dependency on an ssh key pair that doesn't exist
  9531. (substitute* "ttfunk.gemspec"
  9532. (("spec.signing_key.*") ""))
  9533. #t))
  9534. (add-before 'check 'remove-rubocop
  9535. (lambda _
  9536. ;; remove rubocop as a dependency as not needed for testing
  9537. (substitute* "ttfunk.gemspec"
  9538. (("spec.add_development_dependency\\('rubocop'.*") ""))
  9539. (substitute* "Rakefile"
  9540. (("require 'rubocop/rake_task'") "")
  9541. (("RuboCop::RakeTask.new") ""))
  9542. #t)))))
  9543. (native-inputs
  9544. `(("ruby-rspec" ,ruby-rspec)
  9545. ("ruby-yard" ,ruby-yard)
  9546. ("bundler" ,bundler)))
  9547. (synopsis "Font metrics parser for the Prawn PDF generator")
  9548. (description
  9549. "TTFunk is a TrueType font parser written in pure Ruby. It is used as
  9550. part of the Prawn PDF generator.")
  9551. (home-page "https://github.com/prawnpdf/ttfunk")
  9552. ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
  9553. ;; for details."
  9554. (license %prawn-project-licenses)))
  9555. (define-public ruby-puma
  9556. (package
  9557. (name "ruby-puma")
  9558. (version "3.9.1")
  9559. (source
  9560. (origin
  9561. (method git-fetch)
  9562. ;; Fetch from GitHub because distributed gem does not contain tests.
  9563. (uri (git-reference
  9564. (url "https://github.com/puma/puma")
  9565. (commit (string-append "v" version))))
  9566. (file-name (git-file-name name version))
  9567. (sha256
  9568. (base32
  9569. "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
  9570. (build-system ruby-build-system)
  9571. (arguments
  9572. `(#:tests? #f ; Tests require an out-dated version of minitest.
  9573. #:phases
  9574. (modify-phases %standard-phases
  9575. (add-before 'build 'fix-gemspec
  9576. (lambda _
  9577. (substitute* "puma.gemspec"
  9578. (("git ls-files") "find * |sort"))
  9579. #t)))))
  9580. (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
  9581. (description
  9582. "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
  9583. for Ruby/Rack applications. Puma is intended for use in both development and
  9584. production environments. In order to get the best throughput, it is highly
  9585. recommended that you use a Ruby implementation with real threads like Rubinius
  9586. or JRuby.")
  9587. (home-page "https://puma.io/")
  9588. (license license:expat)))
  9589. (define-public ruby-hoe-git
  9590. (package
  9591. (name "ruby-hoe-git")
  9592. (version "1.6.0")
  9593. (source
  9594. (origin
  9595. (method url-fetch)
  9596. (uri (rubygems-uri "hoe-git" version))
  9597. (sha256
  9598. (base32
  9599. "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
  9600. (build-system ruby-build-system)
  9601. (propagated-inputs
  9602. `(("ruby-hoe" ,ruby-hoe)))
  9603. (synopsis "Hoe plugins for tighter Git integration")
  9604. (description
  9605. "This package provides a set of Hoe plugins for tighter Git integration.
  9606. It provides tasks to automate release tagging and pushing and changelog
  9607. generation.")
  9608. (home-page "https://github.com/jbarnette/hoe-git")
  9609. (license license:expat)))
  9610. (define-public ruby-sequel
  9611. (package
  9612. (name "ruby-sequel")
  9613. (version "5.47.0")
  9614. (source
  9615. (origin
  9616. (method url-fetch)
  9617. (uri (rubygems-uri "sequel" version))
  9618. (sha256
  9619. (base32
  9620. "03pmhj4kc3ga75wy397l57bvd18jxxmrk3qsznjw93b993qgvj3z"))))
  9621. (build-system ruby-build-system)
  9622. (arguments
  9623. '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
  9624. (synopsis "Database toolkit for Ruby")
  9625. (description "Sequel provides thread safety, connection pooling and a
  9626. concise DSL for constructing SQL queries and table schemas. It includes a
  9627. comprehensive ORM layer for mapping records to Ruby objects and handling
  9628. associated records.")
  9629. (home-page "https://sequel.jeremyevans.net")
  9630. (license license:expat)))
  9631. (define-public ruby-timecop
  9632. (package
  9633. (name "ruby-timecop")
  9634. (version "0.9.1")
  9635. (source
  9636. (origin
  9637. (method url-fetch)
  9638. (uri (rubygems-uri "timecop" version))
  9639. (sha256
  9640. (base32
  9641. "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
  9642. (build-system ruby-build-system)
  9643. (arguments
  9644. `(#:phases
  9645. (modify-phases %standard-phases
  9646. (add-before 'check 'set-check-rubylib
  9647. (lambda _
  9648. ;; Set RUBYLIB so timecop tests finds its own lib.
  9649. (setenv "RUBYLIB" "lib")
  9650. #t)))))
  9651. (native-inputs
  9652. `(("bundler" ,bundler)
  9653. ("ruby-minitest-rg" ,ruby-minitest-rg)
  9654. ("ruby-mocha" ,ruby-mocha)
  9655. ("ruby-activesupport" ,ruby-activesupport)))
  9656. (synopsis "Test mocks for time-dependent functions")
  9657. (description
  9658. "Timecop provides \"time travel\" and \"time freezing\" capabilities,
  9659. making it easier to test time-dependent code. It provides a unified method to
  9660. mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
  9661. call.")
  9662. (home-page "https://github.com/travisjeffery/timecop")
  9663. (license license:expat)))
  9664. (define-public ruby-concurrent
  9665. (package
  9666. (name "ruby-concurrent")
  9667. (version "1.1.5")
  9668. (source
  9669. (origin
  9670. (method git-fetch)
  9671. ;; Download from GitHub because the rubygems version does not contain
  9672. ;; Rakefile.
  9673. (uri (git-reference
  9674. (url "https://github.com/ruby-concurrency/concurrent-ruby")
  9675. (commit (string-append "v" version))))
  9676. (file-name (git-file-name name version))
  9677. (sha256
  9678. (base32
  9679. "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
  9680. (build-system ruby-build-system)
  9681. (arguments
  9682. `(#:test-target "ci"
  9683. #:phases
  9684. (modify-phases %standard-phases
  9685. (add-before 'replace-git-ls-files 'remove-extra-gemspecs
  9686. (lambda _
  9687. ;; Delete extra gemspec files so 'first-gemspec' chooses the
  9688. ;; correct one.
  9689. (delete-file "concurrent-ruby-edge.gemspec")
  9690. (delete-file "concurrent-ruby-ext.gemspec")
  9691. #t))
  9692. (replace 'replace-git-ls-files
  9693. (lambda _
  9694. ;; XXX: The default substitution made by this phase is not fully
  9695. ;; compatible with "git ls-files". The latter produces file names
  9696. ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
  9697. ;; which gives "./lib/foo". That difference in turn breaks the
  9698. ;; comparison against a glob pattern in this script.
  9699. (substitute* "concurrent-ruby.gemspec"
  9700. (("git ls-files") "find * -type f | sort"))
  9701. #t))
  9702. (add-before 'build 'remove-jar-from-gemspec
  9703. (lambda _
  9704. ;; The gemspec wants to include a JAR file that we do not build
  9705. ;; nor need.
  9706. (substitute* "concurrent-ruby.gemspec"
  9707. (("'lib/concurrent/concurrent_ruby.jar'")
  9708. ""))
  9709. #t))
  9710. (add-before 'build 'remove-rake_compiler_dock-dependency
  9711. (lambda _
  9712. ;; This library is only used when building for non-MRI targets.
  9713. (substitute* "Rakefile"
  9714. (("require 'rake_compiler_dock'")
  9715. ""))
  9716. #t))
  9717. (add-before 'check 'remove-timecop-dependency
  9718. ;; Remove timecop-dependent tests as having timecop as a depedency
  9719. ;; causes circular depedencies.
  9720. (lambda _
  9721. (delete-file "spec/concurrent/executor/timer_set_spec.rb")
  9722. (delete-file "spec/concurrent/scheduled_task_spec.rb")
  9723. #t)))))
  9724. (native-inputs
  9725. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  9726. ("ruby-rspec" ,ruby-rspec)))
  9727. (synopsis "Concurrency tools for Ruby")
  9728. (description
  9729. "This library provides modern concurrency tools including agents,
  9730. futures, promises, thread pools, actors, supervisors, and more. It is
  9731. inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
  9732. patterns.")
  9733. (home-page "http://www.concurrent-ruby.com")
  9734. (license license:expat)))
  9735. (define-public ruby-pkg-config
  9736. (package
  9737. (name "ruby-pkg-config")
  9738. (version "1.2.5")
  9739. (source
  9740. (origin
  9741. (method url-fetch)
  9742. (uri (rubygems-uri "pkg-config" version))
  9743. (sha256
  9744. (base32
  9745. "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
  9746. (build-system ruby-build-system)
  9747. (arguments
  9748. ;; Tests require extra files not included in the gem.
  9749. `(#:tests? #f))
  9750. (synopsis "Detect libraries for compiling Ruby native extensions")
  9751. (description
  9752. "@code{pkg-config} can be used in your extconf.rb to properly detect need
  9753. libraries for compiling Ruby native extensions.")
  9754. (home-page "https://github.com/ruby-gnome2/pkg-config")
  9755. (license license:lgpl2.0+)))
  9756. (define-public ruby-net-http-digest-auth
  9757. (package
  9758. (name "ruby-net-http-digest-auth")
  9759. (version "1.4.1")
  9760. (source
  9761. (origin
  9762. (method url-fetch)
  9763. (uri (rubygems-uri "net-http-digest_auth" version))
  9764. (sha256
  9765. (base32
  9766. "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
  9767. (build-system ruby-build-system)
  9768. (native-inputs
  9769. `(("ruby-hoe" ,ruby-hoe)))
  9770. (synopsis "RFC 2617 HTTP digest authentication library")
  9771. (description
  9772. "This library implements HTTP's digest authentication scheme based on
  9773. RFC 2617. This enables the use of the digest authentication scheme instead
  9774. of the more insecure basic authentication scheme.")
  9775. (home-page "https://github.com/drbrain/net-http-digest_auth")
  9776. (license license:expat)))
  9777. (define-public ruby-mail
  9778. (package
  9779. (name "ruby-mail")
  9780. (version "2.7.1")
  9781. (source
  9782. (origin
  9783. (method url-fetch)
  9784. (uri (rubygems-uri "mail" version))
  9785. (sha256
  9786. (base32
  9787. "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"))))
  9788. (build-system ruby-build-system)
  9789. (propagated-inputs
  9790. `(("ruby-mini-mime" ,ruby-mini-mime)))
  9791. (arguments
  9792. '(#:tests? #f)) ; no rakefile
  9793. (synopsis "Mail library for Ruby")
  9794. (description
  9795. "Mail is an internet library for Ruby that is designed to handle email
  9796. generation, parsing and sending. The purpose of this library is to provide
  9797. a single point of access to handle all email functions, including sending
  9798. and receiving emails. All network type actions are done through proxy
  9799. methods to @code{Net::SMTP}, @code{Net::POP3} etc.
  9800. Mail has been designed with a very simple object oriented system that
  9801. really opens up the email messages you are parsing, if you know what you
  9802. are doing, you can fiddle with every last bit of your email directly.")
  9803. (home-page "https://github.com/mikel/mail")
  9804. (license license:expat)))
  9805. (define-public ruby-email-reply-trimmer
  9806. (package
  9807. (name "ruby-email-reply-trimmer")
  9808. (version "0.1.13")
  9809. (source
  9810. (origin
  9811. (method url-fetch)
  9812. (uri (rubygems-uri "email_reply_trimmer" version))
  9813. (sha256
  9814. (base32
  9815. "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
  9816. (build-system ruby-build-system)
  9817. (synopsis "Trim replies from plain text email")
  9818. (description "EmailReplyTrimmer is a Ruby small library to trim replies
  9819. from plain text email.")
  9820. (home-page "https://github.com/discourse/email_reply_trimmer")
  9821. (license license:expat)))
  9822. (define-public ruby-mathn
  9823. (package
  9824. (name "ruby-mathn")
  9825. (version "0.1.0")
  9826. (source
  9827. (origin
  9828. (method url-fetch)
  9829. (uri (rubygems-uri "mathn" version))
  9830. (sha256
  9831. (base32
  9832. "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
  9833. (build-system ruby-build-system)
  9834. (native-inputs
  9835. `(("bundler" ,bundler)
  9836. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  9837. (synopsis "Extends math operations for increased precision")
  9838. (description
  9839. "This gem makes mathematical operations more precise in Ruby and
  9840. integrates other mathematical standard libraries. Prior to Ruby 2.5,
  9841. @code{mathn} was part of the Ruby standard library.")
  9842. (home-page "https://github.com/ruby/mathn")
  9843. (license license:bsd-2)))
  9844. (define-public ruby-code-statistics
  9845. (package
  9846. (name "ruby-code-statistics")
  9847. (version "0.2.13")
  9848. (source
  9849. (origin
  9850. (method url-fetch)
  9851. (uri (rubygems-uri "code_statistics" version))
  9852. (sha256
  9853. (base32
  9854. "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
  9855. (build-system ruby-build-system)
  9856. (arguments
  9857. `(#:tests? #f)) ; Not all test code is included in gem.
  9858. (synopsis "Port of the rails 'rake stats' method")
  9859. (description
  9860. "This gem is a port of the rails 'rake stats' method so it can be made
  9861. more robust and work for non rails projects.")
  9862. (home-page "https://github.com/danmayer/code_statistics")
  9863. (license license:expat)))
  9864. (define-public ruby-rubypants
  9865. (package
  9866. (name "ruby-rubypants")
  9867. (version "0.6.0")
  9868. (source (origin
  9869. (method url-fetch)
  9870. (uri (rubygems-uri "rubypants" version))
  9871. (sha256
  9872. (base32
  9873. "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
  9874. (build-system ruby-build-system)
  9875. (arguments
  9876. '(#:tests? #f)) ; need Codecov
  9877. (synopsis "Port of the smart-quotes library SmartyPants")
  9878. (description
  9879. "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
  9880. original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
  9881. and BBEdit that easily translates plain ASCII punctuation characters into
  9882. smart typographic punctuation HTML entities.")
  9883. (home-page "https://github.com/jmcnevin/rubypants")
  9884. (license license:bsd-2)))
  9885. (define-public ruby-org-ruby
  9886. (package
  9887. (name "ruby-org-ruby")
  9888. (version "0.9.12")
  9889. (source (origin
  9890. (method url-fetch)
  9891. (uri (rubygems-uri "org-ruby" version))
  9892. (sha256
  9893. (base32
  9894. "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
  9895. (build-system ruby-build-system)
  9896. (arguments
  9897. '(#:tests? #f)) ; no rakefile
  9898. (propagated-inputs
  9899. `(("ruby-rubypants" ,ruby-rubypants)))
  9900. (synopsis "Org-mode parser written in Ruby")
  9901. (description
  9902. "Org-ruby is an org-mode parser written in Ruby. The most significant
  9903. thing this library does today is convert org-mode files to HTML or Textile or
  9904. Markdown.")
  9905. (home-page "https://github.com/wallyqs/org-ruby")
  9906. (license license:expat)))
  9907. (define-public ruby-rake
  9908. (package
  9909. (name "ruby-rake")
  9910. (version "13.0.1")
  9911. (source
  9912. (origin
  9913. (method url-fetch)
  9914. (uri (rubygems-uri "rake" version))
  9915. (sha256
  9916. (base32
  9917. "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
  9918. (build-system ruby-build-system)
  9919. (native-inputs
  9920. `(("bundler" ,bundler)))
  9921. (synopsis "Rake is a Make-like program implemented in Ruby")
  9922. (description
  9923. "Rake is a Make-like program where tasks and dependencies are specified
  9924. in standard Ruby syntax.")
  9925. (home-page "https://github.com/ruby/rake")
  9926. (license license:expat)))
  9927. (define-public ruby-childprocess
  9928. (package
  9929. (name "ruby-childprocess")
  9930. (version "3.0.0")
  9931. (source
  9932. (origin
  9933. (method url-fetch)
  9934. (uri (rubygems-uri "childprocess" version))
  9935. (sha256
  9936. (base32
  9937. "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
  9938. (build-system ruby-build-system)
  9939. (arguments
  9940. `(#:tests? #f))
  9941. (native-inputs
  9942. `(("bundler" ,bundler)
  9943. ("ruby-rspec" ,ruby-rspec)))
  9944. (propagated-inputs
  9945. `(("ruby-ffi" ,ruby-ffi)))
  9946. (synopsis "Control external programs running in the background, in Ruby")
  9947. (description "@code{childprocess} provides a gem to control external
  9948. programs running in the background, in Ruby.")
  9949. (home-page "https://github.com/enkessler/childprocess")
  9950. (license license:expat)))
  9951. (define-public ruby-public-suffix
  9952. (package
  9953. (name "ruby-public-suffix")
  9954. (version "4.0.5")
  9955. (source (origin
  9956. (method url-fetch)
  9957. (uri (rubygems-uri "public_suffix" version))
  9958. (sha256
  9959. (base32
  9960. "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
  9961. (build-system ruby-build-system)
  9962. (arguments
  9963. '(#:phases
  9964. (modify-phases %standard-phases
  9965. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  9966. ;; including it as an input can lead to circular dependencies.
  9967. (add-after 'unpack 'remove-rubocop-from-Rakefile
  9968. (lambda _
  9969. (substitute* "Rakefile"
  9970. (("require \"rubocop/rake\\_task\"") "")
  9971. (("RuboCop::RakeTask\\.new") ""))
  9972. #t)))))
  9973. (native-inputs
  9974. `(("bundler" ,bundler)
  9975. ("ruby-yard" ,ruby-yard)
  9976. ("ruby-mocha" ,ruby-mocha)
  9977. ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
  9978. (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
  9979. (synopsis "Domain name parser")
  9980. (description "The gem @code{public_suffix} is a domain name parser,
  9981. written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
  9982. is one under which Internet users can (or historically could) directly
  9983. register names. Some examples of public suffixes are @code{.com},
  9984. @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
  9985. all known public suffixes.")
  9986. (license license:expat)))
  9987. (define-public ruby-addressable
  9988. (package
  9989. (name "ruby-addressable")
  9990. (version "2.7.0")
  9991. (source (origin
  9992. (method url-fetch)
  9993. (uri (rubygems-uri "addressable" version))
  9994. (sha256
  9995. (base32
  9996. "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
  9997. (build-system ruby-build-system)
  9998. (arguments
  9999. '(#:test-target "spec"
  10000. #:phases
  10001. (modify-phases %standard-phases
  10002. (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
  10003. (lambda _
  10004. (substitute* "Gemfile"
  10005. (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
  10006. ((".*launchy.*") "")
  10007. ((".*rake.*") "gem 'rake'\n")
  10008. ((".*redcarpet.*") ""))
  10009. #t))
  10010. (add-before 'check 'delete-network-dependent-test
  10011. (lambda _
  10012. (delete-file "spec/addressable/net_http_compat_spec.rb")
  10013. #t)))))
  10014. (native-inputs
  10015. `(("ruby-rspec" ,ruby-rspec)
  10016. ("bundler" ,bundler)
  10017. ("ruby-idn-ruby" ,ruby-idn-ruby)
  10018. ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
  10019. ("ruby-rspec-its" ,ruby-rspec-its-minimal)
  10020. ("ruby-yard" ,ruby-yard)
  10021. ("ruby-simplecov" ,ruby-simplecov)))
  10022. (propagated-inputs
  10023. `(("ruby-public-suffix" ,ruby-public-suffix)))
  10024. (home-page "https://github.com/sporkmonger/addressable")
  10025. (synopsis "Alternative URI implementation")
  10026. (description "Addressable is a replacement for the URI implementation that
  10027. is part of Ruby's standard library. It more closely conforms to RFC 3986,
  10028. RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
  10029. (license license:asl2.0)))
  10030. (define-public ruby-colorize
  10031. (package
  10032. (name "ruby-colorize")
  10033. (version "0.8.1")
  10034. (source (origin
  10035. (method url-fetch)
  10036. (uri (rubygems-uri "colorize" version))
  10037. (sha256
  10038. (base32
  10039. "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
  10040. (build-system ruby-build-system)
  10041. (arguments
  10042. '(#:phases (modify-phases %standard-phases
  10043. (add-before 'check 'remove-codeclimate-dependency
  10044. (lambda _
  10045. (substitute* "test/test_colorize.rb"
  10046. ;; Do not hook the tests into the online CodeClimate
  10047. ;; service which is unnecessary for these tests.
  10048. (("require 'codeclimate-test-reporter'")
  10049. "")
  10050. (("CodeClimate.*") ""))
  10051. #t)))))
  10052. (synopsis "Add color effects to the @code{String} class")
  10053. (description
  10054. "This package extends the @code{String} class and adds a
  10055. @code{ColorizedString} with methods to set text color, background color,
  10056. and text effects.")
  10057. (home-page "https://github.com/fazibear/colorize")
  10058. (license license:gpl2+)))
  10059. (define-public ruby-colorator
  10060. (package
  10061. (name "ruby-colorator")
  10062. (version "1.1.0")
  10063. (source (origin
  10064. (method url-fetch)
  10065. (uri (rubygems-uri "colorator" version))
  10066. (sha256
  10067. (base32
  10068. "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
  10069. (build-system ruby-build-system)
  10070. (arguments
  10071. ;; No test target
  10072. `(#:tests? #f))
  10073. (home-page "http://octopress.org/colorator/")
  10074. (synopsis "Terminal color library")
  10075. (description "Colorator is a Ruby gem that helps you colorize your text
  10076. for the terminal.")
  10077. (license license:expat)))
  10078. (define-public ruby-command-line-reporter
  10079. (package
  10080. (name "ruby-command-line-reporter")
  10081. (version "4.0.1")
  10082. (source (origin
  10083. (method url-fetch)
  10084. (uri (rubygems-uri "command_line_reporter" version))
  10085. (sha256
  10086. (base32
  10087. "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
  10088. (build-system ruby-build-system)
  10089. (arguments
  10090. ;; No Rakefile
  10091. `(#:tests? #f
  10092. #:phases
  10093. (modify-phases %standard-phases
  10094. (add-before 'build 'fix-dependencies
  10095. (lambda _
  10096. (substitute* ".gemspec"
  10097. ;; colored is unmaintained
  10098. (("colored") "colorator")
  10099. ;; colorator version
  10100. (("= 1.2") "= 1.1"))
  10101. #t)))))
  10102. (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
  10103. (home-page "https://github.com/wbailey/command_line_reporter")
  10104. (synopsis "Report production while executing Ruby scripts")
  10105. (description "This gem provides a DSL that makes it easy to write reports
  10106. of various types in ruby. It eliminates the need to litter your source with
  10107. puts statements, instead providing a more readable, expressive interface to
  10108. your application.")
  10109. (license license:asl2.0)))
  10110. (define-public ruby-command-line-reporter-3
  10111. (package
  10112. (inherit ruby-command-line-reporter)
  10113. (version "3.3.6")
  10114. (source (origin
  10115. (method url-fetch)
  10116. (uri (rubygems-uri "command_line_reporter" version))
  10117. (sha256
  10118. (base32
  10119. "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
  10120. (define-public ruby-kpeg
  10121. (package
  10122. (name "ruby-kpeg")
  10123. (version "1.1.0")
  10124. (source
  10125. (origin
  10126. (method url-fetch)
  10127. (uri (rubygems-uri "kpeg" version))
  10128. (sha256
  10129. (base32
  10130. "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
  10131. (build-system ruby-build-system)
  10132. (native-inputs
  10133. `(("ruby-hoe" ,ruby-hoe)))
  10134. (synopsis "PEG library for Ruby")
  10135. (description "KPeg is a simple PEG library for Ruby. It provides an API as
  10136. well as native grammar to build the grammar. KPeg supports direct left
  10137. recursion of rules via the
  10138. @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
  10139. technique.")
  10140. (home-page "https://github.com/evanphx/kpeg")
  10141. (license license:expat)))
  10142. (define-public ruby-rdoc
  10143. (package
  10144. (name "ruby-rdoc")
  10145. (version "6.2.0")
  10146. (source
  10147. (origin
  10148. (method git-fetch)
  10149. (uri (git-reference
  10150. (url "https://github.com/ruby/rdoc")
  10151. (commit (string-append "v" version))))
  10152. (file-name (git-file-name name version))
  10153. (sha256
  10154. (base32
  10155. "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
  10156. (build-system ruby-build-system)
  10157. (arguments
  10158. `(#:phases
  10159. (modify-phases %standard-phases
  10160. (add-after 'unpack 'patch-gemspec
  10161. ;; TODO: Remove after next release is tagged.
  10162. (lambda _
  10163. (substitute* "rdoc.gemspec"
  10164. (("\"lib/rdoc/generator/template/darkfish/js/\
  10165. jquery\\.js\", ") ""))
  10166. #t))
  10167. (add-before 'build 'generate
  10168. ;; 'gem build' doesn't honor Rakefile dependencies (see:
  10169. ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
  10170. (lambda _
  10171. (invoke "rake" "generate"))))))
  10172. (native-inputs
  10173. `(("bundler" ,bundler)
  10174. ("ruby-kpeg" ,ruby-kpeg)
  10175. ("ruby-racc" ,ruby-racc)
  10176. ("ruby-rubocop" ,ruby-rubocop)))
  10177. (home-page "https://ruby.github.io/rdoc/")
  10178. (synopsis "HTML and command-line documentation utility")
  10179. (description "RDoc produces HTML and command-line documentation for Ruby
  10180. projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
  10181. documentation from the command-line.")
  10182. (license license:gpl2+)))
  10183. (define-public ruby-sass-listen
  10184. (package
  10185. (name "ruby-sass-listen")
  10186. (version "4.0.0")
  10187. (source (origin
  10188. (method url-fetch)
  10189. (uri (rubygems-uri "sass-listen" version))
  10190. (sha256
  10191. (base32
  10192. "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
  10193. (build-system ruby-build-system)
  10194. (arguments
  10195. ;; No test target
  10196. `(#:tests? #f))
  10197. (propagated-inputs
  10198. `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
  10199. ("ruby-rb-inotify" ,ruby-rb-inotify)))
  10200. (home-page "https://github.com/sass/listen")
  10201. (synopsis "File modification notification library")
  10202. (description "The Listen gem listens to file modifications and notifies you
  10203. about the changes.")
  10204. (license license:expat)))
  10205. (define-public ruby-terminfo
  10206. (package
  10207. (name "ruby-terminfo")
  10208. (version "0.1.1")
  10209. (source
  10210. (origin
  10211. (method url-fetch)
  10212. (uri (rubygems-uri "ruby-terminfo" version))
  10213. (sha256
  10214. (base32
  10215. "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
  10216. (build-system ruby-build-system)
  10217. (arguments
  10218. `(#:test-target "test"
  10219. ;; Rakefile requires old packages and would need modification to
  10220. ;; work with current software.
  10221. #:tests? #f))
  10222. (inputs
  10223. `(("ncurses" ,ncurses)))
  10224. (native-inputs
  10225. `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
  10226. ("ruby-rdoc" ,ruby-rdoc)))
  10227. (home-page "http://www.a-k-r.org/ruby-terminfo/")
  10228. (synopsis "Terminfo binding for Ruby")
  10229. (description "Ruby-terminfo provides terminfo binding for Ruby.")
  10230. (license license:bsd-3)))
  10231. (define-public ruby-diffy
  10232. (package
  10233. (name "ruby-diffy")
  10234. (version "3.2.1")
  10235. (source
  10236. (origin
  10237. (method url-fetch)
  10238. (uri (rubygems-uri "diffy" version))
  10239. (sha256
  10240. (base32
  10241. "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
  10242. (build-system ruby-build-system)
  10243. (arguments
  10244. ;; No tests
  10245. `(#:tests? #f))
  10246. (native-inputs
  10247. `(("ruby-rspec" ,ruby-rspec)))
  10248. (home-page "https://github.com/samg/diffy")
  10249. (synopsis "Convenient diffing in ruby")
  10250. (description "Diffy provides a convenient way to generate a diff from two
  10251. strings or files.")
  10252. (license license:expat)))
  10253. (define-public ruby-sass-spec
  10254. (package
  10255. (name "ruby-sass-spec")
  10256. (version "3.5.4")
  10257. (source
  10258. (origin
  10259. (method git-fetch)
  10260. (uri (git-reference
  10261. (url "https://github.com/sass/sass-spec")
  10262. (commit (string-append "v" version))))
  10263. (file-name (git-file-name name version))
  10264. (sha256
  10265. (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
  10266. (build-system ruby-build-system)
  10267. (propagated-inputs
  10268. `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
  10269. ("ruby-diffy" ,ruby-diffy)
  10270. ("ruby-terminfo" ,ruby-terminfo)))
  10271. (arguments
  10272. `(;; This package contains tests for a sass implementation, and the to
  10273. ;; avoid any circular dependencies, the tests are not run here
  10274. #:tests? #f
  10275. #:phases
  10276. (modify-phases %standard-phases
  10277. (add-after 'unpack 'patch-test
  10278. (lambda _
  10279. (delete-file "spec/values/colors/alpha_hex-3.5/error")
  10280. (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
  10281. (("string") "color")))))))
  10282. (home-page "https://github.com/sass/sass-spec")
  10283. (synopsis "Test suite for Sass")
  10284. (description "Sass Spec is a test suite for Sass. Test cases are all in
  10285. the @file{spec} directory.")
  10286. (license license:expat)))
  10287. (define-public ruby-sass
  10288. (package
  10289. (name "ruby-sass")
  10290. (version "3.6.0")
  10291. (source (origin
  10292. (method url-fetch)
  10293. (uri (rubygems-uri "sass" version))
  10294. (sha256
  10295. (base32
  10296. "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
  10297. (build-system ruby-build-system)
  10298. (propagated-inputs
  10299. `(("ruby-sass-listen" ,ruby-sass-listen)))
  10300. (native-inputs
  10301. `(("ruby-sass-spec" ,ruby-sass-spec)
  10302. ("ruby-mathn" ,ruby-mathn)
  10303. ("ruby-cmath" ,ruby-cmath)))
  10304. (home-page "https://sass-lang.com/")
  10305. (synopsis "CSS extension language")
  10306. (description "Sass is a CSS extension language. It extends CSS with
  10307. features that don't exist yet like variables, nesting, mixins and inheritance.")
  10308. (license license:expat)))
  10309. (define-public ruby-sassc
  10310. (package
  10311. (name "ruby-sassc")
  10312. (version "2.4.0")
  10313. (source
  10314. (origin
  10315. (method url-fetch)
  10316. (uri (rubygems-uri "sassc" version))
  10317. (sha256
  10318. (base32
  10319. "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
  10320. (build-system ruby-build-system)
  10321. (arguments
  10322. '(#:modules ((guix build ruby-build-system)
  10323. (guix build utils)
  10324. (ice-9 textual-ports))
  10325. #:phases
  10326. (modify-phases %standard-phases
  10327. ;; TODO: This would be better as a snippet, but the ruby-build-system
  10328. ;; doesn't seem to support that
  10329. (add-after 'unpack 'remove-libsass
  10330. (lambda _
  10331. (delete-file-recursively "ext")
  10332. (with-atomic-file-replacement "sassc.gemspec"
  10333. (lambda (in out)
  10334. (let* ((gemspec (get-string-all in))
  10335. (index (string-contains gemspec "libsass_dir")))
  10336. (display (string-append
  10337. (string-take gemspec index)
  10338. "\nend\n")
  10339. out))))
  10340. #t))
  10341. (add-after 'unpack 'dont-check-the-libsass-version
  10342. (lambda _
  10343. (substitute* "test/native_test.rb"
  10344. (("assert_equal.*Native\\.version") ""))
  10345. #t))
  10346. (add-after 'unpack 'remove-git-from-gemspec
  10347. (lambda _
  10348. (substitute* "sassc.gemspec"
  10349. (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
  10350. #t))
  10351. (add-after 'unpack 'remove-extensions-from-gemspec
  10352. (lambda _
  10353. (substitute* "sassc.gemspec"
  10354. (("\\[\"ext/extconf.rb\"\\]") "[]"))
  10355. #t))
  10356. (add-after 'unpack 'fix-Rakefile
  10357. (lambda _
  10358. (substitute* "Rakefile"
  10359. (("test: 'compile:libsass'") ":test"))
  10360. #t))
  10361. (add-after 'unpack 'remove-unnecessary-dependencies
  10362. (lambda _
  10363. (substitute* "test/test_helper.rb"
  10364. (("require \"pry\"") ""))
  10365. #t))
  10366. (add-before 'build 'patch-native.rb
  10367. (lambda* (#:key inputs #:allow-other-keys)
  10368. (substitute* "lib/sassc/native.rb"
  10369. ((".*gem_root = spec.gem_dir") "")
  10370. (("ffi_lib .*\n")
  10371. (string-append
  10372. "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
  10373. #t))
  10374. ;; The gemspec still references the libsass files, so just keep the
  10375. ;; one in the gem.
  10376. (delete 'extract-gemspec))))
  10377. (propagated-inputs
  10378. `(("ruby-ffi" ,ruby-ffi)
  10379. ("ruby-rake" ,ruby-rake)))
  10380. (inputs
  10381. `(("libsass" ,libsass)))
  10382. (native-inputs
  10383. `(("bundler" ,bundler)
  10384. ("ruby-rake-compiler" ,ruby-rake-compiler)
  10385. ("ruby-minitest-around" ,ruby-minitest-around)
  10386. ("ruby-test-construct" ,ruby-test-construct)))
  10387. (synopsis "Use libsss from Ruby")
  10388. (description
  10389. "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
  10390. bindings to the libsass library. This enables rendering
  10391. @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
  10392. (home-page "https://github.com/sass/sassc-ruby")
  10393. (license license:expat)))
  10394. (define-public ruby-jekyll-sass-converter
  10395. (package
  10396. (name "ruby-jekyll-sass-converter")
  10397. (version "2.1.0")
  10398. (source (origin
  10399. (method url-fetch)
  10400. (uri (rubygems-uri "jekyll-sass-converter" version))
  10401. (sha256
  10402. (base32
  10403. "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"))))
  10404. (build-system ruby-build-system)
  10405. (propagated-inputs
  10406. `(("ruby-sass" ,ruby-sass)))
  10407. (arguments
  10408. ;; No rakefile
  10409. `(#:tests? #f))
  10410. (home-page "https://github.com/jekyll/jekyll-sass-converter")
  10411. (synopsis "Sass converter for Jekyll")
  10412. (description "This gem provide built-in support for the Sass converter
  10413. in Jekyll.")
  10414. (license license:expat)))
  10415. (define-public ruby-jekyll-watch
  10416. (package
  10417. (name "ruby-jekyll-watch")
  10418. (version "2.1.2")
  10419. (source (origin
  10420. (method url-fetch)
  10421. (uri (rubygems-uri "jekyll-watch" version))
  10422. (sha256
  10423. (base32
  10424. "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
  10425. (build-system ruby-build-system)
  10426. (propagated-inputs
  10427. `(("ruby-listen" ,ruby-listen)))
  10428. (arguments
  10429. ;; No rakefile
  10430. `(#:tests? #f))
  10431. (home-page "https://github.com/jekyll/jekyll-watch")
  10432. (synopsis "Jekyll auto-rebuild support")
  10433. (description "This gems add the @code{--watch} switch to the jekyll CLI
  10434. interface. It allows Jekyll to rebuild your site when a file changes.")
  10435. (license license:expat)))
  10436. (define-public ruby-parallel
  10437. (package
  10438. (name "ruby-parallel")
  10439. (version "1.13.0")
  10440. (source
  10441. (origin
  10442. (method git-fetch)
  10443. (uri (git-reference
  10444. (url "https://github.com/grosser/parallel")
  10445. (commit (string-append "v" version))))
  10446. (file-name (git-file-name name version))
  10447. (sha256
  10448. (base32
  10449. "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
  10450. (build-system ruby-build-system)
  10451. (arguments
  10452. `(;; TODO 3 test failures
  10453. ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
  10454. ;; open unnecessary pipes
  10455. ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
  10456. ;; SQLite in processes
  10457. ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
  10458. ;; SQLite in threads
  10459. #:tests? #f
  10460. #:test-target "rspec-rerun:spec"
  10461. #:phases
  10462. (modify-phases %standard-phases
  10463. (add-after 'unpack 'patch-Gemfile
  10464. (lambda _
  10465. (substitute* "Gemfile"
  10466. (("gem 'rspec-legacy_formatters'") "")
  10467. (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
  10468. (add-before 'check 'delete-Gemfile.lock
  10469. (lambda _
  10470. ;; Bundler isn't being used for fetching dependendencies, so
  10471. ;; delete the Gemfile.lock
  10472. (delete-file "Gemfile.lock")
  10473. #t))
  10474. (add-before 'build 'patch-gemspec
  10475. (lambda _
  10476. (substitute* "parallel.gemspec"
  10477. (("git ls-files") "find"))
  10478. #t)))))
  10479. (native-inputs
  10480. `(("ruby-rspec" ,ruby-rspec)
  10481. ("ruby-rspec-rerun" ,ruby-rspec-rerun)
  10482. ("bundler" ,bundler)
  10483. ("ruby-activerecord" ,ruby-activerecord)
  10484. ("ruby-progressbar" ,ruby-progressbar)
  10485. ("ruby-bump" ,ruby-bump)
  10486. ("procps" ,procps)
  10487. ("lsof" ,lsof)
  10488. ("ruby-mysql2" ,ruby-mysql2)
  10489. ("ruby-sqlite3" ,ruby-sqlite3)
  10490. ("ruby-i18n" ,ruby-i18n)))
  10491. (home-page "https://github.com/grosser/parallel")
  10492. (synopsis "Parallel processing in Ruby")
  10493. (description "Parallel allows you to run any code in parallel Processes
  10494. (to use all CPUs) or Threads(to speedup blocking operations). It is best
  10495. suited for map-reduce or e.g. parallel downloads/uploads.")
  10496. (license license:expat)))
  10497. (define-public ruby-cane
  10498. (package
  10499. (name "ruby-cane")
  10500. (version "3.0.0")
  10501. (source (origin
  10502. (method url-fetch)
  10503. (uri (rubygems-uri "cane" version))
  10504. (sha256
  10505. (base32
  10506. "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
  10507. (build-system ruby-build-system)
  10508. (arguments `(#:tests? #f)); No rakefile
  10509. (home-page "https://github.com/square/cane")
  10510. (propagated-inputs
  10511. `(("ruby-parallel" ,ruby-parallel)))
  10512. (synopsis "Code quality threshold checking")
  10513. (description "Cane fails your build if code quality thresholds are not met.")
  10514. (license license:asl2.0)))
  10515. (define-public ruby-morecane
  10516. (package
  10517. (name "ruby-morecane")
  10518. (version "0.2.0")
  10519. (source (origin
  10520. (method url-fetch)
  10521. (uri (rubygems-uri "morecane" version))
  10522. (sha256
  10523. (base32
  10524. "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
  10525. (build-system ruby-build-system)
  10526. (home-page "https://github.com/yob/morecane")
  10527. (arguments `(#:tests? #f)); No rakefile
  10528. (propagated-inputs
  10529. `(("ruby-parallel" ,ruby-parallel)))
  10530. (synopsis "Extra checks for cane")
  10531. (description "The cane gem provides a great framework for running quality
  10532. checks over your ruby project as part of continuous integration build. It
  10533. comes with a few checks out of the box, but also provides an API for loading
  10534. custom checks. This gem provides a set of additional checks.")
  10535. (license license:expat)))
  10536. (define-public ruby-pdf-reader
  10537. (package
  10538. (name "ruby-pdf-reader")
  10539. (version "2.4.0")
  10540. (source (origin
  10541. (method git-fetch) ;no test in distributed gem archive
  10542. (uri (git-reference
  10543. (url "https://github.com/yob/pdf-reader")
  10544. (commit (string-append "v" version))))
  10545. (file-name (git-file-name name version))
  10546. (sha256
  10547. (base32
  10548. "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
  10549. (build-system ruby-build-system)
  10550. (arguments `(#:test-target "spec"
  10551. #:phases (modify-phases %standard-phases
  10552. (add-after 'unpack 'do-not-use-bundler
  10553. (lambda _
  10554. (substitute* "spec/spec_helper.rb"
  10555. ((".*[Bb]undler.*") ""))
  10556. #t)))))
  10557. (native-inputs
  10558. `(("ruby-rspec" ,ruby-rspec)
  10559. ("ruby-cane" ,ruby-cane)
  10560. ("ruby-morecane" ,ruby-morecane)))
  10561. (propagated-inputs
  10562. `(("ruby-afm" ,ruby-afm)
  10563. ("ruby-ascii85" ,ruby-ascii85)
  10564. ("ruby-hashery" ,ruby-hashery)
  10565. ("ruby-rc4" ,ruby-rc4)
  10566. ("ruby-ttfunk" ,ruby-ttfunk)))
  10567. (home-page "https://github.com/yob/pdf-reader")
  10568. (synopsis "PDF parser in Ruby")
  10569. (description "The PDF::Reader library implements a PDF parser conforming as
  10570. much as possible to the PDF specification from Adobe. It provides programmatic
  10571. access to the contents of a PDF file with a high degree of flexibility.")
  10572. (license license:gpl3+)))
  10573. (define-public ruby-pdf-inspector
  10574. (let ((revision "1")
  10575. (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
  10576. (package
  10577. (name "ruby-pdf-inspector")
  10578. (version (git-version "1.3.0" revision commit))
  10579. (source (origin
  10580. (method git-fetch)
  10581. (uri (git-reference
  10582. (url "https://github.com/prawnpdf/pdf-inspector")
  10583. (commit commit)))
  10584. (file-name (git-file-name name version))
  10585. (sha256
  10586. (base32
  10587. "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
  10588. (build-system ruby-build-system)
  10589. (arguments
  10590. `(#:test-target "spec"
  10591. #:phases (modify-phases %standard-phases
  10592. (add-before 'build 'drop-signing-key-requirement
  10593. (lambda _
  10594. (substitute* "pdf-inspector.gemspec"
  10595. (("spec.signing_key =.*")
  10596. "spec.signing_key = nil"))
  10597. #t))
  10598. (replace 'check
  10599. (lambda _
  10600. (substitute* "pdf-inspector.gemspec"
  10601. ((".*rubocop.*") "")
  10602. ((".*yard.*") ""))
  10603. (invoke "rspec"))))))
  10604. (native-inputs
  10605. `(("ruby-rspec" ,ruby-rspec)))
  10606. (propagated-inputs
  10607. `(("ruby-pdf-reader" ,ruby-pdf-reader)))
  10608. (home-page "https://github.com/prawnpdf/pdf-inspector")
  10609. (synopsis "Analysis classes for inspecting PDF output")
  10610. (description "This library provides a number of PDF::Reader based tools for
  10611. use in testing PDF output. Presently, the primary purpose of this tool is to
  10612. support the tests found in Prawn, a pure Ruby PDF generation library.")
  10613. (license %prawn-project-licenses))))
  10614. (define-public ruby-pdf-core
  10615. (package
  10616. (name "ruby-pdf-core")
  10617. (version "0.8.1")
  10618. (source (origin
  10619. (method url-fetch)
  10620. (uri (rubygems-uri "pdf-core" version))
  10621. (sha256
  10622. (base32
  10623. "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
  10624. (build-system ruby-build-system)
  10625. (arguments
  10626. ; No test target
  10627. `(#:tests? #f))
  10628. (home-page "https://github.com/prawnpdf/pdf-core")
  10629. (synopsis "Low level PDF features for Prawn")
  10630. (description "This is an experimental gem that extracts low-level PDF
  10631. functionality from Prawn.")
  10632. (license license:gpl3+)))
  10633. (define-public ruby-prawn
  10634. ;; There hasn't been a new release since 2017/03/17.
  10635. (let ((revision "1")
  10636. (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
  10637. (package
  10638. (name "ruby-prawn")
  10639. (version (git-version "2.2.2" revision commit))
  10640. (source (origin
  10641. (method git-fetch)
  10642. (uri (git-reference
  10643. (url "https://github.com/prawnpdf/prawn")
  10644. (commit commit)))
  10645. (file-name (git-file-name name version))
  10646. (sha256
  10647. (base32
  10648. "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
  10649. (build-system ruby-build-system)
  10650. (arguments
  10651. `(#:phases
  10652. (modify-phases %standard-phases
  10653. (add-before 'build 'drop-signing-key-requirement
  10654. (lambda _
  10655. (substitute* "prawn.gemspec"
  10656. (("spec.signing_key =.*")
  10657. "spec.signing_key = nil"))
  10658. #t))
  10659. (replace 'check
  10660. (lambda* (#:key tests? #:allow-other-keys)
  10661. (when tests?
  10662. ;; The Prawn manual test fails (see:
  10663. ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
  10664. ;; it.
  10665. (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
  10666. #t)))))
  10667. (propagated-inputs
  10668. `(("ruby-pdf-core" ,ruby-pdf-core)
  10669. ("ruby-ttfunk" ,ruby-ttfunk)))
  10670. (native-inputs
  10671. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  10672. ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
  10673. ("ruby-rspec" ,ruby-rspec)
  10674. ("ruby-simplecov" ,ruby-simplecov)
  10675. ("ruby-yard" ,ruby-yard)))
  10676. (home-page "https://prawnpdf.org/api-docs/2.0/")
  10677. (synopsis "PDF generation for Ruby")
  10678. (description "Prawn is a pure Ruby PDF generation library.")
  10679. (license %prawn-project-licenses))))
  10680. (define-public ruby-prawn-table
  10681. (package
  10682. (name "ruby-prawn-table")
  10683. (version "0.2.2")
  10684. (source (origin
  10685. (method url-fetch)
  10686. (uri (rubygems-uri "prawn-table" version))
  10687. (sha256
  10688. (base32
  10689. "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
  10690. (build-system ruby-build-system)
  10691. (propagated-inputs
  10692. `(("ruby-prawn" ,ruby-prawn)
  10693. ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
  10694. (native-inputs
  10695. `(("bundler" ,bundler)
  10696. ("ruby-yard" ,ruby-yard)
  10697. ("ruby-mocha" ,ruby-mocha)
  10698. ("ruby-coderay" ,ruby-coderay)
  10699. ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
  10700. ("ruby-simplecov" ,ruby-simplecov)
  10701. ("ruby-rspec-2" ,ruby-rspec-2)))
  10702. (arguments
  10703. '(;; TODO: 1 test fails
  10704. ;; Failure/Error: pdf.page_count.should == 1
  10705. ;; expected: 1
  10706. ;; got: 2 (using ==)
  10707. ;; # ./spec/table_spec.rb:1308
  10708. ;;
  10709. ;; 225 examples, 1 failure
  10710. #:tests? #f
  10711. #:phases
  10712. (modify-phases %standard-phases
  10713. (add-before 'check 'patch-gemspec
  10714. (lambda _
  10715. (substitute* "prawn-table.gemspec"
  10716. ;; Loosen the requirement for pdf-inspector
  10717. (("~> 1\\.1\\.0") ">= 0")
  10718. ;; Loosen the requirement for pdf-reader
  10719. (("~> 1\\.2") ">= 0"))))
  10720. (replace 'check
  10721. (lambda* (#:key tests? #:allow-other-keys)
  10722. (when tests?
  10723. (invoke "rspec"))
  10724. #t)))))
  10725. (home-page "https://github.com/prawnpdf/prawn-table")
  10726. (synopsis "Tables support for Prawn")
  10727. (description "This gem provides tables support for Prawn.")
  10728. (license license:gpl3+)))
  10729. (define-public ruby-kramdown
  10730. (package
  10731. (name "ruby-kramdown")
  10732. (version "2.3.1")
  10733. (source (origin
  10734. (method url-fetch)
  10735. (uri (rubygems-uri "kramdown" version))
  10736. (sha256
  10737. (base32
  10738. "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
  10739. (build-system ruby-build-system)
  10740. (arguments `(#:tests? #f)); FIXME: some test failures
  10741. (native-inputs
  10742. `(("ruby-prawn" ,ruby-prawn)
  10743. ("ruby-prawn-table" ,ruby-prawn-table)))
  10744. (home-page "https://kramdown.gettalong.org/")
  10745. (synopsis "Markdown parsing and converting library")
  10746. (description "Kramdown is a library for parsing and converting a superset
  10747. of Markdown. It is completely written in Ruby, supports standard Markdown
  10748. (with some minor modifications) and various extensions that have been made
  10749. popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
  10750. (license license:expat)))
  10751. (define-public ruby-kramdown-parser-gfm
  10752. (package
  10753. (name "ruby-kramdown-parser-gfm")
  10754. (version "1.1.0")
  10755. (source
  10756. (origin
  10757. (method url-fetch)
  10758. (uri (rubygems-uri "kramdown-parser-gfm" version))
  10759. (sha256
  10760. (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
  10761. (build-system ruby-build-system)
  10762. (arguments
  10763. `(#:tests? #f)) ;no rakefile
  10764. (propagated-inputs
  10765. `(("ruby-kramdown" ,ruby-kramdown)))
  10766. (synopsis "Kramdown parser for the GFM dialect of Markdown")
  10767. (description
  10768. "This is a parser for kramdown that converts Markdown documents in the
  10769. GFM dialect to HTML.")
  10770. (home-page "https://github.com/kramdown/parser-gfm")
  10771. (license license:expat)))
  10772. (define-public ruby-http-parser.rb
  10773. (package
  10774. (name "ruby-http-parser.rb")
  10775. (version "0.6.0")
  10776. (source
  10777. (origin
  10778. (method url-fetch)
  10779. (uri (rubygems-uri "http_parser.rb" version))
  10780. (sha256
  10781. (base32
  10782. "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
  10783. (build-system ruby-build-system)
  10784. (arguments
  10785. ;; No tests
  10786. `(#:tests? #f))
  10787. (native-inputs
  10788. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  10789. ("ruby-rspec" ,ruby-rspec)))
  10790. (home-page "https://github.com/tmm1/http_parser.rb")
  10791. (synopsis "HTTP parser un Ruby")
  10792. (description "This gem is a simple callback-based HTTP request/response
  10793. parser for writing http servers, clients and proxies.")
  10794. (license license:expat)))
  10795. (define-public ruby-em-websocket
  10796. (package
  10797. (name "ruby-em-websocket")
  10798. (version "0.5.1")
  10799. (source
  10800. (origin
  10801. (method url-fetch)
  10802. (uri (rubygems-uri "em-websocket" version))
  10803. (sha256
  10804. (base32
  10805. "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
  10806. (build-system ruby-build-system)
  10807. (arguments
  10808. ;; No tests
  10809. `(#:tests? #f))
  10810. (propagated-inputs
  10811. `(("ruby-eventmachine" ,ruby-eventmachine)
  10812. ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
  10813. (native-inputs
  10814. `(("bundler" ,bundler)
  10815. ("ruby-rspec" ,ruby-rspec)))
  10816. (home-page "https://github.com/igrigorik/em-websocket")
  10817. (synopsis "EventMachine based WebSocket server")
  10818. (description "Em-websocket is an EventMachine based WebSocket server
  10819. implementation.")
  10820. (license license:expat)))
  10821. (define-public ruby-rouge
  10822. (package
  10823. (name "ruby-rouge")
  10824. (version "3.21.0")
  10825. (source (origin
  10826. (method url-fetch)
  10827. (uri (rubygems-uri "rouge" version))
  10828. (sha256
  10829. (base32
  10830. "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
  10831. (build-system ruby-build-system)
  10832. (arguments `(#:tests? #f)); No rakefile
  10833. (home-page "http://rouge.jneen.net/")
  10834. (synopsis "Code highlighter")
  10835. (description "Rouge is a code highlighter written in Ruby. It supports more
  10836. than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
  10837. is compatible with stylesheets designed for pygments.")
  10838. (license (list
  10839. ;; rouge is licensed under expat
  10840. license:expat
  10841. ;; pygments is licensed under bsd-2
  10842. license:bsd-2))))
  10843. (define-public ruby-hashie
  10844. (package
  10845. (name "ruby-hashie")
  10846. (version "3.6.0")
  10847. (source (origin
  10848. (method url-fetch)
  10849. (uri (rubygems-uri "hashie" version))
  10850. (sha256
  10851. (base32
  10852. "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
  10853. (build-system ruby-build-system)
  10854. (native-inputs
  10855. `(("bundler" ,bundler)))
  10856. (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
  10857. (home-page "https://github.com/intridea/hashie")
  10858. (synopsis "Extensions to Ruby Hashes")
  10859. (description "Hashie is a collection of classes and mixins that make Ruby
  10860. hashes more powerful.")
  10861. (license license:expat)))
  10862. (define-public ruby-heredoc-unindent
  10863. (package
  10864. (name "ruby-heredoc-unindent")
  10865. (version "1.2.0")
  10866. (source (origin
  10867. (method url-fetch)
  10868. (uri (rubygems-uri "heredoc_unindent" version))
  10869. (sha256
  10870. (base32
  10871. "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
  10872. (build-system ruby-build-system)
  10873. (native-inputs
  10874. `(("ruby-hoe" ,ruby-hoe)))
  10875. (home-page "https://github.com/adrianomitre/heredoc_unindent")
  10876. (synopsis "Heredoc indentation cleaner")
  10877. (description "This gem removes common margin from indented strings, such
  10878. as the ones produced by indented heredocs. In other words, it strips out
  10879. leading whitespace chars at the beginning of each line, but only as much as
  10880. the line with the smallest margin.
  10881. It is acknowledged that many strings defined by heredocs are just code and
  10882. fact is that most parsers are insensitive to indentation. If, however, the
  10883. strings are to be used otherwise, be it for printing or testing, the extra
  10884. indentation will probably be an issue and hence this gem.")
  10885. (license license:expat)))
  10886. (define-public ruby-safe-yaml
  10887. (package
  10888. (name "ruby-safe-yaml")
  10889. (version "1.0.5")
  10890. (source
  10891. (origin
  10892. (method git-fetch)
  10893. (uri (git-reference
  10894. (url "https://github.com/dtao/safe_yaml")
  10895. (commit version)))
  10896. (file-name (git-file-name name version))
  10897. (sha256
  10898. (base32
  10899. "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
  10900. (build-system ruby-build-system)
  10901. (native-inputs
  10902. `(("ruby-rspec" ,ruby-rspec)
  10903. ("ruby-hashie" ,ruby-hashie)
  10904. ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
  10905. (arguments
  10906. '(#:test-target "spec"
  10907. #:phases
  10908. (modify-phases %standard-phases
  10909. (add-before 'check 'set-TZ
  10910. (lambda _
  10911. ;; This test is dependent on the timezone
  10912. ;; spec/transform/to_date_spec.rb:35
  10913. ;; # SafeYAML::Transform::ToDate converts times to the local
  10914. ;; timezone
  10915. (setenv "TZ" "UTC-11")
  10916. #t)))))
  10917. (home-page "https://github.com/dtao/safe_yaml")
  10918. (synopsis "YAML parser")
  10919. (description "The SafeYAML gem provides an alternative implementation of
  10920. YAML.load suitable for accepting user input in Ruby applications.")
  10921. (license license:expat)))
  10922. (define-public ruby-yaml-lint
  10923. (package
  10924. (name "ruby-yaml-lint")
  10925. (version "0.0.10")
  10926. (source
  10927. (origin
  10928. (method git-fetch)
  10929. (uri (git-reference
  10930. (url "https://github.com/Pryz/yaml-lint")
  10931. (commit version)))
  10932. (file-name (git-file-name name version))
  10933. (sha256
  10934. (base32
  10935. "1jz26mxjkdyjbgqp7f9isnzd1i6vkizsswyj1v639nmq31hwfh0d"))))
  10936. (build-system ruby-build-system)
  10937. (arguments
  10938. `(#:phases
  10939. (modify-phases %standard-phases
  10940. (replace 'check
  10941. (lambda* (#:key tests? #:allow-other-keys)
  10942. (when tests?
  10943. (invoke "rspec"))
  10944. #t)))))
  10945. (native-inputs
  10946. `(("ruby-coveralls" ,ruby-coveralls)
  10947. ("ruby-rspec" ,ruby-rspec)
  10948. ("ruby-simplecov" ,ruby-simplecov)))
  10949. (synopsis "Simple YAML check tool")
  10950. (description
  10951. "@code{yaml-lint} will simply try to load the YAML file with the built-in
  10952. Ruby yaml library.")
  10953. (home-page "https://github.com/Pryz/yaml-lint")
  10954. (license license:expat)))
  10955. (define-public ruby-mercenary
  10956. (package
  10957. (name "ruby-mercenary")
  10958. (version "0.4.0")
  10959. (source (origin
  10960. (method url-fetch)
  10961. (uri (rubygems-uri "mercenary" version))
  10962. (sha256
  10963. (base32
  10964. "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
  10965. (build-system ruby-build-system)
  10966. (arguments `(#:test-target "spec"))
  10967. (native-inputs
  10968. `(("bundler" ,bundler)))
  10969. (home-page "https://github.com/jekyll/mercenary")
  10970. (synopsis "Command-line apps library in Ruby")
  10971. (description "Mercenary is a lightweight and flexible library for writing
  10972. command-line apps in Ruby.")
  10973. (license license:expat)))
  10974. (define-public ruby-liquid
  10975. (package
  10976. (name "ruby-liquid")
  10977. (version "4.0.0")
  10978. (source (origin
  10979. (method url-fetch)
  10980. (uri (rubygems-uri "liquid" version))
  10981. (sha256
  10982. (base32
  10983. "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
  10984. (build-system ruby-build-system)
  10985. (arguments `(#:tests? #f)); No rakefile
  10986. (home-page "https://shopify.github.io/liquid/")
  10987. (synopsis "Template language")
  10988. (description "Liquid is a template language written in Ruby. It is used
  10989. to load dynamic content on storefronts.")
  10990. (license license:expat)))
  10991. (define-public ruby-forwardable-extended
  10992. (package
  10993. (name "ruby-forwardable-extended")
  10994. (version "2.6.0")
  10995. (source (origin
  10996. (method url-fetch)
  10997. (uri (rubygems-uri "forwardable-extended" version))
  10998. (sha256
  10999. (base32
  11000. "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
  11001. (build-system ruby-build-system)
  11002. (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
  11003. (home-page "https://github.com/envygeeks/forwardable-extended")
  11004. (synopsis "Delegation to hashes and instance variables in Forwardable")
  11005. (description "Forwardable Extended provides more @code{Forwardable}
  11006. methods for your source as @code{Forwardable::Extended}.")
  11007. (license license:expat)))
  11008. (define-public ruby-pathutil
  11009. (package
  11010. (name "ruby-pathutil")
  11011. (version "0.16.2")
  11012. (source (origin
  11013. (method url-fetch)
  11014. (uri (rubygems-uri "pathutil" version))
  11015. (sha256
  11016. (base32
  11017. "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
  11018. (build-system ruby-build-system)
  11019. (propagated-inputs
  11020. `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
  11021. (native-inputs
  11022. `(("bundler" ,bundler)
  11023. ("ruby-rspec" ,ruby-rspec)))
  11024. ;; Fails with: cannot load such file --
  11025. ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
  11026. (arguments `(#:tests? #f))
  11027. (home-page "https://github.com/envygeeks/pathutil")
  11028. (synopsis "Extended implementation of Pathname")
  11029. (description "Pathutil tries to be a faster pure Ruby implementation of
  11030. Pathname.")
  11031. (license license:expat)))
  11032. (define-public ruby-terminal-table
  11033. (package
  11034. (name "ruby-terminal-table")
  11035. (version "2.0.0")
  11036. (source
  11037. (origin
  11038. (method url-fetch)
  11039. (uri (rubygems-uri "terminal-table" version))
  11040. (sha256
  11041. (base32
  11042. "18rbrh464ysqbdv53iwj0r8frshn65566kyj044cp3x9c2754jwh"))))
  11043. (arguments
  11044. '(#:phases
  11045. (modify-phases %standard-phases
  11046. (add-before 'check 'remove-gemfile-lock
  11047. (lambda _
  11048. (delete-file "Gemfile.lock")))
  11049. (add-before 'check 'remove-unnecessary-dependencies
  11050. (lambda _
  11051. (substitute* "terminal-table.gemspec"
  11052. (("s.add_runtime_dependency.*") "\n")
  11053. (("s.add_development_dependency.*") "\n"))
  11054. (substitute* "Gemfile"
  11055. ((".*tins.*") "\n"))))
  11056. (replace 'check
  11057. (lambda* (#:key tests? #:allow-other-keys)
  11058. (when tests?
  11059. (invoke "rspec")))))))
  11060. (build-system ruby-build-system)
  11061. (propagated-inputs
  11062. `(("ruby-unicode-display-width" ,ruby-unicode-display-width)))
  11063. (native-inputs
  11064. `(("ruby-rspec" ,ruby-rspec)))
  11065. (home-page "https://github.com/tj/terminal-table")
  11066. (synopsis "Simple, feature rich ASCII table generation library")
  11067. (description
  11068. "Terminal Table is a fast and simple, yet feature rich
  11069. table generator written in Ruby. It supports ASCII and
  11070. Unicode formatted tables.")
  11071. (license license:expat)))
  11072. (define-public jekyll
  11073. (package
  11074. (name "jekyll")
  11075. (version "4.2.0")
  11076. (source (origin
  11077. (method url-fetch)
  11078. (uri (rubygems-uri "jekyll" version))
  11079. (sha256
  11080. (base32
  11081. "0cqkh78jw8scrajyx5nla0vwm9fvp2qql3kdcvvplcq9mazy8snq"))))
  11082. (build-system ruby-build-system)
  11083. (arguments
  11084. ;; No rakefile, but a test subdirectory.
  11085. `(#:tests? #f
  11086. #:phases
  11087. (modify-phases %standard-phases
  11088. (add-before 'build 'fix-i18n
  11089. (lambda _
  11090. (substitute* ".gemspec"
  11091. (("~> 0.7") ">= 0.7")
  11092. (("~> 1.14") ">= 1.14"))
  11093. #t)))))
  11094. (propagated-inputs
  11095. `(("ruby-addressable" ,ruby-addressable)
  11096. ("ruby-colorator" ,ruby-colorator)
  11097. ("ruby-em-websocket" ,ruby-em-websocket)
  11098. ("ruby-i18n" ,ruby-i18n)
  11099. ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
  11100. ("ruby-jekyll-watch" ,ruby-jekyll-watch)
  11101. ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
  11102. ("ruby-liquid" ,ruby-liquid)
  11103. ("ruby-mercenary" ,ruby-mercenary)
  11104. ("ruby-pathutil" ,ruby-pathutil)
  11105. ("ruby-rouge" ,ruby-rouge)
  11106. ("ruby-safe-yaml" ,ruby-safe-yaml)
  11107. ("ruby-sassc" ,ruby-sassc)
  11108. ("ruby-terminal-table" ,ruby-terminal-table)))
  11109. (home-page "https://jekyllrb.com/")
  11110. (synopsis "Static site generator")
  11111. (description "Jekyll is a simple, blog aware, static site generator.")
  11112. (license license:expat)))
  11113. (define-public ruby-jekyll-paginate-v2
  11114. (package
  11115. (name "ruby-jekyll-paginate-v2")
  11116. (version "3.0.0")
  11117. (source (origin
  11118. (method url-fetch)
  11119. (uri (rubygems-uri "jekyll-paginate-v2" version))
  11120. (sha256
  11121. (base32
  11122. "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
  11123. (build-system ruby-build-system)
  11124. (propagated-inputs
  11125. `(("jekyll" ,jekyll)))
  11126. (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
  11127. (synopsis "Pagination Generator for Jekyll 3")
  11128. (description "The Pagination Generator forms the core of the pagination
  11129. logic in Jekyll. It calculates and generates the pagination pages.")
  11130. (license license:expat)))
  11131. (define-public ruby-faraday
  11132. (package
  11133. (name "ruby-faraday")
  11134. (version "0.15.4")
  11135. (source
  11136. (origin
  11137. (method url-fetch)
  11138. (uri (rubygems-uri "faraday" version))
  11139. (sha256
  11140. (base32
  11141. "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
  11142. (build-system ruby-build-system)
  11143. (arguments
  11144. '(#:tests? #f))
  11145. (propagated-inputs
  11146. `(("ruby-multipart-post" ,ruby-multipart-post)))
  11147. (synopsis "Ruby HTTP/REST API client library")
  11148. (description
  11149. "Faraday is a HTTP/REST API client library which provides a common
  11150. interface over different adapters.")
  11151. (home-page "https://github.com/lostisland/faraday")
  11152. (license license:expat)))
  11153. (define-public ruby-nio4r
  11154. (package
  11155. (name "ruby-nio4r")
  11156. (version "2.5.2")
  11157. (source
  11158. (origin
  11159. (method url-fetch)
  11160. (uri (rubygems-uri "nio4r" version))
  11161. (sha256
  11162. (base32
  11163. "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
  11164. (build-system ruby-build-system)
  11165. (arguments
  11166. '(#:phases
  11167. (modify-phases %standard-phases
  11168. (add-after 'unpack 'remove-unnecessary-dependencies
  11169. (lambda _
  11170. (substitute* "spec/spec_helper.rb"
  11171. ;; Coveralls is for uploading test coverage information to an
  11172. ;; online service, and thus unnecessary for building the Guix
  11173. ;; package
  11174. (("require \"coveralls\"") "")
  11175. (("Coveralls\\.wear!") "")
  11176. ;; Remove rspec/retry as we are not retrying the tests
  11177. (("require \"rspec/retry\"") "")
  11178. (("config\\.display_try_failure_messages = true") "")
  11179. (("config\\.verbose_retry = true") ""))
  11180. #t))
  11181. (add-before 'check 'compile
  11182. (lambda _
  11183. (invoke "rake" "compile")
  11184. #t))
  11185. (replace 'check
  11186. (lambda* (#:key tests? #:allow-other-keys)
  11187. (when tests?
  11188. (invoke "rspec"))
  11189. #t)))))
  11190. (native-inputs
  11191. `(("bundler" ,bundler)
  11192. ("ruby-rake-compiler" ,ruby-rake-compiler)
  11193. ("ruby-rspec" ,ruby-rspec)
  11194. ("ruby-rubocop" ,ruby-rubocop)))
  11195. (synopsis "New I/O for Ruby")
  11196. (description
  11197. "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
  11198. for scalable network clients and servers.")
  11199. (home-page "https://github.com/socketry/nio4r")
  11200. (license license:expat)))
  11201. (define-public ruby-globalid
  11202. (package
  11203. (name "ruby-globalid")
  11204. (version "0.4.2")
  11205. (source
  11206. (origin
  11207. (method url-fetch)
  11208. (uri (rubygems-uri "globalid" version))
  11209. (sha256
  11210. (base32
  11211. "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
  11212. (build-system ruby-build-system)
  11213. (arguments
  11214. '(;; No included tests
  11215. #:tests? #f))
  11216. (propagated-inputs
  11217. `(("ruby-activesupport" ,ruby-activesupport)))
  11218. (synopsis "Generate URIs idenfitying model instances in Ruby")
  11219. (description
  11220. "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
  11221. uniquely identify it.")
  11222. (home-page "https://rubyonrails.org/")
  11223. (license license:expat)))
  11224. (define-public ruby-sprockets
  11225. (package
  11226. (name "ruby-sprockets")
  11227. (version "3.7.2")
  11228. (source
  11229. (origin
  11230. (method url-fetch)
  11231. (uri (rubygems-uri "sprockets" version))
  11232. (sha256
  11233. (base32
  11234. "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
  11235. (build-system ruby-build-system)
  11236. (arguments
  11237. '(;; No included tests
  11238. #:tests? #f))
  11239. (propagated-inputs
  11240. `(("ruby-concurrent" ,ruby-concurrent)
  11241. ("ruby-rack" ,ruby-rack)))
  11242. (synopsis "Sprockets is a Rack-based asset packaging system")
  11243. (description
  11244. "Sprockets is a Rack-based asset packaging system that concatenates and
  11245. serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
  11246. (home-page "https://github.com/rails/sprockets")
  11247. (license license:expat)))
  11248. (define-public ruby-mustache
  11249. (package
  11250. (name "ruby-mustache")
  11251. (version "1.1.1")
  11252. (source
  11253. (origin
  11254. (method url-fetch)
  11255. (uri (rubygems-uri "mustache" version))
  11256. (sha256
  11257. (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
  11258. (build-system ruby-build-system)
  11259. (native-inputs
  11260. `(("ruby-simplecov" ,ruby-simplecov)))
  11261. (synopsis "framework-agnostic way to render logic-free views")
  11262. (description
  11263. "Mustache is a framework-agnostic way to render logic-free views.
  11264. Think of Mustache as a replacement for your views. Instead of views
  11265. consisting of ERB or HAML with random helpers and arbitrary logic,
  11266. your views are broken into two parts: a Ruby class and an HTML
  11267. template.")
  11268. (home-page "https://github.com/mustache/mustache")
  11269. (license license:expat)))
  11270. (define-public ruby-mustermann
  11271. (package
  11272. (name "ruby-mustermann")
  11273. (version "1.0.3")
  11274. (source
  11275. (origin
  11276. (method url-fetch)
  11277. (uri (rubygems-uri "mustermann" version))
  11278. (sha256
  11279. (base32
  11280. "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
  11281. (build-system ruby-build-system)
  11282. (arguments
  11283. ;; No tests.
  11284. '(#:tests? #f))
  11285. (synopsis "Library implementing patterns that behave like regular expressions")
  11286. (description "Given a string pattern, Mustermann will turn it into an
  11287. object that behaves like a regular expression and has comparable performance
  11288. characteristics.")
  11289. (home-page "https://github.com/sinatra/mustermann")
  11290. (license license:expat)))
  11291. (define-public ruby-html-proofer
  11292. (package
  11293. (name "ruby-html-proofer")
  11294. (version "3.18.5")
  11295. (source
  11296. (origin
  11297. (method git-fetch)
  11298. (uri (git-reference
  11299. (url "https://github.com/gjtorikian/html-proofer")
  11300. (commit (string-append "v" version))))
  11301. (file-name (git-file-name name version))
  11302. (sha256
  11303. (base32
  11304. "1pxb0fajb3l3lm7sqj548qwl7vx6sx3jy7n4cns9d4lqx7s9r9xb"))))
  11305. (build-system ruby-build-system)
  11306. (arguments
  11307. `(;; FIXME: Tests depend on rubocop-standard.
  11308. #:tests? #f))
  11309. (native-inputs
  11310. `(("ruby-awesome-print" ,ruby-awesome-print)
  11311. ("ruby-redcarpet" ,ruby-redcarpet)
  11312. ("ruby-rspec" ,ruby-rspec)
  11313. ("ruby-rubocop" ,ruby-rubocop)
  11314. ("ruby-rubocop-performance" ,ruby-rubocop-performance)
  11315. ("ruby-pry-byebug" ,ruby-pry-byebug)))
  11316. (propagated-inputs
  11317. `(("ruby-addressable" ,ruby-addressable)
  11318. ("ruby-mercenary" ,ruby-mercenary)
  11319. ("ruby-nokogumbo" ,ruby-nokogumbo)
  11320. ("ruby-parallel" ,ruby-parallel)
  11321. ("ruby-rainbow" ,ruby-rainbow)
  11322. ("ruby-typhoeus" ,ruby-typhoeus)
  11323. ("ruby-yell" ,ruby-yell)))
  11324. (synopsis "Test your rendered HTML files to make sure they're accurate")
  11325. (description
  11326. "HTMLProofer is a set of tests to validate your HTML output. These
  11327. tests check if your image references are legitimate, if they have alt tags,
  11328. if your internal links are working, and so on. It's intended to be an
  11329. all-in-one checker for your output.")
  11330. (home-page "https://github.com/gjtorikian/html-proofer")
  11331. (license license:expat)))
  11332. (define-public ruby-htmlentities
  11333. (package
  11334. (name "ruby-htmlentities")
  11335. (version "4.3.4")
  11336. (source
  11337. (origin
  11338. (method url-fetch)
  11339. (uri (rubygems-uri "htmlentities" version))
  11340. (sha256
  11341. (base32
  11342. "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
  11343. (build-system ruby-build-system)
  11344. (arguments
  11345. `(#:phases
  11346. (modify-phases %standard-phases
  11347. (replace 'check
  11348. (lambda _
  11349. (map (lambda (file)
  11350. (invoke "ruby" "-Itest" file))
  11351. (find-files "./test" ".*_test\\.rb")))))))
  11352. (synopsis "Encode and decode (X)HTML entities")
  11353. (description
  11354. "This package provides a module for encoding and decoding (X)HTML
  11355. entities.")
  11356. (home-page "https://github.com/threedaymonk/htmlentities")
  11357. (license license:expat)))
  11358. (define-public ruby-sinatra
  11359. (package
  11360. (name "ruby-sinatra")
  11361. (version "2.0.8.1")
  11362. (source
  11363. (origin
  11364. (method url-fetch)
  11365. (uri (rubygems-uri "sinatra" version))
  11366. (sha256
  11367. (base32
  11368. "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
  11369. (build-system ruby-build-system)
  11370. (arguments
  11371. `(#:phases
  11372. (modify-phases %standard-phases
  11373. ;; See: https://github.com/sinatra/sinatra/issues/1578.
  11374. (add-after 'extract-gemspec 'fix-slow-doc-generation
  11375. (lambda _
  11376. (substitute* "sinatra.gemspec"
  11377. (("\"README.rdoc\"\\.freeze," all)
  11378. (string-append all " \"--exclude=.*\\.md\".freeze,")))
  11379. #t)))))
  11380. (propagated-inputs
  11381. `(("ruby-mustermann" ,ruby-mustermann)
  11382. ("ruby-rack" ,ruby-rack)
  11383. ("ruby-rack-protection" ,ruby-rack-protection)
  11384. ("ruby-tilt" ,ruby-tilt)))
  11385. (synopsis "DSL for quick web applications creation in Ruby")
  11386. (description
  11387. "Sinatra is a DSL for quickly creating web applications in Ruby with
  11388. minimal effort.")
  11389. (home-page "http://sinatrarb.com/")
  11390. (license license:expat)))
  11391. (define-public ruby-thin
  11392. (package
  11393. (name "ruby-thin")
  11394. (version "1.7.2")
  11395. (source
  11396. (origin
  11397. (method url-fetch)
  11398. (uri (rubygems-uri "thin" version))
  11399. (sha256
  11400. (base32
  11401. "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
  11402. (build-system ruby-build-system)
  11403. (arguments
  11404. ;; No tests.
  11405. '(#:tests? #f))
  11406. (propagated-inputs
  11407. `(("ruby-daemons" ,ruby-daemons)
  11408. ("ruby-eventmachine" ,ruby-eventmachine)
  11409. ("ruby-rack" ,ruby-rack)))
  11410. (synopsis "Thin and fast web server for Ruby")
  11411. (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
  11412. @itemize
  11413. @item the Mongrel parser,
  11414. @item Event Machine, a network I/O library with high scalability, performance
  11415. and stability,
  11416. @item Rack, a minimal interface between webservers and Ruby frameworks.
  11417. @end itemize\n")
  11418. (home-page "https://github.com/macournoyer/thin")
  11419. (license license:ruby)))
  11420. (define-public ruby-skinny
  11421. (package
  11422. (name "ruby-skinny")
  11423. (version "0.2.4")
  11424. (source
  11425. (origin
  11426. (method url-fetch)
  11427. (uri (rubygems-uri "skinny" version))
  11428. (sha256
  11429. (base32
  11430. "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
  11431. (build-system ruby-build-system)
  11432. (arguments
  11433. '(#:tests? #f ; No included tests
  11434. #:phases
  11435. (modify-phases %standard-phases
  11436. (add-before 'build 'patch-gemspec
  11437. (lambda _
  11438. (substitute* ".gemspec"
  11439. (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
  11440. "<eventmachine>, [\">= 1.0.0\"")
  11441. (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
  11442. #t)))))
  11443. (propagated-inputs
  11444. `(("ruby-eventmachine" ,ruby-eventmachine)
  11445. ("ruby-thin" ,ruby-thin)))
  11446. (synopsis "Simple, upgradable WebSockets for Ruby Thin")
  11447. (description "Skinny is a simple, upgradable WebSockets for Ruby, using
  11448. the Thin library.")
  11449. (home-page "https://github.com/sj26/skinny")
  11450. (license license:expat)))
  11451. (define-public ruby-sys-filesystem
  11452. (package
  11453. (name "ruby-sys-filesystem")
  11454. (version "1.3.4")
  11455. (source (origin
  11456. (method url-fetch)
  11457. (uri (rubygems-uri "sys-filesystem" version))
  11458. (sha256
  11459. (base32
  11460. "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
  11461. (build-system ruby-build-system)
  11462. (arguments
  11463. '(#:phases (modify-phases %standard-phases
  11464. (add-before 'check 'set-HOME
  11465. (lambda _
  11466. ;; Some tests attempt to stat $HOME. Let them.
  11467. (setenv "HOME" "/tmp")
  11468. #t)))))
  11469. (propagated-inputs
  11470. `(("ruby-ffi" ,ruby-ffi)))
  11471. (native-inputs
  11472. `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
  11473. (synopsis "Gather file system information")
  11474. (description
  11475. "The @code{sys-filesystem} library provides a cross-platform interface
  11476. for gathering file system information, such as disk space and mount points.")
  11477. (home-page "https://github.com/djberg96/sys-filesystem")
  11478. (license license:asl2.0)))
  11479. (define-public mailcatcher
  11480. (package
  11481. (name "mailcatcher")
  11482. (version "0.7.1")
  11483. (source
  11484. (origin
  11485. (method url-fetch)
  11486. (uri (rubygems-uri "mailcatcher" version))
  11487. (sha256
  11488. (base32
  11489. "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
  11490. (build-system ruby-build-system)
  11491. (arguments
  11492. ;; Tests require web/assets which is not included in the output. We
  11493. ;; might be able to fix this by adding the Git repository to the GEM_PATH
  11494. ;; of the tests. See ruby-mysql2.
  11495. '(#:tests? #f
  11496. #:phases
  11497. (modify-phases %standard-phases
  11498. (add-before 'build 'patch-gemspec
  11499. (lambda _
  11500. (substitute* ".gemspec"
  11501. (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
  11502. "<eventmachine>, [\">= 1.0.9.1")
  11503. (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
  11504. (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
  11505. (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
  11506. #t))
  11507. (add-before 'build 'loosen-dependency-contraint
  11508. (lambda _
  11509. (substitute* "lib/mail_catcher.rb"
  11510. (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
  11511. (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
  11512. (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
  11513. (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
  11514. #t)))))
  11515. (inputs
  11516. `(("ruby-eventmachine" ,ruby-eventmachine)
  11517. ("ruby-mail" ,ruby-mail)
  11518. ("ruby-rack" ,ruby-rack)
  11519. ("ruby-sinatra" ,ruby-sinatra)
  11520. ("ruby-skinny" ,ruby-skinny)
  11521. ("ruby-sqlite3" ,ruby-sqlite3)
  11522. ("ruby-thin" ,ruby-thin)))
  11523. (synopsis "SMTP server which catches messages to display them a browser")
  11524. (description
  11525. "MailCatcher runs a super simple SMTP server which catches any message
  11526. sent to it to display in a web interface. Run mailcatcher, set your favourite
  11527. app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
  11528. then check out http://127.0.0.1:1080 to see the mail.")
  11529. (home-page "https://mailcatcher.me")
  11530. (license license:expat)))
  11531. (define-public ruby-backport
  11532. (package
  11533. (name "ruby-backport")
  11534. (version "1.1.2")
  11535. (source
  11536. (origin
  11537. ;; The gem does not include test code, so fetch from the Git repository.
  11538. (method git-fetch)
  11539. (uri (git-reference
  11540. (url "https://github.com/castwide/backport")
  11541. (commit (string-append "v" version))))
  11542. (file-name (git-file-name name version))
  11543. (sha256
  11544. (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
  11545. (build-system ruby-build-system)
  11546. (arguments
  11547. `(#:test-target "spec"))
  11548. (native-inputs
  11549. `(("bundler" ,bundler)
  11550. ("ruby-rspec" ,ruby-rspec)))
  11551. (inputs
  11552. `(("ruby-simplecov" ,ruby-simplecov)))
  11553. (synopsis "Pure Ruby library for event-driven IO")
  11554. (description
  11555. "This package provides a pure Ruby library for event-driven IO.")
  11556. (home-page "https://github.com/castwide/backport")
  11557. (license license:expat)))
  11558. (define-public ruby-json-schema
  11559. (package
  11560. (name "ruby-json-schema")
  11561. (version "2.8.1")
  11562. (source
  11563. (origin
  11564. (method url-fetch)
  11565. (uri (rubygems-uri "json-schema" version))
  11566. (sha256
  11567. (base32
  11568. "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
  11569. (build-system ruby-build-system)
  11570. (arguments
  11571. `(#:tests? #f ; no tests
  11572. #:phases
  11573. (modify-phases %standard-phases
  11574. (replace 'build
  11575. (lambda _
  11576. (invoke "gem" "build" ".gemspec"))))))
  11577. (propagated-inputs
  11578. `(("ruby-addressable" ,ruby-addressable)))
  11579. (synopsis "Ruby JSON Schema Validator")
  11580. (description "This library provides Ruby with an interface for validating
  11581. JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
  11582. support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
  11583. is also included.")
  11584. (home-page "https://github.com/ruby-json-schema/json-schema")
  11585. (license license:expat)))
  11586. (define-public swagger-diff
  11587. (package
  11588. (name "swagger-diff")
  11589. (version "1.1.2")
  11590. (source
  11591. (origin
  11592. (method url-fetch)
  11593. (uri (rubygems-uri "swagger-diff" version))
  11594. (sha256
  11595. (base32
  11596. "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
  11597. (build-system ruby-build-system)
  11598. (arguments
  11599. `(#:test-target "spec"
  11600. #:phases
  11601. (modify-phases %standard-phases
  11602. ;; Don't run or require rubocop, the code linting tool, as this is a
  11603. ;; bit unnecessary.
  11604. (add-after 'unpack 'dont-run-rubocop
  11605. (lambda _
  11606. (substitute* "Rakefile"
  11607. ((".*rubocop.*") "")
  11608. ((".*RuboCop.*") ""))
  11609. #t)))))
  11610. (propagated-inputs
  11611. `(("ruby-json-schema" ,ruby-json-schema)))
  11612. (native-inputs
  11613. `(("bundler" ,bundler)
  11614. ("ruby-rspec-core" ,ruby-rspec-core)
  11615. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  11616. (synopsis
  11617. "Compare Open API Initiative specification files")
  11618. (description
  11619. "Swagger::Diff is a utility for comparing two different Open API
  11620. Initiative (OAI) specifications (formerly known as Swagger specifications).
  11621. It is intended to determine whether a newer API specification is
  11622. backwards-compatible with an older API specification.")
  11623. (home-page "https://github.com/civisanalytics/swagger-diff")
  11624. (license license:bsd-3)))
  11625. (define-public ruby-reverse-markdown
  11626. (package
  11627. (name "ruby-reverse-markdown")
  11628. (version "1.1.0")
  11629. (source
  11630. (origin
  11631. (method url-fetch)
  11632. (uri (rubygems-uri "reverse_markdown" version))
  11633. (sha256
  11634. (base32
  11635. "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
  11636. (build-system ruby-build-system)
  11637. (propagated-inputs
  11638. `(("ruby-nokogiri" ,ruby-nokogiri)))
  11639. (native-inputs
  11640. `(("bundler" ,bundler)
  11641. ("ruby-rspec" ,ruby-rspec)
  11642. ("ruby-kramdown" ,ruby-kramdown)
  11643. ("ruby-simplecov" ,ruby-simplecov)))
  11644. (arguments
  11645. `(#:phases
  11646. (modify-phases %standard-phases
  11647. (replace 'check
  11648. (lambda* (#:key tests? #:allow-other-keys)
  11649. (when tests?
  11650. (invoke "rspec"))
  11651. #t)))))
  11652. (synopsis "Convert HTML into Markdown")
  11653. (description
  11654. "This Ruby module allows you to map simple HTML back into
  11655. Markdown---e.g., if you want to import existing HTML data in your
  11656. application.")
  11657. (home-page "https://github.com/xijo/reverse_markdown")
  11658. (license license:wtfpl2)))
  11659. (define-public ruby-solargraph
  11660. (package
  11661. (name "ruby-solargraph")
  11662. (version "0.40.3")
  11663. (source
  11664. (origin
  11665. (method url-fetch)
  11666. (uri (rubygems-uri "solargraph" version))
  11667. (sha256
  11668. (base32
  11669. "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
  11670. (build-system ruby-build-system)
  11671. (propagated-inputs
  11672. `(("ruby-backport" ,ruby-backport)
  11673. ("bundler" ,bundler)
  11674. ("ruby-benchmark" ,ruby-benchmark)
  11675. ("ruby-e2mmap" ,ruby-e2mmap)
  11676. ("ruby-jaro-winkler" ,ruby-jaro-winkler)
  11677. ("ruby-kramdown" ,ruby-kramdown)
  11678. ("ruby-kramdown-parser-gfm" ,ruby-kramdown-parser-gfm)
  11679. ("ruby-maruku" ,ruby-maruku)
  11680. ("ruby-nokogiri" ,ruby-nokogiri)
  11681. ("ruby-parser" ,ruby-parser)
  11682. ("ruby-reverse-markdown" ,ruby-reverse-markdown)
  11683. ("ruby-rubocop" ,ruby-rubocop)
  11684. ("ruby-thor" ,ruby-thor)
  11685. ("ruby-tilt" ,ruby-tilt)
  11686. ("ruby-yard" ,ruby-yard)))
  11687. (native-inputs
  11688. `(("ruby-rspec" ,ruby-rspec)
  11689. ("ruby-pry" ,ruby-pry)
  11690. ("ruby-simplecov" ,ruby-simplecov)
  11691. ("ruby-webmock" ,ruby-webmock)))
  11692. ;; FIXME: can't figure out how to run the tests properly:
  11693. ;; An error occurred while loading spec_helper.
  11694. ;; Failure/Error: return gem_original_require(path)
  11695. ;; LoadError:
  11696. ;; cannot load such file -- spec_helper
  11697. (arguments
  11698. '(#:tests? #f
  11699. #:phases
  11700. (modify-phases %standard-phases
  11701. (replace 'check
  11702. (lambda* (#:key tests? #:allow-other-keys)
  11703. (when tests?
  11704. (invoke "rspec"))
  11705. #t)))))
  11706. (synopsis
  11707. "IDE tools for code completion, inline documentation, and static analysis")
  11708. (description
  11709. "Solargraph provides a comprehensive suite of tools for Ruby
  11710. programming: intellisense, diagnostics, inline documentation, and type
  11711. checking.")
  11712. (home-page "https://solargraph.org/")
  11713. (license license:expat)))
  11714. (define-public ruby-wayback-machine-downloader
  11715. (package
  11716. (name "ruby-wayback-machine-downloader")
  11717. (version "2.2.1")
  11718. (source
  11719. (origin
  11720. (method url-fetch)
  11721. (uri (rubygems-uri
  11722. "wayback_machine_downloader"
  11723. version))
  11724. (sha256
  11725. (base32
  11726. "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
  11727. (build-system ruby-build-system)
  11728. (arguments
  11729. '(#:tests? #f)) ; no tests
  11730. (synopsis "Download archived websites from the Wayback Machine")
  11731. (description
  11732. "Wayback Machine Downloader is a command line tool for downloading
  11733. websites from the Internet Archive's Wayback Machine (archive.org).
  11734. It allows fine grained control over what to download by specifying
  11735. which snapshots to consider and what files to include.")
  11736. (home-page
  11737. "https://github.com/hartator/wayback-machine-downloader")
  11738. (license license:expat)))
  11739. (define-public ruby-zeitwerk
  11740. (package
  11741. (name "ruby-zeitwerk")
  11742. (version "2.4.2")
  11743. (source
  11744. (origin
  11745. (method git-fetch)
  11746. (uri (git-reference
  11747. ;; No tests in the released gem.
  11748. (url "https://github.com/fxn/zeitwerk")
  11749. (commit (string-append "v" version))))
  11750. (file-name (git-file-name name version))
  11751. (sha256
  11752. (base32
  11753. "119fgdyb57gmss2yvfwfr47wcy8nny38sai72446krpihyavpizw"))))
  11754. (build-system ruby-build-system)
  11755. (native-inputs
  11756. `(("ruby-minitest" ,ruby-minitest)
  11757. ("ruby-minitest-focus" ,ruby-minitest-focus)
  11758. ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
  11759. (synopsis "Efficient and thread-safe code loader for Ruby")
  11760. (description
  11761. "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
  11762. and application may have their own independent autoloader, with its own
  11763. configuration, inflector, and logger. Supports autoloading, reloading, and
  11764. eager loading.")
  11765. (home-page "https://github.com/fxn/zeitwerk")
  11766. (license license:expat)))
  11767. (define-public ruby-wwtd
  11768. (package
  11769. (name "ruby-wwtd")
  11770. (version "1.4.1")
  11771. (home-page "https://github.com/grosser/wwtd")
  11772. (source (origin
  11773. (method git-fetch)
  11774. (uri (git-reference
  11775. (url home-page)
  11776. (commit (string-append "v" version))))
  11777. (file-name (git-file-name name version))
  11778. (sha256
  11779. (base32
  11780. "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
  11781. (modules '((guix build utils)))
  11782. (snippet
  11783. '(begin
  11784. ;; Remove bundled library.
  11785. (delete-file "spec/rake-12.3.0.gem")
  11786. #t))))
  11787. (build-system ruby-build-system)
  11788. (arguments
  11789. '(;; XXX: Tests need multiple versions of ruby, wants to run
  11790. ;; `bundle install`, etc.
  11791. #:tests? #f
  11792. #:phases (modify-phases %standard-phases
  11793. (replace 'replace-git-ls-files
  11794. (lambda _
  11795. (substitute* "wwtd.gemspec"
  11796. (("git ls-files lib/ bin/`")
  11797. "find lib/ bin/ -type f |sort`"))
  11798. #t))
  11799. (add-before 'check 'remove-version-constraints
  11800. (lambda _
  11801. (delete-file "Gemfile.lock")
  11802. #t))
  11803. (replace 'check
  11804. (lambda* (#:key tests? #:allow-other-keys)
  11805. (if tests?
  11806. (invoke "rspec" "spec/")
  11807. (format #t "test suite not run~%"))
  11808. #t)))))
  11809. (native-inputs
  11810. `(("ruby-bump" ,ruby-bump)
  11811. ("ruby-rspec" ,ruby-rspec)))
  11812. (synopsis "Run @file{.travis.yml} files locally")
  11813. (description
  11814. "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
  11815. defined in @file{.travis.yml} on your local machine, using @code{rvm},
  11816. @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
  11817. (license license:expat)))
  11818. (define-public ruby-rugged
  11819. (package
  11820. (name "ruby-rugged")
  11821. (version "1.1.0")
  11822. (home-page "https://www.rubydoc.info/gems/rugged")
  11823. (source
  11824. (origin
  11825. (method url-fetch)
  11826. (uri (rubygems-uri "rugged" version))
  11827. (sha256
  11828. (base32 "04aq913plcxjw71l5r62qgz3bx3466p0wvgyfqahg5n3nybmcwqy"))))
  11829. (build-system ruby-build-system)
  11830. (arguments
  11831. `(#:tests? #f
  11832. #:gem-flags (list "--" "--use-system-libraries")))
  11833. (inputs
  11834. `(("libgit2" ,libgit2)))
  11835. (native-inputs
  11836. `(("ruby-minitest" ,ruby-minitest)
  11837. ("ruby-pry" ,ruby-pry)
  11838. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  11839. (synopsis "Ruby bindings to the libgit2 linkable C Git library")
  11840. (description "Rugged is a library for accessing libgit2 in Ruby. It gives
  11841. you the speed and portability of libgit2 with the beauty of the Ruby
  11842. language.")
  11843. (license license:expat)))
  11844. (define-public ruby-yell
  11845. (package
  11846. (name "ruby-yell")
  11847. (version "2.2.2")
  11848. (source
  11849. (origin
  11850. (method url-fetch)
  11851. (uri (rubygems-uri "yell" version))
  11852. (sha256
  11853. (base32
  11854. "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
  11855. (build-system ruby-build-system)
  11856. (arguments
  11857. `(#:phases
  11858. (modify-phases %standard-phases
  11859. (replace 'check
  11860. (lambda _
  11861. (invoke "rake" "examples")))))) ; there is no test target.
  11862. (synopsis
  11863. "Extensible logging library for Ruby")
  11864. (description
  11865. "Yell is a comprehensive logging replacement for Ruby. It defines
  11866. multiple adapters, various log level combinations and message formatting
  11867. options.")
  11868. (home-page "https://github.com/rudionrails/yell")
  11869. (license license:expat)))
  11870. (define-public ruby-e2mmap
  11871. (package
  11872. (name "ruby-e2mmap")
  11873. (version "0.1.0")
  11874. (source
  11875. (origin
  11876. (method url-fetch)
  11877. (uri (rubygems-uri "e2mmap" version))
  11878. (sha256
  11879. (base32
  11880. "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
  11881. (build-system ruby-build-system)
  11882. (arguments
  11883. `(#:tests? #f)) ;; There is a rakefile but no tests
  11884. (synopsis
  11885. "Module for defining custom exceptions with specific messages")
  11886. (description
  11887. "Exception2MessageMapper (e2mmap) is a helper module for easily defining
  11888. exceptions with predefined messages.")
  11889. (home-page "https://github.com/ruby/e2mmap")
  11890. (license license:bsd-2)))
  11891. (define-public ruby-benchmark
  11892. (package
  11893. (name "ruby-benchmark")
  11894. (version "0.1.1")
  11895. (source
  11896. (origin
  11897. (method url-fetch)
  11898. (uri (rubygems-uri "benchmark" version))
  11899. (sha256
  11900. (base32
  11901. "1jvrl7400fv7v2jjri1r7ilj3sri36hzipwwgpn5psib4c9c59c6"))))
  11902. (build-system ruby-build-system)
  11903. (synopsis "Performance benchmarking library")
  11904. (description "This package provides methods for benchmarking Ruby code,
  11905. giving detailed reports on the time taken for each task.")
  11906. (home-page "https://github.com/ruby/benchmark")
  11907. (license license:bsd-2)))
  11908. (define-public ruby-jekyll-feed
  11909. (package
  11910. (name "ruby-jekyll-feed")
  11911. (version "0.15.1")
  11912. (source
  11913. (origin
  11914. (method url-fetch)
  11915. (uri (rubygems-uri "jekyll-feed" version))
  11916. (sha256
  11917. (base32
  11918. "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
  11919. (build-system ruby-build-system)
  11920. (arguments
  11921. `(#:tests? #false)) ;there are none
  11922. (propagated-inputs
  11923. `(("jekyll" ,jekyll)))
  11924. (synopsis
  11925. "Jekyll plugin to generate an Atom feed of your Jekyll posts")
  11926. (description
  11927. "This package provides a Jekyll plugin to generate an Atom feed
  11928. of your Jekyll posts.")
  11929. (home-page
  11930. "https://github.com/jekyll/jekyll-feed")
  11931. (license license:expat)))
  11932. (define-public ruby-jekyll-sitemap
  11933. (package
  11934. (name "ruby-jekyll-sitemap")
  11935. (version "1.4.0")
  11936. (source
  11937. (origin
  11938. (method url-fetch)
  11939. (uri (rubygems-uri "jekyll-sitemap" version))
  11940. (sha256
  11941. (base32
  11942. "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
  11943. (build-system ruby-build-system)
  11944. (arguments
  11945. `(#:tests? #false)) ;there are none
  11946. (propagated-inputs
  11947. `(("jekyll" ,jekyll)))
  11948. (synopsis
  11949. "Automatically generate a sitemap.xml for your Jekyll site")
  11950. (description
  11951. "This package provides a Jekyll plugin to silently generate
  11952. a sitemaps.org compliant sitemap for your Jekyll site.")
  11953. (home-page
  11954. "https://github.com/jekyll/jekyll-sitemap")
  11955. (license license:expat)))
  11956. (define-public ruby-jekyll-seo-tag
  11957. (package
  11958. (name "ruby-jekyll-seo-tag")
  11959. (version "2.7.1")
  11960. (source
  11961. (origin
  11962. (method url-fetch)
  11963. (uri (rubygems-uri "jekyll-seo-tag" version))
  11964. (sha256
  11965. (base32
  11966. "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
  11967. (build-system ruby-build-system)
  11968. (arguments
  11969. `(#:tests? #false))
  11970. (propagated-inputs
  11971. `(("jekyll" ,jekyll)))
  11972. (synopsis
  11973. "Jekyll plugin to add metadata tags for search engines and social networks")
  11974. (description
  11975. "This package provides a Jekyll plugin to add metadata tags for search engines
  11976. and social networks to better index and display your site's content.")
  11977. (home-page
  11978. "https://github.com/jekyll/jekyll-seo-tag")
  11979. (license license:expat)))
  11980. (define-public ruby-taskjuggler
  11981. (package
  11982. (name "ruby-taskjuggler")
  11983. (version "3.7.1")
  11984. (source
  11985. (origin
  11986. (method url-fetch)
  11987. (uri (rubygems-uri "taskjuggler" version))
  11988. (sha256
  11989. (base32
  11990. "1jrsajzhzpnfa8hj6lbf7adn8hls56dz3yw1gvzgz9y4zkka3k9v"))))
  11991. (build-system ruby-build-system)
  11992. (native-inputs `(("tzdata" ,tzdata-for-tests)))
  11993. (propagated-inputs
  11994. `(("ruby-mail" ,ruby-mail)
  11995. ("ruby-term-ansicolor" ,ruby-term-ansicolor)))
  11996. (arguments
  11997. '(#:phases (modify-phases %standard-phases
  11998. (replace 'replace-git-ls-files
  11999. (lambda _
  12000. (substitute* "tasks/rdoc.rake"
  12001. (("`git ls-files -- lib`")
  12002. "`find lib/ -type f |sort`"))
  12003. #t))
  12004. (add-before 'check 'tzdir-setup
  12005. (lambda* (#:key inputs #:allow-other-keys)
  12006. (setenv "TZDIR"
  12007. (string-append (assoc-ref inputs "tzdata")
  12008. "/share/zoneinfo"))
  12009. #t))
  12010. (add-before 'check 'delete-test-BatchProcessor
  12011. ;; test_BatchProcessor fails with exeption:
  12012. ;; run> terminated with exception (report_on_exception is true)
  12013. (lambda _
  12014. (delete-file "test/test_BatchProcessor.rb")
  12015. #t)))))
  12016. (synopsis
  12017. "Project management command line tool with a domain specific language")
  12018. (description
  12019. "TaskJuggler (tj3) is a project management tool for project planning and
  12020. tracking using a domain specific language; projects are plain text files
  12021. written using your favourite text editor. It includes reporting in HTML, CSV
  12022. or iCalendar format and an email based status tracking system to send and
  12023. receive time sheets from collaborators.
  12024. It covers the complete spectrum of project management tasks from the first
  12025. idea to the completion of the project. It assists you during project scoping,
  12026. resource assignment, cost and revenue planning, risk and communication
  12027. management, status tracking and reporting.")
  12028. (home-page "https://taskjuggler.org")
  12029. (license license:gpl2)))
  12030. (define-public ruby-cmath
  12031. (package
  12032. (name "ruby-cmath")
  12033. (version "1.0.0")
  12034. (source
  12035. (origin
  12036. (method url-fetch)
  12037. (uri (rubygems-uri "cmath" version))
  12038. (sha256
  12039. (base32
  12040. "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
  12041. (build-system ruby-build-system)
  12042. (arguments
  12043. `(#:tests? #false))
  12044. (native-inputs
  12045. `(("bundler" ,bundler)
  12046. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  12047. (synopsis "Trigonometric functions for complex numbers")
  12048. (description
  12049. "This gem is a library that provides trigonometric and transcendental
  12050. functions for complex numbers. The functions in this module accept integers,
  12051. floating-point numbers or complex numbers as arguments.")
  12052. (home-page "https://github.com/ruby/cmath")
  12053. (license license:bsd-2)))