ruby.scm 445 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479
  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. `(#:phases
  1113. (modify-phases %standard-phases
  1114. (add-after 'unpack 'disable-failing-tests
  1115. ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
  1116. ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
  1117. (lambda _
  1118. (substitute* "test/test_conversions.rb"
  1119. (("next if from == to.*" all)
  1120. (string-append
  1121. all
  1122. " next if ['plain', 'beamer'].include? to\n")))
  1123. #t))
  1124. (add-after 'unpack 'patch-pandoc-path
  1125. (lambda* (#:key inputs #:allow-other-keys)
  1126. (let ((pandoc (search-input-file inputs "/bin/pandoc")))
  1127. (substitute* "lib/pandoc-ruby.rb"
  1128. (("@@pandoc_path = 'pandoc'")
  1129. (format #f "@@pandoc_path = '~a'" pandoc)))
  1130. (substitute* "test/test_pandoc_ruby.rb"
  1131. (("('|\")pandoc" _ quote)
  1132. (string-append quote pandoc))
  1133. (("\\^pandoc")
  1134. ".*pandoc")))))
  1135. (add-after 'unpack 'adjust-tests
  1136. ;; The tests expect filenames with spaces. Because they don't have
  1137. ;; spaces the quotes around the output are dropped automatically.
  1138. (lambda _
  1139. (substitute* "test/test_pandoc_ruby.rb"
  1140. (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
  1141. (add-after 'extract-gemspec 'remove-Gemfile.lock
  1142. (lambda _
  1143. (delete-file "Gemfile.lock")
  1144. (substitute* "pandoc-ruby.gemspec"
  1145. (("Gemfile\\.lock") "")))))))
  1146. (native-inputs
  1147. `(("ruby-mocha" ,ruby-mocha)))
  1148. (inputs
  1149. `(("pandoc" ,pandoc)))
  1150. (synopsis "Ruby wrapper for Pandoc")
  1151. (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
  1152. command line tools for converting one markup format to another. Pandoc can
  1153. convert documents from a variety of formats including markdown,
  1154. reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
  1155. variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
  1156. ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
  1157. markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
  1158. more.")
  1159. (home-page "https://github.com/xwmx/pandoc-ruby")
  1160. (license license:expat)))
  1161. (define-public ruby-patron
  1162. (package
  1163. (name "ruby-patron")
  1164. (version "0.13.3")
  1165. (source
  1166. (origin
  1167. (method url-fetch)
  1168. (uri (rubygems-uri "patron" version))
  1169. (sha256
  1170. (base32
  1171. "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
  1172. (build-system ruby-build-system)
  1173. (inputs
  1174. `(("curl" ,curl)))
  1175. (arguments
  1176. `(#:tests? #f)) ; no included tests
  1177. (synopsis "Ruby HTTP client library based on @code{libcurl}")
  1178. (description
  1179. "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
  1180. not try to expose the full power (read complexity) of @code{libcurl} but
  1181. instead tries to provide a sane API while taking advantage of @code{libcurl}
  1182. under the hood.")
  1183. (home-page "https://github.com/toland/patron")
  1184. (license license:expat)))
  1185. (define-public ruby-slim
  1186. (package
  1187. (name "ruby-slim")
  1188. (version "4.1.0")
  1189. (source
  1190. (origin
  1191. (method url-fetch)
  1192. (uri (rubygems-uri "slim" version))
  1193. (sha256
  1194. (base32
  1195. "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
  1196. (build-system ruby-build-system)
  1197. (arguments
  1198. `(#:phases
  1199. (modify-phases %standard-phases
  1200. ;; See: https://github.com/slim-template/slim/issues/857 and
  1201. ;; https://github.com/slim-template/slim/issues/858.
  1202. (add-after 'unpack 'skip-broken-tests
  1203. (lambda _
  1204. (substitute* "test/core/test_embedded_engines.rb"
  1205. (("def test_render_with_markdown")
  1206. "def skipped_test_render_with_markdown"))
  1207. (substitute* "test/translator/test_translator.rb"
  1208. (("raise (\"Missing test for.*)" _ tail)
  1209. (string-append "print " tail)))
  1210. #t))
  1211. ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
  1212. ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
  1213. (add-after 'unpack 'prevent-bundler-interference
  1214. (lambda _
  1215. (substitute* "Rakefile"
  1216. (("require 'bundler/setup'") "nil")
  1217. (("Bundler::GemHelper\\.install_tasks") "nil"))
  1218. #t)))))
  1219. (native-inputs
  1220. `(("ruby-rack-test" ,ruby-rack-test)
  1221. ("ruby-sinatra" ,ruby-sinatra)))
  1222. (propagated-inputs
  1223. `(("ruby-temple" ,ruby-temple)
  1224. ("ruby-tilt" ,ruby-tilt)))
  1225. (synopsis "Minimalist template language for Ruby")
  1226. (description "Slim is a template language for Ruby that aims to reduce the
  1227. syntax to the minimum while remaining clear.")
  1228. (home-page "http://slim-lang.com/")
  1229. (license license:expat)))
  1230. (define-public ruby-asciidoctor
  1231. (package
  1232. (name "ruby-asciidoctor")
  1233. (version "2.0.16")
  1234. (source
  1235. (origin
  1236. (method git-fetch) ;the gem release lacks a Rakefile
  1237. (uri (git-reference
  1238. (url "https://github.com/asciidoctor/asciidoctor")
  1239. (commit (string-append "v" version))))
  1240. (file-name (git-file-name name version))
  1241. (sha256
  1242. (base32
  1243. "086i17v9rxx0sxac26xp8c5v75jqba6rqjlk57x94qjvrh8vzyw2"))))
  1244. (build-system ruby-build-system)
  1245. (arguments
  1246. `(#:test-target "test:all"
  1247. #:phases
  1248. (modify-phases %standard-phases
  1249. (add-after 'extract-gemspec 'strip-version-requirements
  1250. (lambda _
  1251. (delete-file "Gemfile")
  1252. (substitute* "asciidoctor.gemspec"
  1253. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  1254. (string-append stripped "\n")))
  1255. #t)))))
  1256. (native-inputs
  1257. `(("ruby-erubi" ,ruby-erubi)
  1258. ("ruby-erubis" ,ruby-erubis)
  1259. ("ruby-minitest" ,ruby-minitest)
  1260. ("ruby-nokogiri" ,ruby-nokogiri)
  1261. ("ruby-asciimath" ,ruby-asciimath)
  1262. ("ruby-coderay" ,ruby-coderay)
  1263. ("ruby-cucumber" ,ruby-cucumber)
  1264. ("ruby-haml" ,ruby-haml)
  1265. ("ruby-rouge" ,ruby-rouge)
  1266. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  1267. ("ruby-simplecov" ,ruby-simplecov)
  1268. ("ruby-slim" ,ruby-slim)
  1269. ("ruby-tilt" ,ruby-tilt)))
  1270. (synopsis "Converter from AsciiDoc content to other formats")
  1271. (description "Asciidoctor is a text processor and publishing toolchain for
  1272. converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
  1273. formats.")
  1274. (home-page "https://asciidoctor.org")
  1275. (license license:expat)))
  1276. (define-public ruby-prawn-icon
  1277. (package
  1278. (name "ruby-prawn-icon")
  1279. (version "2.5.0")
  1280. (source
  1281. (origin
  1282. (method url-fetch)
  1283. (uri (rubygems-uri "prawn-icon" version))
  1284. (sha256
  1285. (base32
  1286. "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
  1287. (build-system ruby-build-system)
  1288. (arguments
  1289. `(#:test-target "spec"
  1290. #:phases (modify-phases %standard-phases
  1291. (add-after 'unpack 'remove-unnecessary-dependencies
  1292. (lambda _
  1293. (substitute* '("Rakefile" "spec/spec_helper.rb")
  1294. ((".*[Bb]undler.*") "")
  1295. (("^require 'rubocop.*") "")
  1296. (("^RuboCop.*") ""))
  1297. #t)))))
  1298. (native-inputs
  1299. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1300. ("ruby-pdf-reader" ,ruby-pdf-reader)
  1301. ("ruby-rspec" ,ruby-rspec)
  1302. ("ruby-simplecov" ,ruby-simplecov)))
  1303. (propagated-inputs
  1304. `(("ruby-prawn" ,ruby-prawn)))
  1305. (synopsis "Icon fonts for use with the Prawn PDF toolkit")
  1306. (description "@code{Prawn::Icon} provides various icon fonts including
  1307. FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
  1308. toolkit.")
  1309. (home-page "https://github.com/jessedoyle/prawn-icon/")
  1310. (license %prawn-project-licenses)))
  1311. (define-public ruby-css-parser
  1312. (package
  1313. (name "ruby-css-parser")
  1314. (version "1.7.1")
  1315. (source
  1316. (origin
  1317. (method url-fetch)
  1318. (uri (rubygems-uri "css_parser" version))
  1319. (sha256
  1320. (base32
  1321. "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
  1322. (build-system ruby-build-system)
  1323. (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
  1324. (propagated-inputs
  1325. `(("ruby-addressable" ,ruby-addressable)))
  1326. (synopsis "Ruby Cascading Style Sheets (CSS) parser")
  1327. (description "This package allows loading, parsing and cascading Cascading
  1328. Style Sheets (CSS) rule sets in Ruby.")
  1329. (home-page "https://github.com/premailer/css_parser")
  1330. (license license:expat)))
  1331. (define-public ruby-prawn-svg
  1332. (package
  1333. (name "ruby-prawn-svg")
  1334. (version "0.30.0")
  1335. (source
  1336. (origin
  1337. (method url-fetch)
  1338. (uri (rubygems-uri "prawn-svg" version))
  1339. (sha256
  1340. (base32
  1341. "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
  1342. (build-system ruby-build-system)
  1343. (arguments
  1344. `(#:phases (modify-phases %standard-phases
  1345. (add-after 'unpack 'do-not-use-bundler
  1346. (lambda _
  1347. (substitute* "spec/spec_helper.rb"
  1348. ((".*[Bb]undler.*") ""))
  1349. #t))
  1350. (replace 'check
  1351. (lambda* (#:key tests? #:allow-other-keys)
  1352. (when tests?
  1353. (invoke "rspec" "-Ilib" "-rprawn-svg"))
  1354. #t)))))
  1355. (native-inputs
  1356. `(("ruby-rspec" ,ruby-rspec)))
  1357. (propagated-inputs
  1358. `(("ruby-css-parser" ,ruby-css-parser)
  1359. ("ruby-prawn" ,ruby-prawn)))
  1360. (synopsis "SVG renderer for the Prawn PDF library")
  1361. (description "This library allows rendering Scalable Vector Graphics (SVG)
  1362. graphics directly into a Portable Document Format (PDF) document using the
  1363. Prawn module.")
  1364. (home-page "https://github.com/mogest/prawn-svg")
  1365. (license license:expat)))
  1366. (define-public ruby-prawn-templates
  1367. (package
  1368. (name "ruby-prawn-templates")
  1369. (version "0.1.2")
  1370. (source
  1371. (origin
  1372. (method git-fetch)
  1373. (uri (git-reference
  1374. (url "https://github.com/prawnpdf/prawn-templates")
  1375. (commit version)))
  1376. (file-name (git-file-name name version))
  1377. (sha256
  1378. (base32
  1379. "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
  1380. (build-system ruby-build-system)
  1381. (arguments
  1382. `(#:phases (modify-phases %standard-phases
  1383. (add-after 'unpack 'do-not-use-bundler
  1384. (lambda _
  1385. (substitute* "spec/spec_helper.rb"
  1386. ((".*[Bb]undler.*") ""))
  1387. #t))
  1388. (replace 'check
  1389. (lambda* (#:key tests? #:allow-other-keys)
  1390. (when tests?
  1391. (invoke "rspec"))
  1392. #t)))))
  1393. (native-inputs
  1394. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1395. ("ruby-rspec" ,ruby-rspec)))
  1396. (propagated-inputs
  1397. `(("ruby-pdf-reader" ,ruby-pdf-reader)
  1398. ("ruby-prawn" ,ruby-prawn)))
  1399. (synopsis "Prawn extension to include or combine PDF documents")
  1400. (description "This @strong{unmaintained} package provides a Prawn
  1401. extension that allows including other Portable Document Format (PDF) documents
  1402. as background or combining several PDF documents into one. This functionality
  1403. used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
  1404. of its many longstanding issues.")
  1405. (home-page "https://github.com/prawnpdf/prawn-templates")
  1406. (license %prawn-project-licenses)))
  1407. (define-public ruby-polyglot
  1408. (package
  1409. (name "ruby-polyglot")
  1410. (version "0.3.5")
  1411. (source
  1412. (origin
  1413. (method url-fetch)
  1414. (uri (rubygems-uri "polyglot" version))
  1415. (sha256
  1416. (base32
  1417. "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
  1418. (build-system ruby-build-system)
  1419. (arguments `(#:tests? #f)) ;no test suite
  1420. (synopsis "Augment @code{require} to load non-Ruby file types")
  1421. (description "The Polyglot library allows a Ruby module to register a
  1422. loader for the file type associated with a filename extension, and it augments
  1423. @code{require} to find and load matching files.")
  1424. (home-page "https://github.com/cjheath/polyglot")
  1425. (license license:expat)))
  1426. (define-public ruby-treetop
  1427. (package
  1428. (name "ruby-treetop")
  1429. (version "1.6.10")
  1430. (source
  1431. (origin
  1432. (method git-fetch) ;no test suite in distributed gem
  1433. (uri (git-reference
  1434. (url "https://github.com/cjheath/treetop")
  1435. (commit (string-append "v" version))))
  1436. (file-name (git-file-name name version))
  1437. (sha256
  1438. (base32
  1439. "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
  1440. (build-system ruby-build-system)
  1441. (arguments
  1442. `(#:test-target "spec"))
  1443. (native-inputs
  1444. `(("ruby-activesupport" ,ruby-activesupport)
  1445. ("ruby-rr" ,ruby-rr)
  1446. ("ruby-rspec" ,ruby-rspec)))
  1447. (propagated-inputs
  1448. `(("ruby-polyglot" ,ruby-polyglot)))
  1449. (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
  1450. (description "This package provides a Ruby-based Parsing Expression
  1451. Grammar (PEG) parser generator Domain Specific Language (DSL).")
  1452. (home-page "https://github.com/cjheath/treetop")
  1453. (license license:expat)))
  1454. (define-public ruby-typhoeus
  1455. (package
  1456. (name "ruby-typhoeus")
  1457. (version "1.4.0")
  1458. (source
  1459. (origin
  1460. (method url-fetch)
  1461. (uri (rubygems-uri "typhoeus" version))
  1462. (sha256
  1463. (base32
  1464. "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
  1465. (build-system ruby-build-system)
  1466. (arguments
  1467. `(#:tests? #f)) ; no included tests
  1468. (propagated-inputs
  1469. `(("ruby-ethon" ,ruby-ethon)))
  1470. (synopsis "@code{libcurl} wrapper in Ruby")
  1471. (description
  1472. "Like a modern code version of the mythical beast with 100 serpent heads,
  1473. Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
  1474. logic.")
  1475. (home-page "https://github.com/typhoeus/typhoeus")
  1476. (license license:expat)))
  1477. (define-public ruby-rubocop-rspec
  1478. (package
  1479. (name "ruby-rubocop-rspec")
  1480. (version "2.2.0")
  1481. (source
  1482. (origin
  1483. (method git-fetch)
  1484. (uri (git-reference
  1485. (url "https://github.com/rubocop-hq/rubocop-rspec")
  1486. (commit (string-append "v" version))))
  1487. (file-name (git-file-name name version))
  1488. (sha256
  1489. (base32
  1490. "0gdpjpympb6qc77bang759z7z6lckf14ghkx8v6614agxg8l3g5y"))))
  1491. (build-system ruby-build-system)
  1492. (arguments
  1493. '(#:test-target "internal_investigation"
  1494. #:phases
  1495. (modify-phases %standard-phases
  1496. (add-before 'check 'set-HOME
  1497. (lambda _
  1498. (setenv "HOME" "/tmp")
  1499. #t)))))
  1500. (propagated-inputs
  1501. `(("ruby-rubocop" ,ruby-rubocop)
  1502. ("ruby-rubocop-ast" ,ruby-rubocop-ast)))
  1503. (native-inputs
  1504. `(("ruby-rack" ,ruby-rack)
  1505. ("ruby-rspec" ,ruby-rspec)
  1506. ("ruby-rubocop-performance" ,ruby-rubocop-performance)
  1507. ("ruby-simplecov" ,ruby-simplecov)
  1508. ("ruby-yard" ,ruby-yard)))
  1509. (synopsis "Code style checking for RSpec files")
  1510. (description "This package provides a plugin for the RuboCop code style
  1511. enforcing & linting tool.")
  1512. (home-page "https://github.com/rubocop-hq/rubocop-rspec")
  1513. (license license:expat)))
  1514. (define-public ruby-rubocop-rspec-minimal
  1515. (hidden-package
  1516. (package
  1517. (inherit ruby-rubocop-rspec)
  1518. (arguments
  1519. (substitute-keyword-arguments (package-arguments ruby-rubocop-rspec)
  1520. ((#:tests? _ #f) #f)))
  1521. (propagated-inputs '())
  1522. (native-inputs '()))))
  1523. (define-public ruby-rubocop-performance
  1524. (package
  1525. (name "ruby-rubocop-performance")
  1526. (version "1.9.2")
  1527. (source
  1528. (origin
  1529. (method git-fetch)
  1530. (uri (git-reference
  1531. (url "https://github.com/rubocop-hq/rubocop-performance")
  1532. (commit (string-append "v" version))))
  1533. (file-name (git-file-name name version))
  1534. (sha256
  1535. (base32
  1536. "04lmkmz6c0ccs5miikrww7lakp7y6xz00g7b47ay7rn7sx5j6qyf"))))
  1537. (build-system ruby-build-system)
  1538. (arguments
  1539. `(#:tests? #f ; tests require a git checkout of rubocop's source code.
  1540. #:phases
  1541. (modify-phases %standard-phases
  1542. (replace 'replace-git-ls-files
  1543. (lambda _
  1544. (substitute* "rubocop-performance.gemspec"
  1545. (("`git ls-files -z config lib LICENSE.txt README.md`")
  1546. "`find config lib LICENSE.txt README.md -type f -print0 |sort -z`"))
  1547. #t))
  1548. (add-before 'check 'set-HOME
  1549. (lambda _
  1550. (setenv "HOME" "/tmp")
  1551. #t)))))
  1552. (propagated-inputs
  1553. `(("ruby-rubocop" ,ruby-rubocop)
  1554. ("ruby-rubocop-ast" ,ruby-rubocop-ast)))
  1555. (native-inputs
  1556. `(("ruby-bump" ,ruby-bump)
  1557. ("ruby-yard" ,ruby-yard)))
  1558. (synopsis "Performance optimizations checkers for Ruby code")
  1559. (description "This package provides a collection of RuboCop cops to check
  1560. for performance optimizations in Ruby code.")
  1561. (home-page "https://docs.rubocop.org/rubocop-performance/")
  1562. (license license:expat)))
  1563. (define-public ruby-rubocop-performance-minimal
  1564. (hidden-package
  1565. (package
  1566. (inherit ruby-rubocop-performance)
  1567. (arguments
  1568. (substitute-keyword-arguments (package-arguments ruby-rubocop-performance)
  1569. ((#:tests? _ #f) #f)))
  1570. (propagated-inputs '())
  1571. (native-inputs '()))))
  1572. (define-public ruby-gimme
  1573. (let ((revision "1")
  1574. (commit "4e71f0236f1271871916dd403261d26533db34c0"))
  1575. (package
  1576. (name "ruby-gimme")
  1577. (version (git-version "0.5.0" revision commit))
  1578. (source
  1579. (origin
  1580. (method git-fetch)
  1581. (uri (git-reference
  1582. (url "https://github.com/searls/gimme")
  1583. (commit commit)))
  1584. (file-name (git-file-name name version))
  1585. (sha256
  1586. (base32
  1587. "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
  1588. (build-system ruby-build-system)
  1589. (native-inputs
  1590. `(("ruby-coveralls" ,ruby-coveralls)
  1591. ("ruby-cucumber" ,ruby-cucumber)
  1592. ("ruby-pry" ,ruby-pry)
  1593. ("ruby-simplecov" ,ruby-simplecov)
  1594. ("ruby-rspec-given" ,ruby-rspec-given)))
  1595. (arguments
  1596. `(;; The cucumber task fails with error: "index 3 out of matches
  1597. ;; (IndexError)", apparently due to our newer Cucumber version.
  1598. ;; TODO: Try the "default" task with a future release.
  1599. #:test-target "spec"
  1600. #:phases
  1601. (modify-phases %standard-phases
  1602. (add-after 'extract-gemspec 'prepare-for-tests
  1603. (lambda _
  1604. ;; Delete failing tests (possibly due to our newer rspec
  1605. ;; version).
  1606. (delete-file "spec/gimme/gives_class_methods_spec.rb")
  1607. (delete-file "spec/gimme/rspec_adapter_spec.rb")
  1608. (delete-file "spec/gimme/verifies_class_methods_spec.rb")
  1609. ;; Fix duplicate version requirements and de-register files.
  1610. (delete-file "Gemfile")
  1611. (delete-file "Gemfile.lock")
  1612. (substitute* "gimme.gemspec"
  1613. ((".*\"Gemfile\".*") "")
  1614. ((".*\"Gemfile\\.lock\",.*") "")
  1615. ((".*(rspec|cucumber).*\">= 0\".*") "")
  1616. (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
  1617. (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
  1618. (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
  1619. ;; All of these gems relate to development, and are
  1620. ;; unnecessary when running the tests.
  1621. ((".*(add|gem).*guard-.*") "")
  1622. ((".*(add|gem).*jeweler.*") "")
  1623. ((".*(add|gem).*pry.*") "")
  1624. ((".*(add|gem).*growl.*") "")
  1625. ((".*(add|gem).*rb-fsevent.*") ""))
  1626. #t)))))
  1627. (synopsis "Lightweight test double library for Ruby")
  1628. (description "Gimme is a very lightweight test double library for Ruby,
  1629. based on Mockito (a mocking framework for Java). It is an opinionated (but
  1630. not noisy) means to facilitate test-driving by enabling the authors to specify
  1631. only what they care about.")
  1632. (home-page "https://github.com/searls/gimme")
  1633. (license license:expat))))
  1634. (define-public ruby-standard
  1635. (package
  1636. (name "ruby-standard")
  1637. (version "0.4.7")
  1638. (source
  1639. (origin
  1640. (method git-fetch) ;no test suite in distributed gem
  1641. (uri (git-reference
  1642. (url "https://github.com/testdouble/standard")
  1643. (commit (string-append "v" version))))
  1644. (file-name (git-file-name name version))
  1645. (sha256
  1646. (base32
  1647. "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
  1648. (build-system ruby-build-system)
  1649. (arguments
  1650. ;; TODO: the tests are currently broken due to using a newer Rubocop.
  1651. `(#:tests? #f
  1652. #:phases
  1653. (modify-phases %standard-phases
  1654. (add-after 'unpack 'relax-version-requiremens
  1655. (lambda _
  1656. (delete-file "Gemfile")
  1657. (delete-file "Gemfile.lock")
  1658. #t)))))
  1659. (native-inputs
  1660. `(("ruby-gimme" ,ruby-gimme)
  1661. ("ruby-pry" ,ruby-pry)
  1662. ("ruby-simplecov" ,ruby-simplecov)))
  1663. (propagated-inputs
  1664. `(("ruby-rubocop" ,ruby-rubocop)
  1665. ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
  1666. (synopsis "Ruby Style Guide, with linter & automatic code fixer")
  1667. (description "Standard is a port of StandardJS. Like StandardJS, it aims
  1668. to save time in the following ways:
  1669. @itemize
  1670. @item No configuration.
  1671. @item Automatically format code.
  1672. @item Catch style issues and programmer errors early.
  1673. @end itemize")
  1674. (home-page "https://github.com/testdouble/standard")
  1675. (license license:expat)))
  1676. (define-public ruby-chunky-png
  1677. (package
  1678. (name "ruby-chunky-png")
  1679. (version "1.3.14")
  1680. (source
  1681. (origin
  1682. (method git-fetch)
  1683. (uri (git-reference
  1684. (url "https://github.com/wvanbergen/chunky_png")
  1685. (commit (string-append "v" version))))
  1686. (file-name (git-file-name name version))
  1687. (sha256
  1688. (base32 "1m7y11ix38h5a2pj5v81qdmvqh980ql9hp62hk2dxwkwsa4nh22h"))))
  1689. (build-system ruby-build-system)
  1690. (arguments
  1691. `(#:test-target "spec"
  1692. #:phases
  1693. (modify-phases %standard-phases
  1694. (add-after 'unpack 'disable-bundler
  1695. (lambda _
  1696. (substitute* (find-files "." "\\.rb$")
  1697. (("require.*bundler/setup.*") ""))
  1698. #t)))))
  1699. (native-inputs
  1700. `(("bundler" ,bundler)
  1701. ("ruby-rspec" ,ruby-rspec)
  1702. ("ruby-standard" ,ruby-standard)
  1703. ("ruby-yard" ,ruby-yard)))
  1704. (synopsis "Ruby library to handle PNG images")
  1705. (description "ChunkyPNG is a pure Ruby library that can read and write
  1706. Portable Network Graphics (PNG) images without depending on an external image
  1707. library. It tries to be memory efficient and reasonably fast. It has
  1708. features such as:
  1709. @itemize
  1710. @item
  1711. Decoding support for any image that the PNG standard allows. This includes all
  1712. standard color modes, all bit depths, all transparency, and interlacing and
  1713. filtering options.
  1714. @item
  1715. Encoding support for images of all color modes (true color, grayscale, and
  1716. indexed) and transparency for all these color modes. The best color mode is
  1717. chosen automatically, based on the amount of used colors.
  1718. @item Read/write access to the image's pixels.
  1719. @item Read/write access to all image metadata that is stored in chunks.
  1720. @item
  1721. Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
  1722. pixel, depending on the hardware).
  1723. @item
  1724. Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
  1725. integer math and a highly optimized saving routine.
  1726. @item Interoperability with RMagick.
  1727. @end itemize
  1728. ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
  1729. loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
  1730. Deal with untrusted images in a separate process, e.g., by using @code{fork}
  1731. or a background processing library.")
  1732. (home-page "https://github.com/wvanbergen/chunky_png/wiki")
  1733. (license license:expat)))
  1734. (define-public ruby-text-hyphen
  1735. (package
  1736. (name "ruby-text-hyphen")
  1737. (version "1.4.1")
  1738. (source
  1739. (origin
  1740. (method url-fetch)
  1741. (uri (rubygems-uri "text-hyphen" version))
  1742. (sha256
  1743. (base32
  1744. "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
  1745. (build-system ruby-build-system)
  1746. (native-inputs
  1747. `(("ruby-hoe" ,ruby-hoe)))
  1748. (synopsis "Ruby library to hyphenate words in various languages")
  1749. (description "Text::Hyphen is a Ruby library to hyphenate words in various
  1750. languages using Ruby-fied versions of TeX hyphenation patterns. It will
  1751. properly hyphenate various words according to the rules of the language the
  1752. word is written in. The algorithm is based on that of the TeX typesetting
  1753. system by Donald E. Knuth.")
  1754. (home-page "https://github.com/halostatue/text-hyphen")
  1755. ;; The whole is licensed under the Expat license, but parts use various
  1756. ;; versions of the LaTeX Project Public License.
  1757. (license license:expat)))
  1758. (define-public ruby-open-uri-cached
  1759. (package
  1760. (name "ruby-open-uri-cached")
  1761. (version "0.0.5")
  1762. (source
  1763. (origin
  1764. (method url-fetch)
  1765. (uri (rubygems-uri "open-uri-cached" version))
  1766. (sha256
  1767. (base32
  1768. "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
  1769. (build-system ruby-build-system)
  1770. (arguments
  1771. `(#:tests? #f)) ;no test suite
  1772. (synopsis "OpenURI with transparent disk caching")
  1773. (description "OpenURI with transparent disk caching, which is
  1774. useful to avoid making excessive queries, for example when scraping
  1775. web pages.")
  1776. (home-page "https://github.com/tigris/open-uri-cached")
  1777. (license license:expat)))
  1778. (define-public ruby-asciidoctor-pdf
  1779. ;; Use the latest commit, as the last tag doesn't build with the
  1780. ;; latest Ruby dependencies in Guix.
  1781. (let ((revision "1")
  1782. (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
  1783. (package
  1784. (name "ruby-asciidoctor-pdf")
  1785. (version (git-version "1.5.3" revision commit))
  1786. (source
  1787. (origin
  1788. (method git-fetch) ;no test suite in the distributed gem
  1789. (uri (git-reference
  1790. (url "https://github.com/asciidoctor/asciidoctor-pdf")
  1791. (commit commit)))
  1792. (file-name (git-file-name name version))
  1793. (sha256
  1794. (base32
  1795. "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
  1796. (build-system ruby-build-system)
  1797. (arguments
  1798. `(#:test-target "spec"
  1799. #:phases
  1800. (modify-phases %standard-phases
  1801. (add-after 'unpack 'remove-failing-tests
  1802. ;; Two tests module fail for unknown reasons, *only* when
  1803. ;; ran in the build container (see:
  1804. ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
  1805. (lambda _
  1806. (delete-file "spec/audio_spec.rb")
  1807. (delete-file "spec/video_spec.rb")
  1808. #t))
  1809. (add-after 'extract-gemspec 'strip-version-requirements
  1810. (lambda _
  1811. (substitute* "asciidoctor-pdf.gemspec"
  1812. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  1813. (string-append stripped "\n")))
  1814. #t))
  1815. ;; The tests rely on the Gem being installed, so move the check phase
  1816. ;; after the install phase.
  1817. (delete 'check)
  1818. (add-after 'install 'check
  1819. (lambda* (#:key outputs tests? #:allow-other-keys)
  1820. (let ((new-gem (string-append (assoc-ref outputs "out")
  1821. "/lib/ruby/vendor_ruby")))
  1822. (setenv "GEM_PATH"
  1823. (string-append (getenv "GEM_PATH") ":" new-gem))
  1824. (when tests?
  1825. (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
  1826. #t))))))
  1827. (native-inputs
  1828. `(("ruby-chunky-png" ,ruby-chunky-png)
  1829. ("ruby-coderay" ,ruby-coderay)
  1830. ("ruby-pdf-inspector" ,ruby-pdf-inspector)
  1831. ("ruby-rouge" ,ruby-rouge)
  1832. ("ruby-rspec" ,ruby-rspec)))
  1833. (propagated-inputs
  1834. `(("ruby-asciidoctor" ,ruby-asciidoctor)
  1835. ("ruby-concurrent-ruby" ,ruby-concurrent)
  1836. ("ruby-open-uri-cached" ,ruby-open-uri-cached)
  1837. ("ruby-prawn" ,ruby-prawn)
  1838. ("ruby-prawn-icon" ,ruby-prawn-icon)
  1839. ("ruby-prawn-svg" ,ruby-prawn-svg)
  1840. ("ruby-prawn-table" ,ruby-prawn-table)
  1841. ("ruby-prawn-templates" ,ruby-prawn-templates)
  1842. ("ruby-safe-yaml" ,ruby-safe-yaml)
  1843. ("ruby-text-hyphen" ,ruby-text-hyphen)
  1844. ("ruby-thread-safe" ,ruby-thread-safe)
  1845. ("ruby-treetop" ,ruby-treetop)
  1846. ("ruby-ttfunk" ,ruby-ttfunk)))
  1847. (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
  1848. (description "Asciidoctor PDF is an extension for Asciidoctor that
  1849. converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
  1850. PDF library. It has features such as:
  1851. @itemize
  1852. @item Direct AsciiDoc to PDF conversion
  1853. @item Configuration-driven theme (style and layout)
  1854. @item Scalable Vector Graphics (SVG) support
  1855. @item PDF document outline (i.e., bookmarks)
  1856. @item Table of contents page(s)
  1857. @item Document metadata (title, authors, subject, keywords, etc.)
  1858. @item Internal cross reference links
  1859. @item Syntax highlighting with Rouge, Pygments, or CodeRay
  1860. @item Page numbering
  1861. @item Customizable running content (header and footer)
  1862. @item
  1863. “Keep together” blocks (i.e., page breaks avoided in certain block content)
  1864. @item Orphaned section titles avoided
  1865. @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
  1866. @item Table border settings honored
  1867. @item Font-based icons
  1868. @item Custom TrueType (TTF) fonts
  1869. @item Double-sided printing mode (margins alternate on recto and verso pages)
  1870. @end itemize")
  1871. (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
  1872. (license license:expat))))
  1873. (define-public ruby-ast
  1874. (package
  1875. (name "ruby-ast")
  1876. (version "2.4.2")
  1877. (source
  1878. (origin
  1879. (method git-fetch) ;no test included in gem from v2.4.1
  1880. (uri (git-reference
  1881. (url "https://github.com/whitequark/ast")
  1882. (commit (string-append "v" version))))
  1883. (file-name (git-file-name name version))
  1884. (sha256
  1885. (base32
  1886. "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
  1887. (build-system ruby-build-system)
  1888. (arguments
  1889. '(#:phases
  1890. (modify-phases %standard-phases
  1891. (add-after 'unpack 'remove-coveralls-requirement
  1892. (lambda _
  1893. (substitute* "test/helper.rb"
  1894. (("require 'coveralls'") "")
  1895. (("Coveralls::SimpleCov::Formatter") ""))
  1896. #t))
  1897. (add-after 'extract-gemspec 'remove-unnecessary-requirements
  1898. (lambda* (#:key inputs #:allow-other-keys)
  1899. (substitute* "ast.gemspec"
  1900. ((".*coveralls.*") "\n")
  1901. (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
  1902. (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
  1903. (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
  1904. (("12\\.3") "13.0"))
  1905. #t)))))
  1906. (native-inputs
  1907. `(("bundler" ,bundler)
  1908. ("ruby-bacon" ,ruby-bacon)
  1909. ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
  1910. ("ruby-json-pure" ,ruby-json-pure)
  1911. ("ruby-kramdown" ,ruby-kramdown)
  1912. ("ruby-mime-types" ,ruby-mime-types)
  1913. ("ruby-racc" ,ruby-racc)
  1914. ("ruby-rest-client" ,ruby-rest-client)
  1915. ("ruby-simplecov" ,ruby-simplecov)
  1916. ("ruby-yard" ,ruby-yard)))
  1917. (synopsis "Library for working with Abstract Syntax Trees")
  1918. (description
  1919. "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
  1920. It does this through immutable data structures.")
  1921. (home-page "https://whitequark.github.io/ast/")
  1922. (license license:expat)))
  1923. (define-public ruby-sporkmonger-rack-mount
  1924. ;; Testing the addressable gem requires a newer commit than that released, so
  1925. ;; use an up to date version.
  1926. (let ((revision "1")
  1927. (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
  1928. (package
  1929. (name "ruby-sporkmonger-rack-mount")
  1930. (version (git-version "0.8.3" revision commit))
  1931. (source (origin
  1932. (method git-fetch)
  1933. (uri (git-reference
  1934. (url "https://github.com/sporkmonger/rack-mount")
  1935. (commit commit)))
  1936. (file-name (git-file-name name version))
  1937. (sha256
  1938. (base32
  1939. "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
  1940. (build-system ruby-build-system)
  1941. (arguments
  1942. ;; Tests currently fail so disable them.
  1943. ;; https://github.com/sporkmonger/rack-mount/pull/1
  1944. `(#:tests? #f))
  1945. (propagated-inputs `(("ruby-rack" ,ruby-rack)))
  1946. (synopsis "Stackable dynamic tree based Rack router")
  1947. (description
  1948. "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
  1949. continue trying routes if the response returns pass. This allows multiple
  1950. routes to be nested or stacked on top of each other.")
  1951. (home-page "https://github.com/sporkmonger/rack-mount")
  1952. (license license:expat))))
  1953. (define-public ruby-ci-reporter
  1954. (package
  1955. (name "ruby-ci-reporter")
  1956. (version "2.0.0")
  1957. (source (origin
  1958. (method url-fetch)
  1959. (uri (rubygems-uri "ci_reporter" version))
  1960. (sha256
  1961. (base32
  1962. "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
  1963. (build-system ruby-build-system)
  1964. (arguments
  1965. `(#:test-target "rspec"))
  1966. (propagated-inputs
  1967. `(("ruby-builder" ,ruby-builder)))
  1968. (native-inputs
  1969. `(("bundler" ,bundler)
  1970. ("ruby-rspec" ,ruby-rspec)))
  1971. (synopsis "Generate XML reports of runs test")
  1972. (description
  1973. "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
  1974. you to generate XML reports of your test runs. The resulting files can be
  1975. read by a continuous integration system that understands Ant's JUnit report
  1976. format.")
  1977. (home-page "https://github.com/nicksieger/ci_reporter")
  1978. (license license:expat)))
  1979. (define-public ruby-contracts
  1980. (package
  1981. (name "ruby-contracts")
  1982. (version "0.16.0")
  1983. (source
  1984. (origin
  1985. (method url-fetch)
  1986. (uri (rubygems-uri "contracts" version))
  1987. (sha256
  1988. (base32
  1989. "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
  1990. (build-system ruby-build-system)
  1991. (arguments
  1992. '(#:test-target "spec"
  1993. #:phases
  1994. (modify-phases %standard-phases
  1995. ;; Don't run or require rubocop, the code linting tool, as this is a
  1996. ;; bit unnecessary.
  1997. (add-after 'unpack 'dont-run-rubocop
  1998. (lambda _
  1999. (substitute* "Rakefile"
  2000. ((".*rubocop.*") "")
  2001. ((".*RuboCop.*") ""))
  2002. #t)))))
  2003. (native-inputs
  2004. `(("ruby-rspec" ,ruby-rspec)))
  2005. (synopsis "Method contracts for Ruby")
  2006. (description
  2007. "This library provides contracts for Ruby. A contract describes the
  2008. correct inputs and output for a method, and will raise an error if a incorrect
  2009. value is found.")
  2010. (home-page "https://github.com/egonSchiele/contracts.ruby")
  2011. (license license:bsd-2)))
  2012. (define-public ruby-crack
  2013. (package
  2014. (name "ruby-crack")
  2015. (version "0.4.5")
  2016. (source
  2017. (origin
  2018. (method url-fetch)
  2019. (uri (rubygems-uri "crack" version))
  2020. (sha256
  2021. (base32
  2022. "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
  2023. (build-system ruby-build-system)
  2024. (arguments
  2025. `(#:phases
  2026. (modify-phases %standard-phases
  2027. (replace 'check
  2028. (lambda* (#:key tests? #:allow-other-keys)
  2029. (when tests?
  2030. (for-each (lambda (file)
  2031. (display file)(display "\n")
  2032. (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
  2033. (find-files "test" ".*rb$")))
  2034. #t)))))
  2035. (synopsis "Simple JSON and XML parsing for Ruby")
  2036. (description
  2037. "@code{crack} provides really simple JSON and XML parsing, extracted from
  2038. code in Merb and Rails.")
  2039. (home-page "https://github.com/jnunemaker/crack")
  2040. (license license:expat)))
  2041. (define-public ruby-cliver
  2042. (package
  2043. (name "ruby-cliver")
  2044. (version "0.3.2")
  2045. (source
  2046. (origin
  2047. (method url-fetch)
  2048. (uri (rubygems-uri "cliver" version))
  2049. (sha256
  2050. (base32
  2051. "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
  2052. (build-system ruby-build-system)
  2053. (arguments
  2054. '(#:phases
  2055. (modify-phases %standard-phases
  2056. ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
  2057. ;; would be nice, but the tests look to be incompatible:
  2058. ;;
  2059. ;; NoMethodError: undefined method `last_comment'
  2060. (replace 'check
  2061. (lambda* (#:key tests? #:allow-other-keys)
  2062. (when tests?
  2063. (invoke "rspec"))
  2064. #t)))))
  2065. (native-inputs
  2066. `(("bundler" ,bundler)
  2067. ("ruby-rspec" ,ruby-rspec-2)))
  2068. (synopsis "Assertions for command-line dependencies in Ruby")
  2069. (description
  2070. "@code{cliver} provides a way to detect missing command-line
  2071. dependencies, including versions.")
  2072. (home-page "https://github.com/yaauie/cliver")
  2073. (license license:expat)))
  2074. (define-public ruby-czmq-ffi-gen
  2075. (package
  2076. (name "ruby-czmq-ffi-gen")
  2077. (version "0.13.0")
  2078. (source
  2079. (origin
  2080. (method url-fetch)
  2081. (uri (rubygems-uri "czmq-ffi-gen" version))
  2082. (sha256
  2083. (base32
  2084. "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
  2085. (build-system ruby-build-system)
  2086. (arguments
  2087. '(#:tests? #f ;; Tests are not included in the release on rubygems.org
  2088. #:phases
  2089. (modify-phases %standard-phases
  2090. (add-after 'unpack 'patch-lib_dirs
  2091. (lambda* (#:key inputs #:allow-other-keys)
  2092. (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
  2093. (("lib\\_dirs = \\[.*\\]")
  2094. (string-append "lib_dirs = ['"
  2095. (assoc-ref inputs "czmq") "/lib"
  2096. "']")))
  2097. (substitute* "lib/czmq-ffi-gen/libzmq.rb"
  2098. (("lib\\_dirs = \\[.*\\]")
  2099. (string-append "lib_dirs = ['"
  2100. (assoc-ref inputs "zeromq") "/lib"
  2101. "']"))))))))
  2102. (inputs
  2103. `(("zeromq" ,zeromq)
  2104. ("czmq" ,czmq)))
  2105. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  2106. (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
  2107. (description
  2108. "These Ruby bindings are not intended to be directly used, but rather
  2109. used by higher level bindings like those provided by CZTop.")
  2110. (home-page
  2111. "https://github.com/paddor/czmq-ffi-gen")
  2112. (license license:isc)))
  2113. (define-public ruby-cztop
  2114. (package
  2115. (name "ruby-cztop")
  2116. (version "0.12.2")
  2117. (source
  2118. (origin
  2119. (method url-fetch)
  2120. (uri (rubygems-uri "cztop" version))
  2121. (sha256
  2122. (base32
  2123. "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
  2124. (build-system ruby-build-system)
  2125. (arguments
  2126. '(#:test-target "spec"
  2127. #:phases
  2128. (modify-phases %standard-phases
  2129. (add-after 'unpack 'patch-lib_paths
  2130. (lambda* (#:key inputs #:allow-other-keys)
  2131. (substitute* "lib/cztop/poller/zmq.rb"
  2132. (("lib\\_paths = \\[.*\\]")
  2133. (string-append "lib_paths = ['"
  2134. (assoc-ref inputs "zeromq") "/lib"
  2135. "']"))))))))
  2136. (native-inputs
  2137. `(("bundler" ,bundler)
  2138. ("ruby-rspec" ,ruby-rspec)))
  2139. (inputs
  2140. `(("zeromq" ,zeromq)))
  2141. (propagated-inputs
  2142. `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
  2143. (synopsis "CZMQ Ruby bindings")
  2144. (description
  2145. "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
  2146. CZMQ. The focus of of CZTop is on being easy to use and providing first class
  2147. support for security mechanisms.")
  2148. (home-page "https://github.com/paddor/cztop")
  2149. (license license:isc)))
  2150. (define-public ruby-saikuro-treemap
  2151. (package
  2152. (name "ruby-saikuro-treemap")
  2153. (version "0.2.0")
  2154. (source (origin
  2155. (method url-fetch)
  2156. (uri (rubygems-uri "saikuro_treemap" version))
  2157. (sha256
  2158. (base32
  2159. "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
  2160. (build-system ruby-build-system)
  2161. ;; Some of the tests fail because the generated JSON has keys in a
  2162. ;; different order. This is a problem with the test suite rather than any
  2163. ;; of the involved libraries.
  2164. (arguments `(#:tests? #f))
  2165. (propagated-inputs
  2166. `(("ruby-json-pure" ,ruby-json-pure)
  2167. ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
  2168. (synopsis "Generate complexity treemap based on saikuro analysis")
  2169. (description
  2170. "This gem generates a treemap showing the complexity of Ruby code on
  2171. which it is run. It uses Saikuro under the covers to analyze Ruby code
  2172. complexity.")
  2173. (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
  2174. (license license:expat)))
  2175. (define-public ruby-oauth2
  2176. (package
  2177. (name "ruby-oauth2")
  2178. (version "1.4.2")
  2179. (source
  2180. (origin
  2181. (method url-fetch)
  2182. (uri (rubygems-uri "oauth2" version))
  2183. (sha256
  2184. (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
  2185. (build-system ruby-build-system)
  2186. (arguments
  2187. '(#:tests? #f)) ; no included tests
  2188. (propagated-inputs
  2189. `(("ruby-faraday" ,ruby-faraday)
  2190. ("ruby-jwt" ,ruby-jwt)
  2191. ("ruby-multi-json" ,ruby-multi-json)
  2192. ("ruby-multi-xml" ,ruby-multi-xml)
  2193. ("ruby-rack" ,ruby-rack)))
  2194. (synopsis "Ruby wrapper for the OAuth 2.0")
  2195. (description
  2196. "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
  2197. with a similar style to the original OAuth spec.")
  2198. (home-page "https://github.com/oauth-xx/oauth2")
  2199. (license license:expat)))
  2200. (define-public ruby-omniauth
  2201. (package
  2202. (name "ruby-omniauth")
  2203. (version "2.0.3")
  2204. (source
  2205. (origin
  2206. (method url-fetch)
  2207. (uri (rubygems-uri "omniauth" version))
  2208. (sha256
  2209. (base32 "105mzgvmn2kjaacxw01h4wqv33r7hfn5z8fxlkk3jcjar14j71bh"))))
  2210. (build-system ruby-build-system)
  2211. (propagated-inputs
  2212. `(("ruby-hashie" ,ruby-hashie)
  2213. ("ruby-rack" ,ruby-rack)
  2214. ("ruby-rack-protection" ,ruby-rack-protection)))
  2215. (native-inputs
  2216. `(("ruby-rspec" ,ruby-rspec)))
  2217. (synopsis "Generalized Rack framework for multiple-provider authentication")
  2218. (description
  2219. "This package provides a generalized Rack framework for multiple-provider
  2220. authentication.")
  2221. (home-page "https://github.com/omniauth/omniauth")
  2222. (license license:expat)))
  2223. (define-public ruby-omniauth-oauth2
  2224. (package
  2225. (name "ruby-omniauth-oauth2")
  2226. (version "1.7.1")
  2227. (source
  2228. (origin
  2229. (method url-fetch)
  2230. (uri (rubygems-uri "omniauth-oauth2" version))
  2231. (sha256
  2232. (base32
  2233. "10fr2b58sp7l6nfdvxpbi67374hkrvsf507cvda89jjs0jacy319"))))
  2234. (build-system ruby-build-system)
  2235. (arguments
  2236. '(#:phases
  2237. (modify-phases %standard-phases
  2238. (add-after 'unpack 'remove-unnecessary-dependencies
  2239. (lambda _
  2240. ;; The coveralls gem submits coverage information to an online
  2241. ;; service, and is unnecessary when running the tests
  2242. (substitute* "Gemfile"
  2243. ((".*coveralls\"") ""))
  2244. (substitute* "spec/helper.rb"
  2245. (("require \"coveralls\"") "")
  2246. (("Coveralls::SimpleCov::Formatter") ""))
  2247. #t)))))
  2248. (propagated-inputs
  2249. `(("ruby-oauth2" ,ruby-oauth2)
  2250. ("ruby-omniauth" ,ruby-omniauth)))
  2251. (native-inputs
  2252. `(("bundler" ,bundler)
  2253. ("ruby-rspec" ,ruby-rspec)
  2254. ("ruby-simplecov" ,ruby-simplecov)
  2255. ("ruby-rack-test" ,ruby-rack-test)
  2256. ("ruby-webmock" ,ruby-webmock)))
  2257. (synopsis "Abstract OAuth2 strategy for OmniAuth")
  2258. (description
  2259. "This library provides a generic OAuth2 strategy for OmniAuth. It
  2260. doesn't provide a way to gather user information, so should be used as a
  2261. building block for authentication strategies.")
  2262. (home-page "https://github.com/omniauth/omniauth-oauth2")
  2263. (license license:expat)))
  2264. (define-public ruby-open4
  2265. (package
  2266. (name "ruby-open4")
  2267. (version "1.3.4")
  2268. (source
  2269. (origin
  2270. (method url-fetch)
  2271. (uri (rubygems-uri "open4" version))
  2272. (sha256
  2273. (base32
  2274. "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
  2275. (build-system ruby-build-system)
  2276. (arguments
  2277. '(#:phases
  2278. (modify-phases %standard-phases
  2279. (add-after 'unpack 'patch
  2280. (lambda _
  2281. (substitute* "rakefile"
  2282. ;; Update the Rakefile so it works
  2283. (("-rubygems") "-rrubygems")
  2284. (("Config") "RbConfig"))
  2285. #t))
  2286. (add-before 'check 'set-LIB
  2287. (lambda _
  2288. ;; This is used in the rakefile when running the tests
  2289. (setenv "LIB" "open4")
  2290. #t)))))
  2291. (synopsis "Open child processes from Ruby and manage them easily")
  2292. (description
  2293. "@code{Open4} is a Ruby library to run child processes and manage their
  2294. input and output.")
  2295. (home-page "https://github.com/ahoward/open4")
  2296. (license license:ruby)))
  2297. (define-public ruby-options
  2298. (package
  2299. (name "ruby-options")
  2300. (version "2.3.2")
  2301. (source
  2302. (origin
  2303. (method url-fetch)
  2304. (uri (rubygems-uri "options" version))
  2305. (sha256
  2306. (base32
  2307. "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
  2308. (build-system ruby-build-system)
  2309. (arguments
  2310. '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
  2311. #:phases
  2312. (modify-phases %standard-phases
  2313. (add-before 'check 'set-LIB
  2314. (lambda _
  2315. ;; This is used in the Rakefile, and setting it avoids an issue
  2316. ;; with running the tests.
  2317. (setenv "LIB" "options")
  2318. #t)))))
  2319. (synopsis "Ruby library to parse options from *args cleanly")
  2320. (description
  2321. "The @code{options} library helps with parsing keyword options in Ruby
  2322. functions.")
  2323. (home-page "https://github.com/ahoward/options")
  2324. (license license:ruby)))
  2325. (define-public ruby-erubi
  2326. (package
  2327. (name "ruby-erubi")
  2328. (version "1.8.0")
  2329. (source
  2330. (origin
  2331. (method url-fetch)
  2332. (uri (rubygems-uri "erubi" version))
  2333. (sha256
  2334. (base32
  2335. "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
  2336. (build-system ruby-build-system)
  2337. (synopsis "ERB template engine for Ruby")
  2338. (description
  2339. "Erubi is a ERB template engine for Ruby. It is a simplified fork of
  2340. Erubis")
  2341. (home-page "https://github.com/jeremyevans/erubi")
  2342. (license license:expat)))
  2343. (define-public ruby-erubis
  2344. (package
  2345. (name "ruby-erubis")
  2346. (version "2.7.0")
  2347. (source
  2348. (origin
  2349. (method url-fetch)
  2350. (uri (rubygems-uri "erubis" version))
  2351. (sha256
  2352. (base32
  2353. "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
  2354. (build-system ruby-build-system)
  2355. (arguments
  2356. '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
  2357. (synopsis "Implementation of embedded Ruby (eRuby)")
  2358. (description
  2359. "Erubis is a fast implementation of embedded Ruby (eRuby) with several
  2360. features such as multi-language support, auto escaping, auto trimming spaces
  2361. around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
  2362. support.")
  2363. (home-page "http://www.kuwata-lab.com/erubis/")
  2364. (license license:expat)))
  2365. (define-public ruby-ethon
  2366. (package
  2367. (name "ruby-ethon")
  2368. (version "0.12.0")
  2369. (source
  2370. (origin
  2371. (method url-fetch)
  2372. (uri (rubygems-uri "ethon" version))
  2373. (sha256
  2374. (base32
  2375. "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
  2376. (build-system ruby-build-system)
  2377. (arguments
  2378. `(#:tests? #f)) ; no included tests
  2379. (inputs
  2380. `(("curl" ,curl)))
  2381. (propagated-inputs
  2382. `(("ruby-ffi" ,ruby-ffi)))
  2383. (synopsis "Very lightweight @code{libcurl} wrapper")
  2384. (description
  2385. "Ethon is a very basic @code{libcurl} wrapper using ffi.")
  2386. (home-page "https://github.com/typhoeus/ethon")
  2387. (license license:expat)))
  2388. (define-public ruby-execjs
  2389. (package
  2390. (name "ruby-execjs")
  2391. (version "2.7.0")
  2392. (source
  2393. (origin
  2394. ;; fetch from github as the gem does not contain testing code
  2395. (method git-fetch)
  2396. (uri (git-reference
  2397. (url "https://github.com/rails/execjs")
  2398. (commit (string-append "v" version))))
  2399. (file-name (git-file-name name version))
  2400. (sha256
  2401. (base32
  2402. "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
  2403. (build-system ruby-build-system)
  2404. (native-inputs
  2405. `(("bundler" ,bundler)
  2406. ;; The test suite tests all the available backends. Currenly, this just
  2407. ;; means the node backend.
  2408. ;;
  2409. ;; PASSED: test:node
  2410. ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
  2411. ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
  2412. ("node" ,node)))
  2413. (synopsis "Run JavaScript code from Ruby")
  2414. (description
  2415. "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
  2416. runtime to evaluate your JavaScript program, then returns the result to you as
  2417. a Ruby object.")
  2418. (home-page "https://github.com/rails/execjs")
  2419. (license license:expat)))
  2420. (define-public ruby-fakefs
  2421. (package
  2422. (name "ruby-fakefs")
  2423. (version "1.2.2")
  2424. (home-page "https://github.com/fakefs/fakefs")
  2425. (source (origin
  2426. ;; The Rubygems release does not contain tests.
  2427. (method git-fetch)
  2428. (uri (git-reference
  2429. (url home-page)
  2430. (commit (string-append "v" version))))
  2431. (file-name (git-file-name name version))
  2432. (sha256
  2433. (base32
  2434. "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
  2435. (build-system ruby-build-system)
  2436. (arguments
  2437. '(#:phases (modify-phases %standard-phases
  2438. (replace 'replace-git-ls-files
  2439. (lambda _
  2440. (substitute* "fakefs.gemspec"
  2441. (("`git ls-files lib README.md LICENSE`")
  2442. "`find lib README.md LICENSE -type f | sort`"))
  2443. #t))
  2444. (add-before 'check 'remove-version-constraints
  2445. (lambda _
  2446. ;; Drop hard version requirements for test dependencies.
  2447. (substitute* "fakefs.gemspec"
  2448. (("(.*add_development_dependency .*), .*" _ dep)
  2449. (string-append dep "\n")))
  2450. #t)))))
  2451. (native-inputs
  2452. `(("ruby-bump" ,ruby-bump)
  2453. ("ruby-maxitest" ,ruby-maxitest)
  2454. ("ruby-rubocop" ,ruby-rubocop)
  2455. ("ruby-rspec" ,ruby-rspec)))
  2456. (synopsis "Fake file system for Ruby")
  2457. (description
  2458. "This package provides a fake file system for use in test suites. It
  2459. avoids the need for manually creating temporary directories, or dealing
  2460. with platform intricacies in @code{File} and @code{FileUtils}.")
  2461. (license license:expat)))
  2462. (define-public ruby-orderedhash
  2463. (package
  2464. (name "ruby-orderedhash")
  2465. (version "0.0.6")
  2466. (source (origin
  2467. (method url-fetch)
  2468. (uri (rubygems-uri "orderedhash" version))
  2469. (sha256
  2470. (base32
  2471. "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
  2472. (build-system ruby-build-system)
  2473. (arguments
  2474. '(#:tests? #f)) ; no test suite
  2475. (synopsis "Ruby library providing an order-preserving hash")
  2476. (description "Orderedhash is a Ruby library providing a hash
  2477. implementation that preserves the order of items and features some array-like
  2478. extensions.")
  2479. (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
  2480. (license license:public-domain)))
  2481. (define-public ruby-libxml
  2482. (package
  2483. (name "ruby-libxml")
  2484. (version "3.0.0")
  2485. (source
  2486. (origin
  2487. (method url-fetch)
  2488. (uri (rubygems-uri "libxml-ruby" version))
  2489. (sha256
  2490. (base32
  2491. "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
  2492. (build-system ruby-build-system)
  2493. (inputs
  2494. `(("zlib" ,zlib)
  2495. ("libxml2" ,libxml2)))
  2496. (arguments
  2497. '(#:tests? #f ; test suite hangs for unknown reason
  2498. #:gem-flags
  2499. (list "--no-document" ; TODO: Re-enable when documentation
  2500. ; generation works
  2501. "--"
  2502. (string-append "--with-xml2-include="
  2503. (assoc-ref %build-inputs "libxml2")
  2504. "/include/libxml2" ))))
  2505. (synopsis "Ruby bindings for GNOME Libxml2")
  2506. (description "The Libxml-Ruby project provides Ruby language bindings for
  2507. the GNOME Libxml2 XML toolkit.")
  2508. (home-page "https://xml4r.github.com/libxml-ruby")
  2509. (license license:expat)))
  2510. (define-public ruby-lino
  2511. (package
  2512. (name "ruby-lino")
  2513. (version "1.1.0")
  2514. (source
  2515. (origin
  2516. (method url-fetch)
  2517. (uri (rubygems-uri "lino" version))
  2518. (sha256
  2519. (base32
  2520. "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
  2521. (build-system ruby-build-system)
  2522. (arguments
  2523. '(#:tests? #f)) ; No included tests
  2524. (propagated-inputs
  2525. `(("ruby-hamster" ,ruby-hamster)
  2526. ("ruby-open4" ,ruby-open4)))
  2527. (synopsis "Build and execute commands in Ruby")
  2528. (description
  2529. "@code{Lino} provides an interface to run external commands. It provides
  2530. an interface to add options as well as managing the standard input, output and
  2531. error streams.")
  2532. (home-page "https://github.com/tobyclemson/lino")
  2533. (license license:expat)))
  2534. (define-public ruby-xml-simple
  2535. (package
  2536. (name "ruby-xml-simple")
  2537. (version "1.1.5")
  2538. (source (origin
  2539. (method url-fetch)
  2540. (uri (rubygems-uri "xml-simple" version))
  2541. (sha256
  2542. (base32
  2543. "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
  2544. (build-system ruby-build-system)
  2545. (arguments
  2546. '(#:tests? #f)) ; no test suite
  2547. (synopsis "Simple Ruby library for XML processing")
  2548. (description "This library provides a simple API for XML processing in
  2549. Ruby.")
  2550. (home-page "https://github.com/maik/xml-simple")
  2551. (license license:ruby)))
  2552. (define-public ruby-thor
  2553. (package
  2554. (name "ruby-thor")
  2555. (version "1.0.1")
  2556. (source (origin
  2557. ;; Pull from git because the gem has no tests.
  2558. (method git-fetch)
  2559. (uri (git-reference
  2560. (url "https://github.com/erikhuda/thor")
  2561. (commit (string-append "v" version))))
  2562. (file-name (git-file-name name version))
  2563. (sha256
  2564. (base32
  2565. "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
  2566. (build-system ruby-build-system)
  2567. (arguments
  2568. '(#:phases (modify-phases %standard-phases
  2569. (add-after 'unpack 'fix-readline-tests
  2570. (lambda _
  2571. ;; Ensure Readline is initialized before running the
  2572. ;; test to avoid a type clash with the mock ::Readline.
  2573. ;; See <https://github.com/erikhuda/thor/pull/717>.
  2574. (substitute* "spec/line_editor/readline_spec.rb"
  2575. (("unless defined\\? ::Readline" all)
  2576. (string-append "Thor::LineEditor::Readline.available?\n"
  2577. all)))
  2578. #t))
  2579. (add-after 'unpack 'remove-coveralls-dependency
  2580. (lambda _
  2581. ;; Do not hook the test suite into the online
  2582. ;; coveralls service.
  2583. (substitute* "Gemfile"
  2584. ((".*coveralls.*") ""))
  2585. (substitute* "spec/helper.rb"
  2586. (("require \"coveralls\"") "")
  2587. (("Coveralls::SimpleCov::Formatter") "")
  2588. ;; Also drop the WebMock dependency which is only
  2589. ;; present to allow a coveralls.io connection, and
  2590. ;; would otherwise introduce a circular dependency.
  2591. (("require \"webmock/rspec\"") "")
  2592. (("WebMock\\.disable_net_connect.*") ""))
  2593. #t))
  2594. (add-after 'unpack 'disable-network-tests
  2595. (lambda _
  2596. ;; These tests attempt to look up example.com.
  2597. (substitute* "spec/actions/file_manipulation_spec.rb"
  2598. (("it \"accepts (https?) remote sources" _ proto)
  2599. (string-append "xit \"accepts " proto " remote sources")))
  2600. #t))
  2601. (add-after 'unpack 'disable-quality-tests
  2602. (lambda _
  2603. ;; These tests attempt to check the git repository for
  2604. ;; tabs vs spaces, double vs single quotes, etc, and
  2605. ;; depend on the git checkout.
  2606. (delete-file "spec/quality_spec.rb")
  2607. #t))
  2608. (add-before 'check 'make-files-writable
  2609. (lambda _
  2610. ;; The tests needs rw access to the test suite.
  2611. (for-each make-file-writable (find-files "spec"))
  2612. #t))
  2613. (replace 'check
  2614. (lambda _
  2615. (invoke "rspec" "spec"))))))
  2616. (native-inputs
  2617. `(("ruby-rspec" ,ruby-rspec)
  2618. ("ruby-simplecov" ,ruby-simplecov)))
  2619. (synopsis "Ruby toolkit for building command-line interfaces")
  2620. (description "Thor is a toolkit for building powerful command-line
  2621. interfaces.")
  2622. (home-page "http://whatisthor.com/")
  2623. (license license:expat)))
  2624. (define-public ruby-lumberjack
  2625. (package
  2626. (name "ruby-lumberjack")
  2627. (version "1.0.13")
  2628. (source (origin
  2629. (method url-fetch)
  2630. (uri (rubygems-uri "lumberjack" version))
  2631. (sha256
  2632. (base32
  2633. "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
  2634. (build-system ruby-build-system)
  2635. (native-inputs
  2636. `(("ruby-rspec" ,ruby-rspec)
  2637. ("ruby-timecop" ,ruby-timecop)))
  2638. (synopsis "Logging utility library for Ruby")
  2639. (description "Lumberjack is a simple logging utility that can be a drop in
  2640. replacement for Logger or ActiveSupport::BufferedLogger. It provides support
  2641. for automatically rolling log files even with multiple processes writing the
  2642. same log file.")
  2643. (home-page "https://github.com/bdurand/lumberjack")
  2644. (license license:expat)))
  2645. (define-public ruby-rbnacl
  2646. (package
  2647. (name "ruby-rbnacl")
  2648. (version "6.0.1")
  2649. (source
  2650. (origin
  2651. (method url-fetch)
  2652. (uri (rubygems-uri "rbnacl" version))
  2653. (sha256
  2654. (base32
  2655. "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
  2656. (build-system ruby-build-system)
  2657. (arguments
  2658. `(#:phases
  2659. (modify-phases %standard-phases
  2660. (add-after 'unpack 'remove-unnecessary-dependencies
  2661. (lambda _
  2662. ;; Coveralls relates to a network service, and Rubocop to code
  2663. ;; linting and both are unnecessary to run the tests
  2664. (substitute* "Gemfile"
  2665. ((".*rubocop.*") "\n")
  2666. ((".*guard-rspec.*") "\n")
  2667. ((".*coveralls.*") "\n"))
  2668. (substitute* "spec/spec_helper.rb"
  2669. (("require \"coveralls\"") "")
  2670. (("Coveralls.wear!") ""))
  2671. #t))
  2672. (add-after 'unpack 'use-libsodium-from-store
  2673. (lambda* (#:key inputs #:allow-other-keys)
  2674. (substitute* '("lib/rbnacl/init.rb"
  2675. "lib/rbnacl/sodium.rb")
  2676. (("ffi_lib \\[.+\\]")
  2677. (string-append "ffi_lib [\""
  2678. (assoc-ref inputs "libsodium") "/lib/libsodium.so"
  2679. "\"]")))
  2680. #t))
  2681. ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
  2682. (replace 'check
  2683. (lambda* (#:key tests? #:allow-other-keys)
  2684. (when tests?
  2685. (invoke "rspec"))
  2686. #t)))))
  2687. (propagated-inputs
  2688. `(("ruby-ffi" ,ruby-ffi)))
  2689. (inputs
  2690. `(("libsodium" ,libsodium)))
  2691. (native-inputs
  2692. `(("bundler" ,bundler)
  2693. ("ruby-rspec" ,ruby-rspec)))
  2694. (synopsis "Ruby FFI binding to libsodium")
  2695. (description
  2696. "This package provides Ruby FFI bindings to the Networking and
  2697. Cryptography (NaCl) library, also known as libsodium. This provides a
  2698. high-level toolkit for building cryptographic systems and protocols.")
  2699. (home-page "https://github.com/crypto-rb/rbnacl")
  2700. (license license:expat)))
  2701. (define-public ruby-hkdf
  2702. (package
  2703. (name "ruby-hkdf")
  2704. (version "1.0.0")
  2705. (source
  2706. (origin
  2707. (method git-fetch)
  2708. (uri (git-reference
  2709. (url "https://github.com/jtdowney/hkdf")
  2710. (commit (string-append "v" version))))
  2711. (file-name (git-file-name name version))
  2712. (sha256
  2713. (base32
  2714. "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
  2715. (build-system ruby-build-system)
  2716. (arguments
  2717. `(#:test-target "default"))
  2718. (native-inputs
  2719. `(("ruby-rspec" ,ruby-rspec)))
  2720. (synopsis "HMAC-based Key Derivation Function")
  2721. (description
  2722. "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
  2723. HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
  2724. take some source key material and generate suitable cryptographic keys from it.")
  2725. (home-page "https://github.com/jtdowney/hkdf")
  2726. (license license:expat)))
  2727. (define-public ruby-nenv
  2728. (package
  2729. (name "ruby-nenv")
  2730. (version "0.3.0")
  2731. (source (origin
  2732. (method url-fetch)
  2733. (uri (rubygems-uri "nenv" version))
  2734. (sha256
  2735. (base32
  2736. "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
  2737. (build-system ruby-build-system)
  2738. (arguments
  2739. `(#:tests? #f)) ; no tests included
  2740. (native-inputs
  2741. `(("ruby-rspec" ,ruby-rspec)
  2742. ("bundler" ,bundler)))
  2743. (synopsis "Ruby interface for modifying the environment")
  2744. (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
  2745. and inspect the environment.")
  2746. (home-page "https://github.com/e2/nenv")
  2747. (license license:expat)))
  2748. (define-public ruby-ptools
  2749. (package
  2750. (name "ruby-ptools")
  2751. (version "1.3.5")
  2752. (source (origin
  2753. (method url-fetch)
  2754. (uri (rubygems-uri "ptools" version))
  2755. (sha256
  2756. (base32
  2757. "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
  2758. (build-system ruby-build-system)
  2759. (arguments
  2760. '(#:phases (modify-phases %standard-phases
  2761. (add-after 'unpack 'patch-/bin/ls
  2762. (lambda _
  2763. (substitute* "test/test_binary.rb"
  2764. (("/bin/ls")
  2765. (which "ls")))
  2766. #t))
  2767. (add-before 'install 'create-gem
  2768. (lambda _
  2769. ;; Do not attempt to sign the gem.
  2770. (substitute* "Rakefile"
  2771. (("spec\\.signing_key = .*")
  2772. ""))
  2773. (invoke "rake" "gem:create"))))))
  2774. (synopsis "Extra methods for Ruby's @code{File} class")
  2775. (description
  2776. "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
  2777. class with many additional methods modelled after common POSIX tools, such as
  2778. @code{File.which} for finding executables, @code{File.tail} to print the last
  2779. lines of a file, @code{File.wc} to count words, and so on.")
  2780. (home-page "https://github.com/djberg96/ptools")
  2781. (license license:artistic2.0)))
  2782. (define-public ruby-permutation
  2783. (package
  2784. (name "ruby-permutation")
  2785. (version "0.1.8")
  2786. (source (origin
  2787. (method url-fetch)
  2788. (uri (rubygems-uri "permutation" version))
  2789. (sha256
  2790. (base32
  2791. "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
  2792. (build-system ruby-build-system)
  2793. (arguments
  2794. `(#:phases
  2795. (modify-phases %standard-phases
  2796. (add-after 'unpack 'fix-rakefile
  2797. (lambda _
  2798. (substitute* "Rakefile"
  2799. (("require 'rake/gempackagetask'")
  2800. "require 'rubygems/package_task'")
  2801. (("include Config") ""))
  2802. #t))
  2803. (replace 'check
  2804. (lambda _
  2805. (invoke "ruby" "-Ilib" "test/test.rb"))))))
  2806. (synopsis "Library to perform operations with sequence permutations")
  2807. (description "This package provides a Ruby library to perform different
  2808. operations with permutations of sequences, such as strings and arrays.")
  2809. (home-page "https://flori.github.io/permutation")
  2810. (license license:gpl2))) ; GPL 2 only
  2811. (define-public ruby-shellany
  2812. (package
  2813. (name "ruby-shellany")
  2814. (version "0.0.1")
  2815. (source (origin
  2816. (method url-fetch)
  2817. (uri (rubygems-uri "shellany" version))
  2818. (sha256
  2819. (base32
  2820. "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
  2821. (build-system ruby-build-system)
  2822. (arguments
  2823. `(#:test-target "default"
  2824. #:phases
  2825. (modify-phases %standard-phases
  2826. (add-after 'unpack 'fix-version-test
  2827. (lambda _
  2828. (substitute* "spec/shellany_spec.rb"
  2829. (("^RSpec") "require \"shellany\"\nRSpec"))
  2830. #t)))))
  2831. (native-inputs
  2832. `(("ruby-rspec" ,ruby-rspec)
  2833. ("ruby-nenv" ,ruby-nenv)
  2834. ("bundler" ,bundler)))
  2835. (synopsis "Capture command output")
  2836. (description "Shellany is a Ruby library providing functions to capture
  2837. the output produced by running shell commands.")
  2838. (home-page "https://rubygems.org/gems/shellany")
  2839. (license license:expat)))
  2840. (define-public ruby-notiffany
  2841. (package
  2842. (name "ruby-notiffany")
  2843. (version "0.1.3")
  2844. (source (origin
  2845. (method url-fetch)
  2846. (uri (rubygems-uri "notiffany" version))
  2847. (sha256
  2848. (base32
  2849. "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
  2850. (build-system ruby-build-system)
  2851. ;; Tests are not included in the gem.
  2852. (arguments `(#:tests? #f))
  2853. (propagated-inputs
  2854. `(("ruby-shellany" ,ruby-shellany)
  2855. ("ruby-nenv" ,ruby-nenv)))
  2856. (native-inputs
  2857. `(("bundler" ,bundler)))
  2858. (synopsis "Wrapper library for notification libraries")
  2859. (description "Notiffany is a Ruby wrapper library for notification
  2860. libraries such as Libnotify.")
  2861. (home-page "https://github.com/guard/notiffany")
  2862. (license license:expat)))
  2863. (define-public ruby-forking-test-runner
  2864. (package
  2865. (name "ruby-forking-test-runner")
  2866. (version "1.6.0")
  2867. (home-page "https://github.com/grosser/forking_test_runner")
  2868. (source (origin
  2869. (method git-fetch)
  2870. (uri (git-reference (url home-page)
  2871. (commit (string-append "v" version))))
  2872. (file-name (git-file-name name version))
  2873. (sha256
  2874. (base32
  2875. "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
  2876. (build-system ruby-build-system)
  2877. (arguments
  2878. '(#:test-target "spec"
  2879. ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
  2880. ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
  2881. #:tests? #f
  2882. #:phases (modify-phases %standard-phases
  2883. (replace 'replace-git-ls-files
  2884. (lambda _
  2885. (substitute* "forking_test_runner.gemspec"
  2886. (("`git ls-files lib/ bin/ MIT-LICENSE`")
  2887. "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
  2888. #t))
  2889. (add-before 'check 'remove-version-constraints
  2890. (lambda _
  2891. ;; Ignore hard coded version constraints for the tests.
  2892. (delete-file "Gemfile.lock")
  2893. #t))
  2894. (add-before 'check 'set-HOME
  2895. (lambda _
  2896. ;; Many tests invoke Bundler, and fails when Bundler
  2897. ;; warns that /homeless-shelter does not exist.
  2898. (setenv "HOME" "/tmp")
  2899. #t)))))
  2900. (native-inputs
  2901. `(("ruby-activerecord" ,ruby-activerecord)
  2902. ("ruby-bump" ,ruby-bump)
  2903. ("ruby-rspec" ,ruby-rspec)
  2904. ("ruby-sqlite3" ,ruby-sqlite3)
  2905. ("ruby-wwtd" ,ruby-wwtd)))
  2906. (propagated-inputs
  2907. `(("ruby-parallel-tests" ,ruby-parallel-tests)))
  2908. (synopsis "Run every test in a fork")
  2909. (description
  2910. "This package is a wrapper around @code{parallel_tests} that runs every
  2911. test in a fork to avoid pollution and get clean output per test.")
  2912. (license license:expat)))
  2913. (define-public ruby-formatador
  2914. (package
  2915. (name "ruby-formatador")
  2916. (version "0.2.5")
  2917. (source (origin
  2918. (method url-fetch)
  2919. (uri (rubygems-uri "formatador" version))
  2920. (sha256
  2921. (base32
  2922. "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
  2923. (build-system ruby-build-system)
  2924. ;; Circular dependency: Tests require ruby-shindo, which requires
  2925. ;; ruby-formatador at runtime.
  2926. (arguments `(#:tests? #f))
  2927. (synopsis "Ruby library to format text on stdout")
  2928. (description "Formatador is a Ruby library to format text printed to the
  2929. standard output stream.")
  2930. (home-page "https://github.com/geemus/formatador")
  2931. (license license:expat)))
  2932. (define-public ruby-fuubar
  2933. (package
  2934. (name "ruby-fuubar")
  2935. (version "2.3.2")
  2936. (source
  2937. (origin
  2938. ;; Fetch from the git repository, as the gem package doesn't include
  2939. ;; the tests.
  2940. (method git-fetch)
  2941. (uri (git-reference
  2942. (url "https://github.com/thekompanee/fuubar")
  2943. (commit (string-append "releases/v" version))))
  2944. (file-name (git-file-name name version))
  2945. (sha256
  2946. (base32
  2947. "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
  2948. (build-system ruby-build-system)
  2949. (arguments
  2950. '(;; TODO: Some tests fail, unsure why.
  2951. ;; 21 examples, 7 failures
  2952. #:tests? #f
  2953. #:phases
  2954. (modify-phases %standard-phases
  2955. (add-before 'build 'delete-certificate
  2956. (lambda _
  2957. ;; Remove 's.cert_chain' as we do not build with a private key
  2958. (substitute* "fuubar.gemspec"
  2959. ((".*cert_chain.*") "")
  2960. ((".*signing_key.*") ""))
  2961. #t))
  2962. (replace 'check
  2963. (lambda* (#:key tests? #:allow-other-keys)
  2964. (when tests?
  2965. (invoke "rspec"))
  2966. #t)))))
  2967. (native-inputs
  2968. `(("bundler" ,bundler)))
  2969. (propagated-inputs
  2970. `(("ruby-rspec-core" ,ruby-rspec-core)
  2971. ("ruby-progressbar" ,ruby-progressbar)))
  2972. (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
  2973. (description
  2974. "Fuubar is an RSpec formatter that uses a progress bar instead of a
  2975. string of letters and dots as feedback. It also stops on the first test
  2976. failure.")
  2977. (home-page "https://github.com/thekompanee/fuubar")
  2978. (license license:expat)))
  2979. (define-public ruby-haml
  2980. (package
  2981. (name "ruby-haml")
  2982. (version "5.0.4")
  2983. (source
  2984. (origin
  2985. (method url-fetch)
  2986. (uri (rubygems-uri "haml" version))
  2987. (sha256
  2988. (base32
  2989. "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
  2990. (build-system ruby-build-system)
  2991. (arguments
  2992. '(#:tests? #f)) ; No included tests
  2993. (propagated-inputs
  2994. `(("ruby-tilt" ,ruby-tilt)
  2995. ("ruby-temple" ,ruby-temple)))
  2996. (synopsis "Haml is a Ruby library to generate HTML documents")
  2997. (description
  2998. "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
  2999. HTML or XML that is designed to express the structure of documents using
  3000. indentation rather than closing tags. It was originally envisioned as a
  3001. plugin for Ruby on Rails, but it can function as a stand-alone templating
  3002. engine.")
  3003. (home-page "https://haml.info/")
  3004. (license license:expat)))
  3005. (define-public ruby-hamster
  3006. (package
  3007. (name "ruby-hamster")
  3008. (version "3.0.0")
  3009. (source
  3010. (origin
  3011. (method url-fetch)
  3012. (uri (rubygems-uri "hamster" version))
  3013. (sha256
  3014. (base32
  3015. "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
  3016. (build-system ruby-build-system)
  3017. (arguments
  3018. '(#:phases
  3019. (modify-phases %standard-phases
  3020. (add-after 'unpack 'remove-unnecessary-dependencies
  3021. (lambda _
  3022. ;; pry is a debugging tool, and is unnecessary when running the
  3023. ;; tests
  3024. (substitute* "spec/lib/hamster/vector/insert_spec.rb"
  3025. (("require 'pry'") ""))
  3026. (substitute* "spec/spec_helper.rb"
  3027. (("require \"pry\"") "")
  3028. ;; CodeClimate is an online service, and is unnecessary for
  3029. ;; running the tests
  3030. (("require \"codeclimate-test-reporter\"") "")
  3031. (("CodeClimate.*\n") ""))
  3032. #t))
  3033. ;; No Rakefile is included, so run rspec directly.
  3034. (replace 'check
  3035. (lambda* (#:key tests? #:allow-other-keys)
  3036. (when tests?
  3037. (invoke "rspec"))
  3038. #t)))))
  3039. (propagated-inputs
  3040. `(("ruby-concurrent" ,ruby-concurrent)))
  3041. (native-inputs
  3042. `(("ruby-rspec" ,ruby-rspec)))
  3043. (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
  3044. (description
  3045. "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
  3046. @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
  3047. immutable queue or stack).")
  3048. (home-page "https://github.com/hamstergem/hamster")
  3049. (license license:expat)))
  3050. (define-public ruby-hashdiff
  3051. (package
  3052. (name "ruby-hashdiff")
  3053. (version "1.0.1")
  3054. (source
  3055. (origin
  3056. (method url-fetch)
  3057. (uri (rubygems-uri "hashdiff" version))
  3058. (sha256
  3059. (base32
  3060. "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
  3061. (build-system ruby-build-system)
  3062. (arguments
  3063. '(#:phases
  3064. (modify-phases %standard-phases
  3065. ;; Run tests directly via rspec to avoid depending on rubocop.
  3066. (replace 'check
  3067. (lambda* (#:key tests? #:allow-other-keys)
  3068. (when tests?
  3069. (invoke "rspec"))
  3070. #t)))))
  3071. (native-inputs
  3072. `(("bundler" ,bundler)
  3073. ("ruby-rspec" ,ruby-rspec-2)))
  3074. (synopsis "HashDiff computes the smallest difference between two hashes")
  3075. (description
  3076. "HashDiff is a Ruby library to compute the smallest difference between
  3077. two hashes.")
  3078. (home-page "https://github.com/liufengyun/hashdiff")
  3079. (license license:expat)))
  3080. (define-public ruby-hydra
  3081. ;; No releases yet.
  3082. (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
  3083. (revision "0"))
  3084. (package
  3085. (name "ruby-hydra")
  3086. (version (git-version "0.0" revision commit))
  3087. (home-page "https://github.com/hyphenation/hydra")
  3088. (source (origin
  3089. (method git-fetch)
  3090. (uri (git-reference (url home-page) (commit commit)))
  3091. (file-name (git-file-name name version))
  3092. (sha256
  3093. (base32
  3094. "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
  3095. (build-system ruby-build-system)
  3096. (arguments
  3097. '(#:phases (modify-phases %standard-phases
  3098. (add-after 'unpack 'make-files-writable
  3099. (lambda _
  3100. (for-each make-file-writable (find-files "."))
  3101. #t))
  3102. (replace 'check
  3103. (lambda _
  3104. (invoke "rspec"))))))
  3105. (native-inputs
  3106. `(("ruby-rspec" ,ruby-rspec)))
  3107. (propagated-inputs
  3108. `(("ruby-byebug" ,ruby-byebug)))
  3109. (synopsis "Ruby hyphenation patterns")
  3110. (description
  3111. "ruby-hydra is a Ruby library for working with hyphenation patterns.")
  3112. (license license:expat))))
  3113. (define-public ruby-shindo
  3114. (package
  3115. (name "ruby-shindo")
  3116. (version "0.3.8")
  3117. (source (origin
  3118. (method url-fetch)
  3119. (uri (rubygems-uri "shindo" version))
  3120. (sha256
  3121. (base32
  3122. "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
  3123. (build-system ruby-build-system)
  3124. (arguments
  3125. `(#:test-target "shindo_tests"
  3126. #:phases
  3127. (modify-phases %standard-phases
  3128. (add-after 'unpack 'fix-tests
  3129. (lambda _
  3130. (substitute* "tests/tests_helper.rb"
  3131. (("-rubygems") ""))
  3132. (substitute* "Rakefile"
  3133. (("system \"shindo") "system \"./bin/shindo")
  3134. ;; This test doesn't work, so we disable it.
  3135. (("fail \"The build_error test should fail") "#")
  3136. ((" -rubygems") ""))
  3137. #t)))))
  3138. (propagated-inputs
  3139. `(("ruby-formatador" ,ruby-formatador)))
  3140. (synopsis "Simple depth first Ruby testing")
  3141. (description "Shindo is a simple depth first testing library for Ruby.")
  3142. (home-page "https://github.com/geemus/shindo")
  3143. (license license:expat)))
  3144. (define-public ruby-rubygems-tasks
  3145. (package
  3146. (name "ruby-rubygems-tasks")
  3147. (version "0.2.5")
  3148. (source (origin
  3149. (method url-fetch)
  3150. (uri (rubygems-uri "rubygems-tasks" version))
  3151. (sha256
  3152. (base32
  3153. "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
  3154. (build-system ruby-build-system)
  3155. ;; Tests need Internet access.
  3156. (arguments `(#:tests? #f))
  3157. (native-inputs
  3158. `(("ruby-rspec" ,ruby-rspec)
  3159. ("ruby-yard" ,ruby-yard)))
  3160. (synopsis "Rake tasks for managing and releasing Ruby Gems")
  3161. (description "Rubygems-task provides Rake tasks for managing and releasing
  3162. Ruby Gems.")
  3163. (home-page "https://github.com/postmodern/rubygems-tasks")
  3164. (license license:expat)))
  3165. (define-public ruby-rubyzip
  3166. (package
  3167. (name "ruby-rubyzip")
  3168. (version "1.2.1")
  3169. (source
  3170. (origin
  3171. (method url-fetch)
  3172. (uri (rubygems-uri "rubyzip" version))
  3173. (sha256
  3174. (base32
  3175. "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
  3176. (build-system ruby-build-system)
  3177. (arguments
  3178. '(#:phases
  3179. (modify-phases %standard-phases
  3180. (add-before 'check 'patch-tests
  3181. (lambda* (#:key inputs #:allow-other-keys)
  3182. (substitute* "test/gentestfiles.rb"
  3183. (("/usr/bin/zip")
  3184. (string-append
  3185. (assoc-ref inputs "zip") "/bin/zip")))
  3186. (substitute* "test/input_stream_test.rb"
  3187. (("/usr/bin/env ruby") (which "ruby")))
  3188. #t)))))
  3189. (native-inputs
  3190. `(("bundler" ,bundler)
  3191. ("ruby-simplecov" ,ruby-simplecov)
  3192. ("zip" ,zip)
  3193. ("unzip" ,unzip)))
  3194. (synopsis "Ruby module is for reading and writing zip files")
  3195. (description
  3196. "The rubyzip module provides ways to read from and create zip files.")
  3197. (home-page "https://github.com/rubyzip/rubyzip")
  3198. (license license:bsd-2)))
  3199. (define-public ruby-simplecov-html
  3200. (package
  3201. (name "ruby-simplecov-html")
  3202. (version "0.10.2")
  3203. (source (origin
  3204. (method url-fetch)
  3205. (uri (rubygems-uri "simplecov-html" version))
  3206. (sha256
  3207. (base32
  3208. "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
  3209. (build-system ruby-build-system)
  3210. (arguments `(#:tests? #f)) ; there are no tests
  3211. (native-inputs
  3212. `(("bundler" ,bundler)))
  3213. (synopsis "Default HTML formatter for SimpleCov code coverage tool")
  3214. (description "This package provides the default HTML formatter for
  3215. the SimpleCov code coverage tool for Ruby version 1.9 and above.")
  3216. (home-page "https://github.com/colszowka/simplecov-html")
  3217. (license license:expat)))
  3218. (define-public ruby-simplecov
  3219. (package
  3220. (name "ruby-simplecov")
  3221. (version "0.17.1")
  3222. (source (origin
  3223. (method url-fetch)
  3224. (uri (rubygems-uri "simplecov" version))
  3225. (sha256
  3226. (base32
  3227. "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
  3228. (build-system ruby-build-system)
  3229. ;; Simplecov depends on rubocop for code style checking at build time.
  3230. ;; Rubocop needs simplecov at build time.
  3231. (arguments `(#:tests? #f))
  3232. (propagated-inputs
  3233. `(("ruby-json" ,ruby-json)
  3234. ("ruby-docile" ,ruby-docile)
  3235. ("ruby-simplecov-html" ,ruby-simplecov-html)))
  3236. (native-inputs
  3237. `(("bundler" ,bundler)))
  3238. (synopsis "Code coverage framework for Ruby")
  3239. (description "SimpleCov is a code coverage framework for Ruby with a
  3240. powerful configuration library and automatic merging of coverage across test
  3241. suites.")
  3242. (home-page "https://github.com/colszowka/simplecov")
  3243. (license license:expat)))
  3244. (define-public ruby-useragent
  3245. (package
  3246. (name "ruby-useragent")
  3247. (version "0.16.10")
  3248. (source (origin
  3249. (method url-fetch)
  3250. (uri (rubygems-uri "useragent" version))
  3251. (sha256
  3252. (base32
  3253. "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
  3254. (build-system ruby-build-system)
  3255. (arguments
  3256. '(#:tests? #f)) ; no test suite
  3257. (synopsis "HTTP user agent parser for Ruby")
  3258. (description "UserAgent is a Ruby library that parses and compares HTTP
  3259. User Agents.")
  3260. (home-page "https://github.com/gshutler/useragent")
  3261. (license license:expat)))
  3262. (define-public ruby-backports
  3263. (package
  3264. (name "ruby-backports")
  3265. (version "3.11.4")
  3266. (source
  3267. (origin
  3268. (method url-fetch)
  3269. (uri (rubygems-uri "backports" version))
  3270. (sha256
  3271. (base32
  3272. "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
  3273. (build-system ruby-build-system)
  3274. (arguments
  3275. '(;; TODO: This should be default, but there is one test failure
  3276. #:test-target "all_spec"))
  3277. (native-inputs
  3278. `(("ruby-mspec" ,ruby-mspec)
  3279. ("ruby-activesupport" ,ruby-activesupport)))
  3280. (synopsis "Backports of the features in newer Ruby versions")
  3281. (description
  3282. "Backports enables more compatibility across Ruby versions by providing
  3283. backports of some features.")
  3284. (home-page "https://github.com/marcandre/backports")
  3285. (license license:expat)))
  3286. (define-public ruby-bacon
  3287. (package
  3288. (name "ruby-bacon")
  3289. (version "1.2.0")
  3290. (source (origin
  3291. (method url-fetch)
  3292. (uri (rubygems-uri "bacon" version))
  3293. (sha256
  3294. (base32
  3295. "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
  3296. (build-system ruby-build-system)
  3297. (synopsis "Small RSpec clone")
  3298. (description "Bacon is a small RSpec clone providing all essential
  3299. features.")
  3300. (home-page "https://github.com/chneukirchen/bacon")
  3301. (license license:expat)))
  3302. (define-public ruby-bacon-bits
  3303. (package
  3304. (name "ruby-bacon-bits")
  3305. (version "0.1.0")
  3306. (source
  3307. (origin
  3308. (method url-fetch)
  3309. (uri (rubygems-uri "bacon-bits" version))
  3310. (sha256
  3311. (base32
  3312. "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
  3313. (build-system ruby-build-system)
  3314. (arguments
  3315. ;; No tests
  3316. '(#:tests? #f))
  3317. (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
  3318. (synopsis "Extensions to Bacon, for disabling tests, before and after
  3319. blocks and more")
  3320. (description
  3321. "This extends the bacon testing framework with useful extensions to
  3322. disable tests, have before and after blocks that run once and more.")
  3323. (home-page "https://github.com/cldwalker/bacon-bits")
  3324. (license license:expat)))
  3325. (define-public ruby-bacon-colored-output
  3326. (package
  3327. (name "ruby-bacon-colored-output")
  3328. (version "1.1.1")
  3329. (source
  3330. (origin
  3331. (method url-fetch)
  3332. (uri (rubygems-uri "bacon-colored_output" version))
  3333. (sha256
  3334. (base32
  3335. "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
  3336. (build-system ruby-build-system)
  3337. (arguments
  3338. '(;; No included tests
  3339. #:tests? #f))
  3340. (propagated-inputs
  3341. `(("ruby-bacon" ,ruby-bacon)))
  3342. (synopsis "Colored output for Bacon test framework")
  3343. (description
  3344. "This package adds color through ANSI escape codes to Bacon test
  3345. output.")
  3346. (home-page "https://github.com/whitequark/bacon-colored_output")
  3347. (license license:expat)))
  3348. (define-public ruby-connection-pool
  3349. (package
  3350. (name "ruby-connection-pool")
  3351. (version "2.2.2")
  3352. (source (origin
  3353. (method url-fetch)
  3354. (uri (rubygems-uri "connection_pool" version))
  3355. (sha256
  3356. (base32
  3357. "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
  3358. (build-system ruby-build-system)
  3359. (native-inputs
  3360. `(("bundler" ,bundler)))
  3361. (synopsis "Generic connection pool for Ruby")
  3362. (description "Connection_pool provides a generic connection pooling
  3363. interface for Ruby programs.")
  3364. (home-page "https://github.com/mperham/connection_pool")
  3365. (license license:expat)))
  3366. (define-public ruby-fast-gettext
  3367. (package
  3368. (name "ruby-fast-gettext")
  3369. (version "2.0.3")
  3370. (home-page "https://github.com/grosser/fast_gettext")
  3371. (source (origin
  3372. (method git-fetch)
  3373. (uri (git-reference (url home-page)
  3374. (commit (string-append "v" version))))
  3375. (file-name (git-file-name name version))
  3376. (sha256
  3377. (base32
  3378. "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
  3379. (build-system ruby-build-system)
  3380. (arguments
  3381. '(#:test-target "spec"
  3382. #:phases (modify-phases %standard-phases
  3383. (add-before 'check 'remove-version-constraints
  3384. (lambda _
  3385. (delete-file "Gemfile.lock")
  3386. #t))
  3387. (add-before 'check 'remove-activerecord-test
  3388. (lambda _
  3389. ;; FIXME: This test fails because ActiveRecord depends on
  3390. ;; a different version of ruby-sqlite than the currently
  3391. ;; available one.
  3392. (delete-file
  3393. "spec/fast_gettext/translation_repository/db_spec.rb")
  3394. #t))
  3395. (add-before 'check 'disable-i18n-test
  3396. (lambda _
  3397. ;; XXX: This test checks i18n intricasies with Rails 3 and
  3398. ;; automatically disables itself for Rails 4.0, but does
  3399. ;; not know about newer versions as it has not been updated
  3400. ;; since 2014. Disable for later versions of Rails too.
  3401. (substitute* "spec/fast_gettext/vendor/string_spec.rb"
  3402. (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
  3403. "ActiveRecord::VERSION::MINOR == 0"))
  3404. "ActiveRecord::VERSION::MAJOR >= 4"))
  3405. #t)))))
  3406. (native-inputs
  3407. `(;; For tests.
  3408. ("ruby-activerecord" ,ruby-activerecord)
  3409. ("ruby-activesupport" ,ruby-activesupport)
  3410. ("ruby-bump" ,ruby-bump)
  3411. ("ruby-forking-test-runner" ,ruby-forking-test-runner)
  3412. ("ruby-i18n" ,ruby-i18n)
  3413. ("ruby-rubocop" ,ruby-rubocop)
  3414. ("ruby-rspec" ,ruby-rspec)
  3415. ("ruby-single-cov" ,ruby-single-cov)
  3416. ("ruby-sqlite3" ,ruby-sqlite3)
  3417. ("ruby-wwtd" ,ruby-wwtd)))
  3418. (synopsis "Fast implementation of @code{GetText}")
  3419. (description
  3420. "This package provides an alternative implementation of the Ruby
  3421. @code{GetText} library that is approximately 12x faster yet thread safe.")
  3422. ;; Some parts are covered by the Ruby license, see file headers.
  3423. (license (list license:expat license:ruby))))
  3424. (define-public ruby-net-http-persistent
  3425. (package
  3426. (name "ruby-net-http-persistent")
  3427. (version "3.0.0")
  3428. (source (origin
  3429. (method url-fetch)
  3430. (uri (rubygems-uri "net-http-persistent" version))
  3431. (sha256
  3432. (base32
  3433. "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
  3434. (build-system ruby-build-system)
  3435. (native-inputs
  3436. `(("ruby-connection-pool" ,ruby-connection-pool)
  3437. ("ruby-hoe" ,ruby-hoe)))
  3438. (synopsis "Persistent HTTP connection manager")
  3439. (description "Net::HTTP::Persistent manages persistent HTTP connections
  3440. using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
  3441. (home-page "https://github.com/drbrain/net-http-persistent")
  3442. (license license:expat)))
  3443. (define-public ruby-power-assert
  3444. (package
  3445. (name "ruby-power-assert")
  3446. (version "1.1.5")
  3447. (source (origin
  3448. (method url-fetch)
  3449. (uri (rubygems-uri "power_assert" version))
  3450. (sha256
  3451. (base32
  3452. "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
  3453. (build-system ruby-build-system)
  3454. (arguments
  3455. '(#:tests? #f)) ; No included tests
  3456. (native-inputs
  3457. `(("bundler" ,bundler)))
  3458. (synopsis "Assert library with descriptive assertion messages")
  3459. (description "Power-assert is an assertion library providing descriptive
  3460. assertion messages for tests.")
  3461. (home-page "https://github.com/k-tsj/power_assert")
  3462. (license (list license:bsd-2 license:ruby))))
  3463. (define-public ruby-powerpack
  3464. (package
  3465. (name "ruby-powerpack")
  3466. (version "0.1.2")
  3467. (source
  3468. (origin
  3469. (method url-fetch)
  3470. (uri (rubygems-uri "powerpack" version))
  3471. (sha256
  3472. (base32
  3473. "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
  3474. (build-system ruby-build-system)
  3475. (arguments
  3476. '(#:test-target "spec"))
  3477. (native-inputs
  3478. `(("bundler" ,bundler)
  3479. ("ruby-rspec" ,ruby-rspec)
  3480. ("ruby-yard" ,ruby-yard)))
  3481. (synopsis "Useful extensions to core Ruby classes")
  3482. (description
  3483. "This package provides a few useful extensions to core Ruby classes,
  3484. including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
  3485. @code{String}.")
  3486. (home-page "https://github.com/bbatsov/powerpack")
  3487. (license license:expat)))
  3488. (define-public ruby-locale
  3489. (package
  3490. (name "ruby-locale")
  3491. (version "2.1.2")
  3492. (source (origin
  3493. (method url-fetch)
  3494. (uri (rubygems-uri "locale" version))
  3495. (sha256
  3496. (base32
  3497. "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
  3498. (build-system ruby-build-system)
  3499. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  3500. ;; which needs ruby-gettext, which needs ruby-locale. To break the
  3501. ;; dependency cycle we disable tests.
  3502. (arguments `(#:tests? #f))
  3503. (native-inputs
  3504. `(("bundler" ,bundler)
  3505. ("ruby-yard" ,ruby-yard)))
  3506. (synopsis "Ruby library providing basic localization APIs")
  3507. (description
  3508. "Ruby-Locale is the pure ruby library which provides basic APIs for
  3509. localization.")
  3510. (home-page "https://github.com/ruby-gettext/locale")
  3511. (license (list license:lgpl3+ license:ruby))))
  3512. (define-public ruby-temple
  3513. (package
  3514. (name "ruby-temple")
  3515. (version "0.8.2")
  3516. (source
  3517. (origin
  3518. (method url-fetch)
  3519. (uri (rubygems-uri "temple" version))
  3520. (sha256
  3521. (base32
  3522. "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
  3523. (build-system ruby-build-system)
  3524. (native-inputs
  3525. `(("ruby-tilt" ,ruby-tilt)
  3526. ("ruby-bacon" ,ruby-bacon)
  3527. ("ruby-erubis" ,ruby-erubis)))
  3528. (synopsis "Template compilation framework in Ruby")
  3529. (description
  3530. "Temple is an abstraction and framework for compiling templates to pure
  3531. Ruby.")
  3532. (home-page "https://github.com/judofyr/temple")
  3533. (license license:expat)))
  3534. (define-public ruby-text
  3535. (package
  3536. (name "ruby-text")
  3537. (version "1.3.1")
  3538. (source (origin
  3539. (method url-fetch)
  3540. (uri (rubygems-uri "text" version))
  3541. (sha256
  3542. (base32
  3543. "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
  3544. (build-system ruby-build-system)
  3545. (synopsis "Collection of text algorithms for Ruby")
  3546. (description
  3547. "This package provides a collection of text algorithms: Levenshtein,
  3548. Soundex, Metaphone, Double Metaphone, Porter Stemming.")
  3549. (home-page "https://github.com/threedaymonk/text")
  3550. (license license:expat)))
  3551. (define-public ruby-gettext
  3552. (package
  3553. (name "ruby-gettext")
  3554. (version "3.1.7")
  3555. (source (origin
  3556. (method url-fetch)
  3557. (uri (rubygems-uri "gettext" version))
  3558. (sha256
  3559. (base32
  3560. "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
  3561. (build-system ruby-build-system)
  3562. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
  3563. ;; which needs ruby-gettext. To break the dependency cycle we disable
  3564. ;; tests.
  3565. (arguments `(#:tests? #f))
  3566. (propagated-inputs
  3567. `(("ruby-locale" ,ruby-locale)
  3568. ("ruby-text" ,ruby-text)))
  3569. (native-inputs
  3570. `(("bundler" ,bundler)
  3571. ("ruby-yard" ,ruby-yard)))
  3572. (synopsis "GNU gettext-like program for Ruby")
  3573. (description
  3574. "Gettext is a GNU gettext-like program for Ruby. The catalog
  3575. file (po-file) used is the same as that used by GNU gettext, allowing you to
  3576. use GNU gettext tools for maintenance.")
  3577. (home-page "https://ruby-gettext.github.com/")
  3578. (license (list license:lgpl3+ license:ruby))))
  3579. (define-public ruby-packnga
  3580. (package
  3581. (name "ruby-packnga")
  3582. (version "1.0.4")
  3583. (source (origin
  3584. (method url-fetch)
  3585. (uri (rubygems-uri "packnga" version))
  3586. (sha256
  3587. (base32
  3588. "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
  3589. (build-system ruby-build-system)
  3590. ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
  3591. ;; To break the dependency cycle we disable tests.
  3592. (arguments `(#:tests? #f))
  3593. (propagated-inputs
  3594. `(("ruby-gettext" ,ruby-gettext)
  3595. ("ruby-yard" ,ruby-yard)))
  3596. (native-inputs
  3597. `(("bundler" ,bundler)))
  3598. (synopsis "Utility library to package internationalized libraries")
  3599. (description
  3600. "Packnga is a library to translate to many languages using YARD.")
  3601. (home-page "http://ranguba.org/packnga/")
  3602. (license license:lgpl2.0+)))
  3603. (define-public ruby-test-construct
  3604. (package
  3605. (name "ruby-test-construct")
  3606. (version "2.0.1")
  3607. (source
  3608. (origin
  3609. (method url-fetch)
  3610. (uri (rubygems-uri "test_construct" version))
  3611. (sha256
  3612. (base32
  3613. "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
  3614. (build-system ruby-build-system)
  3615. (native-inputs
  3616. `(("bundler" ,bundler)
  3617. ("ruby-mocha" ,ruby-mocha)
  3618. ("ruby-rspec" ,ruby-rspec)))
  3619. (synopsis "Creates temporary files and directories for testing")
  3620. (description
  3621. "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
  3622. temporary files and directories during tests.")
  3623. (home-page "https://github.com/bhb/test_construct")
  3624. (license license:expat)))
  3625. (define-public ruby-test-unit
  3626. (package
  3627. (name "ruby-test-unit")
  3628. (version "3.4.4")
  3629. (source (origin
  3630. (method url-fetch)
  3631. (uri (rubygems-uri "test-unit" version))
  3632. (sha256
  3633. (base32
  3634. "15isy7vhppbfd0032klirj9gxp65ygkzjdwrmm28xpirlcsk6qpd"))))
  3635. (build-system ruby-build-system)
  3636. (propagated-inputs
  3637. `(("ruby-power-assert" ,ruby-power-assert)))
  3638. (native-inputs
  3639. `(("bundler" ,bundler)
  3640. ("ruby-packnga" ,ruby-packnga)
  3641. ("ruby-yard" ,ruby-yard)))
  3642. (synopsis "Unit testing framework for Ruby")
  3643. (description "@code{Test::Unit} is unit testing framework for Ruby, based
  3644. on xUnit principles. These were originally designed by Kent Beck, creator of
  3645. extreme programming software development methodology, for Smalltalk's SUnit.
  3646. It allows writing tests, checking results and automated testing in Ruby.")
  3647. (home-page "https://test-unit.github.io/")
  3648. (license (list license:psfl license:ruby))))
  3649. (define-public ruby-markaby
  3650. (package
  3651. (name "ruby-markaby")
  3652. (version "0.9.0")
  3653. (source
  3654. (origin
  3655. (method url-fetch)
  3656. (uri (rubygems-uri "markaby" version))
  3657. (sha256
  3658. (base32
  3659. "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
  3660. (build-system ruby-build-system)
  3661. (arguments
  3662. '(#:phases
  3663. (modify-phases %standard-phases
  3664. ;; Run rspec manually without using the Rakefile, as the versions of
  3665. ;; Rake and RSpec 2 are incompatible:
  3666. ;;
  3667. ;; NoMethodError: undefined method `last_comment'
  3668. (replace 'check
  3669. (lambda* (#:key tests? #:allow-other-keys)
  3670. (when tests?
  3671. (invoke "rspec"))
  3672. #t)))))
  3673. (propagated-inputs
  3674. `(("ruby-builder" ,ruby-builder)))
  3675. (native-inputs
  3676. `(("bundler" ,bundler)
  3677. ("ruby-rspec" ,ruby-rspec-2)))
  3678. (synopsis "Write HTML pages in pure Ruby")
  3679. (description
  3680. "Markaby allows writing HTML packages in pure Ruby. This is similar to
  3681. the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
  3682. mixture of HTML and additional ERB syntax.")
  3683. (home-page "https://markaby.github.io/")
  3684. (license license:expat)))
  3685. (define-public ruby-maruku
  3686. (package
  3687. (name "ruby-maruku")
  3688. (version "0.7.3")
  3689. (source
  3690. (origin
  3691. (method url-fetch)
  3692. (uri (rubygems-uri "maruku" version))
  3693. (sha256
  3694. (base32
  3695. "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
  3696. (build-system ruby-build-system)
  3697. (arguments
  3698. '(;; TODO: 3 tests seem to fail due to HTML encoding issues
  3699. #:tests? #f
  3700. #:phases
  3701. (modify-phases %standard-phases
  3702. (replace 'check
  3703. (lambda* (#:key tests? #:allow-other-keys)
  3704. (when tests?
  3705. (invoke "rspec"))
  3706. #t)))))
  3707. (native-inputs
  3708. `(("ruby-rspec" ,ruby-rspec)
  3709. ("ruby-simplecov" ,ruby-simplecov)
  3710. ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
  3711. (synopsis "Markdown interpreter in Ruby")
  3712. (description
  3713. "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
  3714. HTML, and PDF through LaTeX.")
  3715. (home-page "https://github.com/bhollis/maruku")
  3716. (license license:expat)))
  3717. (define-public ruby-metaclass
  3718. (package
  3719. (name "ruby-metaclass")
  3720. (version "0.0.4")
  3721. (source (origin
  3722. (method url-fetch)
  3723. (uri (rubygems-uri "metaclass" version))
  3724. (sha256
  3725. (base32
  3726. "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
  3727. (build-system ruby-build-system)
  3728. (arguments
  3729. `(#:phases
  3730. (modify-phases %standard-phases
  3731. (add-after 'unpack 'add-test-unit-to-search-path
  3732. (lambda* (#:key inputs #:allow-other-keys)
  3733. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  3734. (substitute* "Rakefile"
  3735. (("t\\.libs << \"test\"" line)
  3736. (string-append line "; t.libs << \""
  3737. test-unit "/lib/ruby/vendor_ruby"
  3738. "/gems/test-unit-"
  3739. ,(package-version ruby-test-unit)
  3740. "/lib\""))))
  3741. #t)))))
  3742. (native-inputs
  3743. `(("bundler" ,bundler)
  3744. ("ruby-test-unit" ,ruby-test-unit)))
  3745. (synopsis "Ruby library adding metaclass method to all objects")
  3746. (description
  3747. "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
  3748. objects.")
  3749. (home-page "https://github.com/floehopper/metaclass")
  3750. (license license:expat)))
  3751. (define-public ruby-mkmf-lite
  3752. (package
  3753. (name "ruby-mkmf-lite")
  3754. (version "0.3.2")
  3755. (source (origin
  3756. (method url-fetch)
  3757. (uri (rubygems-uri "mkmf-lite" version))
  3758. (sha256
  3759. (base32
  3760. "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
  3761. (build-system ruby-build-system)
  3762. (propagated-inputs
  3763. `(("ruby-ptools" ,ruby-ptools)))
  3764. (synopsis "Lightweight alternative to @code{mkmf}")
  3765. (description
  3766. "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
  3767. for use as a library. It does not create packages, builds, or log files of
  3768. any kind. Instead, it provides mixin methods that you can use in FFI or tests
  3769. to check for the presence of header files, constants, and so on.")
  3770. (home-page "https://github.com/djberg96/mkmf-lite")
  3771. (license license:asl2.0)))
  3772. (define-public ruby-mspec
  3773. (package
  3774. (name "ruby-mspec")
  3775. (version "1.9.1")
  3776. (source
  3777. (origin
  3778. (method url-fetch)
  3779. (uri (rubygems-uri "mspec" version))
  3780. (sha256
  3781. (base32
  3782. "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
  3783. (build-system ruby-build-system)
  3784. (arguments
  3785. '(;; TODO: 3 test failures
  3786. ;; ./spec/mocks/mock_spec.rb:82
  3787. ;; ./spec/utils/name_map_spec.rb:151
  3788. ;; ./spec/utils/name_map_spec.rb:155
  3789. #:tests? #f
  3790. #:phases
  3791. (modify-phases %standard-phases
  3792. (add-after 'extract-gemspec 'change-dependency-constraints
  3793. (lambda _
  3794. (substitute* "mspec.gemspec"
  3795. (("rake.*") "rake>)\n")
  3796. (("rspec.*") "rspec>)\n"))
  3797. #t))
  3798. (replace 'check
  3799. (lambda* (#:key tests? #:allow-other-keys)
  3800. (when tests?
  3801. (invoke "rspec" "spec"))
  3802. #t)))))
  3803. (native-inputs
  3804. `(("bundler" ,bundler)
  3805. ("ruby-rake" ,ruby-rake)
  3806. ("ruby-rspec" ,ruby-rspec)))
  3807. (synopsis "MSpec is a specialized framework for RubySpec")
  3808. (description
  3809. "MSpec is a specialized framework that is syntax-compatible with RSpec 2
  3810. for basic features. MSpec contains additional features that assist in writing
  3811. specs for Ruby implementations in ruby/spec.")
  3812. (home-page "http://rubyspec.org")
  3813. (license license:expat)))
  3814. (define-public ruby-mysql2
  3815. (package
  3816. (name "ruby-mysql2")
  3817. (version "0.5.2")
  3818. (source
  3819. (origin
  3820. (method git-fetch)
  3821. (uri (git-reference
  3822. (url "https://github.com/brianmario/mysql2")
  3823. (commit version)))
  3824. (file-name (git-file-name name version))
  3825. (sha256
  3826. (base32
  3827. "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
  3828. (build-system ruby-build-system)
  3829. (arguments
  3830. '(;; TODO: Tests require a running MySQL/MariaDB service
  3831. #:tests? #f
  3832. #:phases
  3833. (modify-phases %standard-phases
  3834. (replace 'replace-git-ls-files
  3835. (lambda _
  3836. (substitute* "mysql2.gemspec"
  3837. (("git ls-files .*`") "find . -type f |sort`"))
  3838. #t))
  3839. (add-before 'install 'set-MAKEFLAGS
  3840. (lambda* (#:key outputs #:allow-other-keys)
  3841. (setenv "MAKEFLAGS"
  3842. (string-append
  3843. "V=1 "
  3844. "prefix=" (assoc-ref outputs "out")))
  3845. #t))
  3846. ;; Move the 'check phase to after 'install, as then you can test
  3847. ;; using the installed mysql2 gem in the store.
  3848. (delete 'check)
  3849. (add-after 'install 'check
  3850. (lambda* (#:key outputs tests? #:allow-other-keys)
  3851. (setenv "GEM_PATH"
  3852. (string-append
  3853. (getenv "GEM_PATH")
  3854. ":"
  3855. (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
  3856. (when tests?
  3857. (invoke "rspec"))
  3858. #t)))))
  3859. (inputs
  3860. `(("mariadb-dev" ,mariadb "dev")
  3861. ("zlib" ,zlib)))
  3862. (native-inputs
  3863. `(("ruby-rspec" ,ruby-rspec)
  3864. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  3865. (synopsis "MySQL library for Ruby, binding to libmysql")
  3866. (description
  3867. "This package provides a simple, fast MySQL library for Ruby, binding to
  3868. libmysql.")
  3869. (home-page "https://github.com/brianmario/mysql2")
  3870. (license license:expat)))
  3871. (define-public ruby-blankslate
  3872. (package
  3873. (name "ruby-blankslate")
  3874. (version "3.1.3")
  3875. (source (origin
  3876. (method url-fetch)
  3877. (uri (rubygems-uri "blankslate" version))
  3878. (sha256
  3879. (base32
  3880. "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
  3881. (build-system ruby-build-system)
  3882. (arguments
  3883. `(#:phases
  3884. (modify-phases %standard-phases
  3885. (replace 'check
  3886. (lambda _ (invoke "rspec" "spec/"))))))
  3887. (native-inputs
  3888. `(("bundler" ,bundler)
  3889. ("ruby-rspec" ,ruby-rspec)))
  3890. (synopsis "Abstract base class with no predefined methods")
  3891. (description
  3892. "BlankSlate provides an abstract base class with no predefined
  3893. methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
  3894. as a base class when writing classes that depend upon
  3895. @code{method_missing} (e.g. dynamic proxies).")
  3896. (home-page "https://github.com/masover/blankslate")
  3897. (license license:expat)))
  3898. (define-public ruby-bond
  3899. (package
  3900. (name "ruby-bond")
  3901. (version "0.5.1")
  3902. (source
  3903. (origin
  3904. (method url-fetch)
  3905. (uri (rubygems-uri "bond" version))
  3906. (sha256
  3907. (base32
  3908. "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
  3909. (build-system ruby-build-system)
  3910. (arguments
  3911. ;; The test suite fails (see:
  3912. ;; https://github.com/cldwalker/bond/issues/46).
  3913. `(#:tests? #f))
  3914. (native-inputs
  3915. `(("ruby-bacon" ,ruby-bacon)
  3916. ("ruby-bacon-bits" ,ruby-bacon-bits)
  3917. ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
  3918. (synopsis "Bond can provide custom autocompletion for arguments, methods
  3919. and more")
  3920. (description
  3921. "Bond can autocomplete argument(s) to methods, uniquely completing per
  3922. module, per method and per argument. Bond provides a configuration system and
  3923. a DSL for creating custom completions and completion rules. Bond can also
  3924. load completions that ship with gems. Bond is able to offer more than irb's
  3925. completion since it uses the full line of input when completing as opposed to
  3926. irb's last-word approach.")
  3927. (home-page "http://tagaholic.me/bond/")
  3928. (license license:expat)))
  3929. (define-public ruby-idn-ruby
  3930. (package
  3931. (name "ruby-idn-ruby")
  3932. (version "0.1.0")
  3933. (source
  3934. (origin
  3935. (method url-fetch)
  3936. (uri (rubygems-uri "idn-ruby" version))
  3937. (sha256
  3938. (base32
  3939. "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
  3940. (build-system ruby-build-system)
  3941. (arguments
  3942. '(#:phases
  3943. (modify-phases %standard-phases
  3944. (delete 'check)
  3945. (add-after 'install 'check
  3946. (lambda* (#:key tests? outputs #:allow-other-keys)
  3947. (when tests?
  3948. (let* ((gem-file (cadr (find-files "." "\\.gem")))
  3949. (name-and-version (basename gem-file ".gem")))
  3950. (apply invoke
  3951. "ruby" "--verbose"
  3952. (string-append "-I"
  3953. (assoc-ref outputs "out")
  3954. "/lib/ruby/vendor_ruby/gems/"
  3955. name-and-version
  3956. "/lib")
  3957. (find-files "./test" ".*\\.rb"))))
  3958. #t)))))
  3959. (inputs
  3960. `(("libidn" ,libidn)))
  3961. (synopsis "Ruby Bindings for the GNU LibIDN library")
  3962. (description
  3963. "Ruby Bindings for the GNU LibIDN library, an implementation of the
  3964. Stringprep, Punycode and IDNA specifications. These are used to encode and
  3965. decode internationalized domain + names according to the IDNA2003
  3966. specifications.
  3967. Included are the most important parts of the Stringprep, Punycode and IDNA
  3968. APIs like performing Stringprep processings, encoding to and decoding from
  3969. Punycode strings and converting entire domain names to and from the ACE
  3970. encoded form.")
  3971. (home-page "https://github.com/deepfryed/idn-ruby")
  3972. (license license:asl2.0)))
  3973. (define-public ruby-instantiator
  3974. (package
  3975. (name "ruby-instantiator")
  3976. (version "0.0.7")
  3977. (source (origin
  3978. (method url-fetch)
  3979. (uri (rubygems-uri "instantiator" version))
  3980. (sha256
  3981. (base32
  3982. "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
  3983. (build-system ruby-build-system)
  3984. (arguments
  3985. `(#:phases
  3986. (modify-phases %standard-phases
  3987. (add-after 'unpack 'add-test-unit-to-search-path
  3988. (lambda* (#:key inputs #:allow-other-keys)
  3989. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  3990. (substitute* "Rakefile"
  3991. (("t\\.libs << \"test\"" line)
  3992. (string-append line "; t.libs << \""
  3993. test-unit "/lib/ruby/vendor_ruby"
  3994. "/gems/test-unit-"
  3995. ,(package-version ruby-test-unit)
  3996. "/lib\""))))
  3997. #t)))))
  3998. (propagated-inputs
  3999. `(("ruby-blankslate" ,ruby-blankslate)))
  4000. (native-inputs
  4001. `(("bundler" ,bundler)
  4002. ("ruby-test-unit" ,ruby-test-unit)))
  4003. (synopsis "Instantiate an arbitrary Ruby class")
  4004. (description
  4005. "Instantiator lets you instantiate an arbitrary Ruby class without
  4006. knowing anything about the constructor.")
  4007. (home-page "https://github.com/floehopper/instantiator")
  4008. (license license:expat)))
  4009. (define-public ruby-introspection
  4010. (package
  4011. (name "ruby-introspection")
  4012. (version "0.0.4")
  4013. (source (origin
  4014. (method url-fetch)
  4015. (uri (rubygems-uri "introspection" version))
  4016. (sha256
  4017. (base32
  4018. "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
  4019. (build-system ruby-build-system)
  4020. (arguments
  4021. `(#:phases
  4022. (modify-phases %standard-phases
  4023. (add-after 'unpack 'add-test-unit-to-search-path
  4024. (lambda* (#:key inputs #:allow-other-keys)
  4025. (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
  4026. (substitute* "Rakefile"
  4027. (("t\\.libs << \"test\"" line)
  4028. (string-append line "; t.libs << \""
  4029. test-unit "/lib/ruby/vendor_ruby"
  4030. "/gems/test-unit-"
  4031. ,(package-version ruby-test-unit)
  4032. "/lib\""))))
  4033. #t)))))
  4034. (propagated-inputs
  4035. `(("ruby-instantiator" ,ruby-instantiator)
  4036. ("ruby-metaclass" ,ruby-metaclass)))
  4037. (native-inputs
  4038. `(("bundler" ,bundler)
  4039. ("ruby-blankslate" ,ruby-blankslate)
  4040. ("ruby-test-unit" ,ruby-test-unit)))
  4041. (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
  4042. (description
  4043. "Introspection provides tools to inspect the hierarchy of method
  4044. definitions on a Ruby object.")
  4045. (home-page "https://github.com/floehopper/introspection")
  4046. (license license:expat)))
  4047. (define-public ruby-redcarpet
  4048. (package
  4049. (name "ruby-redcarpet")
  4050. (version "3.5.0")
  4051. (source (origin
  4052. (method url-fetch)
  4053. (uri (rubygems-uri "redcarpet" version))
  4054. (sha256
  4055. (base32
  4056. "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
  4057. (build-system ruby-build-system)
  4058. (arguments
  4059. `(#:phases
  4060. (modify-phases %standard-phases
  4061. ;; The gem archive does not include the conformance tests.
  4062. (add-after 'unpack 'disable-conformance-tests
  4063. (lambda _
  4064. (substitute* "Rakefile"
  4065. (("task :test => %w\\[test:unit test:conformance\\]")
  4066. "task :test => %w[test:unit]"))
  4067. #t)))))
  4068. (native-inputs
  4069. `(("bundler" ,bundler)
  4070. ("ruby-test-unit" ,ruby-test-unit)
  4071. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  4072. (synopsis "Extensible Markdown to (X)HTML converter")
  4073. (description
  4074. "Redcarpet is an extensible Ruby library for Markdown processing and
  4075. conversion to (X)HTML.")
  4076. (home-page "https://github.com/vmg/redcarpet")
  4077. (license license:expat)))
  4078. (define-public ruby-rerun
  4079. (package
  4080. (name "ruby-rerun")
  4081. (version "0.13.0")
  4082. (source
  4083. (origin
  4084. (method url-fetch)
  4085. (uri (rubygems-uri "rerun" version))
  4086. (sha256
  4087. (base32
  4088. "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
  4089. (build-system ruby-build-system)
  4090. (arguments
  4091. '(#:tests? #f)) ; No included tests
  4092. (propagated-inputs
  4093. `(("ruby-listen" ,ruby-listen)))
  4094. (synopsis "Run a process, and restart when some monitored files change")
  4095. (description
  4096. "Rerun is a tool to launch programs, then monitor the file system, and
  4097. restart the program when any of the monitored files change. It's written in
  4098. Ruby, but can be used for all programs.")
  4099. (home-page "https://github.com/alexch/rerun/")
  4100. (license license:expat)))
  4101. (define-public ruby-maxitest
  4102. (package
  4103. (name "ruby-maxitest")
  4104. (version "3.6.0")
  4105. (home-page "https://github.com/grosser/maxitest")
  4106. (source (origin
  4107. ;; Pull from git because the gem does not contain tests.
  4108. (method git-fetch)
  4109. (uri (git-reference
  4110. (url home-page)
  4111. (commit (string-append "v" version))))
  4112. (file-name (git-file-name name version))
  4113. (sha256
  4114. (base32
  4115. "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
  4116. (build-system ruby-build-system)
  4117. (arguments
  4118. '(#:test-target "default"
  4119. #:phases (modify-phases %standard-phases
  4120. (replace 'replace-git-ls-files
  4121. (lambda _
  4122. (substitute* "maxitest.gemspec"
  4123. (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
  4124. "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
  4125. #t))
  4126. (add-before 'check 'remove-version-constraints
  4127. (lambda _
  4128. ;; Don't use specific versions of dependencies, instead
  4129. ;; take whatever is available in Guix.
  4130. (delete-file "Gemfile.lock")
  4131. #t))
  4132. (add-before 'check 'add-mtest-on-PATH
  4133. (lambda _
  4134. ;; Tests use 'mtest' which is not automatically added on
  4135. ;; PATH.
  4136. (setenv "PATH" (string-append (getcwd) "/bin:"
  4137. (getenv "PATH")))
  4138. #t)))))
  4139. (native-inputs
  4140. `(("ps" ,procps)
  4141. ("ruby-bump" ,ruby-bump)
  4142. ("ruby-byebug" ,ruby-byebug)
  4143. ("ruby-rspec" ,ruby-rspec)
  4144. ("ruby-wwtd" ,ruby-wwtd)))
  4145. (propagated-inputs
  4146. `(("ruby-minitest" ,ruby-minitest)))
  4147. (synopsis "Minitest with extra features")
  4148. (description
  4149. "Maxitest is a wrapper around Minitest with extra functionality such
  4150. as timeouts, an @command{mtest} executable that can run tests by line
  4151. number, support for interrupted tests, better backtraces, and more.")
  4152. (license license:expat)))
  4153. (define-public ruby-mocha
  4154. (package
  4155. (name "ruby-mocha")
  4156. (version "1.13.0")
  4157. (source (origin
  4158. (method url-fetch)
  4159. (uri (rubygems-uri "mocha" version))
  4160. (sha256
  4161. (base32
  4162. "15s53ggsykk69kxqvs4416s8yxdhz6caggva55n8sjgy4ixzwp10"))))
  4163. (build-system ruby-build-system)
  4164. (arguments
  4165. `(#:phases
  4166. (modify-phases %standard-phases
  4167. (add-before 'check 'remove-rubocop-dependency
  4168. (lambda _
  4169. ;; Disable dependency on Rubocop, which is just a linter,
  4170. ;; and would introduce a circular dependency.
  4171. (substitute* "mocha.gemspec"
  4172. ((".*rubocop.*")
  4173. "true\n"))
  4174. #t)))))
  4175. (native-inputs
  4176. `(("ruby-introspection" ,ruby-introspection)))
  4177. (synopsis "Mocking and stubbing library for Ruby")
  4178. (description
  4179. "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
  4180. allows mocking and stubbing of methods on real (non-mock) classes.")
  4181. (home-page "https://mocha.jamesmead.org/")
  4182. ;; Mocha can be used with either license at the users choice.
  4183. (license (list license:expat license:ruby))))
  4184. (define-public ruby-mocha-on-bacon
  4185. (package
  4186. (name "ruby-mocha-on-bacon")
  4187. (version "0.2.3")
  4188. (source
  4189. (origin
  4190. (method url-fetch)
  4191. (uri (rubygems-uri "mocha-on-bacon" version))
  4192. (sha256
  4193. (base32
  4194. "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
  4195. (build-system ruby-build-system)
  4196. (arguments
  4197. ;; rubygems.org release missing tests
  4198. '(#:tests? #f))
  4199. (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
  4200. (synopsis "Mocha adapter for Bacon")
  4201. (description
  4202. "This package provides a Mocha adapter for Bacon, allowing you to use the
  4203. Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
  4204. (home-page
  4205. "https://github.com/alloy/mocha-on-bacon")
  4206. (license license:expat)))
  4207. (define-public ruby-net-ssh
  4208. (package
  4209. (name "ruby-net-ssh")
  4210. (version "4.2.0")
  4211. (source (origin
  4212. (method url-fetch)
  4213. (uri (rubygems-uri "net-ssh" version))
  4214. (sha256
  4215. (base32
  4216. "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
  4217. (build-system ruby-build-system)
  4218. (native-inputs
  4219. `(("bundler" ,bundler)
  4220. ("ruby-mocha" ,ruby-mocha)
  4221. ("ruby-test-unit" ,ruby-test-unit)))
  4222. (synopsis "Ruby implementation of the SSH2 client protocol")
  4223. (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
  4224. client protocol. It allows you to write programs that invoke and interact
  4225. with processes on remote servers, via SSH2.")
  4226. (home-page "https://github.com/net-ssh/net-ssh")
  4227. (license license:expat)))
  4228. (define-public ruby-net-scp
  4229. (package
  4230. (name "ruby-net-scp")
  4231. ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
  4232. (version "1.2.2.rc2")
  4233. (source
  4234. (origin
  4235. (method git-fetch)
  4236. (uri (git-reference
  4237. (url "https://github.com/net-ssh/net-scp")
  4238. (commit (string-append "v" version))))
  4239. (file-name (git-file-name name version))
  4240. (sha256
  4241. (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
  4242. (build-system ruby-build-system)
  4243. (native-inputs
  4244. `(("bundler" ,bundler)
  4245. ("ruby-test-unit" ,ruby-test-unit)
  4246. ("ruby-mocha" ,ruby-mocha)))
  4247. (propagated-inputs
  4248. `(("ruby-net-ssh" ,ruby-net-ssh)))
  4249. (synopsis "Pure-Ruby SCP client library")
  4250. (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
  4251. client protocol.")
  4252. (home-page "https://github.com/net-ssh/net-scp")
  4253. (license license:expat)))
  4254. (define-public ruby-minitest
  4255. (package
  4256. (name "ruby-minitest")
  4257. (version "5.14.4")
  4258. (source (origin
  4259. (method url-fetch)
  4260. (uri (rubygems-uri "minitest" version))
  4261. (sha256
  4262. (base32
  4263. "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"))))
  4264. (build-system ruby-build-system)
  4265. (native-inputs
  4266. `(("ruby-hoe" ,ruby-hoe)))
  4267. (synopsis "Small test suite library for Ruby")
  4268. (description "Minitest provides a complete suite of Ruby testing
  4269. facilities supporting TDD, BDD, mocking, and benchmarking.")
  4270. (home-page "https://github.com/seattlerb/minitest")
  4271. (license license:expat)))
  4272. ;; This is the last release of Minitest 4, which is used by some packages.
  4273. (define-public ruby-minitest-4
  4274. (package (inherit ruby-minitest)
  4275. (version "4.7.5")
  4276. (source (origin
  4277. (method url-fetch)
  4278. (uri (rubygems-uri "minitest" version))
  4279. (sha256
  4280. (base32
  4281. "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
  4282. (arguments
  4283. `(#:phases
  4284. (modify-phases %standard-phases
  4285. (add-after 'unpack 'remove-unsupported-method
  4286. (lambda _
  4287. (substitute* "Rakefile"
  4288. (("self\\.rubyforge_name = .*") ""))
  4289. #t))
  4290. (add-after 'build 'exclude-failing-tests
  4291. (lambda _
  4292. ;; Some tests are failing on Ruby 2.4 due to the deprecation of
  4293. ;; Fixnum.
  4294. (delete-file "test/minitest/test_minitest_spec.rb")
  4295. #t)))))))
  4296. (define-public ruby-minitest-around
  4297. (package
  4298. (name "ruby-minitest-around")
  4299. (version "0.5.0")
  4300. (source
  4301. (origin
  4302. (method url-fetch)
  4303. (uri (rubygems-uri "minitest-around" version))
  4304. (sha256
  4305. (base32
  4306. "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
  4307. (build-system ruby-build-system)
  4308. (arguments
  4309. '(#:phases
  4310. (modify-phases %standard-phases
  4311. (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
  4312. (lambda _
  4313. (substitute* "minitest-around.gemspec"
  4314. (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
  4315. #t)))))
  4316. (propagated-inputs
  4317. `(("ruby-minitest" ,ruby-minitest)))
  4318. (native-inputs
  4319. `(("bundler" ,bundler)
  4320. ("ruby-cucumber" ,ruby-cucumber)
  4321. ("ruby-bump" ,ruby-bump)
  4322. ("ruby-test-construct" ,ruby-test-construct)))
  4323. (synopsis "Run code around tests in Minitest")
  4324. (description
  4325. "This library provides a way to run code around tests in Minitest,
  4326. written using either the unit test or spec style.")
  4327. (home-page "https://github.com/splattael/minitest-around")
  4328. (license license:expat)))
  4329. (define-public ruby-minitest-sprint
  4330. (package
  4331. (name "ruby-minitest-sprint")
  4332. (version "1.1.0")
  4333. (source (origin
  4334. (method url-fetch)
  4335. (uri (rubygems-uri "minitest-sprint" version))
  4336. (sha256
  4337. (base32
  4338. "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
  4339. (build-system ruby-build-system)
  4340. (native-inputs
  4341. `(("ruby-hoe" ,ruby-hoe)
  4342. ("ruby-minitest" ,ruby-minitest)))
  4343. (synopsis "Fast test suite runner for minitest")
  4344. (description "Minitest-sprint is a test runner for minitest that makes it
  4345. easier to re-run individual failing tests.")
  4346. (home-page "https://github.com/seattlerb/minitest-sprint")
  4347. (license license:expat)))
  4348. (define-public ruby-minitest-bacon
  4349. (package
  4350. (name "ruby-minitest-bacon")
  4351. (version "1.0.3")
  4352. (source (origin
  4353. (method url-fetch)
  4354. (uri (rubygems-uri "minitest-bacon" version))
  4355. (sha256
  4356. (base32
  4357. "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
  4358. (build-system ruby-build-system)
  4359. (native-inputs
  4360. `(("ruby-hoe" ,ruby-hoe)))
  4361. (inputs
  4362. `(("ruby-minitest" ,ruby-minitest)))
  4363. (synopsis "Bacon compatibility library for minitest")
  4364. (description "Minitest-bacon extends minitest with bacon-like
  4365. functionality, making it easier to migrate test suites from bacon to minitest.")
  4366. (home-page "https://github.com/seattlerb/minitest-bacon")
  4367. (license license:expat)))
  4368. (define-public ruby-minitest-focus
  4369. (package
  4370. (name "ruby-minitest-focus")
  4371. (version "1.1.2")
  4372. (source
  4373. (origin
  4374. (method url-fetch)
  4375. (uri (rubygems-uri "minitest-focus" version))
  4376. (sha256
  4377. (base32
  4378. "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
  4379. (build-system ruby-build-system)
  4380. (propagated-inputs
  4381. `(("ruby-minitest" ,ruby-minitest)))
  4382. (native-inputs
  4383. `(("ruby-hoe" ,ruby-hoe)))
  4384. (synopsis "Allows a few specific tests to be focused on")
  4385. (description
  4386. "@code{minitest-focus} gives the ability focus on a few tests with ease
  4387. without having to use command-line arguments. It introduces a @code{focus}
  4388. class method for use in testing classes, specifying that the next defined test
  4389. is to be run.")
  4390. (home-page "https://github.com/seattlerb/minitest-focus")
  4391. (license license:expat)))
  4392. (define-public ruby-minitest-pretty-diff
  4393. ;; Use git reference because gem is out of date and does not contain testing
  4394. ;; script. There are no releases on GitHub.
  4395. (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
  4396. (package
  4397. (name "ruby-minitest-pretty-diff")
  4398. (version (string-append "0.1-1." (string-take commit 8)))
  4399. (source (origin
  4400. (method git-fetch)
  4401. (uri (git-reference
  4402. (url "https://github.com/adammck/minitest-pretty_diff")
  4403. (commit commit)))
  4404. (file-name (string-append name "-" version "-checkout"))
  4405. (sha256
  4406. (base32
  4407. "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
  4408. (build-system ruby-build-system)
  4409. (arguments
  4410. `(#:phases
  4411. (modify-phases %standard-phases
  4412. (replace 'check
  4413. (lambda _
  4414. (invoke "script/test"))))))
  4415. (native-inputs
  4416. `(("bundler" ,bundler)
  4417. ("ruby-turn" ,ruby-turn)))
  4418. (synopsis "Pretty-print hashes and arrays in MiniTest")
  4419. (description
  4420. "@code{minitest-pretty_diff} monkey-patches
  4421. @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
  4422. diffing them. This makes it easier to spot differences between nested
  4423. structures when tests fail.")
  4424. (home-page "https://github.com/adammck/minitest-pretty_diff")
  4425. (license license:expat))))
  4426. (define-public ruby-minitest-moar
  4427. (package
  4428. (name "ruby-minitest-moar")
  4429. (version "0.0.4")
  4430. (source
  4431. (origin
  4432. (method url-fetch)
  4433. (uri (rubygems-uri "minitest-moar" version))
  4434. (sha256
  4435. (base32
  4436. "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
  4437. (build-system ruby-build-system)
  4438. (arguments
  4439. `(#:phases
  4440. (modify-phases %standard-phases
  4441. (add-before 'check 'clean-dependencies
  4442. (lambda _
  4443. ;; Remove all gems defined in the Gemfile because these are not
  4444. ;; truly needed.
  4445. (substitute* "Gemfile"
  4446. (("gem .*") ""))
  4447. ;; Remove byebug as not needed to run tests.
  4448. (substitute* "test/test_helper.rb"
  4449. (("require 'byebug'") ""))
  4450. #t)))))
  4451. (native-inputs
  4452. `(("bundler" ,bundler)
  4453. ("ruby-minitest" ,ruby-minitest)))
  4454. (synopsis "Extra features and changes to MiniTest")
  4455. (description "@code{MiniTest Moar} add some additional features and
  4456. changes some default behaviours in MiniTest. For instance, Moar replaces the
  4457. MiniTest @code{Object#stub} with a global @code{stub} method.")
  4458. (home-page "https://github.com/dockyard/minitest-moar")
  4459. (license license:expat)))
  4460. (define-public ruby-minitest-bonus-assertions
  4461. (package
  4462. (name "ruby-minitest-bonus-assertions")
  4463. (version "3.0")
  4464. (source
  4465. (origin
  4466. (method url-fetch)
  4467. (uri (rubygems-uri "minitest-bonus-assertions" version))
  4468. (sha256
  4469. (base32
  4470. "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
  4471. (build-system ruby-build-system)
  4472. (arguments
  4473. `(#:tests? #f ; Test suite has bitrotted.
  4474. #:phases
  4475. (modify-phases %standard-phases
  4476. (add-before 'check 'clean-dependencies
  4477. (lambda _
  4478. ;; Remove unneeded require statement that would entail another
  4479. ;; dependency.
  4480. (substitute* "test/minitest_config.rb"
  4481. (("require 'minitest/bisect'") ""))
  4482. #t)))))
  4483. (native-inputs
  4484. `(("ruby-hoe" ,ruby-hoe)
  4485. ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
  4486. ("ruby-minitest-focus" ,ruby-minitest-focus)
  4487. ("ruby-minitest-moar" ,ruby-minitest-moar)))
  4488. (synopsis "Bonus assertions for @code{Minitest}")
  4489. (description
  4490. "Minitest bonus assertions provides extra MiniTest assertions. For
  4491. instance, it provides @code{assert_true}, @code{assert_false} and
  4492. @code{assert_set_equal}.")
  4493. (home-page "https://github.com/halostatue/minitest-bonus-assertions")
  4494. (license license:expat)))
  4495. (define-public ruby-minitest-reporters
  4496. (package
  4497. (name "ruby-minitest-reporters")
  4498. (version "1.3.6")
  4499. (source
  4500. (origin
  4501. (method url-fetch)
  4502. (uri (rubygems-uri "minitest-reporters" version))
  4503. (sha256
  4504. (base32
  4505. "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
  4506. (build-system ruby-build-system)
  4507. (arguments
  4508. '(#:phases
  4509. (modify-phases %standard-phases
  4510. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  4511. ;; including it as an input can lead to circular dependencies.
  4512. (add-after 'unpack 'remove-rubocop-from-Rakefile
  4513. (lambda _
  4514. (substitute* "Rakefile"
  4515. (("require 'rubocop/rake\\_task'") "")
  4516. (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
  4517. #t))
  4518. (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
  4519. (lambda _
  4520. (substitute* "minitest-reporters.gemspec"
  4521. ((".*%q<rubocop>.*") "\n"))
  4522. #t)))))
  4523. (propagated-inputs
  4524. `(("ruby-ansi" ,ruby-ansi)
  4525. ("ruby-builder" ,ruby-builder)
  4526. ("ruby-minitest" ,ruby-minitest)
  4527. ("ruby-progressbar" ,ruby-progressbar)))
  4528. (native-inputs
  4529. `(("bundler" ,bundler)
  4530. ("ruby-maruku" ,ruby-maruku)))
  4531. (synopsis "Enhanced reporting for Minitest tests")
  4532. (description
  4533. "@code{minitest/reporters} provides a custom Minitest runner to improve
  4534. how the test state is reported. A number of different reporters are
  4535. available, including a spec reporter, progress bar reporter, a HTML
  4536. reporter.")
  4537. (home-page "https://github.com/kern/minitest-reporters")
  4538. (license license:expat)))
  4539. (define-public ruby-minitest-rg
  4540. (package
  4541. (name "ruby-minitest-rg")
  4542. (version "5.2.0")
  4543. (source
  4544. (origin
  4545. (method url-fetch)
  4546. (uri (rubygems-uri "minitest-rg" version))
  4547. (sha256
  4548. (base32
  4549. "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
  4550. (build-system ruby-build-system)
  4551. (arguments
  4552. ;; Some tests fail even outside Guix, so disable tests.
  4553. ;; https://github.com/blowmage/minitest-rg/issues/12
  4554. ;; https://github.com/blowmage/minitest-rg/pull/13
  4555. `(#:tests? #f))
  4556. (propagated-inputs
  4557. `(("ruby-minitest" ,ruby-minitest)))
  4558. (synopsis "Coloured output for Minitest")
  4559. (description
  4560. "@code{minitest-rg} changes the colour of the output from Minitest.")
  4561. (home-page "https://blowmage.com/minitest-rg/")
  4562. (license license:expat)))
  4563. (define-public ruby-minitest-global-expectations
  4564. (package
  4565. (name "ruby-minitest-global-expectations")
  4566. (version "1.0.1")
  4567. (source
  4568. (origin
  4569. (method url-fetch)
  4570. (uri (rubygems-uri "minitest-global_expectations"
  4571. version))
  4572. (sha256
  4573. (base32
  4574. "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
  4575. (build-system ruby-build-system)
  4576. (propagated-inputs
  4577. `(("ruby-minitest" ,ruby-minitest)))
  4578. (synopsis "Adjust minitest behaviour for calling expectation methods")
  4579. (description
  4580. "Minitest-global_expectations allows continued use of expectation methods
  4581. on all objects. Calling expectation methods on all objects was deprecated in
  4582. minitest 5.12, and is planned to be removed from minitest 6.")
  4583. (home-page "https://github.com/jeremyevans/minitest-global_expectations")
  4584. (license license:expat)))
  4585. (define-public ruby-minitest-hooks
  4586. (package
  4587. (name "ruby-minitest-hooks")
  4588. (version "1.5.0")
  4589. (source
  4590. (origin
  4591. (method url-fetch)
  4592. (uri (rubygems-uri "minitest-hooks" version))
  4593. (sha256
  4594. (base32
  4595. "05z8r6sw3fz4s44fs1150ndlcmcy82vlxmhps5nncg8vk59k3gmf"))))
  4596. (build-system ruby-build-system)
  4597. (arguments
  4598. '(#:test-target "spec"
  4599. ;; Test suite is incompatible with ruby-2.7.
  4600. ;; https://github.com/jeremyevans/minitest-hooks/issues/19
  4601. #:tests? #f))
  4602. (native-inputs
  4603. `(("ruby-sequel" ,ruby-sequel)
  4604. ("ruby-sqlite3" ,ruby-sqlite3)))
  4605. (synopsis "Hooks for the minitest framework")
  4606. (description
  4607. "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
  4608. @code{around_all} hooks for Minitest. This allows, for instance, running each
  4609. suite of specs inside a database transaction, running each spec inside its own
  4610. savepoint inside that transaction. This can significantly speed up testing
  4611. for specs that share expensive database setup code.")
  4612. (home-page "https://github.com/jeremyevans/minitest-hooks")
  4613. (license license:expat)))
  4614. (define-public ruby-daemons
  4615. (package
  4616. (name "ruby-daemons")
  4617. (version "1.2.5")
  4618. (source (origin
  4619. (method url-fetch)
  4620. (uri (rubygems-uri "daemons" version))
  4621. (sha256
  4622. (base32
  4623. "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
  4624. (build-system ruby-build-system)
  4625. (arguments
  4626. `(#:tests? #f)) ; no test suite
  4627. (synopsis "Daemonize Ruby programs")
  4628. (description "Daemons provides a way to wrap existing Ruby scripts to be
  4629. run as a daemon and to be controlled by simple start/stop/restart commands.")
  4630. (home-page "https://github.com/thuehlinger/daemons")
  4631. (license license:expat)))
  4632. (define-public ruby-data_uri
  4633. (package
  4634. (name "ruby-data_uri")
  4635. (version "0.1.0")
  4636. (source
  4637. (origin
  4638. (method url-fetch)
  4639. (uri (rubygems-uri "data_uri" version))
  4640. (sha256
  4641. (base32
  4642. "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
  4643. (build-system ruby-build-system)
  4644. (synopsis "URI class for parsing data URIs")
  4645. (description
  4646. "Data @acronym{URI, universal resource idenfitier}s allow resources to be
  4647. embedded inside a URI. The URI::Data class provides support for parsing these
  4648. URIs using the normal URI.parse method.")
  4649. (home-page "https://github.com/dball/data_uri")
  4650. (license license:expat)))
  4651. (define-public ruby-deep-merge
  4652. (package
  4653. (name "ruby-deep-merge")
  4654. (version "1.2.1")
  4655. (home-page "https://github.com/danielsdeleo/deep_merge")
  4656. ;; The Rubygem source does not contain the gemspec required for tests.
  4657. (source (origin
  4658. (method git-fetch)
  4659. (uri (git-reference (url home-page) (commit version)))
  4660. (file-name (git-file-name name version))
  4661. (sha256
  4662. (base32
  4663. "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
  4664. (build-system ruby-build-system)
  4665. (native-inputs
  4666. `(("ruby-minitest" ,ruby-minitest)))
  4667. (synopsis "Recursively merge hashes")
  4668. (description
  4669. "Deep Merge is a set of utility functions for @code{Hash}. It permits
  4670. you to merge elements inside a hash together recursively.")
  4671. (license license:expat)))
  4672. (define-public ruby-git
  4673. (package
  4674. (name "ruby-git")
  4675. (version "1.3.0")
  4676. (source (origin
  4677. (method url-fetch)
  4678. (uri (rubygems-uri "git" version))
  4679. (sha256
  4680. (base32
  4681. "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
  4682. (build-system ruby-build-system)
  4683. (arguments
  4684. `(#:tests? #f ; no tests
  4685. #:phases (modify-phases %standard-phases
  4686. (add-after 'install 'patch-git-binary
  4687. (lambda* (#:key inputs outputs #:allow-other-keys)
  4688. ;; Make the default git binary an absolute path to the
  4689. ;; store.
  4690. (let ((git (search-input-file inputs "/bin/git"))
  4691. (config (string-append
  4692. (assoc-ref outputs "out")
  4693. "/lib/ruby/vendor_ruby/gems/git-"
  4694. ,version "/lib/git/config.rb")))
  4695. (substitute* (list config)
  4696. (("'git'")
  4697. (string-append "'" git "'")))
  4698. #t))))))
  4699. (inputs
  4700. `(("git" ,git)))
  4701. (synopsis "Ruby wrappers for Git")
  4702. (description "Ruby/Git is a Ruby library that can be used to create, read
  4703. and manipulate Git repositories by wrapping system calls to the git binary.")
  4704. (home-page "https://github.com/schacon/ruby-git")
  4705. (license license:expat)))
  4706. (define-public ruby-hocon
  4707. (package
  4708. (name "ruby-hocon")
  4709. (version "1.3.1")
  4710. (home-page "https://github.com/puppetlabs/ruby-hocon")
  4711. (source (origin
  4712. (method git-fetch)
  4713. (uri (git-reference (url home-page) (commit version)))
  4714. (file-name (git-file-name name version))
  4715. (sha256
  4716. (base32
  4717. "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
  4718. (build-system ruby-build-system)
  4719. (arguments
  4720. '(#:phases (modify-phases %standard-phases
  4721. (replace 'check
  4722. (lambda* (#:key tests? #:allow-other-keys)
  4723. (if tests?
  4724. (invoke "rspec")
  4725. (format #t "test suite not run~%"))
  4726. #t)))))
  4727. (native-inputs
  4728. `(("bundler" ,bundler)
  4729. ("ruby-rspec" ,ruby-rspec)))
  4730. (synopsis "HOCON config library")
  4731. (description
  4732. "This package provides Ruby support for the @acronym{HOCON,
  4733. Human-Optimized Config Object Notation} configuration file format. It
  4734. supports parsing and modifying HOCON and JSON files, and rendering parsed
  4735. objects back to a @code{String}.")
  4736. (license license:asl2.0)))
  4737. (define-public ruby-slop
  4738. (package
  4739. (name "ruby-slop")
  4740. (version "4.5.0")
  4741. (source (origin
  4742. (method url-fetch)
  4743. (uri (rubygems-uri "slop" version))
  4744. (sha256
  4745. (base32
  4746. "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
  4747. (build-system ruby-build-system)
  4748. (native-inputs
  4749. `(("ruby-minitest" ,ruby-minitest)))
  4750. (synopsis "Ruby command line option parser")
  4751. (description "Slop provides a Ruby domain specific language for gathering
  4752. options and parsing command line flags.")
  4753. (home-page "https://github.com/leejarvis/slop")
  4754. (license license:expat)))
  4755. (define-public ruby-slop-3
  4756. (package (inherit ruby-slop)
  4757. (version "3.6.0")
  4758. (source (origin
  4759. (method url-fetch)
  4760. (uri (rubygems-uri "slop" version))
  4761. (sha256
  4762. (base32
  4763. "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
  4764. (define-public ruby-multi-xml
  4765. (package
  4766. (name "ruby-multi-xml")
  4767. (version "0.6.0")
  4768. (source
  4769. (origin
  4770. (method url-fetch)
  4771. (uri (rubygems-uri "multi_xml" version))
  4772. (sha256
  4773. (base32
  4774. "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
  4775. (build-system ruby-build-system)
  4776. (arguments
  4777. '(#:tests? #f)) ; No included tests
  4778. (synopsis "Swappable XML backends for Ruby")
  4779. (description
  4780. "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
  4781. Nokogiri, Ox, or REXML.")
  4782. (home-page "https://github.com/sferik/multi_xml")
  4783. (license license:expat)))
  4784. (define-public ruby-multipart-post
  4785. (package
  4786. (name "ruby-multipart-post")
  4787. (version "2.0.0")
  4788. (source (origin
  4789. (method url-fetch)
  4790. (uri (rubygems-uri "multipart-post" version))
  4791. (sha256
  4792. (base32
  4793. "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
  4794. (build-system ruby-build-system)
  4795. (native-inputs
  4796. `(("bundler" ,bundler)))
  4797. (synopsis "Multipart POST library for Ruby")
  4798. (description "Multipart-Post Adds multipart POST capability to Ruby's
  4799. net/http library.")
  4800. (home-page "https://github.com/nicksieger/multipart-post")
  4801. (license license:expat)))
  4802. (define-public ruby-multi-json
  4803. (package
  4804. (name "ruby-multi-json")
  4805. (version "1.15.0")
  4806. (source
  4807. (origin
  4808. (method git-fetch)
  4809. ;; Tests are not distributed at rubygems.org so download from GitHub
  4810. ;; instead.
  4811. (uri (git-reference
  4812. (url "https://github.com/intridea/multi_json")
  4813. (commit (string-append "v" version))))
  4814. (file-name (git-file-name name version))
  4815. (sha256
  4816. (base32
  4817. "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
  4818. (build-system ruby-build-system)
  4819. (arguments
  4820. `(#:phases
  4821. (modify-phases %standard-phases
  4822. (add-before 'check 'pre-check
  4823. (lambda _
  4824. ;; As seen in the .travis.yml file.
  4825. (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
  4826. (native-inputs
  4827. `(("ruby-rspec" ,ruby-rspec)
  4828. ("ruby-json-pure" ,ruby-json-pure)
  4829. ("ruby-oj" ,ruby-oj)
  4830. ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
  4831. (synopsis "Common interface to multiple JSON libraries for Ruby")
  4832. (description
  4833. "This package provides a common interface to multiple JSON libraries,
  4834. including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
  4835. NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
  4836. (home-page "https://github.com/intridea/multi_json")
  4837. (license license:expat)))
  4838. (define-public ruby-multi-test
  4839. (package
  4840. (name "ruby-multi-test")
  4841. (version "0.1.2")
  4842. (source
  4843. (origin
  4844. (method url-fetch)
  4845. (uri (rubygems-uri "multi_test" version))
  4846. (sha256
  4847. (base32
  4848. "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
  4849. (build-system ruby-build-system)
  4850. (arguments
  4851. '(;; Tests require different sets of specific gem versions to be available,
  4852. ;; and there is no gemfile that specifies the newest versions of
  4853. ;; dependencies to be tested.
  4854. #:tests? #f))
  4855. (synopsis
  4856. "Interface to testing libraries loaded into a running Ruby process")
  4857. (description
  4858. "@code{multi_test} provides a uniform interface onto whatever testing
  4859. libraries that have been loaded into a running Ruby process to help control
  4860. rogue test/unit/autorun requires.")
  4861. (home-page "https://github.com/cucumber/multi_test")
  4862. (license license:expat)))
  4863. (define-public ruby-arel
  4864. (package
  4865. (name "ruby-arel")
  4866. (version "9.0.0")
  4867. (source (origin
  4868. (method url-fetch)
  4869. (uri (rubygems-uri "arel" version))
  4870. (sha256
  4871. (base32
  4872. "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
  4873. (build-system ruby-build-system)
  4874. (arguments '(#:tests? #f)) ; no tests
  4875. (home-page "https://github.com/rails/arel")
  4876. (synopsis "SQL AST manager for Ruby")
  4877. (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
  4878. Ruby. It simplifies the generation of complex SQL queries and adapts to
  4879. various relational database implementations.")
  4880. (license license:expat)))
  4881. (define-public ruby-marcel
  4882. (package
  4883. (name "ruby-marcel")
  4884. (version "0.3.3")
  4885. (source
  4886. (origin
  4887. (method url-fetch)
  4888. (uri (rubygems-uri "marcel" version))
  4889. (sha256
  4890. (base32
  4891. "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
  4892. (build-system ruby-build-system)
  4893. (arguments
  4894. '(;; No included tests
  4895. #:tests? #f))
  4896. (propagated-inputs
  4897. `(("ruby-mimemagic" ,ruby-mimemagic)))
  4898. (synopsis "MIME type detection using magic numbers, filenames and extensions")
  4899. (description
  4900. "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
  4901. Extensions} type detection using magic numbers, filenames, and extensions")
  4902. (home-page "https://github.com/basecamp/marcel")
  4903. (license license:expat)))
  4904. (define-public ruby-minitar
  4905. ;; We package from the GitHub source to fix the security issue reported at
  4906. ;; https://github.com/halostatue/minitar/issues/16.
  4907. (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
  4908. (package
  4909. (name "ruby-minitar")
  4910. (version (string-append "0.5.4-1." (string-take commit 8)))
  4911. (source
  4912. (origin
  4913. (method git-fetch)
  4914. (uri (git-reference
  4915. (url "https://github.com/halostatue/minitar")
  4916. (commit commit)))
  4917. (file-name (string-append name "-" version "-checkout"))
  4918. (sha256
  4919. (base32
  4920. "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
  4921. (build-system ruby-build-system)
  4922. (arguments
  4923. '(#:tests? #f)) ; missing a gemspec
  4924. (synopsis "Ruby library and utility for handling tar archives")
  4925. (description
  4926. "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
  4927. that provides the ability to deal with POSIX tar archive files.")
  4928. (home-page "http://www.github.com/atoulme/minitar")
  4929. (license (list license:gpl2+ license:ruby)))))
  4930. (define-public ruby-mini-portile
  4931. (package
  4932. (name "ruby-mini-portile")
  4933. (version "0.6.2")
  4934. (source
  4935. (origin
  4936. (method url-fetch)
  4937. (uri (rubygems-uri "mini_portile" version))
  4938. (sha256
  4939. (base32
  4940. "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
  4941. (build-system ruby-build-system)
  4942. (arguments
  4943. '(#:tests? #f)) ; tests require network access
  4944. (synopsis "Ports system for Ruby developers")
  4945. (description "Mini-portile is a port/recipe system for Ruby developers.
  4946. It provides a standard way to compile against specific versions of libraries
  4947. to reproduce user environments.")
  4948. (home-page "https://github.com/flavorjones/mini_portile")
  4949. (license license:expat)))
  4950. (define-public ruby-mini-portile-2
  4951. (package (inherit ruby-mini-portile)
  4952. (version "2.4.0")
  4953. (source (origin
  4954. (method url-fetch)
  4955. (uri (rubygems-uri "mini_portile2" version))
  4956. (sha256
  4957. (base32
  4958. "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
  4959. (define-public ruby-nokogiri
  4960. (package
  4961. (name "ruby-nokogiri")
  4962. (version "1.10.9")
  4963. (source (origin
  4964. (method url-fetch)
  4965. (uri (rubygems-uri "nokogiri" version))
  4966. (sha256
  4967. (base32
  4968. "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
  4969. (build-system ruby-build-system)
  4970. (arguments
  4971. ;; Tests fail because Nokogiri can only test with an installed extension,
  4972. ;; and also because many test framework dependencies are missing.
  4973. `(#:tests? #f
  4974. #:gem-flags (list "--" "--use-system-libraries"
  4975. (string-append "--with-xml2-include="
  4976. (assoc-ref %build-inputs "libxml2")
  4977. "/include/libxml2" ))
  4978. #:phases
  4979. (modify-phases %standard-phases
  4980. (add-before 'build 'patch-extconf
  4981. ;; 'pkg-config' is not included in the GEM_PATH during
  4982. ;; installation, so we add it directly to the load path.
  4983. (lambda* (#:key inputs #:allow-other-keys)
  4984. (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
  4985. (substitute* "ext/nokogiri/extconf.rb"
  4986. (("gem 'pkg-config'.*")
  4987. (string-append "$:.unshift '"
  4988. pkg-config "/lib/ruby/vendor_ruby"
  4989. "/gems/pkg-config-"
  4990. ,(package-version ruby-pkg-config)
  4991. "/lib'\n"))))
  4992. #t)))))
  4993. (native-inputs
  4994. `(("ruby-hoe" ,ruby-hoe)))
  4995. (inputs
  4996. `(("zlib" ,zlib)
  4997. ("libxml2" ,libxml2)
  4998. ("libxslt" ,libxslt)))
  4999. (propagated-inputs
  5000. `(("ruby-mini-portile" ,ruby-mini-portile-2)
  5001. ("ruby-pkg-config" ,ruby-pkg-config)))
  5002. (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
  5003. (description "Nokogiri (鋸) parses and searches XML/HTML, and features
  5004. both CSS3 selector and XPath 1.0 support.")
  5005. (home-page "http://www.nokogiri.org/")
  5006. (license license:expat)))
  5007. (define-public ruby-method-source
  5008. (package
  5009. (name "ruby-method-source")
  5010. (version "1.0.0")
  5011. (source
  5012. (origin
  5013. (method url-fetch)
  5014. (uri (rubygems-uri "method_source" version))
  5015. (sha256
  5016. (base32
  5017. "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
  5018. (build-system ruby-build-system)
  5019. (arguments
  5020. `(#:test-target "spec"
  5021. #:phases
  5022. (modify-phases %standard-phases
  5023. (add-after 'unpack 'remove-git-ls-files
  5024. (lambda* (#:key outputs #:allow-other-keys)
  5025. (substitute* "Rakefile"
  5026. (("git ls-files") "find . -type f"))
  5027. #t)))))
  5028. (native-inputs
  5029. `(("ruby-rspec" ,ruby-rspec)))
  5030. (synopsis "Retrieve the source code for Ruby methods")
  5031. (description "Method_source retrieves the source code for Ruby methods.
  5032. Additionally, it can extract source code from Proc and Lambda objects or just
  5033. extract comments.")
  5034. (home-page "https://github.com/banister/method_source")
  5035. (license license:expat)))
  5036. (define-public ruby-coderay
  5037. (package
  5038. (name "ruby-coderay")
  5039. (version "1.1.2")
  5040. (source
  5041. (origin
  5042. (method url-fetch)
  5043. (uri (rubygems-uri "coderay" version))
  5044. (sha256
  5045. (base32
  5046. "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
  5047. (build-system ruby-build-system)
  5048. (arguments
  5049. '(#:tests? #f)) ; missing test files
  5050. (synopsis "Ruby syntax highlighting library")
  5051. (description "Coderay is a Ruby library that provides syntax highlighting
  5052. for select languages.")
  5053. (home-page "http://coderay.rubychan.de")
  5054. (license license:expat)))
  5055. (define-public ruby-cuke-modeler
  5056. (package
  5057. (name "ruby-cuke-modeler")
  5058. (version "3.1.0")
  5059. (source
  5060. (origin
  5061. (method url-fetch)
  5062. (uri (rubygems-uri "cuke_modeler" version))
  5063. (sha256
  5064. (base32
  5065. "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
  5066. (build-system ruby-build-system)
  5067. (arguments `(#:tests? #f)) ;no test suite in gem
  5068. (propagated-inputs
  5069. `(("ruby-gherkin" ,ruby-gherkin)))
  5070. (synopsis "Gherkin test suite analysis tool")
  5071. (description "CukeModeler facilitates modeling a test suite that is
  5072. written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
  5073. providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
  5074. the @code{cucumber-gherkin} generates when parsing features, as well as
  5075. providing models for feature files and directories in order to be able to have
  5076. a fully traversable model tree of a test suite's structure. These models can
  5077. then be analyzed or manipulated more easily than the underlying AST layer.")
  5078. (home-page "https://github.com/enkessler/cuke_modeler")
  5079. (license license:expat)))
  5080. (define-public ruby-parallel-tests
  5081. (package
  5082. (name "ruby-parallel-tests")
  5083. (version "3.0.0")
  5084. (home-page "https://github.com/grosser/parallel_tests")
  5085. (source (origin
  5086. (method git-fetch)
  5087. (uri (git-reference
  5088. (url home-page)
  5089. (commit (string-append "v" version))))
  5090. (file-name (string-append name version))
  5091. (sha256
  5092. (base32
  5093. "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
  5094. (build-system ruby-build-system)
  5095. (arguments
  5096. '(#:test-target "default"
  5097. #:phases (modify-phases %standard-phases
  5098. (add-after 'patch-source-shebangs 'patch-shell-invokations
  5099. (lambda _
  5100. (substitute* '("lib/parallel_tests/tasks.rb"
  5101. "spec/parallel_tests/tasks_spec.rb")
  5102. (("/bin/sh") (which "sh"))
  5103. (("/bin/bash") (which "bash")))
  5104. #t))
  5105. (add-before 'check 'remove-version-constraints
  5106. (lambda _
  5107. ;; Remove hard coded version constraints, instead just
  5108. ;; use whatever versions are available in Guix.
  5109. (delete-file "Gemfile.lock")
  5110. (substitute* "Gemfile"
  5111. (("'minitest',.*")
  5112. "'minitest'\n")
  5113. (("'cucumber',.*")
  5114. "'cucumber'\n"))
  5115. #t))
  5116. (add-before 'check 'disable-rails-test
  5117. (lambda _
  5118. ;; XXX: This test attempts to download and run the test
  5119. ;; suites of multiple Rails versions(!) directly.
  5120. (delete-file "spec/rails_spec.rb")
  5121. #t))
  5122. (add-before 'check 'set-HOME
  5123. (lambda _
  5124. ;; Some tests check the output of Bundler, and fail when
  5125. ;; Bundler warns that /homeless-shelter does not exist.
  5126. (setenv "HOME" "/tmp")
  5127. #t)))))
  5128. (native-inputs
  5129. `(("ruby-bump" ,ruby-bump)
  5130. ("ruby-cucumber" ,ruby-cucumber)
  5131. ("ruby-cuke-modeler" ,ruby-cuke-modeler)
  5132. ("ruby-minitest" ,ruby-minitest)
  5133. ("ruby-rake" ,ruby-rake)
  5134. ("ruby-rspec" ,ruby-rspec)
  5135. ("ruby-spinach" ,ruby-spinach)))
  5136. (propagated-inputs
  5137. `(("ruby-parallel" ,ruby-parallel)))
  5138. (synopsis "Run tests in parallel")
  5139. (description
  5140. "This package can speed up @code{Test::Unit}, @code{RSpec},
  5141. @code{Cucumber}, and @code{Spinach} tests by running them concurrently
  5142. across multiple CPU cores.")
  5143. (license license:expat)))
  5144. (define-public ruby-parser
  5145. (package
  5146. (name "ruby-parser")
  5147. (version "3.0.0.0")
  5148. (source
  5149. (origin
  5150. (method url-fetch)
  5151. (uri (rubygems-uri "parser" version))
  5152. (sha256
  5153. (base32
  5154. "1jixakyzmy0j5c1rb0fjrrdhgnyryvrr6vgcybs14jfw09akv5ml"))))
  5155. (build-system ruby-build-system)
  5156. (arguments
  5157. '(#:tests? #f)) ; tests not included in gem
  5158. (native-inputs
  5159. `(("bundler" ,bundler)
  5160. ("ruby-cliver" ,ruby-cliver)
  5161. ("ruby-simplecov" ,ruby-simplecov)
  5162. ("ruby-racc" ,ruby-racc)))
  5163. (inputs
  5164. `(("ragel" ,ragel)))
  5165. (propagated-inputs
  5166. `(("ruby-ast" ,ruby-ast)))
  5167. (synopsis "Ruby parser written in pure Ruby")
  5168. (description
  5169. "This package provides a Ruby parser written in pure Ruby.")
  5170. (home-page "https://github.com/whitequark/parser")
  5171. (license license:expat)))
  5172. (define-public ruby-sexp-processor
  5173. (package
  5174. (name "ruby-sexp-processor")
  5175. (version "4.15.0")
  5176. (source
  5177. (origin
  5178. (method url-fetch)
  5179. (uri (rubygems-uri "sexp_processor" version))
  5180. (sha256
  5181. (base32
  5182. "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
  5183. (build-system ruby-build-system)
  5184. (native-inputs
  5185. ;; TODO: Add ruby-minitest-proveit once available.
  5186. `(("hoe" ,ruby-hoe)))
  5187. (synopsis "ParseTree fork which includes generic S-exp processing tools")
  5188. (description "The sexp_processor package is derived from ParseTree, but
  5189. contrary to ParseTree, it includes all the generic S-exp processing tools.
  5190. Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
  5191. @code{Environment}")
  5192. (home-page "https://github.com/seattlerb/sexp_processor")
  5193. (license license:expat)))
  5194. (define-public ruby-ruby-parser
  5195. (package
  5196. (name "ruby-ruby-parser")
  5197. (version "3.14.2")
  5198. (source
  5199. (origin
  5200. (method url-fetch)
  5201. (uri (rubygems-uri "ruby_parser" version))
  5202. (sha256
  5203. (base32
  5204. "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
  5205. (build-system ruby-build-system)
  5206. (native-inputs
  5207. `(("hoe" ,ruby-hoe)
  5208. ("racc" ,ruby-racc)
  5209. ("unifdef" ,unifdef)))
  5210. (propagated-inputs
  5211. `(("ruby-sexp-processor" ,ruby-sexp-processor)))
  5212. (home-page "https://github.com/seattlerb/ruby_parser/")
  5213. (synopsis "Ruby parser written in pure Ruby")
  5214. (description "The ruby_parser (RP) package provides a Ruby parser written
  5215. in pure Ruby. It outputs S-expressions which can be manipulated and converted
  5216. back to Ruby via the @code{ruby2ruby} library.")
  5217. (license license:expat)))
  5218. (define-public ruby-prawn-manual-builder
  5219. (package
  5220. (name "ruby-prawn-manual-builder")
  5221. (version "0.3.1")
  5222. (source
  5223. (origin
  5224. (method url-fetch)
  5225. (uri (rubygems-uri "prawn-manual_builder" version))
  5226. (sha256
  5227. (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
  5228. (build-system ruby-build-system)
  5229. (arguments
  5230. '(#:tests? #f ; no included tests
  5231. #:phases
  5232. (modify-phases %standard-phases
  5233. (add-after 'extract-gemspec 'patch-gemspec
  5234. (lambda _
  5235. (substitute* ".gemspec"
  5236. ;; Loosen the requirement for pdf-inspector
  5237. (("~> 1\\.0\\.7") ">= 0")))))))
  5238. (propagated-inputs
  5239. `(("ruby-coderay" ,ruby-coderay)))
  5240. (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
  5241. (description
  5242. "This package provides a tool for writing manuals for Prawn and Prawn
  5243. accessories")
  5244. (home-page "https://github.com/prawnpdf/prawn-manual_builder")
  5245. (license %prawn-project-licenses)))
  5246. (define-public ruby-progress_bar
  5247. (package
  5248. (name "ruby-progress_bar")
  5249. (version "1.1.0")
  5250. (source
  5251. (origin
  5252. (method url-fetch)
  5253. (uri (rubygems-uri "progress_bar" version))
  5254. (sha256
  5255. (base32
  5256. "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
  5257. (build-system ruby-build-system)
  5258. (arguments
  5259. '(#:test-target "spec"))
  5260. (propagated-inputs
  5261. `(("ruby-highline" ,ruby-highline)
  5262. ("ruby-options" ,ruby-options)))
  5263. (native-inputs
  5264. `(("bundler" ,bundler)
  5265. ("ruby-rspec" ,ruby-rspec)
  5266. ("ruby-timecop" ,ruby-timecop)))
  5267. (synopsis
  5268. "Ruby library for displaying progress bars")
  5269. (description
  5270. "ProgressBar is a simple library for displaying progress bars. The
  5271. maximum value is configurable, and additional information can be displayed
  5272. like the percentage completion, estimated time remaining, elapsed time and
  5273. rate.")
  5274. (home-page "https://github.com/paul/progress_bar")
  5275. (license license:wtfpl2)))
  5276. (define-public ruby-dep
  5277. (package
  5278. (name "ruby-dep")
  5279. (version "1.5.0")
  5280. (source
  5281. (origin
  5282. (method url-fetch)
  5283. (uri (rubygems-uri "ruby_dep" version))
  5284. (sha256
  5285. (base32
  5286. "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
  5287. (build-system ruby-build-system)
  5288. (arguments
  5289. '(#:tests? #f)) ; No included tests
  5290. (synopsis "Creates a version constraint of supported Rubies")
  5291. (description
  5292. "This package helps create a version constraint of supported Rubies,
  5293. suitable for a gemspec file.")
  5294. (home-page "https://github.com/e2/ruby_dep")
  5295. (license license:expat)))
  5296. (define-public ruby-progressbar
  5297. (package
  5298. (name "ruby-progressbar")
  5299. (version "1.10.1")
  5300. (source
  5301. (origin
  5302. (method url-fetch)
  5303. (uri (rubygems-uri "ruby-progressbar" version))
  5304. (sha256
  5305. (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
  5306. (build-system ruby-build-system)
  5307. (arguments
  5308. '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
  5309. #:tests? #f))
  5310. (synopsis "Text progress bar library for Ruby")
  5311. (description
  5312. "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
  5313. The output can be customized with a formatting system.")
  5314. (home-page "https://github.com/jfelchner/ruby-progressbar")
  5315. (license license:expat)))
  5316. (define-public ruby-pry
  5317. (package
  5318. (name "ruby-pry")
  5319. (version "0.13.1")
  5320. (source
  5321. (origin
  5322. (method url-fetch)
  5323. (uri (rubygems-uri "pry" version))
  5324. (sha256
  5325. (base32
  5326. "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
  5327. (build-system ruby-build-system)
  5328. (arguments
  5329. '(#:tests? #f)) ; no tests
  5330. (propagated-inputs
  5331. `(("ruby-coderay" ,ruby-coderay)
  5332. ("ruby-method-source" ,ruby-method-source)))
  5333. (synopsis "Ruby REPL")
  5334. (description "Pry is an IRB alternative and runtime developer console for
  5335. Ruby. It features syntax highlighting, a plugin architecture, runtime
  5336. invocation, and source and documentation browsing.")
  5337. (home-page "https://cobaltbluemedia.com/pryrepl/")
  5338. (license license:expat)))
  5339. (define-public ruby-single-cov
  5340. (package
  5341. (name "ruby-single-cov")
  5342. (version "1.3.2")
  5343. (home-page "https://github.com/grosser/single_cov")
  5344. (source (origin
  5345. (method git-fetch)
  5346. (uri (git-reference (url home-page)
  5347. (commit (string-append "v" version))))
  5348. (file-name (git-file-name name version))
  5349. (sha256
  5350. (base32
  5351. "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
  5352. (build-system ruby-build-system)
  5353. (arguments
  5354. '(#:test-target "default"
  5355. #:phases (modify-phases %standard-phases
  5356. (replace 'replace-git-ls-files
  5357. (lambda _
  5358. (substitute* "single_cov.gemspec"
  5359. (("`git ls-files lib/ bin/ MIT-LICENSE`")
  5360. "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
  5361. #t))
  5362. (add-before 'check 'remove-version-constraints
  5363. (lambda _
  5364. (delete-file "Gemfile.lock")
  5365. #t))
  5366. (add-before 'check 'make-files-writable
  5367. (lambda _
  5368. ;; Tests need to create local directories and open files
  5369. ;; with write permissions.
  5370. (for-each make-file-writable
  5371. (find-files "specs" #:directories? #t))
  5372. #t))
  5373. (add-before 'check 'disable-failing-test
  5374. (lambda _
  5375. ;; XXX: This test copies assets from minitest, but can
  5376. ;; not cope with the files being read-only. Just skip
  5377. ;; it for now.
  5378. (substitute* "specs/single_cov_spec.rb"
  5379. (("it \"complains when coverage is bad\"")
  5380. "xit \"complains when coverage is bad\""))
  5381. #t)))))
  5382. (native-inputs
  5383. `(("ruby-bump" ,ruby-bump)
  5384. ("ruby-minitest" ,ruby-minitest)
  5385. ("ruby-rspec" ,ruby-rspec)
  5386. ("ruby-simplecov" ,ruby-simplecov)))
  5387. (synopsis "Code coverage reporting tool")
  5388. (description
  5389. "This package provides actionable code coverage reports for Ruby
  5390. projects. It has very little overhead and can be easily integrated with
  5391. development tools to catch coverage problems early.")
  5392. (license license:expat)))
  5393. (define-public ruby-oedipus-lex
  5394. (package
  5395. (name "ruby-oedipus-lex")
  5396. (version "2.5.2")
  5397. (source
  5398. (origin
  5399. (method url-fetch)
  5400. (uri (rubygems-uri "oedipus_lex" version))
  5401. (sha256
  5402. (base32
  5403. "1v1rk78khwq87ar300lwll570zxpkq9rjnpgc9mgsyd6mm9qjz4w"))))
  5404. (build-system ruby-build-system)
  5405. (native-inputs
  5406. `(("ruby-hoe" ,ruby-hoe)))
  5407. (synopsis "Ruby lexer")
  5408. (description
  5409. "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
  5410. It is based primarily on generating code much like you would a hand-written
  5411. lexer. It uses StrScanner within a multi-level case statement. As such,
  5412. Oedipus matches on the first match, not the longest.")
  5413. (home-page "https://github.com/seattlerb/oedipus_lex")
  5414. (license license:expat)))
  5415. (define-public ruby-guard
  5416. (package
  5417. (name "ruby-guard")
  5418. (version "2.13.0")
  5419. (source (origin
  5420. (method git-fetch)
  5421. ;; The gem does not include a Rakefile, nor does it contain a
  5422. ;; gemspec file, nor does it come with the tests. This is why
  5423. ;; we fetch the tarball from Github.
  5424. (uri (git-reference
  5425. (url "https://github.com/guard/guard")
  5426. (commit (string-append "v" version))))
  5427. (file-name (git-file-name name version))
  5428. (sha256
  5429. (base32
  5430. "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
  5431. (build-system ruby-build-system)
  5432. (arguments
  5433. `(#:tests? #f ; tests require cucumber
  5434. #:phases
  5435. (modify-phases %standard-phases
  5436. (add-after 'unpack 'remove-git-ls-files
  5437. (lambda* (#:key outputs #:allow-other-keys)
  5438. (substitute* "guard.gemspec"
  5439. (("git ls-files -z") "find . -type f -print0"))
  5440. #t))
  5441. (replace 'build
  5442. (lambda _
  5443. (invoke "gem" "build" "guard.gemspec"))))))
  5444. (propagated-inputs
  5445. `(("ruby-formatador" ,ruby-formatador)
  5446. ("ruby-listen" ,ruby-listen)
  5447. ("ruby-lumberjack" ,ruby-lumberjack)
  5448. ("ruby-nenv" ,ruby-nenv)
  5449. ("ruby-notiffany" ,ruby-notiffany)
  5450. ("ruby-pry" ,ruby-pry)
  5451. ("ruby-shellany" ,ruby-shellany)
  5452. ("ruby-thor" ,ruby-thor)))
  5453. (native-inputs
  5454. `(("bundler" ,bundler)
  5455. ("ruby-rspec" ,ruby-rspec)))
  5456. (synopsis "Tool to handle events on file system modifications")
  5457. (description
  5458. "Guard is a command line tool to easily handle events on file system
  5459. modifications. Guard automates various tasks by running custom rules whenever
  5460. file or directories are modified.")
  5461. (home-page "https://guardgem.org/")
  5462. (license license:expat)))
  5463. (define-public ruby-spinach
  5464. (package
  5465. (name "ruby-spinach")
  5466. (version "0.11.0")
  5467. (home-page "https://github.com/codegram/spinach")
  5468. (source (origin
  5469. (method url-fetch)
  5470. (uri (rubygems-uri "spinach" version))
  5471. (sha256
  5472. (base32
  5473. "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
  5474. (build-system ruby-build-system)
  5475. (arguments
  5476. ;; FIXME: Disable tests altogether because they depend on 'capybara'
  5477. ;; which in turn depends on many other unpackaged gems. Enable once
  5478. ;; capybara is available.
  5479. '(#:tests? #f))
  5480. (propagated-inputs
  5481. `(("ruby-colorize" ,ruby-colorize)
  5482. ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
  5483. ("ruby-json" ,ruby-json)))
  5484. (synopsis "Gherkin-based BDD framework")
  5485. (description
  5486. "Spinach is a high-level @acronym{BDD, Behavior-driven development}
  5487. framework that leverages the expressive @code{Gherkin} language to help you
  5488. define executable specifications of your code.")
  5489. (license license:expat)))
  5490. (define-public ruby-tilt
  5491. (package
  5492. (name "ruby-tilt")
  5493. (version "2.0.10")
  5494. (source
  5495. (origin
  5496. (method git-fetch) ;the distributed gem lacks tests
  5497. (uri (git-reference
  5498. (url "https://github.com/rtomayko/tilt")
  5499. (commit (string-append "v" version))))
  5500. (file-name (git-file-name name version))
  5501. (sha256
  5502. (base32
  5503. "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
  5504. (build-system ruby-build-system)
  5505. (arguments
  5506. '(#:phases
  5507. (modify-phases %standard-phases
  5508. (add-after 'unpack 'remove-some-dependencies
  5509. (lambda _
  5510. (substitute* "Gemfile"
  5511. ;; TODO ronn is used for generating the manual
  5512. (("gem 'ronn'.*") "\n")
  5513. ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
  5514. ;; pass it in as a native-input
  5515. (("gem 'haml'.*") "\n")
  5516. ;; TODO Not all of these gems are packaged for Guix yet:
  5517. ;; less, coffee-script, livescript, babel-transpiler,
  5518. ;; typescript-node
  5519. (("if can_execjs") "if false")
  5520. ;; Disable the secondary group to reduce the number of
  5521. ;; dependencies. None of the normal approaches work, so patch
  5522. ;; the Gemfile instead.
  5523. (("group :secondary") "[].each"))
  5524. #t)))))
  5525. (propagated-inputs
  5526. `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
  5527. ("ruby-sassc" ,ruby-sassc)))
  5528. (native-inputs
  5529. `(("bundler" ,bundler)
  5530. ("ruby-yard" ,ruby-yard)
  5531. ("ruby-builder" ,ruby-builder)
  5532. ("ruby-erubis" ,ruby-erubis)
  5533. ("ruby-markaby" ,ruby-markaby)))
  5534. (synopsis "Generic interface to multiple Ruby template engines")
  5535. (description
  5536. "Tilt is a thin interface over a number of different Ruby template
  5537. engines in an attempt to make their usage as generic as possible.")
  5538. (home-page "https://github.com/rtomayko/tilt/")
  5539. (license license:expat)))
  5540. (define-public ruby-thread-safe
  5541. (package
  5542. (name "ruby-thread-safe")
  5543. (version "0.3.6")
  5544. (source
  5545. (origin
  5546. (method url-fetch)
  5547. (uri (rubygems-uri "thread_safe" version))
  5548. (sha256
  5549. (base32
  5550. "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
  5551. (build-system ruby-build-system)
  5552. (arguments
  5553. '(#:tests? #f)) ; needs simplecov, among others
  5554. (synopsis "Thread-safe utilities for Ruby")
  5555. (description "The thread_safe library provides thread-safe collections and
  5556. utilities for Ruby.")
  5557. (home-page "https://github.com/ruby-concurrency/thread_safe")
  5558. (license license:asl2.0)))
  5559. (define-public ruby-tzinfo
  5560. (package
  5561. (name "ruby-tzinfo")
  5562. (version "2.0.4")
  5563. (source
  5564. (origin
  5565. (method git-fetch)
  5566. (uri (git-reference
  5567. ;; Pull from git because the gem has no tests.
  5568. (url "https://github.com/tzinfo/tzinfo")
  5569. (commit (string-append "v" version))))
  5570. (file-name (git-file-name name version))
  5571. (sha256
  5572. (base32
  5573. "0jaq1givdaz5jxz47xngyj3j315n872rk97mnpm5njwm48wy45yh"))))
  5574. (build-system ruby-build-system)
  5575. (arguments
  5576. '(#:phases
  5577. (modify-phases %standard-phases
  5578. (add-after 'unpack 'skip-safe-tests
  5579. (lambda _
  5580. (substitute* "test/test_utils.rb"
  5581. (("def safe_test\\(options = \\{\\}\\)")
  5582. "def safe_test(options = {})
  5583. skip('The Guix build environment has an unsafe load path')"))
  5584. #t))
  5585. (add-before 'check 'pre-check
  5586. (lambda _
  5587. (setenv "HOME" (getcwd))
  5588. (substitute* "Gemfile"
  5589. (("simplecov.*") "simplecov'\n"))
  5590. #t))
  5591. (replace 'check
  5592. (lambda* (#:key tests? test-target #:allow-other-keys)
  5593. (when tests?
  5594. (invoke "bundler" "exec" "rake" test-target))
  5595. #t)))))
  5596. (propagated-inputs
  5597. `(("ruby-concurrent-ruby" ,ruby-concurrent)))
  5598. (native-inputs
  5599. `(("ruby-simplecov" ,ruby-simplecov)))
  5600. (synopsis "Time zone library for Ruby")
  5601. (description "TZInfo is a Ruby library that provides daylight savings
  5602. aware transformations between times in different time zones.")
  5603. (home-page "https://tzinfo.github.io")
  5604. (license license:expat)))
  5605. (define-public ruby-tzinfo-data
  5606. (package
  5607. (name "ruby-tzinfo-data")
  5608. (version "1.2021.1")
  5609. (source
  5610. (origin
  5611. (method git-fetch)
  5612. ;; Download from GitHub because the rubygems version does not contain
  5613. ;; Rakefile or tests.
  5614. (uri (git-reference
  5615. (url "https://github.com/tzinfo/tzinfo-data")
  5616. (commit (string-append "v" version))))
  5617. (file-name (git-file-name name version))
  5618. (sha256
  5619. (base32
  5620. "0yzyr3rf8qaw6kxfc0gwpxsb7gl3rhfpx9g1c2z15vapyminhi60"))))
  5621. (build-system ruby-build-system)
  5622. (arguments
  5623. `(#:phases
  5624. (modify-phases %standard-phases
  5625. (add-after 'unpack 'patch-source
  5626. (lambda* (#:key inputs #:allow-other-keys)
  5627. (substitute* "Rakefile"
  5628. (("https://data.iana.org/time-zones/releases")
  5629. (assoc-ref inputs "tzdata")))
  5630. #t))
  5631. (add-before 'check 'pre-check
  5632. (lambda _
  5633. (setenv "HOME" (getcwd))
  5634. (substitute* "Rakefile"
  5635. ;; Don't need gpg, and it may break after a time.
  5636. (("gpg ") "echo ")
  5637. ((" sh\\(\\\"make -C" text)
  5638. (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
  5639. " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
  5640. (setenv "cc" ,(cc-for-target))
  5641. #t)))))
  5642. (propagated-inputs
  5643. `(("ruby-tzinfo" ,ruby-tzinfo)))
  5644. (native-inputs
  5645. `(("tzdata"
  5646. ,(file-union "tzdata-for-ruby-tzdata-info"
  5647. `(("tzdata2021a.tar.gz"
  5648. ,(origin
  5649. (method url-fetch)
  5650. (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz")
  5651. (sha256
  5652. (base32
  5653. "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
  5654. ("tzdata2021a.tar.gz.asc"
  5655. ,(origin
  5656. (method url-fetch)
  5657. (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz.asc")
  5658. (sha256
  5659. (base32
  5660. "0n7h2w8ji1lrxpk0d44wyfshlhr7c9jmwj6lqbxlyvqnfi3gbicx"))))
  5661. ("tzcode2021a.tar.gz"
  5662. ,(origin
  5663. (method url-fetch)
  5664. (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz")
  5665. (sha256
  5666. (base32
  5667. "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))
  5668. ("tzcode2021a.tar.gz.asc"
  5669. ,(origin
  5670. (method url-fetch)
  5671. (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz.asc")
  5672. (sha256
  5673. (base32
  5674. "1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g")))))))))
  5675. (synopsis "Data from the IANA Time Zone database")
  5676. (description
  5677. "This library provides @code{TZInfo::Data}, which contains data from the
  5678. IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
  5679. (home-page "https://tzinfo.github.io")
  5680. (license license:expat)))
  5681. (define-public ruby-rb-inotify
  5682. (package
  5683. (name "ruby-rb-inotify")
  5684. (version "0.9.10")
  5685. (source
  5686. (origin
  5687. (method url-fetch)
  5688. (uri (rubygems-uri "rb-inotify" version))
  5689. (sha256
  5690. (base32
  5691. "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
  5692. (build-system ruby-build-system)
  5693. (arguments
  5694. '(#:tests? #f ; there are no tests
  5695. #:phases
  5696. (modify-phases %standard-phases
  5697. ;; Building the gemspec with rake is not working here since it is
  5698. ;; generated with Jeweler. It is also unnecessary because the
  5699. ;; existing gemspec does not use any development tools to generate a
  5700. ;; list of files.
  5701. (replace 'build
  5702. (lambda _
  5703. (invoke "gem" "build" "rb-inotify.gemspec"))))))
  5704. (propagated-inputs
  5705. `(("ruby-ffi" ,ruby-ffi)))
  5706. (native-inputs
  5707. `(("ruby-yard" ,ruby-yard)))
  5708. (synopsis "Ruby wrapper for Linux's inotify")
  5709. (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
  5710. kernel subsystem for monitoring changes to files and directories.")
  5711. (home-page "https://github.com/nex3/rb-inotify")
  5712. (license license:expat)))
  5713. (define-public ruby-pry-editline
  5714. (package
  5715. (name "ruby-pry-editline")
  5716. (version "1.1.2")
  5717. (source (origin
  5718. (method url-fetch)
  5719. (uri (rubygems-uri "pry-editline" version))
  5720. (sha256
  5721. (base32
  5722. "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
  5723. (build-system ruby-build-system)
  5724. (arguments `(#:tests? #f)) ; no tests included
  5725. (native-inputs
  5726. `(("bundler" ,bundler)))
  5727. (synopsis "Open the current REPL line in an editor")
  5728. (description
  5729. "This gem provides a plugin for the Ruby REPL to enable opening the
  5730. current line in an external editor.")
  5731. (home-page "https://github.com/tpope/pry-editline")
  5732. (license license:expat)))
  5733. (define-public ruby-sdoc
  5734. (package
  5735. (name "ruby-sdoc")
  5736. (version "1.1.0")
  5737. (source (origin
  5738. (method url-fetch)
  5739. (uri (rubygems-uri "sdoc" version))
  5740. (sha256
  5741. (base32
  5742. "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
  5743. (build-system ruby-build-system)
  5744. (arguments
  5745. `(#:phases
  5746. (modify-phases %standard-phases
  5747. (add-before 'check 'set-rubylib-and-patch-gemfile
  5748. (lambda _
  5749. (setenv "RUBYLIB" "lib")
  5750. (substitute* "sdoc.gemspec"
  5751. (("s.add_runtime_dependency.*") "\n")
  5752. (("s.add_dependency.*") "\n"))
  5753. (substitute* "Gemfile"
  5754. (("gem \"rake\".*")
  5755. "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
  5756. #t)))))
  5757. (propagated-inputs
  5758. `(("ruby-json" ,ruby-json)))
  5759. (native-inputs
  5760. `(("bundler" ,bundler)
  5761. ("ruby-minitest" ,ruby-minitest)
  5762. ("ruby-hoe" ,ruby-hoe)))
  5763. (synopsis "Generate searchable RDoc documentation")
  5764. (description
  5765. "SDoc is an RDoc documentation generator to build searchable HTML
  5766. documentation for Ruby code.")
  5767. (home-page "https://github.com/voloko/sdoc")
  5768. (license license:expat)))
  5769. (define-public ruby-tins
  5770. (package
  5771. (name "ruby-tins")
  5772. (version "1.29.1")
  5773. (source (origin
  5774. (method url-fetch)
  5775. (uri (rubygems-uri "tins" version))
  5776. (sha256
  5777. (base32
  5778. "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
  5779. (build-system ruby-build-system)
  5780. ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
  5781. ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
  5782. ;; the gemspec.
  5783. (arguments
  5784. `(#:tests? #f ; there are no tests
  5785. #:phases
  5786. (modify-phases %standard-phases
  5787. (replace 'build
  5788. (lambda _
  5789. ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
  5790. ;; causes an error.
  5791. (substitute* "tins.gemspec"
  5792. (("\"lib/spruz\", ") ""))
  5793. (invoke "gem" "build" "tins.gemspec"))))))
  5794. (propagated-inputs
  5795. `(("ruby-sync" ,ruby-sync)))
  5796. (synopsis "Assorted tools for Ruby")
  5797. (description "Tins is a Ruby library providing assorted tools.")
  5798. (home-page "https://github.com/flori/tins")
  5799. (license license:expat)))
  5800. (define-public ruby-gem-hadar
  5801. (package
  5802. (name "ruby-gem-hadar")
  5803. (version "1.11.0")
  5804. (source (origin
  5805. (method url-fetch)
  5806. (uri (rubygems-uri "gem_hadar" version))
  5807. (sha256
  5808. (base32
  5809. "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
  5810. (build-system ruby-build-system)
  5811. ;; This gem needs itself at development time. We disable rebuilding of the
  5812. ;; gemspec to avoid this loop.
  5813. (arguments
  5814. `(#:tests? #f ; there are no tests
  5815. #:phases
  5816. (modify-phases %standard-phases
  5817. (replace 'build
  5818. (lambda _
  5819. (invoke "gem" "build" "gem_hadar.gemspec"))))))
  5820. (propagated-inputs
  5821. `(("git" ,git)
  5822. ("ruby-tins" ,ruby-tins)
  5823. ("ruby-yard" ,ruby-yard)))
  5824. (synopsis "Library for the development of Ruby gems")
  5825. (description
  5826. "This library contains some useful functionality to support the
  5827. development of Ruby gems.")
  5828. (home-page "https://github.com/flori/gem_hadar")
  5829. (license license:expat)))
  5830. (define-public ruby-minitest-tu-shim
  5831. (package
  5832. (name "ruby-minitest-tu-shim")
  5833. (version "1.3.3")
  5834. (source (origin
  5835. (method url-fetch)
  5836. (uri (rubygems-uri "minitest_tu_shim" version))
  5837. (sha256
  5838. (base32
  5839. "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
  5840. (build-system ruby-build-system)
  5841. (arguments
  5842. `(#:phases
  5843. (modify-phases %standard-phases
  5844. (add-after 'unpack 'fix-test-include-path
  5845. (lambda* (#:key inputs #:allow-other-keys)
  5846. (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
  5847. (substitute* "Rakefile"
  5848. (("Hoe\\.add_include_dirs .*")
  5849. (string-append "Hoe.add_include_dirs \""
  5850. minitest "/lib/ruby/vendor_ruby"
  5851. "/gems/minitest-"
  5852. ,(package-version ruby-minitest-4)
  5853. "/lib" "\""))))
  5854. #t))
  5855. (add-before 'check 'fix-test-assumptions
  5856. (lambda _
  5857. ;; The test output includes the file name, so a couple of tests
  5858. ;; fail. Changing the regular expressions slightly fixes this
  5859. ;; problem.
  5860. (substitute* "test/test_mini_test.rb"
  5861. (("output.sub!\\(.*, 'FILE:LINE'\\)")
  5862. "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
  5863. (("gsub\\(/.*, 'FILE:LINE'\\)")
  5864. "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
  5865. #t)))))
  5866. (propagated-inputs
  5867. `(("ruby-minitest-4" ,ruby-minitest-4)))
  5868. (native-inputs
  5869. `(("ruby-hoe" ,ruby-hoe)))
  5870. (synopsis "Adapter library between minitest and test/unit")
  5871. (description
  5872. "This library bridges the gap between the small and fast minitest and
  5873. Ruby's large and slower test/unit.")
  5874. (home-page "https://rubygems.org/gems/minitest_tu_shim")
  5875. (license license:expat)))
  5876. (define-public ruby-term-ansicolor
  5877. (package
  5878. (name "ruby-term-ansicolor")
  5879. (version "1.7.1")
  5880. (source (origin
  5881. (method url-fetch)
  5882. (uri (rubygems-uri "term-ansicolor" version))
  5883. (sha256
  5884. (base32
  5885. "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
  5886. (build-system ruby-build-system)
  5887. ;; Rebuilding the gemspec seems to require git, even though this is not a
  5888. ;; git repository, so we just build the gem from the existing gemspec.
  5889. (arguments
  5890. `(#:phases
  5891. (modify-phases %standard-phases
  5892. (add-after 'unpack 'fix-test
  5893. (lambda -
  5894. (substitute* "tests/hsl_triple_test.rb"
  5895. (("0\\\\\\.0%")
  5896. "0\\.?0?%"))))
  5897. (replace 'build
  5898. (lambda _
  5899. (invoke "gem" "build" "term-ansicolor.gemspec"))))))
  5900. (propagated-inputs
  5901. `(("ruby-tins" ,ruby-tins)))
  5902. (native-inputs
  5903. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5904. ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
  5905. (synopsis "Ruby library to control the attributes of terminal output")
  5906. (description
  5907. "This Ruby library uses ANSI escape sequences to control the attributes
  5908. of terminal output.")
  5909. (home-page "https://flori.github.io/term-ansicolor/")
  5910. ;; There is no mention of the "or later" clause.
  5911. (license license:gpl2)))
  5912. (define-public ruby-terraform
  5913. (package
  5914. (name "ruby-terraform")
  5915. (version "0.22.0")
  5916. (source
  5917. (origin
  5918. (method url-fetch)
  5919. (uri (rubygems-uri "ruby-terraform" version))
  5920. (sha256
  5921. (base32
  5922. "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
  5923. (build-system ruby-build-system)
  5924. (arguments
  5925. '(#:tests? #f)) ; No included tests
  5926. (propagated-inputs
  5927. `(("ruby-lino" ,ruby-lino)))
  5928. (synopsis "Ruby wrapper around the Terraform command line interface")
  5929. (description
  5930. "This package provides a Ruby wrapper around the Terraform command line
  5931. interface so that Terraform can be more easily invoked from Ruby code.")
  5932. (home-page "https://github.com/infrablocks/ruby_terraform")
  5933. (license license:expat)))
  5934. (define-public ruby-pstree
  5935. (package
  5936. (name "ruby-pstree")
  5937. (version "0.3.0")
  5938. (source (origin
  5939. (method url-fetch)
  5940. (uri (rubygems-uri "pstree" version))
  5941. (sha256
  5942. (base32
  5943. "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
  5944. (build-system ruby-build-system)
  5945. (native-inputs
  5946. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5947. ("bundler" ,bundler)))
  5948. (synopsis "Create a process tree data structure")
  5949. (description
  5950. "This library uses the output of the @code{ps} command to create a
  5951. process tree data structure for the current host.")
  5952. (home-page "https://github.com/flori/pstree")
  5953. ;; There is no mention of the "or later" clause.
  5954. (license license:gpl2)))
  5955. (define-public ruby-utils
  5956. (package
  5957. (name "ruby-utils")
  5958. (version "0.9.0")
  5959. (source (origin
  5960. (method url-fetch)
  5961. (uri (rubygems-uri "utils" version))
  5962. (sha256
  5963. (base32
  5964. "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
  5965. (build-system ruby-build-system)
  5966. (propagated-inputs
  5967. `(("ruby-tins" ,ruby-tins)
  5968. ("ruby-term-ansicolor" ,ruby-term-ansicolor)
  5969. ("ruby-pstree" ,ruby-pstree)
  5970. ("ruby-pry-editline" ,ruby-pry-editline)))
  5971. (native-inputs
  5972. `(("ruby-gem-hadar" ,ruby-gem-hadar)
  5973. ("bundler" ,bundler)))
  5974. (synopsis "Command line tools for working with Ruby")
  5975. (description
  5976. "This package provides assorted command line tools that may be useful
  5977. when working with Ruby code.")
  5978. (home-page "https://github.com/flori/utils")
  5979. ;; There is no mention of the "or later" clause.
  5980. (license license:gpl2)))
  5981. (define-public ruby-jaro-winkler
  5982. (package
  5983. (name "ruby-jaro-winkler")
  5984. (version "1.5.4")
  5985. (source
  5986. (origin
  5987. (method url-fetch)
  5988. (uri (rubygems-uri "jaro_winkler" version))
  5989. (sha256
  5990. (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
  5991. (build-system ruby-build-system)
  5992. (arguments
  5993. '(#:tests? #f)) ; no included tests
  5994. (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
  5995. (description
  5996. "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
  5997. algorithm. It is written as a C extension and will fallback to a pure Ruby
  5998. implementation on platforms where this is unsupported.")
  5999. (home-page "https://github.com/tonytonyjan/jaro_winkler")
  6000. (license license:expat)))
  6001. (define-public ruby-json
  6002. (package
  6003. (name "ruby-json")
  6004. (version "2.1.0")
  6005. (source
  6006. (origin
  6007. (method url-fetch)
  6008. (uri (rubygems-uri "json" version))
  6009. (sha256
  6010. (base32
  6011. "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
  6012. (build-system ruby-build-system)
  6013. (arguments '(#:tests? #f)) ; dependency cycle with sdoc
  6014. (synopsis "JSON library for Ruby")
  6015. (description "This Ruby library provides a JSON implementation written as
  6016. a native C extension.")
  6017. (home-page "http://json-jruby.rubyforge.org/")
  6018. (license (list license:ruby license:gpl2)))) ; GPL2 only
  6019. (define-public ruby-json-pure
  6020. (package
  6021. (name "ruby-json-pure")
  6022. (version "2.3.1")
  6023. (source (origin
  6024. (method url-fetch)
  6025. (uri (rubygems-uri "json_pure" version))
  6026. (sha256
  6027. (base32
  6028. "00pziwkfqwk8vj19s65sdki31q1wvmf5v9b3sfglxm94qfvas1lx"))))
  6029. (build-system ruby-build-system)
  6030. (arguments
  6031. `(#:phases
  6032. (modify-phases %standard-phases
  6033. (add-after 'unpack 'fix-rakefile
  6034. (lambda _
  6035. (substitute* "Rakefile"
  6036. ;; Since this is not a git repository, do not call 'git'.
  6037. (("`git ls-files`") "`find . -type f |sort`")))))))
  6038. (native-inputs
  6039. `(("bundler" ,bundler)
  6040. ("ragel" ,ragel)
  6041. ("ruby-simplecov" ,ruby-simplecov)
  6042. ("ruby-test-unit" ,ruby-test-unit)
  6043. ("which" ,which)))
  6044. (synopsis "JSON implementation in pure Ruby")
  6045. (description
  6046. "This package provides a JSON implementation written in pure Ruby.")
  6047. (home-page "https://flori.github.com/json/")
  6048. (license license:ruby)))
  6049. (define-public ruby-jwt
  6050. (package
  6051. (name "ruby-jwt")
  6052. (version "2.1.0")
  6053. (source
  6054. (origin
  6055. (method url-fetch)
  6056. (uri (rubygems-uri "jwt" version))
  6057. (sha256
  6058. (base32
  6059. "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
  6060. (build-system ruby-build-system)
  6061. (arguments
  6062. '(#:test-target "test"
  6063. #:phases
  6064. (modify-phases %standard-phases
  6065. (add-after 'unpack 'remove-unnecessary-dependencies
  6066. (lambda _
  6067. (substitute* "spec/spec_helper.rb"
  6068. (("require 'simplecov.*") "\n")
  6069. ;; Use [].each to disable running the SimpleCov configuration
  6070. ;; block
  6071. (("SimpleCov\\.configure") "[].each")
  6072. (("require 'codeclimate-test-reporter'") "")
  6073. (("require 'codacy-coverage'") "")
  6074. (("Codacy::Reporter\\.start") ""))
  6075. #t)))))
  6076. (native-inputs
  6077. `(("bundler" ,bundler)
  6078. ("ruby-rspec" ,ruby-rspec)
  6079. ("ruby-rbnacl" ,ruby-rbnacl)))
  6080. (synopsis "Ruby implementation of the JSON Web Token standard")
  6081. (description
  6082. "This package provides a pure Ruby implementation of the RFC 7519 OAuth
  6083. @acronym{JWT, JSON Web Token} standard.")
  6084. (home-page "https://github.com/jwt/ruby-jwt")
  6085. (license license:expat)))
  6086. ;; Even though this package only provides bindings for a Mac OSX API it is
  6087. ;; required by "ruby-listen" at runtime.
  6088. (define-public ruby-rb-fsevent
  6089. (package
  6090. (name "ruby-rb-fsevent")
  6091. (version "0.10.3")
  6092. (source (origin
  6093. (method url-fetch)
  6094. (uri (rubygems-uri "rb-fsevent" version))
  6095. (sha256
  6096. (base32
  6097. "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
  6098. (build-system ruby-build-system)
  6099. ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
  6100. ;; "listen", which needs "rb-fsevent" at runtime.
  6101. (arguments `(#:tests? #f))
  6102. (synopsis "FSEvents API with signals catching")
  6103. (description
  6104. "This library provides Ruby bindings for the Mac OSX FSEvents API.")
  6105. (home-page "https://rubygems.org/gems/rb-fsevent")
  6106. (license license:expat)))
  6107. (define-public ruby-listen
  6108. (package
  6109. (name "ruby-listen")
  6110. (version "3.2.0")
  6111. (source
  6112. (origin
  6113. ;; The gem does not include a Rakefile, so fetch from the Git
  6114. ;; repository.
  6115. (method git-fetch)
  6116. (uri (git-reference
  6117. (url "https://github.com/guard/listen")
  6118. (commit (string-append "v" version))))
  6119. (file-name (git-file-name name version))
  6120. (sha256
  6121. (base32
  6122. "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
  6123. (build-system ruby-build-system)
  6124. (arguments
  6125. `(#:test-target "spec"
  6126. #:phases
  6127. (modify-phases %standard-phases
  6128. (add-after 'unpack 'fix-files-in-gemspec
  6129. (lambda _
  6130. (substitute* "listen.gemspec"
  6131. (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
  6132. #t))
  6133. (add-before 'check 'remove-unnecessary-dependencies'
  6134. (lambda _
  6135. (substitute* "Rakefile"
  6136. ;; Rubocop is for code linting, and is unnecessary for running
  6137. ;; the tests.
  6138. ((".*rubocop.*") ""))
  6139. #t)))))
  6140. (native-inputs
  6141. `(("bundler" ,bundler)
  6142. ("ruby-rspec" ,ruby-rspec)))
  6143. (inputs
  6144. `(;; ruby-thor is used for the command line interface, and is referenced
  6145. ;; in the wrapper, and therefore just needs to be an input.
  6146. ("ruby-thor" ,ruby-thor)))
  6147. (propagated-inputs
  6148. `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
  6149. ("ruby-rb-inotify" ,ruby-rb-inotify)
  6150. ("ruby-dep" ,ruby-dep)))
  6151. (synopsis "Listen to file modifications")
  6152. (description "The Listen gem listens to file modifications and notifies
  6153. you about the changes.")
  6154. (home-page "https://github.com/guard/listen")
  6155. (license license:expat)))
  6156. (define-public ruby-loofah
  6157. (package
  6158. (name "ruby-loofah")
  6159. (version "2.3.1")
  6160. (source
  6161. (origin
  6162. (method url-fetch)
  6163. (uri (rubygems-uri "loofah" version))
  6164. (sha256
  6165. (base32
  6166. "0npqav026zd7r4qdidq9x5nxcp2dzg71bnp421xxx7sngbxf2xbd"))))
  6167. (build-system ruby-build-system)
  6168. (arguments
  6169. '(#:phases
  6170. (modify-phases %standard-phases
  6171. (add-after 'unpack 'remove-unnecessary-dependencies
  6172. (lambda _
  6173. ;; concourse is a development tool which is unused, so remove it
  6174. ;; so it's not required.
  6175. (substitute* "Rakefile"
  6176. (("require \"concourse\"") "")
  6177. (("Concourse\\.new.*") "task :concourse do\n"))
  6178. #t)))))
  6179. (native-inputs
  6180. `(("ruby-hoe" ,ruby-hoe)
  6181. ("ruby-rr" ,ruby-rr)))
  6182. (propagated-inputs
  6183. `(("ruby-nokogiri" ,ruby-nokogiri)
  6184. ("ruby-crass" ,ruby-crass)))
  6185. (synopsis "Ruby library for manipulating and transforming HTML/XML")
  6186. (description
  6187. "Loofah is a general library for manipulating and transforming HTML/XML
  6188. documents and fragments. It's built on top of Nokogiri and libxml2.")
  6189. (home-page "https://github.com/flavorjones/loofah")
  6190. (license license:expat)))
  6191. (define-public ruby-activesupport
  6192. (package
  6193. (name "ruby-activesupport")
  6194. (version "6.1.3")
  6195. (source
  6196. (origin
  6197. (method url-fetch)
  6198. (uri (rubygems-uri "activesupport" version))
  6199. (sha256
  6200. (base32
  6201. "00a4db64g8w5yyk6hzak2nqrmdfvyh5zc9cvnm9gglwbi87ss28h"))))
  6202. (build-system ruby-build-system)
  6203. (arguments
  6204. `(#:phases
  6205. (modify-phases %standard-phases
  6206. (replace 'check
  6207. (lambda _
  6208. ;; There are no tests, instead attempt to load the library.
  6209. (invoke "ruby" "-Ilib" "-r" "active_support"))))))
  6210. (propagated-inputs
  6211. `(("ruby-concurrent" ,ruby-concurrent)
  6212. ("ruby-i18n" ,ruby-i18n)
  6213. ("ruby-minitest" ,ruby-minitest)
  6214. ("ruby-tzinfo" ,ruby-tzinfo)
  6215. ("ruby-tzinfo-data" ,ruby-tzinfo-data)
  6216. ("ruby-zeitwerk" ,ruby-zeitwerk)))
  6217. (synopsis "Ruby on Rails utility library")
  6218. (description "ActiveSupport is a toolkit of support libraries and Ruby
  6219. core extensions extracted from the Rails framework. It includes support for
  6220. multibyte strings, internationalization, time zones, and testing.")
  6221. (home-page "https://www.rubyonrails.org")
  6222. (license license:expat)))
  6223. (define-public ruby-crass
  6224. (package
  6225. (name "ruby-crass")
  6226. (version "1.0.6")
  6227. (home-page "https://github.com/rgrove/crass")
  6228. (source (origin
  6229. ;; The gem does not contain tests, so pull from git.
  6230. (method git-fetch)
  6231. (uri (git-reference
  6232. (url home-page)
  6233. (commit (string-append "v" version))))
  6234. (file-name (git-file-name name version))
  6235. (sha256
  6236. (base32
  6237. "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
  6238. (build-system ruby-build-system)
  6239. (synopsis "Pure Ruby CSS parser")
  6240. (description
  6241. "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
  6242. (license license:expat)))
  6243. (define-public ruby-nokogumbo
  6244. (package
  6245. (name "ruby-nokogumbo")
  6246. (version "2.0.2")
  6247. (source (origin
  6248. ;; We use the git reference, because there's no Rakefile in the
  6249. ;; published gem and the tarball on Github is outdated.
  6250. (method git-fetch)
  6251. (uri (git-reference
  6252. (url "https://github.com/rubys/nokogumbo")
  6253. (commit (string-append "v" version))))
  6254. (file-name (string-append name "-" version "-checkout"))
  6255. (sha256
  6256. (base32
  6257. "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
  6258. (build-system ruby-build-system)
  6259. (native-inputs
  6260. `(("ruby-rake-compiler" ,ruby-rake-compiler)))
  6261. (inputs
  6262. `(("gumbo-parser" ,gumbo-parser)))
  6263. (propagated-inputs
  6264. `(("ruby-nokogiri" ,ruby-nokogiri)))
  6265. (synopsis "Ruby bindings to the Gumbo HTML5 parser")
  6266. (description
  6267. "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
  6268. access the result as a Nokogiri parsed document.")
  6269. (home-page "https://github.com/rubys/nokogumbo/")
  6270. (license license:asl2.0)))
  6271. (define-public ruby-sanitize
  6272. (package
  6273. (name "ruby-sanitize")
  6274. (version "5.1.0")
  6275. (home-page "https://github.com/rgrove/sanitize")
  6276. (source (origin
  6277. (method git-fetch)
  6278. ;; The gem does not include the Rakefile, so we download the
  6279. ;; source from Github.
  6280. (uri (git-reference
  6281. (url home-page)
  6282. (commit (string-append "v" version))))
  6283. (file-name (git-file-name name version))
  6284. (patches (search-patches "ruby-sanitize-system-libxml.patch"))
  6285. (sha256
  6286. (base32
  6287. "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
  6288. (build-system ruby-build-system)
  6289. (propagated-inputs
  6290. `(("ruby-crass" ,ruby-crass)
  6291. ("ruby-nokogiri" ,ruby-nokogiri)
  6292. ("ruby-nokogumbo" ,ruby-nokogumbo)))
  6293. (native-inputs
  6294. `(("ruby-minitest" ,ruby-minitest)))
  6295. (synopsis "Whitelist-based HTML and CSS sanitizer")
  6296. (description
  6297. "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
  6298. acceptable elements, attributes, and CSS properties, Sanitize will remove all
  6299. unacceptable HTML and/or CSS from a string.")
  6300. (license license:expat)))
  6301. (define-public ruby-sync
  6302. (package
  6303. (name "ruby-sync")
  6304. (version "0.5.0")
  6305. (source
  6306. (origin
  6307. (method url-fetch)
  6308. (uri (rubygems-uri "sync" version))
  6309. (sha256
  6310. (base32
  6311. "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
  6312. (build-system ruby-build-system)
  6313. (synopsis "Ruby module with a two-phase lock and counter")
  6314. (description "This package provides a Ruby module that provides a two-phase
  6315. lock with a counter.")
  6316. (home-page "https://github.com/ruby/sync")
  6317. (license license:bsd-2)))
  6318. (define-public ruby-oj
  6319. (package
  6320. (name "ruby-oj")
  6321. (version "3.10.1")
  6322. (source
  6323. (origin
  6324. (method git-fetch)
  6325. ;; Version on rubygems.org does not contain Rakefile, so download from
  6326. ;; GitHub instead.
  6327. (uri (git-reference
  6328. (url "https://github.com/ohler55/oj")
  6329. (commit (string-append "v" version))))
  6330. (file-name (git-file-name name version))
  6331. (sha256
  6332. (base32
  6333. "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
  6334. (build-system ruby-build-system)
  6335. (arguments
  6336. '(#:test-target "test_all"
  6337. #:phases
  6338. (modify-phases %standard-phases
  6339. (add-before 'check 'disable-bundler
  6340. (lambda _
  6341. (substitute* "Rakefile"
  6342. (("Bundler\\.with_clean_env") "1.times")
  6343. (("bundle exec ") "")))))))
  6344. (native-inputs
  6345. `(("bundler" ,bundler)
  6346. ("ruby-rspec" ,ruby-rspec)
  6347. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  6348. (synopsis "JSON parser for Ruby optimized for speed")
  6349. (description
  6350. "Oj is a JSON parser and generator for Ruby, where the encoding and
  6351. decoding of JSON is implemented as a C extension to Ruby.")
  6352. (home-page "http://www.ohler.com/oj/")
  6353. (license (list license:expat ; Ruby code
  6354. license:bsd-3)))) ; extension code
  6355. (define-public ruby-ox
  6356. (package
  6357. (name "ruby-ox")
  6358. (version "2.6.0")
  6359. (source
  6360. (origin
  6361. (method url-fetch)
  6362. (uri (rubygems-uri "ox" version))
  6363. (sha256
  6364. (base32
  6365. "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
  6366. (build-system ruby-build-system)
  6367. (arguments
  6368. '(#:tests? #f)) ; no tests
  6369. (synopsis "Optimized XML library for Ruby")
  6370. (description
  6371. "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
  6372. written as a native C extension. It was designed to be an alternative to
  6373. Nokogiri and other Ruby XML parsers for generic XML parsing and as an
  6374. alternative to Marshal for Object serialization. ")
  6375. (home-page "http://www.ohler.com/ox")
  6376. (license license:expat)))
  6377. (define-public ruby-redcloth
  6378. (package
  6379. (name "ruby-redcloth")
  6380. (version "4.3.2")
  6381. (source (origin
  6382. (method url-fetch)
  6383. (uri (rubygems-uri "RedCloth" version))
  6384. (sha256
  6385. (base32
  6386. "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
  6387. (build-system ruby-build-system)
  6388. (arguments
  6389. `(#:tests? #f ; no tests
  6390. #:phases
  6391. (modify-phases %standard-phases
  6392. ;; Redcloth has complicated rake tasks to build various versions for
  6393. ;; multiple targets using RVM. We don't want this so we just use the
  6394. ;; existing gemspec.
  6395. (replace 'build
  6396. (lambda _
  6397. (invoke "gem" "build" "redcloth.gemspec"))))))
  6398. (native-inputs
  6399. `(("bundler" ,bundler)
  6400. ("ruby-diff-lcs" ,ruby-diff-lcs)
  6401. ("ruby-rspec-2" ,ruby-rspec-2)))
  6402. (synopsis "Textile markup language parser for Ruby")
  6403. (description
  6404. "RedCloth is a Ruby parser for the Textile markup language.")
  6405. (home-page "http://redcloth.org")
  6406. (license license:expat)))
  6407. (define-public ruby-pg
  6408. (package
  6409. (name "ruby-pg")
  6410. (version "1.2.3")
  6411. (source
  6412. (origin
  6413. (method url-fetch)
  6414. (uri (rubygems-uri "pg" version))
  6415. (sha256
  6416. (base32
  6417. "13mfrysrdrh8cka1d96zm0lnfs59i5x2g6ps49r2kz5p3q81xrzj"))))
  6418. (build-system ruby-build-system)
  6419. (arguments
  6420. '(#:test-target "spec"))
  6421. (native-inputs
  6422. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  6423. ("ruby-hoe" ,ruby-hoe)
  6424. ("ruby-rspec" ,ruby-rspec)))
  6425. (inputs
  6426. `(("postgresql" ,postgresql)))
  6427. (synopsis "Ruby interface to PostgreSQL")
  6428. (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
  6429. with PostgreSQL 9.0 and later.")
  6430. (home-page "https://bitbucket.org/ged/ruby-pg")
  6431. (license license:ruby)))
  6432. (define-public ruby-byebug
  6433. (package
  6434. (name "ruby-byebug")
  6435. (version "11.1.3")
  6436. (source
  6437. (origin
  6438. (method git-fetch)
  6439. (uri (git-reference
  6440. (url "https://github.com/deivid-rodriguez/byebug")
  6441. (commit (string-append "v" version))))
  6442. (file-name (git-file-name name version))
  6443. (sha256
  6444. (base32
  6445. "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
  6446. (modules '((guix build utils)))
  6447. (snippet
  6448. '(begin
  6449. ;; Remove wrappers that try to setup a bundle environment.
  6450. (with-directory-excursion "bin"
  6451. (for-each delete-file '("bundle" "rake" "rubocop"))
  6452. ;; ruby-minitest doesn't come with a launcher, so fix the one
  6453. ;; provided.
  6454. (substitute* "minitest"
  6455. (("load File\\.expand_path\\(\"bundle\".*") "")
  6456. (("require \"bundler/setup\".*") "")))
  6457. #t))))
  6458. (build-system ruby-build-system)
  6459. (arguments
  6460. `(#:phases
  6461. (modify-phases %standard-phases
  6462. (add-after 'unpack 'skip-tmp-path-sensitive-test
  6463. (lambda _
  6464. (substitute* "test/commands/where_test.rb"
  6465. (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
  6466. "unless true\n"))
  6467. #t))
  6468. (add-before 'build 'compile
  6469. (lambda _
  6470. (invoke "rake" "compile")))
  6471. (add-before 'check 'disable-misbehaving-test
  6472. ;; Expects 5, gets 162. From a file containing ~10 lines.
  6473. (lambda _
  6474. (substitute* "test/commands/finish_test.rb"
  6475. (("test_finish_inside_autoloaded_files")
  6476. "finish_inside_autoloaded_files"))))
  6477. (add-before 'check 'set-home
  6478. (lambda _
  6479. (setenv "HOME" (getcwd))
  6480. #t)))))
  6481. (native-inputs
  6482. `(("bundler" ,bundler)
  6483. ("ruby-chandler" ,ruby-chandler)
  6484. ("ruby-minitest" ,ruby-minitest)
  6485. ("ruby-pry" ,ruby-pry)
  6486. ("ruby-rake-compiler" ,ruby-rake-compiler)
  6487. ("ruby-rubocop" ,ruby-rubocop)
  6488. ("ruby-yard" ,ruby-yard)))
  6489. (synopsis "Debugger for Ruby 2")
  6490. (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
  6491. TracePoint C API for execution control and the Debug Inspector C API for call
  6492. stack navigation. The core component provides support that front-ends can
  6493. build on. It provides breakpoint handling and bindings for stack frames among
  6494. other things and it comes with a command line interface.")
  6495. (home-page "https://github.com/deivid-rodriguez/byebug")
  6496. (license license:bsd-2)))
  6497. (define-public ruby-netrc
  6498. (package
  6499. (name "ruby-netrc")
  6500. (version "0.11.0")
  6501. (source (origin
  6502. (method url-fetch)
  6503. (uri (rubygems-uri "netrc" version))
  6504. (sha256
  6505. (base32
  6506. "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
  6507. (build-system ruby-build-system)
  6508. (arguments
  6509. `(#:phases
  6510. (modify-phases %standard-phases
  6511. (replace 'check
  6512. ;; There is no Rakefile and minitest can only run one file at once,
  6513. ;; so we have to iterate over all test files.
  6514. (lambda _
  6515. (for-each (lambda (file)
  6516. (invoke "ruby" "-Itest" file))
  6517. (find-files "./test" "test_.*\\.rb"))))
  6518. (add-before 'check 'patch-tests-for-newer-ruby
  6519. (lambda _
  6520. (substitute* "test/test_netrc.rb"
  6521. (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
  6522. (native-inputs
  6523. `(("ruby-minitest" ,ruby-minitest)))
  6524. (synopsis "Library to read and update netrc files")
  6525. (description
  6526. "This library can read and update netrc files, preserving formatting
  6527. including comments and whitespace.")
  6528. (home-page "https://github.com/geemus/netrc")
  6529. (license license:expat)))
  6530. (define-public ruby-unf-ext
  6531. (package
  6532. (name "ruby-unf-ext")
  6533. (version "0.0.7.6")
  6534. (source (origin
  6535. (method url-fetch)
  6536. (uri (rubygems-uri "unf_ext" version))
  6537. (sha256
  6538. (base32
  6539. "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
  6540. (build-system ruby-build-system)
  6541. (arguments
  6542. `(#:phases
  6543. (modify-phases %standard-phases
  6544. (add-after 'build 'build-ext
  6545. (lambda _ (invoke "rake" "compile:unf_ext")))
  6546. (add-before 'check 'lose-rake-compiler-dock-dependency
  6547. (lambda _
  6548. ;; rake-compiler-dock is listed in the gemspec, but only
  6549. ;; required when cross-compiling.
  6550. (substitute* "unf_ext.gemspec"
  6551. ((".*rake-compiler-dock.*") ""))
  6552. #t)))))
  6553. (native-inputs
  6554. `(("bundler" ,bundler)
  6555. ("ruby-rake-compiler" ,ruby-rake-compiler)
  6556. ("ruby-test-unit" ,ruby-test-unit)))
  6557. (synopsis "Unicode normalization form support library")
  6558. (description
  6559. "This package provides unicode normalization form support for Ruby.")
  6560. (home-page "https://github.com/knu/ruby-unf_ext")
  6561. (license license:expat)))
  6562. (define-public ruby-tdiff
  6563. ;; Use a newer than released snapshot so that rspec-2 is not required.
  6564. (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
  6565. (package
  6566. (name "ruby-tdiff")
  6567. (version (string-append "0.3.3-1." (string-take commit 8)))
  6568. (source (origin
  6569. (method git-fetch)
  6570. (uri (git-reference
  6571. (url "https://github.com/postmodern/tdiff")
  6572. (commit commit)))
  6573. (file-name (string-append name "-" version "-checkout"))
  6574. (sha256
  6575. (base32
  6576. "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
  6577. (build-system ruby-build-system)
  6578. (native-inputs
  6579. `(("ruby-rspec" ,ruby-rspec)
  6580. ("ruby-yard" ,ruby-yard)
  6581. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  6582. (synopsis "Calculate the differences between two tree-like structures")
  6583. (description
  6584. "This library provides functions to calculate the differences between two
  6585. tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
  6586. (home-page "https://github.com/postmodern/tdiff")
  6587. (license license:expat))))
  6588. (define-public ruby-nokogiri-diff
  6589. ;; Use a newer than released snapshot so that rspec-2 is not required.
  6590. (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
  6591. (package
  6592. (name "ruby-nokogiri-diff")
  6593. (version (string-append "0.2.0-1." (string-take commit 8)))
  6594. (source (origin
  6595. (method git-fetch)
  6596. (uri (git-reference
  6597. (url "https://github.com/postmodern/nokogiri-diff")
  6598. (commit commit)))
  6599. (file-name (string-append name "-" version "-checkout"))
  6600. (sha256
  6601. (base32
  6602. "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
  6603. (build-system ruby-build-system)
  6604. (propagated-inputs
  6605. `(("ruby-tdiff" ,ruby-tdiff)
  6606. ("ruby-nokogiri" ,ruby-nokogiri)))
  6607. (native-inputs
  6608. `(("ruby-rspec" ,ruby-rspec)
  6609. ("ruby-yard" ,ruby-yard)
  6610. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  6611. (synopsis "Calculate the differences between two XML/HTML documents")
  6612. (description
  6613. "@code{Nokogiri::Diff} adds the ability to calculate the
  6614. differences (added or removed nodes) between two XML/HTML documents.")
  6615. (home-page "https://github.com/postmodern/nokogiri-diff")
  6616. (license license:expat))))
  6617. (define-public ruby-racc
  6618. (package
  6619. (name "ruby-racc")
  6620. (version "1.5.2")
  6621. (source
  6622. (origin
  6623. (method url-fetch)
  6624. (uri (rubygems-uri "racc" version))
  6625. (sha256
  6626. (base32
  6627. "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
  6628. (build-system ruby-build-system)
  6629. (arguments
  6630. `(#:tests? #f)) ; Fails while parsing test instructions.
  6631. (native-inputs
  6632. `(("ruby-hoe" ,ruby-hoe)
  6633. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  6634. (synopsis "LALR(1) parser generator for Ruby")
  6635. (description
  6636. "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
  6637. generates Ruby program.")
  6638. (home-page "https://i.loveruby.net/en/projects/racc/")
  6639. (license (list
  6640. ;; Generally licensed under the LGPL2.1, and some files also
  6641. ;; available under the same license as Ruby.
  6642. license:lgpl2.1
  6643. license:ruby))))
  6644. (define-public ruby-rack
  6645. (package
  6646. (name "ruby-rack")
  6647. (version "2.2.3")
  6648. (source
  6649. (origin
  6650. (method git-fetch)
  6651. ;; Download from GitHub so that the snippet can be applied and tests run.
  6652. (uri (git-reference
  6653. (url "https://github.com/rack/rack")
  6654. (commit version)))
  6655. (file-name (git-file-name name version))
  6656. (sha256
  6657. (base32
  6658. "1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4"))
  6659. ;; Ignore test which fails inside the build environment but works
  6660. ;; outside.
  6661. (modules '((guix build utils)))
  6662. (snippet
  6663. '(begin (substitute* "test/spec_files.rb"
  6664. (("res.body.must_equal expected_body") ""))
  6665. #t))))
  6666. (build-system ruby-build-system)
  6667. (arguments
  6668. '(#:phases
  6669. (modify-phases %standard-phases
  6670. (add-before 'check 'fix-tests
  6671. (lambda _
  6672. ;; A few of the tests use the length of a file on disk for
  6673. ;; Content-Length and Content-Range headers. However, this file
  6674. ;; has a shebang in it which an earlier phase patches, growing
  6675. ;; the file size from 193 to 239 bytes when the store prefix is
  6676. ;; "/gnu/store".
  6677. (let ((size-diff (- (string-length (which "ruby"))
  6678. (string-length "/usr/bin/env ruby"))))
  6679. (substitute* '("test/spec_files.rb")
  6680. (("208" bytes)
  6681. (number->string (+ (string->number bytes) size-diff)))
  6682. (("bytes(.)22-33" all delimiter)
  6683. (string-append "bytes"
  6684. delimiter
  6685. (number->string (+ 22 size-diff))
  6686. "-"
  6687. (number->string (+ 33 size-diff))))))
  6688. #t)))))
  6689. (native-inputs
  6690. `(("ruby-minitest" ,ruby-minitest)
  6691. ("ruby-minitest-global-expectations" ,ruby-minitest-global-expectations)))
  6692. (synopsis "Unified web application interface for Ruby")
  6693. (description "Rack provides a minimal, modular and adaptable interface for
  6694. developing web applications in Ruby. By wrapping HTTP requests and responses,
  6695. it unifies the API for web servers, web frameworks, and software in between
  6696. into a single method call.")
  6697. (home-page "https://rack.github.io/")
  6698. (license license:expat)))
  6699. (define-public ruby-rack-test
  6700. (package
  6701. (name "ruby-rack-test")
  6702. (version "0.8.3")
  6703. (source
  6704. (origin
  6705. (method url-fetch)
  6706. (uri (rubygems-uri "rack-test" version))
  6707. (sha256
  6708. (base32
  6709. "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
  6710. (build-system ruby-build-system)
  6711. (arguments
  6712. ;; Disable tests because of circular dependencies: requires sinatra,
  6713. ;; which requires rack-protection, which requires rack-test. Instead
  6714. ;; simply require the library.
  6715. `(#:phases
  6716. (modify-phases %standard-phases
  6717. (replace 'check
  6718. (lambda _
  6719. (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
  6720. (propagated-inputs
  6721. `(("ruby-rack" ,ruby-rack)))
  6722. (synopsis "Testing API for Rack applications")
  6723. (description
  6724. "Rack::Test is a small, simple testing API for Rack applications. It can
  6725. be used on its own or as a reusable starting point for Web frameworks and
  6726. testing libraries to build on.")
  6727. (home-page "https://github.com/rack-test/rack-test")
  6728. (license license:expat)))
  6729. (define-public ruby-rack-protection
  6730. (package
  6731. (name "ruby-rack-protection")
  6732. (version "2.0.8.1")
  6733. (source
  6734. (origin
  6735. (method url-fetch)
  6736. (uri (rubygems-uri "rack-protection" version))
  6737. (sha256
  6738. (base32
  6739. "1zyj97bfr1shfgwk4ddmdbw0mdkm4qdyh9s1hl0k7accf3kxx1yi"))))
  6740. (build-system ruby-build-system)
  6741. (arguments
  6742. '(;; Tests missing from the gem.
  6743. #:tests? #f))
  6744. (propagated-inputs
  6745. `(("ruby-rack" ,ruby-rack)))
  6746. (native-inputs
  6747. `(("bundler" ,bundler)
  6748. ("ruby-rspec" ,ruby-rspec-2)
  6749. ("ruby-rack-test" ,ruby-rack-test)))
  6750. (synopsis "Rack middleware that protects against typical web attacks")
  6751. (description "Rack middleware that can be used to protect against typical
  6752. web attacks. It can protect all Rack apps, including Rails. For instance, it
  6753. protects against cross site request forgery, cross site scripting,
  6754. clickjacking, directory traversal, session hijacking and IP spoofing.")
  6755. (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
  6756. (license license:expat)))
  6757. (define-public ruby-rainbow
  6758. (package
  6759. (name "ruby-rainbow")
  6760. (version "3.0.0")
  6761. (source
  6762. (origin
  6763. (method url-fetch)
  6764. (uri (rubygems-uri "rainbow" version))
  6765. (sha256
  6766. (base32
  6767. "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
  6768. (build-system ruby-build-system)
  6769. (arguments
  6770. '(#:phases
  6771. (modify-phases %standard-phases
  6772. ;; Run rspec directly, to avoid requiring Rubocop which is used from
  6773. ;; the Rakefile.
  6774. (replace 'check
  6775. (lambda* (#:key tests? #:allow-other-keys)
  6776. (when tests?
  6777. (invoke "rspec"))
  6778. #t)))))
  6779. (native-inputs
  6780. `(("bundler" ,bundler)
  6781. ("ruby-rspec" ,ruby-rspec)))
  6782. (synopsis "Colorize printed text on ANSI terminals")
  6783. (description
  6784. "@code{rainbow} provides a string presenter object to colorize strings by
  6785. wrapping them in ANSI escape codes.")
  6786. (home-page "https://github.com/sickill/rainbow")
  6787. (license license:expat)))
  6788. (define-public ruby-rr
  6789. (package
  6790. (name "ruby-rr")
  6791. (version "1.2.1")
  6792. (source
  6793. (origin
  6794. (method url-fetch)
  6795. (uri (rubygems-uri "rr" version))
  6796. (sha256
  6797. (base32
  6798. "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
  6799. (build-system ruby-build-system)
  6800. (arguments
  6801. '(#:tests? #f)) ; test files not included
  6802. (native-inputs
  6803. `(("bundler" ,bundler)
  6804. ("ruby-rspec" ,ruby-rspec)))
  6805. (synopsis "Ruby test double framework")
  6806. (description
  6807. "RR is a test double framework that features a rich selection of double
  6808. techniques and a terse syntax.")
  6809. (home-page "https://rr.github.io/rr/")
  6810. (license license:expat)))
  6811. (define-public ruby-rest-client
  6812. (package
  6813. (name "ruby-rest-client")
  6814. (version "2.0.2")
  6815. (source
  6816. (origin
  6817. (method url-fetch)
  6818. (uri (rubygems-uri "rest-client" version))
  6819. (sha256
  6820. (base32
  6821. "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
  6822. (build-system ruby-build-system)
  6823. (arguments
  6824. '(#:phases
  6825. (modify-phases %standard-phases
  6826. (add-before 'check 'remove-unnecessary-development-dependencies
  6827. (lambda _
  6828. (substitute* "rest-client.gemspec"
  6829. ;; Remove rubocop as it's unused. Rubocop also indirectly
  6830. ;; depends on this package through ruby-parser and ruby-ast so
  6831. ;; this avoids a dependency loop.
  6832. ((".*rubocop.*") "\n")
  6833. ;; Remove pry as it's unused, it's a debugging tool
  6834. ((".*pry.*") "\n")
  6835. ;; Remove an unnecessarily strict rdoc dependency
  6836. ((".*rdoc.*") "\n"))
  6837. #t))
  6838. (add-before 'check 'delete-network-dependent-tests
  6839. (lambda _
  6840. (delete-file "spec/integration/request_spec.rb")
  6841. (delete-file "spec/integration/httpbin_spec.rb")
  6842. #t)))))
  6843. (propagated-inputs
  6844. `(("ruby-http-cookie" ,ruby-http-cookie)
  6845. ("ruby-mime-types" ,ruby-mime-types)
  6846. ("ruby-netrc" ,ruby-netrc)))
  6847. (native-inputs
  6848. `(("bundler" ,bundler)
  6849. ("ruby-webmock" ,ruby-webmock-2)
  6850. ("ruby-rspec" ,ruby-rspec)))
  6851. (synopsis "Simple HTTP and REST client for Ruby")
  6852. (description
  6853. "@code{rest-client} provides a simple HTTP and REST client for Ruby,
  6854. inspired by the Sinatra microframework style of specifying actions:
  6855. @code{get}, @code{put}, @code{post}, @code{delete}.")
  6856. (home-page "https://github.com/rest-client/rest-client")
  6857. (license license:expat)))
  6858. (define-public ruby-rubocop-ast
  6859. (package
  6860. (name "ruby-rubocop-ast")
  6861. (version "1.4.1")
  6862. (source
  6863. (origin
  6864. (method git-fetch) ;no test suite in distributed gem
  6865. (uri (git-reference
  6866. (url "https://github.com/rubocop-hq/rubocop-ast")
  6867. (commit (string-append "v" version))))
  6868. (file-name (git-file-name name version))
  6869. (sha256
  6870. (base32
  6871. "1x2m7k4bn4zvvwmj7imzmv0dav6xnrbcvssad1m5lkprx7h5lzkq"))))
  6872. (build-system ruby-build-system)
  6873. (arguments
  6874. `(#:test-target "spec"
  6875. #:phases (modify-phases %standard-phases
  6876. (add-before 'build 'generate-lexer
  6877. (lambda _
  6878. (setenv "RUBOCOP_VERSION" "none")
  6879. (invoke "rake" "generate")))
  6880. (replace 'replace-git-ls-files
  6881. (lambda _
  6882. (substitute* "rubocop-ast.gemspec"
  6883. (("`git ls-files(.*)`" _ files)
  6884. (format #f "`find ~a -type f| sort`" files)))
  6885. #t)))))
  6886. (native-inputs
  6887. `(("ruby-bump" ,ruby-bump)
  6888. ("ruby-oedipus-lex" ,ruby-oedipus-lex)
  6889. ("ruby-pry" ,ruby-pry)
  6890. ("ruby-racc" ,ruby-racc)
  6891. ("ruby-rake" ,ruby-rake)
  6892. ("ruby-rspec" ,ruby-rspec)
  6893. ("ruby-simplecov" ,ruby-simplecov)))
  6894. (propagated-inputs
  6895. `(("ruby-parser" ,ruby-parser)))
  6896. (synopsis "RuboCop's AST extensions and NodePattern functionality")
  6897. (description "Rubocop::AST extends @code{ruby-parser} with classes used
  6898. by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
  6899. @itemize
  6900. @item @code{RuboCop::AST::Node}
  6901. @item @code{RuboCop::AST::NodePattern}
  6902. @end itemize")
  6903. (home-page "https://rubocop.org/")
  6904. (license license:expat)))
  6905. (define-public ruby-rexml
  6906. (package
  6907. (name "ruby-rexml")
  6908. (version "3.2.5")
  6909. (source
  6910. (origin
  6911. (method git-fetch) ;no tests in distributed gem
  6912. (uri (git-reference
  6913. (url "https://github.com/ruby/rexml")
  6914. (commit (string-append "v" version))))
  6915. (file-name (git-file-name name version))
  6916. (sha256
  6917. (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
  6918. (build-system ruby-build-system)
  6919. (synopsis "XML toolkit for Ruby")
  6920. (description "Inspired by Electric XML library for Java, REXML aims to be
  6921. easy-to-use API, small and fast. It supports both tree and stream document
  6922. parsing.")
  6923. (home-page "https://github.com/ruby/rexml")
  6924. (license license:bsd-2)))
  6925. (define-public ruby-character-set
  6926. (package
  6927. (name "ruby-character-set")
  6928. (version "1.4.0")
  6929. (source
  6930. (origin
  6931. (method url-fetch)
  6932. (uri (rubygems-uri "character_set" version))
  6933. (sha256
  6934. (base32
  6935. "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
  6936. (build-system ruby-build-system)
  6937. (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
  6938. (synopsis "Ruby library to manipulate Unicode")
  6939. (description "CharacterSet is a C-extended Ruby library to work with sets
  6940. of Unicode code points. It can read and write these sets in various formats
  6941. and implements the @code{stdlib} @code{Set} interface for them. It also
  6942. offers an alternate paradigm of @code{String} processing which grants much
  6943. better performance than @code{Regexp} and @code{String} methods from the
  6944. @code{stdlib} where applicable. Many parts can be used independently, e.g.:
  6945. @itemize
  6946. @item @code{CharacterSet::Character}
  6947. @item @code{CharacterSet::Parser}
  6948. @item @code{CharacterSet::Writer}
  6949. @item @code{RangeCompressor}
  6950. @end itemize")
  6951. (home-page "https://github.com/jaynetics/character_set")
  6952. (license license:expat)))
  6953. (define-public ruby-range-compressor
  6954. (package
  6955. (name "ruby-range-compressor")
  6956. (version "1.0.0")
  6957. (source
  6958. (origin
  6959. (method git-fetch)
  6960. (uri (git-reference
  6961. (url "https://github.com/janosch-x/range_compressor")
  6962. (commit (string-append "v" version))))
  6963. (file-name (git-file-name name version))
  6964. (sha256
  6965. (base32
  6966. "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
  6967. (build-system ruby-build-system)
  6968. (arguments
  6969. `(#:test-target "spec"
  6970. #:phases (modify-phases %standard-phases
  6971. (add-after 'extract-gemspec 'strip-version-requirements
  6972. (lambda _
  6973. (substitute* "range_compressor.gemspec"
  6974. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  6975. (string-append stripped "\n")))
  6976. #t)))))
  6977. (native-inputs
  6978. `(("ruby-rspec" ,ruby-rspec)))
  6979. (synopsis "Simple arrays of objects to arrays of ranges compressor")
  6980. (description "RangeCompresses is a tiny library that allows compressing
  6981. arrays of objects into arrays of ranges. For example, it can turn the
  6982. following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
  6983. (home-page "https://github.com/janosch-x/range_compressor")
  6984. (license license:expat)))
  6985. (define-public ruby-regexp-property-values
  6986. (let ((commit "03007a66c912949a7130b973cc0eca109c20811f")
  6987. (revision "1"))
  6988. (package
  6989. (name "ruby-regexp-property-values")
  6990. (version (git-version "1.0.0" revision commit))
  6991. (source
  6992. (origin
  6993. (method git-fetch)
  6994. (uri (git-reference ;no test suite in distributed gem
  6995. (url "https://github.com/jaynetics/regexp_property_values")
  6996. (commit commit)))
  6997. (file-name (git-file-name name version))
  6998. (sha256
  6999. (base32
  7000. "1zsax784p16zdkf60lyq9z924zvsafhx9ckxx9srsgkyiqrifi1s"))))
  7001. (build-system ruby-build-system)
  7002. (arguments
  7003. '(#:test-target "default"))
  7004. (native-inputs
  7005. `(("ruby-character-set" ,ruby-character-set)
  7006. ("ruby-rake" ,ruby-rake)
  7007. ("ruby-rake-compiler" ,ruby-rake-compiler)
  7008. ("ruby-range-compressor" ,ruby-range-compressor)
  7009. ("ruby-rspec" ,ruby-rspec)))
  7010. (synopsis "Inspect Ruby's regex engine property values")
  7011. (description "This small library lets you see which property values are
  7012. supported by the regular expression engine of the Ruby version you are running
  7013. and can directly read out their code point ranges. In other words, it
  7014. determines all supported values for @code{\\p{value}} expressions and what
  7015. they match.")
  7016. (home-page "https://github.com/jaynetics/regexp_property_values")
  7017. (license license:expat))))
  7018. (define-public ruby-regexp-parser
  7019. (package
  7020. (name "ruby-regexp-parser")
  7021. (version "2.0.0")
  7022. (source
  7023. (origin
  7024. (method git-fetch) ;bin/test missing from gem
  7025. (uri (git-reference
  7026. (url "https://github.com/ammar/regexp_parser")
  7027. (commit (string-append "v" version))))
  7028. (file-name (git-file-name name version))
  7029. (sha256
  7030. (base32
  7031. "09ddxdwlml30q6j4rqf06bbjj1mwx00rs0bksnyblhv85anrqz3k"))))
  7032. (build-system ruby-build-system)
  7033. (arguments
  7034. '(#:test-target "default"
  7035. #:phases (modify-phases %standard-phases
  7036. (add-before 'build 'compile-scanner.rb
  7037. (lambda _
  7038. (invoke "rake" "build")
  7039. ;; XXX: This is needed otherwise the install
  7040. ;; phase fails to delete the installed cached
  7041. ;; gem file.
  7042. (delete-file-recursively "pkg")
  7043. #t)))))
  7044. (native-inputs
  7045. `(("ragel" ,ragel)
  7046. ("ruby-regexp-property-values" ,ruby-regexp-property-values)
  7047. ("ruby-rspec" ,ruby-rspec)))
  7048. (synopsis "A regular expression parser library for Ruby ")
  7049. (description "A Ruby gem for tokenizing, parsing, and transforming regular
  7050. expressions. It comprises the following components:
  7051. @itemize
  7052. @item A scanner/tokenizer based on Ragel,
  7053. @item A lexer that produces a stream of token objects,
  7054. @item A parser that produces a tree of Expression objects.
  7055. @end itemize")
  7056. (home-page "https://github.com/ammar/regexp_parser")
  7057. (license license:expat)))
  7058. (define-public ruby-test-queue
  7059. (package
  7060. (name "ruby-test-queue")
  7061. (version "0.4.2")
  7062. (source
  7063. (origin
  7064. (method url-fetch)
  7065. (uri (rubygems-uri "test-queue" version))
  7066. (sha256
  7067. (base32
  7068. "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
  7069. (build-system ruby-build-system)
  7070. (arguments
  7071. '(#:phases
  7072. (modify-phases %standard-phases
  7073. (replace 'check
  7074. (lambda* (#:key tests? #:allow-other-keys)
  7075. (when tests?
  7076. (invoke "rspec"))
  7077. #t)))))
  7078. (native-inputs
  7079. `(("ruby-rspec" ,ruby-rspec)))
  7080. (synopsis "Minitest/RSpec parallel test runner for CI environments")
  7081. (description "The test-queue module is a parallel test runner,
  7082. built using a centralized queue to ensure optimal distribution of
  7083. tests between workers. It is specifically optimized for Continuous
  7084. Integration (CI) environments: build statistics from each run are
  7085. stored locally and used to sort the queue at the beginning of the next
  7086. run.")
  7087. (home-page "https://github.com/tmm1/test-queue")
  7088. (license license:expat)))
  7089. (define-public ruby-rubocop
  7090. (package
  7091. (name "ruby-rubocop")
  7092. (version "1.10.0")
  7093. (source
  7094. (origin
  7095. (method git-fetch) ;no tests in distributed gem
  7096. (uri (git-reference
  7097. (url "https://github.com/rubocop-hq/rubocop")
  7098. (commit (string-append "v" version))))
  7099. (file-name (git-file-name name version))
  7100. (sha256
  7101. (base32
  7102. "0wjw9vpzr4f3nf1zf010bag71w4hdi0haybdn7r5rlmw45pmim29"))))
  7103. (build-system ruby-build-system)
  7104. (arguments
  7105. '(#:test-target "default"
  7106. #:phases
  7107. (modify-phases %standard-phases
  7108. (add-before 'check 'set-home
  7109. (lambda _
  7110. (setenv "HOME" (getcwd))
  7111. #t))
  7112. ;; Rubocop depends on itself for tests, directly and indirectly. By
  7113. ;; regenerating the TODO list we test rubocop against itself and
  7114. ;; forgo adjusting the test suite to our environment each release.
  7115. (replace 'check
  7116. (lambda* (#:key tests? #:allow-other-keys)
  7117. (when tests?
  7118. (make-file-writable ".rubocop_todo.yml")
  7119. (invoke "./exe/rubocop" "--auto-gen-config"))
  7120. #t))
  7121. (add-before 'check 'make-adoc-files-writable
  7122. (lambda _
  7123. (let ((adoc-files (find-files "docs/modules/ROOT/pages"
  7124. "\\.adoc$")))
  7125. (for-each make-file-writable adoc-files))
  7126. #t)))))
  7127. (native-inputs
  7128. `(("ruby-bump" ,ruby-bump)
  7129. ("ruby-pry" ,ruby-pry)
  7130. ("ruby-rake" ,ruby-rake)
  7131. ("ruby-rspec" ,ruby-rspec)
  7132. ("ruby-rubocop-minimal" ,ruby-rubocop-minimal)
  7133. ("ruby-rubocop-performance-minimal" ,ruby-rubocop-performance-minimal)
  7134. ("ruby-rubocop-rspec-minimal" ,ruby-rubocop-rspec-minimal)
  7135. ("ruby-simplecov" ,ruby-simplecov)
  7136. ("ruby-stackprof" ,ruby-stackprof)
  7137. ("ruby-test-queue" ,ruby-test-queue)
  7138. ("ruby-webmock" ,ruby-webmock)
  7139. ("ruby-yard" ,ruby-yard)))
  7140. (propagated-inputs
  7141. `(("ruby-parallel" ,ruby-parallel)
  7142. ("ruby-parser" ,ruby-parser)
  7143. ("ruby-rainbow" ,ruby-rainbow)
  7144. ("ruby-regexp-parser" ,ruby-regexp-parser)
  7145. ("ruby-rubocop-ast" ,ruby-rubocop-ast)
  7146. ("ruby-progressbar" ,ruby-progressbar)
  7147. ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
  7148. (synopsis "Ruby code style checking tool")
  7149. (description
  7150. "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
  7151. the community-driven Ruby Style Guide.")
  7152. (home-page "https://github.com/rubocop-hq/rubocop")
  7153. (license license:expat)))
  7154. (define-public ruby-rubocop-minimal
  7155. (hidden-package
  7156. (package
  7157. (inherit ruby-rubocop)
  7158. (arguments
  7159. (substitute-keyword-arguments (package-arguments ruby-rubocop)
  7160. ((#:tests? _ #f) #f)))
  7161. (propagated-inputs '())
  7162. (native-inputs '()))))
  7163. (define-public ruby-contest
  7164. (package
  7165. (name "ruby-contest")
  7166. (version "0.1.3")
  7167. (source
  7168. (origin
  7169. (method url-fetch)
  7170. (uri (rubygems-uri "contest" version))
  7171. (sha256
  7172. (base32
  7173. "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
  7174. (build-system ruby-build-system)
  7175. (synopsis "Write declarative tests using nested contexts")
  7176. (description
  7177. "Contest allows writing declarative @code{Test::Unit} tests using nested
  7178. contexts without performance penalties.")
  7179. (home-page "https://github.com/citrusbyte/contest")
  7180. (license license:expat)))
  7181. (define-public ruby-creole
  7182. (package
  7183. (name "ruby-creole")
  7184. (version "0.5.0")
  7185. (source
  7186. (origin
  7187. (method url-fetch)
  7188. (uri (rubygems-uri "creole" version))
  7189. (sha256
  7190. (base32
  7191. "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
  7192. (build-system ruby-build-system)
  7193. (native-inputs
  7194. `(("ruby-bacon" ,ruby-bacon)))
  7195. (synopsis "Creole markup language converter")
  7196. (description
  7197. "Creole is a lightweight markup language and this library for converting
  7198. creole to @code{HTML}.")
  7199. (home-page "https://github.com/minad/creole")
  7200. (license license:ruby)))
  7201. (define-public ruby-docile
  7202. (package
  7203. (name "ruby-docile")
  7204. (version "1.1.5")
  7205. (source
  7206. (origin
  7207. (method url-fetch)
  7208. (uri (rubygems-uri "docile" version))
  7209. (sha256
  7210. (base32
  7211. "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
  7212. (build-system ruby-build-system)
  7213. (arguments
  7214. '(#:tests? #f)) ; needs github-markup, among others
  7215. (synopsis "Ruby EDSL helper library")
  7216. (description "Docile is a Ruby library that provides an interface for
  7217. creating embedded domain specific languages (EDSLs) that manipulate existing
  7218. Ruby classes.")
  7219. (home-page "https://ms-ati.github.io/docile/")
  7220. (license license:expat)))
  7221. (define-public ruby-middleware
  7222. (package
  7223. (name "ruby-middleware")
  7224. (version "0.1.0")
  7225. (source
  7226. (origin
  7227. (method url-fetch)
  7228. (uri (rubygems-uri "middleware" version))
  7229. (sha256
  7230. (base32
  7231. "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
  7232. (build-system ruby-build-system)
  7233. (arguments '(#:tests? #f)) ;no test suite
  7234. (synopsis "Implementation of a middleware abstraction for Ruby")
  7235. (description "Middleware is a generalized implementation of a middleware
  7236. abstraction for Ruby.")
  7237. (home-page "https://github.com/mitchellh/middleware")
  7238. (license license:expat)))
  7239. (define-public ruby-benchmark-ips
  7240. (package
  7241. (name "ruby-benchmark-ips")
  7242. (version "2.8.2")
  7243. (source
  7244. (origin
  7245. (method url-fetch)
  7246. (uri (rubygems-uri "benchmark-ips" version))
  7247. (sha256
  7248. (base32
  7249. "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
  7250. (build-system ruby-build-system)
  7251. (native-inputs
  7252. `(("ruby-hoe" ,ruby-hoe)))
  7253. (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
  7254. (description "Benchmark-ips enhances the Ruby Benchmark module with the
  7255. iterations per second count. For short snippets of code, it can automatically
  7256. figure out how many times to run the code to get interesting data.")
  7257. (home-page "https://github.com/evanphx/benchmark-ips")
  7258. (license license:expat)))
  7259. (define-public ruby-ffi-rzmq-core
  7260. (package
  7261. (name "ruby-ffi-rzmq-core")
  7262. (version "1.0.7")
  7263. (source
  7264. (origin
  7265. (method url-fetch)
  7266. (uri (rubygems-uri "ffi-rzmq-core" version))
  7267. (sha256
  7268. (base32
  7269. "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
  7270. (build-system ruby-build-system)
  7271. (arguments
  7272. `(#:phases
  7273. (modify-phases %standard-phases
  7274. (add-after 'unpack 'patch-libzmq-search-path
  7275. (lambda* (#:key inputs #:allow-other-keys)
  7276. (let ((zeromq (assoc-ref inputs "zeromq")))
  7277. (substitute* "lib/ffi-rzmq-core/libzmq.rb"
  7278. (("/usr/local/lib")
  7279. (string-append zeromq "/lib")))
  7280. #t)))
  7281. (replace 'check
  7282. (lambda _
  7283. (invoke "rspec"))))))
  7284. (native-inputs
  7285. `(("ruby-rspec" ,ruby-rspec)))
  7286. (inputs
  7287. `(("zeromq" ,zeromq)))
  7288. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  7289. (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
  7290. (description "This library only provides the FFI wrapper for the ZeroMQ
  7291. networking library. It can be used to implement a Ruby API for the ZeroMQ
  7292. library.")
  7293. (home-page "https://github.com/chuckremes/ffi-rzmq-core")
  7294. (license license:expat)))
  7295. (define-public ruby-ffi-rzmq
  7296. (package
  7297. (name "ruby-ffi-rzmq")
  7298. (version "2.0.7")
  7299. (source
  7300. (origin
  7301. (method url-fetch)
  7302. (uri (rubygems-uri "ffi-rzmq" version))
  7303. (sha256
  7304. (base32
  7305. "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
  7306. (build-system ruby-build-system)
  7307. (arguments '(#:tests? #t
  7308. #:phases (modify-phases %standard-phases
  7309. (replace 'check
  7310. (lambda _
  7311. (invoke "rspec"))))))
  7312. (native-inputs
  7313. `(("ruby-rspec" ,ruby-rspec)))
  7314. (propagated-inputs
  7315. `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
  7316. (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
  7317. (description "This library provides a high-level API that wraps the ZeroMQ
  7318. networking library using the Ruby foreign function interface (FFI). It is a
  7319. pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
  7320. for FFI.")
  7321. (home-page "https://github.com/chuckremes/ffi-rzmq")
  7322. (license license:expat)))
  7323. (define-public ruby-sawyer
  7324. (package
  7325. (name "ruby-sawyer")
  7326. (version "0.8.2")
  7327. (source
  7328. (origin
  7329. (method url-fetch)
  7330. (uri (rubygems-uri "sawyer" version))
  7331. (sha256
  7332. (base32
  7333. "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
  7334. (build-system ruby-build-system)
  7335. (propagated-inputs
  7336. `(("ruby-addressable" ,ruby-addressable)
  7337. ("ruby-faraday" ,ruby-faraday)))
  7338. (synopsis "Experimental hypermedia agent for Ruby")
  7339. (description "Sawyer is an experimental hypermedia agent for Ruby built on
  7340. top of Faraday.")
  7341. (home-page "https://github.com/lostisland/sawyer")
  7342. (license license:expat)))
  7343. (define-public ruby-octokit
  7344. (package
  7345. (name "ruby-octokit")
  7346. (version "4.18.0")
  7347. (source
  7348. (origin
  7349. (method url-fetch)
  7350. (uri (rubygems-uri "octokit" version))
  7351. (sha256
  7352. (base32
  7353. "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
  7354. (build-system ruby-build-system)
  7355. (arguments '(#:tests? #f)) ;no test suite in the gem release
  7356. (propagated-inputs
  7357. `(("ruby-faraday" ,ruby-faraday)
  7358. ("ruby-sawyer" ,ruby-sawyer)))
  7359. (synopsis "Ruby toolkit for the GitHub API")
  7360. (description "Octokit wraps the GitHub API in a flat API client that
  7361. follows Ruby conventions and requires little knowledge of REST.")
  7362. (home-page "https://github.com/octokit/octokit.rb")
  7363. (license license:expat)))
  7364. (define-public ruby-chandler
  7365. (package
  7366. (name "ruby-chandler")
  7367. (version "0.9.0")
  7368. (source
  7369. (origin
  7370. (method url-fetch)
  7371. (uri (rubygems-uri "chandler" version))
  7372. (sha256
  7373. (base32
  7374. "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
  7375. (build-system ruby-build-system)
  7376. (native-inputs
  7377. `(("ruby-rubocop" ,ruby-rubocop)))
  7378. (propagated-inputs
  7379. `(("ruby-netrc" ,ruby-netrc)
  7380. ("ruby-octokit" ,ruby-octokit)))
  7381. (synopsis "Sync CHANGELOG entries to GitHub's release notes")
  7382. (description "Chandler syncs a project's CHANGELOG file entries to
  7383. GitHub's release notes to remove the need of manually entering release
  7384. notes.")
  7385. (home-page "https://github.com/mattbrictson/chandler")
  7386. (license license:expat)))
  7387. (define-public ruby-pry-byebug
  7388. (package
  7389. (name "ruby-pry-byebug")
  7390. (version "3.9.0")
  7391. (source
  7392. (origin
  7393. (method git-fetch)
  7394. (uri (git-reference
  7395. (url "https://github.com/deivid-rodriguez/pry-byebug")
  7396. (commit (string-append "v" version))))
  7397. (file-name (git-file-name name version))
  7398. (sha256
  7399. (base32
  7400. "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
  7401. (build-system ruby-build-system)
  7402. (arguments
  7403. `(#:phases (modify-phases %standard-phases
  7404. (add-before 'check 'set-home
  7405. (lambda _
  7406. (setenv "HOME" (getcwd))
  7407. #t)))))
  7408. (native-inputs
  7409. `(("ruby-chandler" ,ruby-chandler)
  7410. ("ruby-rubocop" ,ruby-rubocop)
  7411. ("ruby-simplecov" ,ruby-simplecov)))
  7412. (propagated-inputs
  7413. `(("ruby-byebug" ,ruby-byebug)
  7414. ("ruby-pry" ,ruby-pry)))
  7415. (synopsis "Step-by-step debugging and stack navigation in Pry")
  7416. (description "This package adds step-by-step debugging and stack
  7417. navigation capabilities to @code{pry}, using @code{byebug}.")
  7418. (home-page "https://github.com/deivid-rodriguez/pry-byebug")
  7419. (license license:expat)))
  7420. (define-public ruby-stackprof
  7421. (package
  7422. (name "ruby-stackprof")
  7423. (version "0.2.17")
  7424. (source
  7425. (origin
  7426. (method url-fetch)
  7427. (uri (rubygems-uri "stackprof" version))
  7428. (sha256
  7429. (base32 "06lz70k8c0r7fyxk1nc3idh14x7nvsr21ydm1bsmbj00jyhmfzsn"))))
  7430. (build-system ruby-build-system)
  7431. (arguments
  7432. `(#:phases
  7433. (modify-phases %standard-phases
  7434. (add-before 'check 'skip-dubious-test
  7435. ;; This unreliable test can fail with "Expected 0 to be >= 1."
  7436. (lambda _
  7437. (substitute* "test/test_stackprof.rb"
  7438. (("def test_(cputime)" _ name)
  7439. (string-append "def skip_" name)))))
  7440. (add-before 'check 'build-tests
  7441. (lambda _
  7442. (invoke "rake" "compile"))))))
  7443. (native-inputs
  7444. `(("ruby-mocha" ,ruby-mocha)
  7445. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  7446. (synopsis "Sampling profiler for Ruby code")
  7447. (description
  7448. "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
  7449. wallclock and object allocation samplers.")
  7450. (home-page "https://github.com/tmm1/stackprof")
  7451. (license license:expat)))
  7452. (define-public ruby-binding-of-caller
  7453. (package
  7454. (name "ruby-binding-of-caller")
  7455. (version "0.8.0")
  7456. (source
  7457. (origin
  7458. (method url-fetch)
  7459. (uri (rubygems-uri "binding_of_caller" version))
  7460. (sha256
  7461. (base32
  7462. "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
  7463. (build-system ruby-build-system)
  7464. ;; Attempting to run the test suite fails with a rake deprecation error
  7465. ;; (see: https://github.com/banister/binding_of_caller/issues/76).
  7466. (arguments '(#:tests? #f))
  7467. (propagated-inputs
  7468. `(("ruby-debug-inspector" ,ruby-debug-inspector)))
  7469. (synopsis "Retrieve the binding of a method's caller")
  7470. (description "The @code{binding_of_caller} module provides the
  7471. @code{Binding#of_caller} method. It allows accessing bindings from upper
  7472. frames in the call stack and can evaluate code in that context.")
  7473. (home-page "https://github.com/banister/binding_of_caller")
  7474. (license license:expat)))
  7475. (define-public ruby-pry-stack-explorer
  7476. (package
  7477. (name "ruby-pry-stack-explorer")
  7478. (version "0.5.1")
  7479. (source
  7480. (origin
  7481. (method url-fetch)
  7482. (uri (rubygems-uri "pry-stack_explorer" version))
  7483. (sha256
  7484. (base32
  7485. "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
  7486. (build-system ruby-build-system)
  7487. (arguments '(#:tests? #f)) ;no test suite in gem release
  7488. (propagated-inputs
  7489. `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
  7490. ("ruby-pry" ,ruby-pry)))
  7491. (synopsis "Call-stack navigation plugin for the Pry REPL")
  7492. (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
  7493. add support to navigate the call-stack.")
  7494. (home-page "https://github.com/pry/pry-stack_explorer")
  7495. (license license:expat)))
  7496. (define-public ruby-varint
  7497. (package
  7498. (name "ruby-varint")
  7499. (version "0.1.1")
  7500. (source
  7501. (origin
  7502. (method url-fetch)
  7503. (uri (rubygems-uri "varint" version))
  7504. (sha256
  7505. (base32
  7506. "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
  7507. (build-system ruby-build-system)
  7508. (arguments '(#:tests? #f)) ;no test suite
  7509. (synopsis "Variable length integers (varint) C extension for Ruby")
  7510. (description "This package provides a small C extension to speed up
  7511. variable length integers (varint) in Ruby Protocol Buffers.")
  7512. (home-page "https://github.com/liquidm/varint")
  7513. (license license:bsd-3)))
  7514. (define-public ruby-ruby-prof
  7515. (package
  7516. (name "ruby-ruby-prof")
  7517. (version "1.4.3")
  7518. (source
  7519. (origin
  7520. (method url-fetch)
  7521. (uri (rubygems-uri "ruby-prof" version))
  7522. (sha256
  7523. (base32
  7524. "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m"))))
  7525. (build-system ruby-build-system)
  7526. (arguments
  7527. `(#:phases
  7528. (modify-phases %standard-phases
  7529. (add-after 'unpack 'patch-rakefile
  7530. ;; This fixes the following error: "NameError: uninitialized
  7531. ;; constant Bundler::GemHelper" (see:
  7532. ;; https://github.com/ruby-prof/ruby-prof/issues/274).
  7533. (lambda _
  7534. (substitute* "Rakefile"
  7535. ((".*require \"bundler/setup\".*" all)
  7536. (string-append all " require 'bundler/gem_tasks'\n")))
  7537. #t))
  7538. ;; The LineNumbersTest test fails non-deterministically (see:
  7539. ;; https://github.com/ruby-prof/ruby-prof/issues/276).
  7540. (add-after 'extract-gemspec 'delete-flaky-test
  7541. (lambda _
  7542. (delete-file "test/line_number_test.rb")
  7543. (substitute* "ruby-prof.gemspec"
  7544. (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
  7545. #t))
  7546. (add-before 'check 'compile
  7547. (lambda _
  7548. (invoke "rake" "compile"))))))
  7549. (native-inputs
  7550. `(("bundler" ,bundler)
  7551. ("ruby-minitest" ,ruby-minitest)
  7552. ("ruby-rake-compiler" ,ruby-rake-compiler)
  7553. ("ruby-rdoc" ,ruby-rdoc)))
  7554. (synopsis "Fast code profiler for Ruby")
  7555. (description "RubyProf is a fast code profiler for Ruby. Its features
  7556. include:
  7557. @table @asis
  7558. @item Speed
  7559. Being a C extension, it is many times faster than the standard Ruby profiler.
  7560. @item Measurement Modes
  7561. It can measure program wall time, process time, object allocations and memory
  7562. usage.
  7563. @item Reports
  7564. A variety of text and cross-referenced HTML reports can be generated.
  7565. @item Threads
  7566. Profiling multiple threads simultaneously is supported.
  7567. @end table")
  7568. (home-page "https://github.com/ruby-prof/ruby-prof")
  7569. (license license:bsd-2)))
  7570. (define-public ruby-memory-profiler
  7571. (package
  7572. (name "ruby-memory-profiler")
  7573. (version "1.0.0")
  7574. (source
  7575. (origin
  7576. (method git-fetch)
  7577. (uri (git-reference
  7578. (url "https://github.com/SamSaffron/memory_profiler")
  7579. (commit (string-append "v" version))))
  7580. (file-name (git-file-name name version))
  7581. (sha256
  7582. (base32
  7583. "07yqv11q68xg2fqkrhs6ysngryk8b9zq6qzh24rgx9xqv6qfnj0w"))))
  7584. (build-system ruby-build-system)
  7585. (synopsis "Memory profiling routines for Ruby")
  7586. (description
  7587. "This package provides memory profiling routines for Ruby.")
  7588. (home-page "https://github.com/SamSaffron/memory_profiler")
  7589. (license license:expat)))
  7590. (define-public ruby-cucumber-messages
  7591. (package
  7592. (name "ruby-cucumber-messages")
  7593. (version "12.2.0")
  7594. (source (origin
  7595. (method git-fetch)
  7596. (uri (git-reference
  7597. (url "https://github.com/cucumber/messages-ruby")
  7598. (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
  7599. (file-name (git-file-name name version))
  7600. (sha256
  7601. (base32
  7602. "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
  7603. (build-system ruby-build-system)
  7604. (arguments
  7605. `(#:phases (modify-phases %standard-phases
  7606. (add-after 'unpack 'patch-protobuf.rb
  7607. (lambda _
  7608. (substitute* "rake/protobuf.rb"
  7609. (("load 'protobuf/tasks/compile.rake'")
  7610. "require 'protobuf/tasks'"))
  7611. #t))
  7612. (add-before 'build 'compile
  7613. (lambda _
  7614. (substitute* "Makefile"
  7615. (("bundle exec ") "")
  7616. (("include default.mk.*" all)
  7617. (string-append "#" all)))
  7618. (invoke "make")))
  7619. (replace 'check
  7620. (lambda _
  7621. (invoke "rspec"))))))
  7622. (propagated-inputs
  7623. `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
  7624. (native-inputs
  7625. `(("ruby-rspec" ,ruby-rspec)))
  7626. (home-page "https://github.com/cucumber/messages-ruby")
  7627. (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
  7628. (description "Cucumber Messages for Ruby is a library which allows
  7629. serialization and deserialization of the protocol buffer messages used in
  7630. Cucumber.")
  7631. (license license:expat)))
  7632. (define-public ruby-gherkin
  7633. (package
  7634. (name "ruby-gherkin")
  7635. (version "14.0.1")
  7636. (source (origin
  7637. (method git-fetch)
  7638. (uri (git-reference
  7639. (url "https://github.com/cucumber/gherkin-ruby")
  7640. (commit (string-append "v" version))))
  7641. (file-name (git-file-name name version))
  7642. (sha256
  7643. (base32
  7644. "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
  7645. (build-system ruby-build-system)
  7646. (native-inputs
  7647. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7648. ("ruby-rspec" ,ruby-rspec)))
  7649. (arguments
  7650. `(#:test-target "spec"))
  7651. (synopsis "Gherkin parser for Ruby")
  7652. (description "Gherkin is a parser and compiler for the Gherkin language.
  7653. It is intended be used by all Cucumber implementations to parse
  7654. @file{.feature} files.")
  7655. (home-page "https://github.com/cucumber/gherkin-ruby")
  7656. (license license:expat)))
  7657. (define-public ruby-gherkin-ruby
  7658. (package
  7659. (name "ruby-gherkin-ruby")
  7660. (version "0.3.2")
  7661. (home-page "https://github.com/codegram/gherkin-ruby")
  7662. (source (origin
  7663. (method url-fetch)
  7664. (uri (rubygems-uri "gherkin-ruby" version))
  7665. (sha256
  7666. (base32
  7667. "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
  7668. (build-system ruby-build-system)
  7669. (synopsis "Pure Ruby Gherkin parser")
  7670. (description
  7671. "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
  7672. 200 lines of code.")
  7673. ;; XXX: No license information anywhere but Readme.md.
  7674. (license license:expat)))
  7675. (define-public ruby-aruba
  7676. (package
  7677. (name "ruby-aruba")
  7678. (version "0.14.14")
  7679. (source
  7680. (origin
  7681. (method url-fetch)
  7682. (uri (rubygems-uri "aruba" version))
  7683. (sha256
  7684. (base32
  7685. "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
  7686. (build-system ruby-build-system)
  7687. (arguments
  7688. '(#:test-target "spec"
  7689. #:phases
  7690. (modify-phases %standard-phases
  7691. (add-after 'unpack 'patch
  7692. (lambda _
  7693. (substitute* "spec/aruba/api_spec.rb"
  7694. ;; This resolves some errors in the specs
  7695. ;;
  7696. ;; undefined method `parse' for Time:Class
  7697. (("require 'spec_helper'")
  7698. "require 'spec_helper'\nrequire 'time'"))
  7699. ;; Avoid shebang issues in this spec file
  7700. (substitute* "spec/aruba/matchers/command_spec.rb"
  7701. (("/usr/bin/env bash")
  7702. (which "bash")))
  7703. #t))
  7704. (add-before 'check 'remove-unnecessary-dependencies
  7705. (lambda _
  7706. (substitute* "Gemfile"
  7707. ((".*byebug.*") "\n")
  7708. ((".*pry.*") "\n")
  7709. ((".*yaml.*") "\n")
  7710. ((".*bcat.*") "\n")
  7711. ((".*kramdown.*") "\n")
  7712. ((".*rubocop.*") "\n")
  7713. ((".*cucumber-pro.*") "\n")
  7714. ((".*cucumber.*") "\n")
  7715. ((".*license_finder.*") "\n")
  7716. ((".*rake.*") "gem 'rake'\n")
  7717. ((".*relish.*") "\n"))
  7718. (substitute* "aruba.gemspec"
  7719. (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
  7720. "spec.add_runtime_dependency 'cucumber'"))
  7721. #t))
  7722. (add-before 'check 'set-home
  7723. (lambda _ (setenv "HOME" "/tmp") #t)))))
  7724. (native-inputs
  7725. `(("bundler" ,bundler)
  7726. ("ruby-rspec" ,ruby-rspec)
  7727. ("ruby-fuubar" ,ruby-fuubar)
  7728. ("ruby-simplecov" ,ruby-simplecov)))
  7729. (propagated-inputs
  7730. `(("ruby-childprocess" ,ruby-childprocess)
  7731. ("ruby-contracts" ,ruby-contracts)
  7732. ("ruby-cucumber" ,ruby-cucumber)
  7733. ("ruby-ffi" ,ruby-ffi)
  7734. ("ruby-rspec-expectations" ,ruby-rspec-expectations)
  7735. ("ruby-thor" ,ruby-thor)
  7736. ("ruby-yard" ,ruby-yard)))
  7737. (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
  7738. (description
  7739. "Aruba is an extension for Cucumber, RSpec and Minitest for testing
  7740. command-line applications. It supports applications written in any
  7741. language.")
  7742. (home-page "https://github.com/cucumber/aruba")
  7743. (license license:expat)))
  7744. ;; A version of ruby-aruba without tests run so that circular dependencies can
  7745. ;; be avoided.
  7746. (define ruby-aruba-without-tests
  7747. (package
  7748. (inherit ruby-aruba)
  7749. (arguments '(#:tests? #f))
  7750. (propagated-inputs
  7751. `(("ruby-cucumber" ,ruby-cucumber-without-tests)
  7752. ,@(alist-delete "ruby-cucumber"
  7753. (package-propagated-inputs ruby-aruba))))
  7754. (native-inputs '())))
  7755. (define-public ruby-sys-uname
  7756. (package
  7757. (name "ruby-sys-uname")
  7758. (version "1.2.1")
  7759. (source
  7760. (origin
  7761. (method url-fetch)
  7762. (uri (rubygems-uri "sys-uname" version))
  7763. (sha256
  7764. (base32
  7765. "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
  7766. (build-system ruby-build-system)
  7767. (arguments
  7768. `(#:test-target "spec"))
  7769. (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
  7770. (native-inputs `(("ruby-rspec" ,ruby-rspec)))
  7771. (synopsis "Ruby interface for gathering system information")
  7772. (description "The sys-uname library provides an interface for gathering
  7773. information about your current platform. It allows retrieving information
  7774. such as the OS name, OS version, system name, etc.")
  7775. (home-page "https://github.com/djberg96/sys-uname")
  7776. (license license:asl2.0)))
  7777. (define-public ruby-cucumber-create-meta
  7778. (package
  7779. (name "ruby-cucumber-create-meta")
  7780. (version "1.0.0")
  7781. (source
  7782. (origin
  7783. (method url-fetch)
  7784. (uri (rubygems-uri "cucumber-create-meta" version))
  7785. (sha256
  7786. (base32
  7787. "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
  7788. (build-system ruby-build-system)
  7789. (arguments
  7790. `(#:phases (modify-phases %standard-phases
  7791. (add-after 'extract-gemspec 'relax-version-requirements
  7792. (lambda _
  7793. (substitute* ".gemspec"
  7794. ((" 12\\.2")
  7795. " 12.1"))
  7796. #t))
  7797. (replace 'check
  7798. (lambda _
  7799. (invoke "rspec"))))))
  7800. (native-inputs
  7801. `(("ruby-rspec" ,ruby-rspec)))
  7802. (propagated-inputs
  7803. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7804. ("ruby-sys-uname" ,ruby-sys-uname)))
  7805. (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
  7806. (description "The @code{createMeta} utility function allows generating
  7807. system-specific @code{Meta} messages for Cucumber Ruby.")
  7808. (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
  7809. (license license:expat)))
  7810. (define-public ruby-cucumber-html-formatter
  7811. (package
  7812. (name "ruby-cucumber-html-formatter")
  7813. (version "7.0.0")
  7814. (source
  7815. (origin
  7816. (method url-fetch)
  7817. (uri (rubygems-uri "cucumber-html-formatter" version))
  7818. (sha256
  7819. (base32
  7820. "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
  7821. (build-system ruby-build-system)
  7822. (arguments
  7823. `(#:phases (modify-phases %standard-phases
  7824. (replace 'check
  7825. (lambda _
  7826. (invoke "rspec"))))))
  7827. (native-inputs
  7828. `(("ruby-rspec" ,ruby-rspec)))
  7829. (propagated-inputs
  7830. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
  7831. (synopsis "HTML formatter for Cucumber")
  7832. (description "Cucumber HTML Formatter produces a HTML report for Cucumber
  7833. runs. It is built on top of cucumber-react and works with any Cucumber
  7834. implementation with a protocol buffer formatter that outputs Cucumber
  7835. messages.")
  7836. (home-page "https://github.com/cucumber/cucumber/tree/\
  7837. master/html-formatter/ruby")
  7838. (license license:expat)))
  7839. (define-public ruby-cucumber
  7840. (package
  7841. (name "ruby-cucumber")
  7842. (version "4.1.0")
  7843. (source
  7844. (origin
  7845. (method git-fetch)
  7846. (uri (git-reference
  7847. (url "https://github.com/cucumber/cucumber-ruby")
  7848. (commit (string-append "v" version))))
  7849. (file-name (git-file-name name version))
  7850. (sha256
  7851. (base32
  7852. "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
  7853. (build-system ruby-build-system)
  7854. (arguments
  7855. '(#:test-target "default"
  7856. #:phases
  7857. (modify-phases %standard-phases
  7858. (add-after 'unpack 'disable-rubocop
  7859. ;; Rubocop lint check fails with our more recent version.
  7860. (lambda _
  7861. (substitute* "Rakefile"
  7862. (("spec cucumber rubocop")
  7863. "spec cucumber"))
  7864. #t))
  7865. (add-after 'extract-gemspec 'strip-version-requirements
  7866. (lambda _
  7867. (delete-file "Gemfile") ;do not use Bundler
  7868. (substitute* "cucumber.gemspec"
  7869. (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
  7870. (string-append stripped "\n")))
  7871. #t))
  7872. (add-before 'check 'set-home
  7873. (lambda _
  7874. (setenv "HOME" (getcwd))
  7875. #t)))))
  7876. (propagated-inputs
  7877. `(("ruby-builder" ,ruby-builder)
  7878. ("ruby-cucumber-core" ,ruby-cucumber-core)
  7879. ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
  7880. ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
  7881. ("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7882. ("ruby-cucumber-wire" ,ruby-cucumber-wire)
  7883. ("ruby-diff-lcs" ,ruby-diff-lcs)
  7884. ("ruby-gherkin" ,ruby-gherkin)
  7885. ("ruby-multi-json" ,ruby-multi-json)
  7886. ("ruby-multi-test" ,ruby-multi-test)))
  7887. (native-inputs
  7888. `(;; Use a untested version of aruba, to avoid a circular dependency, as
  7889. ;; ruby-aruba depends on ruby-cucumber.
  7890. ("ruby-aruba" ,ruby-aruba-without-tests)
  7891. ("ruby-rspec" ,ruby-rspec)
  7892. ("ruby-pry" ,ruby-pry)
  7893. ("ruby-nokogiri" ,ruby-nokogiri)
  7894. ("ruby-rubocop" ,ruby-rubocop)))
  7895. (synopsis "Describe automated tests in plain language")
  7896. (description "Cucumber is a tool for running automated tests written in
  7897. plain language. It's designed to support a Behaviour Driven Development (BDD)
  7898. software development workflow.")
  7899. (home-page "https://cucumber.io/")
  7900. (license license:expat)))
  7901. (define ruby-cucumber-without-tests
  7902. (package (inherit ruby-cucumber)
  7903. (arguments
  7904. '(#:tests? #f))
  7905. (native-inputs
  7906. '())))
  7907. (define-public ruby-coveralls
  7908. (package
  7909. (name "ruby-coveralls")
  7910. (version "0.8.23")
  7911. (source
  7912. (origin
  7913. (method url-fetch)
  7914. (uri (rubygems-uri "coveralls" version))
  7915. (sha256
  7916. (base32
  7917. "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
  7918. (build-system ruby-build-system)
  7919. ;; The test suite depends on ruby-vcr, which cannot be included in Guix
  7920. ;; because of its nonfree, Hippocratic-derived license.
  7921. (arguments
  7922. `(#:tests? #f
  7923. #:phases (modify-phases %standard-phases
  7924. (add-after 'extract-gemspec 'strip-version-requirements
  7925. ;; Keeping strict version requirements can cause problems
  7926. ;; to users of the library, such as: Gem::ConflictError:
  7927. ;; Unable to activate coveralls-0.8.23, because
  7928. ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
  7929. (lambda _
  7930. (substitute* "coveralls-ruby.gemspec"
  7931. (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
  7932. (string-append stripped ")\n")))
  7933. #t)))))
  7934. (propagated-inputs
  7935. `(("ruby-json" ,ruby-json)
  7936. ("ruby-term-ansicolor" ,ruby-term-ansicolor)
  7937. ("ruby-thor" ,ruby-thor)
  7938. ("ruby-tins" ,ruby-tins)))
  7939. (synopsis "Ruby implementation of the Coveralls API")
  7940. (description "This package provides a Ruby implementation of the Coveralls
  7941. API.")
  7942. (home-page "https://coveralls.io")
  7943. (license license:expat)))
  7944. (define-public ruby-unindent
  7945. (package
  7946. (name "ruby-unindent")
  7947. (version "1.0")
  7948. (source
  7949. (origin
  7950. (method url-fetch)
  7951. (uri (rubygems-uri "unindent" version))
  7952. (sha256
  7953. (base32
  7954. "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
  7955. (build-system ruby-build-system)
  7956. (synopsis "Ruby method to unindent strings")
  7957. (description "This module provides a @code{String#unindent} Ruby method to
  7958. unindent strings, which can be useful to unindent multiline strings embedded
  7959. in already-indented code.")
  7960. (home-page "https://github.com/mynyml/unindent")
  7961. (license license:expat)))
  7962. (define-public ruby-cucumber-core
  7963. (package
  7964. (name "ruby-cucumber-core")
  7965. (version "7.1.0")
  7966. (source
  7967. (origin
  7968. (method git-fetch)
  7969. (uri (git-reference
  7970. (url "https://github.com/cucumber/cucumber-ruby-core")
  7971. (commit (string-append "v" version))))
  7972. (file-name (git-file-name name version))
  7973. (sha256
  7974. (base32
  7975. "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
  7976. (build-system ruby-build-system)
  7977. (arguments
  7978. `(#:test-target "spec"
  7979. #:phases
  7980. (modify-phases %standard-phases
  7981. (add-after 'extract-gemspec 'relax-version-requirements
  7982. (lambda _
  7983. (substitute* "cucumber-core.gemspec"
  7984. (("'cucumber-tag-expressions',.*")
  7985. "'cucumber-tag-expressions', '>=2.0.0'\n"))
  7986. #t)))))
  7987. (native-inputs
  7988. `(("ruby-rspec" ,ruby-rspec)
  7989. ("ruby-coveralls" ,ruby-coveralls)
  7990. ("ruby-rubocop" ,ruby-rubocop)
  7991. ("ruby-simplecov" ,ruby-simplecov)
  7992. ("ruby-unindent" ,ruby-unindent)))
  7993. (propagated-inputs
  7994. `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
  7995. ("ruby-gherkin" ,ruby-gherkin)
  7996. ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
  7997. (synopsis "Core library for the Cucumber BDD app")
  7998. (description "Cucumber is a tool for running automated tests
  7999. written in plain language. Because they're written in plain language,
  8000. they can be read by anyone on your team. Because they can be read by
  8001. anyone, you can use them to help improve communication, collaboration
  8002. and trust on your team.")
  8003. (home-page "https://cucumber.io/")
  8004. (license license:expat)))
  8005. (define-public ruby-cucumber-expressions
  8006. (package
  8007. (name "ruby-cucumber-expressions")
  8008. (version "10.2.0")
  8009. (source
  8010. (origin
  8011. (method git-fetch)
  8012. (uri (git-reference
  8013. (url "https://github.com/cucumber/cucumber-expressions-ruby")
  8014. (commit (string-append "v" version))))
  8015. (file-name (git-file-name name version))
  8016. (sha256
  8017. (base32
  8018. "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
  8019. (build-system ruby-build-system)
  8020. (arguments
  8021. '(#:test-target "spec"))
  8022. (native-inputs
  8023. `(("ruby-rspec" ,ruby-rspec)
  8024. ("ruby-simplecov" ,ruby-simplecov)))
  8025. (synopsis "Simpler alternative to Regular Expressions")
  8026. (description "Cucumber Expressions offer similar functionality to Regular
  8027. Expressions, with a syntax that is easier to read and write. Cucumber
  8028. Expressions are extensible with parameter types.")
  8029. (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
  8030. (license license:expat)))
  8031. (define-public ruby-cucumber-wire
  8032. (package
  8033. (name "ruby-cucumber-wire")
  8034. (version "3.1.0")
  8035. (source
  8036. (origin
  8037. (method url-fetch)
  8038. (uri (rubygems-uri "cucumber-wire" version))
  8039. (sha256
  8040. (base32
  8041. "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
  8042. (build-system ruby-build-system)
  8043. (arguments
  8044. '(#:tests? #f ;tests use cucumber, causing a cycle
  8045. #:phases
  8046. (modify-phases %standard-phases
  8047. (add-after 'extract-gemspec 'relax-version-requirements
  8048. (lambda _
  8049. (substitute* ".gemspec"
  8050. ((" 10\\.1") " 10.2"))
  8051. #t)))))
  8052. (propagated-inputs
  8053. `(("ruby-cucumber-core" ,ruby-cucumber-core)
  8054. ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
  8055. ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
  8056. (synopsis "Cucumber wire protocol plugin")
  8057. (description "Cucumber's wire protocol allows step definitions to be
  8058. implemented and invoked on any platform.")
  8059. (home-page "https://github.com/cucumber/cucumber-ruby-wire")
  8060. (license license:expat)))
  8061. (define-public ruby-cucumber-tag-expressions
  8062. (package
  8063. (name "ruby-cucumber-tag-expressions")
  8064. (version "3.0.0")
  8065. (source
  8066. (origin
  8067. (method git-fetch)
  8068. (uri (git-reference
  8069. (url "https://github.com/cucumber/tag-expressions-ruby")
  8070. (commit (string-append "v" version))))
  8071. (file-name (git-file-name name version))
  8072. (sha256
  8073. (base32
  8074. "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
  8075. (build-system ruby-build-system)
  8076. (arguments
  8077. `(#:test-target "spec"))
  8078. (native-inputs
  8079. `(("ruby-rspec" ,ruby-rspec)))
  8080. (synopsis "Cucumber tag expressions for Ruby")
  8081. (description "Cucumber tag expression parser for Ruby. A tag expression
  8082. is an infix boolean expression used by Cucumber.")
  8083. (home-page "https://github.com/cucumber/tag-expressions-ruby")
  8084. (license license:expat)))
  8085. (define-public ruby-bindex
  8086. (package
  8087. (name "ruby-bindex")
  8088. (version "0.5.0")
  8089. (source
  8090. (origin
  8091. (method url-fetch)
  8092. (uri (rubygems-uri "bindex" version))
  8093. (sha256
  8094. (base32
  8095. "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
  8096. (build-system ruby-build-system)
  8097. (arguments
  8098. '(#:test-target "default"))
  8099. (native-inputs
  8100. `(("bundler" ,bundler)
  8101. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  8102. (synopsis "Provides access for bindings relating to Ruby exceptions")
  8103. (description
  8104. "@code{bindex} provides a way to access the bindings that relate to
  8105. exceptions in Ruby, providing more information about the context in which the
  8106. exception occurred.")
  8107. (home-page "https://github.com/gsamokovarov/bindex")
  8108. (license license:expat)))
  8109. (define-public ruby-bio-logger
  8110. (package
  8111. (name "ruby-bio-logger")
  8112. (version "1.0.1")
  8113. (source
  8114. (origin
  8115. (method url-fetch)
  8116. (uri (rubygems-uri "bio-logger" version))
  8117. (sha256
  8118. (base32
  8119. "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
  8120. (build-system ruby-build-system)
  8121. (arguments
  8122. `(#:tests? #f)) ; rake errors, missing shoulda
  8123. (propagated-inputs
  8124. `(("ruby-log4r" ,ruby-log4r)))
  8125. (synopsis "Log4r wrapper for Ruby")
  8126. (description "Bio-logger is a wrapper around Log4r adding extra logging
  8127. features such as filtering and fine grained logging.")
  8128. (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
  8129. (license license:expat)))
  8130. (define-public ruby-yajl-ruby
  8131. (package
  8132. (name "ruby-yajl-ruby")
  8133. (version "1.4.1")
  8134. (source
  8135. (origin
  8136. (method url-fetch)
  8137. (uri (rubygems-uri "yajl-ruby" version))
  8138. (sha256
  8139. (base32
  8140. "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
  8141. (build-system ruby-build-system)
  8142. (arguments
  8143. '(#:test-target "spec"
  8144. #:phases
  8145. (modify-phases %standard-phases
  8146. (add-before 'check 'patch-test-to-update-load-path
  8147. (lambda _
  8148. (substitute* "spec/parsing/large_number_spec.rb"
  8149. (("require \"yajl\"")
  8150. "$LOAD_PATH << 'lib'; require 'yajl'"))
  8151. #t)))))
  8152. (native-inputs
  8153. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  8154. ("ruby-rspec" ,ruby-rspec)))
  8155. (synopsis "Streaming JSON parsing and encoding library for Ruby")
  8156. (description
  8157. "Ruby C bindings to the Yajl JSON stream-based parser library. The API
  8158. is compatible with the JSON gem, so yajl-ruby can act as a drop in
  8159. replacement.
  8160. A modified copy of yajl is used, and included in the package.")
  8161. (home-page "https://github.com/brianmario/yajl-ruby")
  8162. (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
  8163. license:bsd-3)))) ; Included, modified copy of yajl
  8164. (define-public ruby-yard
  8165. (package
  8166. (name "ruby-yard")
  8167. (version "0.9.25")
  8168. (source
  8169. (origin
  8170. (method git-fetch)
  8171. ;; Tests do not pass if we build from the distributed gem.
  8172. (uri (git-reference
  8173. (url "https://github.com/lsegal/yard")
  8174. (commit (string-append "v" version))))
  8175. (file-name (git-file-name name version))
  8176. (sha256
  8177. (base32
  8178. "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
  8179. (build-system ruby-build-system)
  8180. (arguments
  8181. ;; Note: Tests are willfully disabled to alleviate dependency cycle
  8182. ;; problems.
  8183. `(#:tests? #f
  8184. #:phases (modify-phases %standard-phases
  8185. (add-after 'unpack 'do-not-set-date-in-gemspec
  8186. ;; Fix a reproducibility issue (see:
  8187. ;; https://github.com/lsegal/yard/issues/1343).
  8188. (lambda _
  8189. (substitute* "yard.gemspec"
  8190. ((".*s\\.date.*") ""))
  8191. #t)))))
  8192. (synopsis "Documentation generation tool for Ruby")
  8193. (description "YARD is a documentation generation tool for the Ruby
  8194. programming language. It enables the user to generate consistent, usable
  8195. documentation that can be exported to a number of formats very easily, and
  8196. also supports extending for custom Ruby constructs such as custom class level
  8197. definitions.")
  8198. (home-page "https://yardoc.org")
  8199. (license license:expat)))
  8200. (define-public ruby-yard-with-tests
  8201. (package
  8202. (inherit ruby-yard)
  8203. (name "ruby-yard-with-tests")
  8204. (arguments
  8205. (substitute-keyword-arguments (package-arguments ruby-yard)
  8206. ((#:tests? _ #t) #t)
  8207. ((#:test-target _ "default") "default")
  8208. ((#:phases phases '%standard-phases)
  8209. `(modify-phases ,phases
  8210. (add-before 'check 'prepare-for-tests
  8211. (lambda* (#:key tests? #:allow-other-keys)
  8212. (when tests?
  8213. (substitute* "Rakefile"
  8214. ((".*[Ss]amus.*") ""))
  8215. ;; Delete the Gemfile to avoid errors relating to it.
  8216. (delete-file "Gemfile")
  8217. ;; $HOME needs to be set to somewhere writeable for tests to
  8218. ;; run.
  8219. (setenv "HOME" "/tmp"))
  8220. #t))))))
  8221. (native-inputs
  8222. `(("ruby-rspec" ,ruby-rspec)
  8223. ("ruby-rack" ,ruby-rack)
  8224. ("ruby-redcloth" ,ruby-redcloth)
  8225. ("ruby-asciidoc" ,ruby-asciidoctor)))))
  8226. (define-public ruby-spectroscope
  8227. (package
  8228. (name "ruby-spectroscope")
  8229. (version "0.1.0")
  8230. (source
  8231. (origin
  8232. (method url-fetch)
  8233. (uri (rubygems-uri "spectroscope" version))
  8234. (sha256
  8235. (base32
  8236. "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
  8237. (build-system ruby-build-system)
  8238. (arguments
  8239. `(#:phases
  8240. (modify-phases %standard-phases
  8241. (replace 'check
  8242. (lambda _
  8243. (with-output-to-file ".test"
  8244. (lambda _
  8245. (display
  8246. "\
  8247. require 'ae/should'
  8248. require 'rspec'
  8249. include RSpec
  8250. Test.run :default do |run|
  8251. run.files << 'spec/*_spec.rb'
  8252. end")))
  8253. (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
  8254. (native-inputs
  8255. `(("ruby-ae" ,ruby-ae)
  8256. ("ruby-rspec" ,ruby-rspec)))
  8257. (propagated-inputs
  8258. `(("ruby-rubytest" ,ruby-rubytest)))
  8259. (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
  8260. (description "Spectroscope is a Behavior-Driven Development (BDD)
  8261. framework built on RubyTest, designed to emulate RSpec in most respects. It
  8262. is assertion framework independent so any number of assertion systems can be
  8263. used, such as Assay or AE.")
  8264. (home-page "http://rubyworks.github.com/spectroscope/")
  8265. (license license:bsd-2)))
  8266. (define-public ruby-tomparse
  8267. (package
  8268. (name "ruby-tomparse")
  8269. (version "0.4.2")
  8270. (source
  8271. (origin
  8272. (method url-fetch)
  8273. (uri (rubygems-uri "tomparse" version))
  8274. (sha256
  8275. (base32
  8276. "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
  8277. (build-system ruby-build-system)
  8278. ;; TODO: Tests require citron and rulebow, not yet packaged.
  8279. (arguments '(#:tests? #f))
  8280. (synopsis "TomDoc parser for Ruby")
  8281. (description "TomParse is a TomDoc parser for Ruby. It takes a code
  8282. comment as input and parses it into a convenient object-oriented structure in
  8283. accordance with the TomDoc standard. See
  8284. @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
  8285. TomDoc format.")
  8286. (home-page "http://rubyworks.github.com/tomparse/")
  8287. (license license:bsd-2)))
  8288. (define-public ruby-yard-tomdoc
  8289. (package
  8290. (name "ruby-yard-tomdoc")
  8291. (version "0.7.1")
  8292. (source
  8293. (origin
  8294. (method url-fetch)
  8295. (uri (rubygems-uri "yard-tomdoc" version))
  8296. (sha256
  8297. (base32
  8298. "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
  8299. (build-system ruby-build-system)
  8300. (arguments
  8301. `(#:phases (modify-phases %standard-phases
  8302. (replace 'check
  8303. (lambda _
  8304. (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
  8305. (native-inputs
  8306. `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
  8307. ("ruby-spectroscope" ,ruby-spectroscope)
  8308. ("ruby-ae" ,ruby-ae)))
  8309. (propagated-inputs
  8310. `(("ruby-tomparse" ,ruby-tomparse)
  8311. ("ruby-yard" ,ruby-yard)))
  8312. (synopsis "TomDoc syntax for YARD")
  8313. (description "This module adds support for the TomDoc documentation format
  8314. to YARD, a documentation generation tool for Ruby.")
  8315. (home-page "http://rubyworks.github.com/yard-tomdoc/")
  8316. (license license:expat)))
  8317. (define-public ruby-clap
  8318. (package
  8319. (name "ruby-clap")
  8320. (version "1.0.0")
  8321. (source (origin
  8322. (method url-fetch)
  8323. (uri (rubygems-uri "clap" version))
  8324. (sha256
  8325. (base32
  8326. "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
  8327. (build-system ruby-build-system)
  8328. ;; Clap needs cutest for running tests, but cutest needs clap.
  8329. (arguments `(#:tests? #f))
  8330. (synopsis "Command line argument parsing for simple applications")
  8331. (description
  8332. "Clap provides command line argument parsing features. It covers the
  8333. simple case of executing code based on the flags or parameters passed.")
  8334. (home-page "https://github.com/djanowski/cutest")
  8335. (license license:expat)))
  8336. (define-public ruby-cutest
  8337. (package
  8338. (name "ruby-cutest")
  8339. (version "1.2.2")
  8340. (source (origin
  8341. (method url-fetch)
  8342. (uri (rubygems-uri "cutest" version))
  8343. (sha256
  8344. (base32
  8345. "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
  8346. (build-system ruby-build-system)
  8347. (propagated-inputs
  8348. `(("ruby-clap" ,ruby-clap)))
  8349. (synopsis "Run tests in separate processes")
  8350. (description
  8351. "Cutest runs tests in separate processes to avoid shared state.")
  8352. (home-page "https://github.com/djanowski/cutest")
  8353. (license license:expat)))
  8354. (define-public ruby-pygmentize
  8355. (package
  8356. (name "ruby-pygmentize")
  8357. (version "0.0.3")
  8358. (source (origin
  8359. (method url-fetch)
  8360. (uri (rubygems-uri "pygmentize" version))
  8361. (sha256
  8362. (base32
  8363. "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
  8364. (build-system ruby-build-system)
  8365. (arguments
  8366. `(#:phases
  8367. (modify-phases %standard-phases
  8368. (add-after 'unpack 'fix-pygmentize-path
  8369. (lambda _
  8370. (substitute* "lib/pygmentize.rb"
  8371. (("\"/usr/bin/env python.*")
  8372. (string-append "\"" (which "pygmentize") "\"\n")))
  8373. #t))
  8374. (add-after 'build 'do-not-use-vendor-directory
  8375. (lambda _
  8376. ;; Remove bundled pygments sources
  8377. ;; FIXME: ruby-build-system does not support snippets.
  8378. (delete-file-recursively "vendor")
  8379. (substitute* "pygmentize.gemspec"
  8380. (("\"vendor/\\*\\*/\\*\",") ""))
  8381. #t)))))
  8382. (inputs
  8383. `(("pygments" ,python-pygments)))
  8384. (native-inputs
  8385. `(("ruby-cutest" ,ruby-cutest)
  8386. ("ruby-nokogiri" ,ruby-nokogiri)))
  8387. (synopsis "Thin Ruby wrapper around pygmentize")
  8388. (description
  8389. "Pygmentize provides a simple way to call pygmentize from within a Ruby
  8390. application.")
  8391. (home-page "https://github.com/djanowski/pygmentize")
  8392. (license license:expat)))
  8393. (define-public ruby-eventmachine
  8394. (package
  8395. (name "ruby-eventmachine")
  8396. (version "1.2.7")
  8397. (source
  8398. (origin
  8399. (method url-fetch)
  8400. (uri (rubygems-uri "eventmachine" version))
  8401. (sha256
  8402. (base32
  8403. "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
  8404. (build-system ruby-build-system)
  8405. (arguments
  8406. '(#:tests? #f)) ; test suite tries to connect to google.com
  8407. (native-inputs
  8408. `(("ruby-rake-compiler" ,ruby-rake-compiler)))
  8409. (synopsis "Single-threaded network event framework for Ruby")
  8410. (description
  8411. "EventMachine implements a single-threaded engine for arbitrary network
  8412. communications. EventMachine wraps all interactions with sockets, allowing
  8413. programs to concentrate on the implementation of network protocols. It can be
  8414. used to create both network servers and clients.")
  8415. ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
  8416. (home-page "https://github.com/eventmachine/eventmachine")
  8417. (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
  8418. (define-public ruby-ruby-engine
  8419. (package
  8420. (name "ruby-ruby-engine")
  8421. (version "2.0.0")
  8422. (source
  8423. (origin
  8424. (method url-fetch)
  8425. (uri (rubygems-uri "ruby_engine" version))
  8426. (sha256
  8427. (base32
  8428. "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
  8429. (build-system ruby-build-system)
  8430. (arguments
  8431. `(#:phases
  8432. (modify-phases %standard-phases
  8433. (add-after 'extract-gemspec 'clean-up
  8434. (lambda _
  8435. (delete-file "Gemfile.lock")
  8436. (substitute* "ruby_engine.gemspec"
  8437. ;; Remove unnecessary imports that would entail further
  8438. ;; dependencies.
  8439. ((".*<rdoc.*") "")
  8440. ((".*<rubygems-tasks.*") "")
  8441. ;; Remove extraneous .gem file
  8442. (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
  8443. (("\"Gemfile.lock\".freeze, ") "")
  8444. ;; Soften rake dependency
  8445. (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
  8446. "%q<rake>.freeze, [\">= 10.0\"]")
  8447. ;; Soften the rspec dependency
  8448. (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
  8449. "%q<rspec>.freeze, [\">= 2.4\"]"))
  8450. (substitute* "Rakefile"
  8451. (("require 'rubygems/tasks'") "")
  8452. (("Gem::Tasks.new") ""))
  8453. ;; Remove extraneous .gem file that otherwise gets installed.
  8454. (delete-file-recursively "pkg")
  8455. #t)))))
  8456. (native-inputs
  8457. `(("bundler" ,bundler)
  8458. ("ruby-rake" ,ruby-rake)
  8459. ("ruby-rspec" ,ruby-rspec)))
  8460. (synopsis "Simplifies checking for Ruby implementation")
  8461. (description
  8462. "@code{ruby_engine} provides an RubyEngine class that can be used to
  8463. check which implementation of Ruby is in use. It can provide the interpreter
  8464. name and provides query methods such as @{RubyEngine.mri?}.")
  8465. (home-page "https://github.com/janlelis/ruby_engine")
  8466. (license license:expat)))
  8467. (define-public ruby-turn
  8468. (package
  8469. (name "ruby-turn")
  8470. (version "0.9.7")
  8471. (source
  8472. (origin
  8473. (method url-fetch)
  8474. (uri (rubygems-uri "turn" version))
  8475. (sha256
  8476. (base32
  8477. "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
  8478. (build-system ruby-build-system)
  8479. (arguments
  8480. `(#:phases
  8481. (modify-phases %standard-phases
  8482. ;; Tests fail because turn changes its environment so can no longer
  8483. ;; find test/unit. Instead simply test if the executable runs
  8484. ;; without issue.
  8485. (replace 'check
  8486. (lambda _
  8487. (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
  8488. (propagated-inputs
  8489. `(("ruby-ansi" ,ruby-ansi)
  8490. ("ruby-minitest" ,ruby-minitest-4)))
  8491. (synopsis "Alternate set of alternative runners for MiniTest")
  8492. (description
  8493. "TURN provides a set of alternative runners for MiniTest which are both
  8494. colorful and informative. TURN displays each test on a separate line with
  8495. failures being displayed immediately instead of at the end of the tests. Note
  8496. that TURN is no longer being maintained.")
  8497. (home-page "https://rubygems.org/gems/turn")
  8498. (license license:expat)))
  8499. (define-public ruby-mimemagic
  8500. (package
  8501. (name "ruby-mimemagic")
  8502. (version "0.3.3")
  8503. (source
  8504. (origin
  8505. (method url-fetch)
  8506. (uri (rubygems-uri "mimemagic" version))
  8507. (sha256
  8508. (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
  8509. (build-system ruby-build-system)
  8510. (arguments
  8511. '(#:phases
  8512. (modify-phases %standard-phases
  8513. ;; This phase breaks the tests, as it patches some of the test data.
  8514. (delete 'patch-source-shebangs))))
  8515. (native-inputs
  8516. `(("ruby-bacon" ,ruby-bacon)))
  8517. (synopsis "Ruby library for MIME detection by extension or content")
  8518. (description
  8519. "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
  8520. extension or content, using the freedesktop.org.xml shared-mime-info
  8521. database.")
  8522. (home-page "https://github.com/minad/mimemagic")
  8523. (license license:expat)))
  8524. (define-public ruby-mime-types-data
  8525. (package
  8526. (name "ruby-mime-types-data")
  8527. (version "3.2016.0521")
  8528. (source
  8529. (origin
  8530. (method url-fetch)
  8531. (uri (rubygems-uri "mime-types-data" version))
  8532. (sha256
  8533. (base32
  8534. "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
  8535. (build-system ruby-build-system)
  8536. (native-inputs
  8537. `(("ruby-hoe" ,ruby-hoe)))
  8538. (synopsis "Registry for information about MIME media type definitions")
  8539. (description
  8540. "@code{mime-types-data} provides a registry for information about
  8541. Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
  8542. be used with the Ruby mime-types library or other software to determine
  8543. defined filename extensions for MIME types, or to use filename extensions to
  8544. look up the likely MIME type definitions.")
  8545. (home-page "https://github.com/mime-types/mime-types-data/")
  8546. (license license:expat)))
  8547. (define-public ruby-mime-types
  8548. (package
  8549. (name "ruby-mime-types")
  8550. (version "3.1")
  8551. (source
  8552. (origin
  8553. (method url-fetch)
  8554. (uri (rubygems-uri "mime-types" version))
  8555. (sha256
  8556. (base32
  8557. "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
  8558. (build-system ruby-build-system)
  8559. (propagated-inputs
  8560. `(("ruby-mime-types-data" ,ruby-mime-types-data)))
  8561. (native-inputs
  8562. `(("ruby-hoe" ,ruby-hoe)
  8563. ("ruby-fivemat" ,ruby-fivemat)
  8564. ("ruby-minitest-focus" ,ruby-minitest-focus)
  8565. ("ruby-minitest-rg" ,ruby-minitest-rg)
  8566. ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
  8567. ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
  8568. (synopsis "Library and registry for MIME content type definitions")
  8569. (description "The mime-types library provides a library and registry for
  8570. information about Multipurpose Internet Mail Extensions (MIME) content type
  8571. definitions. It can be used to determine defined filename extensions for MIME
  8572. types, or to use filename extensions to look up the likely MIME type
  8573. definitions.")
  8574. (home-page "https://github.com/mime-types/ruby-mime-types")
  8575. (license license:expat)))
  8576. (define-public ruby-mini-mime
  8577. (package
  8578. (name "ruby-mini-mime")
  8579. (version "1.0.2")
  8580. (source
  8581. (origin
  8582. (method url-fetch)
  8583. (uri (rubygems-uri "mini_mime" version))
  8584. (sha256
  8585. (base32
  8586. "1axm0rxyx3ss93wbmfkm78a6x03l8y4qy60rhkkiq0aza0vwq3ha"))))
  8587. (build-system ruby-build-system)
  8588. (synopsis "Lightweight mime type lookup toy")
  8589. (description "This package provides a lightweight mime type lookup toy.")
  8590. (home-page "https://github.com/discourse/mini_mime")
  8591. (license license:expat)))
  8592. (define-public ruby-fivemat
  8593. (package
  8594. (name "ruby-fivemat")
  8595. (version "1.3.7")
  8596. (source
  8597. (origin
  8598. (method url-fetch)
  8599. (uri (rubygems-uri "fivemat" version))
  8600. (sha256
  8601. (base32
  8602. "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
  8603. (build-system ruby-build-system)
  8604. (arguments
  8605. `(#:tests? #f)) ; no tests
  8606. (synopsis "Each test file given its own line of dots")
  8607. (description
  8608. "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
  8609. its own line of dots during testing. It aims to provide test output that is
  8610. neither too verbose nor too minimal.")
  8611. (home-page "https://github.com/tpope/fivemat")
  8612. (license license:expat)))
  8613. (define-public ruby-sqlite3
  8614. (package
  8615. (name "ruby-sqlite3")
  8616. (version "1.4.2")
  8617. (source
  8618. (origin
  8619. (method url-fetch)
  8620. (uri (rubygems-uri "sqlite3" version))
  8621. (sha256
  8622. (base32
  8623. "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
  8624. (build-system ruby-build-system)
  8625. (arguments
  8626. `(#:phases
  8627. (modify-phases %standard-phases
  8628. (add-before 'check 'add-gemtest-file
  8629. ;; This file exists in the repository but is not distributed.
  8630. (lambda _ (invoke "touch" ".gemtest"))))))
  8631. (inputs
  8632. `(("sqlite" ,sqlite)))
  8633. (native-inputs
  8634. `(("ruby-hoe" ,ruby-hoe)
  8635. ("ruby-rake-compiler" ,ruby-rake-compiler)
  8636. ("ruby-mini-portile" ,ruby-mini-portile)))
  8637. (synopsis "Interface with SQLite3 databases")
  8638. (description
  8639. "This module allows Ruby programs to interface with the SQLite3 database
  8640. engine.")
  8641. (home-page
  8642. "https://github.com/sparklemotion/sqlite3-ruby")
  8643. (license license:bsd-3)))
  8644. (define-public ruby-shoulda-context
  8645. (package
  8646. (name "ruby-shoulda-context")
  8647. (version "1.2.2")
  8648. (source
  8649. (origin
  8650. (method url-fetch)
  8651. (uri (rubygems-uri "shoulda-context" version))
  8652. (sha256
  8653. (base32
  8654. "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
  8655. (build-system ruby-build-system)
  8656. (arguments
  8657. `(#:phases
  8658. (modify-phases %standard-phases
  8659. (replace 'check
  8660. (lambda _
  8661. ;; Do not run tests to avoid circular dependence with rails.
  8662. ;; Instead just import the library to test.
  8663. (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
  8664. (synopsis "Test::Unit context framework extracted from Shoulda")
  8665. (description
  8666. "@code{shoulda-context} is the context framework extracted from Shoulda.
  8667. Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
  8668. context, setup, and should blocks combine to produce natural test method
  8669. names.")
  8670. (home-page "https://github.com/thoughtbot/shoulda-context")
  8671. (license license:expat)))
  8672. (define-public ruby-shoulda-matchers
  8673. (package
  8674. (name "ruby-shoulda-matchers")
  8675. (version "3.1.2")
  8676. (source
  8677. (origin
  8678. (method url-fetch)
  8679. (uri (rubygems-uri "shoulda-matchers" version))
  8680. (sha256
  8681. (base32
  8682. "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
  8683. (build-system ruby-build-system)
  8684. (arguments
  8685. `(#:phases
  8686. (modify-phases %standard-phases
  8687. (replace 'check
  8688. (lambda _
  8689. ;; Do not run tests to avoid circular dependence with rails. Instead
  8690. ;; just import the library to test.
  8691. (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
  8692. (propagated-inputs
  8693. `(("ruby-activesupport" ,ruby-activesupport)))
  8694. (synopsis "Collection of testing matchers extracted from Shoulda")
  8695. (description
  8696. "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
  8697. test common Rails functionality. These tests would otherwise be much longer,
  8698. more complex, and error-prone.")
  8699. (home-page "https://github.com/thoughtbot/shoulda-matchers")
  8700. (license license:expat)))
  8701. (define-public ruby-shoulda-matchers-2
  8702. (package
  8703. (inherit ruby-shoulda-matchers)
  8704. (version "2.8.0")
  8705. (source (origin
  8706. (method url-fetch)
  8707. (uri (rubygems-uri "shoulda-matchers" version))
  8708. (sha256
  8709. (base32
  8710. "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
  8711. (define-public ruby-shoulda
  8712. (package
  8713. (name "ruby-shoulda")
  8714. (version "3.5.0")
  8715. (source
  8716. (origin
  8717. (method url-fetch)
  8718. (uri (rubygems-uri "shoulda" version))
  8719. (sha256
  8720. (base32
  8721. "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
  8722. (build-system ruby-build-system)
  8723. (arguments
  8724. `(#:phases
  8725. (modify-phases %standard-phases
  8726. (replace 'check
  8727. ;; Don't run tests to avoid circular dependence with rails. Instead
  8728. ;; just import the library to test.
  8729. (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
  8730. (propagated-inputs
  8731. `(("ruby-shoulda-context" ,ruby-shoulda-context)
  8732. ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
  8733. (synopsis "Context framework and matchers for testing")
  8734. (description
  8735. "@code{shoulda} is a meta-package combining @code{shoulda-context} and
  8736. @code{shoulda-matchers} providing tools for writing tests.")
  8737. (home-page "https://github.com/thoughtbot/shoulda")
  8738. (license license:expat)))
  8739. (define-public ruby-unf
  8740. (package
  8741. (name "ruby-unf")
  8742. (version "0.1.4")
  8743. (source
  8744. (origin
  8745. (method url-fetch)
  8746. (uri (rubygems-uri "unf" version))
  8747. (sha256
  8748. (base32
  8749. "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
  8750. (build-system ruby-build-system)
  8751. (arguments
  8752. `(#:phases
  8753. (modify-phases %standard-phases
  8754. (add-before 'check 'add-dependency-to-bundler
  8755. (lambda _
  8756. ;; test-unit is required but not provided by the bundler
  8757. ;; environment. This is fixed in the upstream repository but fix
  8758. ;; has not been released.
  8759. (substitute* "Gemfile"
  8760. (("^gemspec") "gem 'test-unit'\ngemspec"))
  8761. #t)))))
  8762. (propagated-inputs
  8763. `(("ruby-unf-ext" ,ruby-unf-ext)))
  8764. (native-inputs
  8765. `(("ruby-shoulda" ,ruby-shoulda)
  8766. ("bundler" ,bundler)
  8767. ("ruby-test-unit" ,ruby-test-unit)))
  8768. (synopsis "Unicode Normalization Form support to Ruby and JRuby")
  8769. (description
  8770. "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
  8771. support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
  8772. @code{java.text.Normalizer} on JRuby.")
  8773. (home-page "https://github.com/knu/ruby-unf")
  8774. (license license:bsd-2)))
  8775. (define-public ruby-warden
  8776. (package
  8777. (name "ruby-warden")
  8778. (version "1.2.8")
  8779. (source
  8780. (origin
  8781. (method url-fetch)
  8782. (uri (rubygems-uri "warden" version))
  8783. (sha256
  8784. (base32
  8785. "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
  8786. (build-system ruby-build-system)
  8787. (arguments
  8788. '(#:tests? #f)) ; No included tests
  8789. (propagated-inputs
  8790. `(("ruby-rack" ,ruby-rack)))
  8791. (synopsis "Rack middleware providing authentication")
  8792. (description
  8793. "Warden is a Rack-based middleware that provides a mechanism for
  8794. authentication in Ruby web applications.")
  8795. (home-page "https://github.com/wardencommunity/warden")
  8796. (license license:expat)))
  8797. (define-public ruby-warden-oauth2
  8798. (package
  8799. (name "ruby-warden-oauth2")
  8800. (version "0.0.1")
  8801. (source
  8802. (origin
  8803. (method url-fetch)
  8804. (uri (rubygems-uri "warden-oauth2" version))
  8805. (sha256
  8806. (base32
  8807. "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
  8808. (build-system ruby-build-system)
  8809. (arguments
  8810. '(#:test-target "spec"
  8811. #:phases
  8812. (modify-phases %standard-phases
  8813. (add-after 'unpack 'remove-unnecessary-dependencies
  8814. (lambda _
  8815. (substitute* "Gemfile"
  8816. ;; All of these gems relate to development, and are unnecessary
  8817. ;; when running the tests
  8818. (("gem 'guard-bundler'") "")
  8819. (("gem 'guard'") "")
  8820. (("gem 'guard-rspec'") "")
  8821. (("gem 'rb-fsevent'") "")
  8822. (("gem 'pry'") "")
  8823. (("gem 'growl'") ""))
  8824. #t))
  8825. ;; The test suite doesn't work with rspec@2, and this is incompatible
  8826. ;; with the current version of Rake, so invoke Rspec directly
  8827. (replace 'check
  8828. (lambda* (#:key tests? #:allow-other-keys)
  8829. (when tests?
  8830. (invoke "bundle" "exec" "rspec"))
  8831. #t)))))
  8832. (propagated-inputs
  8833. `(("ruby-warden" ,ruby-warden)))
  8834. (native-inputs
  8835. `(("bundler" ,bundler)
  8836. ("ruby-rspec" ,ruby-rspec-2)
  8837. ("ruby-rack-test" ,ruby-rack-test)))
  8838. (synopsis "OAuth 2.0 strategies for Warden")
  8839. (description
  8840. "This library extends Warden to support OAuth 2.0 authorized API
  8841. requests.")
  8842. (home-page "https://github.com/opperator/warden-oauth2")
  8843. (license license:expat)))
  8844. (define-public ruby-webmock
  8845. (package
  8846. (name "ruby-webmock")
  8847. (version "3.11.2")
  8848. (source
  8849. (origin
  8850. (method url-fetch)
  8851. (uri (rubygems-uri "webmock" version))
  8852. (sha256
  8853. (base32
  8854. "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
  8855. (build-system ruby-build-system)
  8856. (native-inputs
  8857. `(("bundler" ,bundler)
  8858. ("ruby-rspec" ,ruby-rspec)))
  8859. (propagated-inputs
  8860. `(("ruby-addressable" ,ruby-addressable)
  8861. ("ruby-crack" ,ruby-crack)
  8862. ("ruby-hashdiff" ,ruby-hashdiff)))
  8863. (synopsis "Allows stubbing and setting expectations on HTTP requests")
  8864. (description
  8865. "WebMock allows stubbing HTTP requests and setting expectations on HTTP
  8866. requests. This is useful when testing software.")
  8867. (home-page "https://github.com/bblimke/webmock")
  8868. (license license:expat)))
  8869. (define-public ruby-webmock-2
  8870. (package
  8871. (inherit ruby-webmock)
  8872. (name "ruby-webmock")
  8873. (version "2.3.2")
  8874. (source
  8875. (origin
  8876. (method url-fetch)
  8877. (uri (rubygems-uri "webmock" version))
  8878. (sha256
  8879. (base32
  8880. "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
  8881. (define-public ruby-unicode-display-width
  8882. (package
  8883. (name "ruby-unicode-display-width")
  8884. (version "1.6.0")
  8885. (source
  8886. (origin
  8887. (method url-fetch)
  8888. (uri (rubygems-uri "unicode-display_width" version))
  8889. (sha256
  8890. (base32
  8891. "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
  8892. (build-system ruby-build-system)
  8893. (arguments
  8894. '(;; Test data not included.
  8895. #:tests? #f))
  8896. (synopsis "Determine the monospace display width of Ruby strings")
  8897. (description
  8898. "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
  8899. display width of strings in Ruby.")
  8900. (home-page "https://github.com/janlelis/unicode-display_width")
  8901. (license license:expat)))
  8902. ;; There is another gem called 'ruby-version' so we use an underscore in this
  8903. ;; name
  8904. (define-public ruby_version
  8905. (package
  8906. (name "ruby_version")
  8907. (version "1.0.2")
  8908. (source
  8909. (origin
  8910. (method url-fetch)
  8911. (uri (rubygems-uri "ruby_version" version))
  8912. (sha256
  8913. (base32
  8914. "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
  8915. (build-system ruby-build-system)
  8916. (arguments
  8917. `(#:phases
  8918. (modify-phases %standard-phases
  8919. (add-before 'check 'fix-dependencies
  8920. (lambda _
  8921. ;; Remove the Gemfile.lock, as we want to use Guix packages at
  8922. ;; whatever versions.
  8923. (delete-file "Gemfile.lock")
  8924. ;; Remove the included gem files as they unnecessary.
  8925. (delete-file-recursively "pkg/")
  8926. ;; Accept any version of rake, rdoc and rspec
  8927. (substitute* "ruby_version.gemspec"
  8928. (("%q<rake.*") "%q<rake>)\n")
  8929. (("%q<rdoc.*") "%q<rdoc>)\n")
  8930. (("%q<rspec.*") "%q<rspec>)\n"))
  8931. ;; Do not use bundler.
  8932. (substitute* "Rakefile"
  8933. (("Bundler\\.setup.*") "nil\n"))
  8934. #t)))))
  8935. (native-inputs
  8936. `(("ruby-rdoc" ,ruby-rdoc)
  8937. ("ruby-rspec" ,ruby-rspec)
  8938. ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
  8939. (synopsis "Ruby library to help check the Ruby version")
  8940. (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
  8941. checking for the right Ruby version in software.")
  8942. (home-page "https://github.com/janlelis/ruby_version")
  8943. (license license:expat)))
  8944. (define-public ruby-websocket-driver
  8945. (package
  8946. (name "ruby-websocket-driver")
  8947. (version "0.7.1")
  8948. (source
  8949. (origin
  8950. (method url-fetch)
  8951. (uri (rubygems-uri "websocket-driver" version))
  8952. (sha256
  8953. (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
  8954. (build-system ruby-build-system)
  8955. (arguments
  8956. '(#:tests? #f)) ; no included tests
  8957. (propagated-inputs
  8958. `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
  8959. (synopsis "WebSocket protocol handler with pluggable I/O")
  8960. (description
  8961. "@code{websocket-driver} provides a complete implementation of the
  8962. WebSocket protocols that can be hooked up to any TCP library")
  8963. (home-page "https://github.com/faye/websocket-driver-ruby")
  8964. (license license:expat)))
  8965. (define-public ruby-websocket-extensions
  8966. (package
  8967. (name "ruby-websocket-extensions")
  8968. (version "0.1.3")
  8969. (source
  8970. (origin
  8971. (method url-fetch)
  8972. (uri (rubygems-uri "websocket-extensions" version))
  8973. (sha256
  8974. (base32
  8975. "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
  8976. (build-system ruby-build-system)
  8977. (arguments
  8978. '(;; No included tests
  8979. #:tests? #f))
  8980. (synopsis "Generic extension manager for WebSocket connections")
  8981. (description
  8982. "@code{websocket-extensions} provides a container for registering
  8983. extension plugins.")
  8984. (home-page "https://github.com/faye/websocket-extensions-ruby")
  8985. (license license:expat)))
  8986. (define-public ruby-domain-name
  8987. (package
  8988. (name "ruby-domain-name")
  8989. (version "0.5.20190701")
  8990. (source
  8991. (origin
  8992. (method url-fetch)
  8993. (uri (rubygems-uri "domain_name" version))
  8994. (sha256
  8995. (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
  8996. (build-system ruby-build-system)
  8997. (arguments
  8998. `(#:phases
  8999. (modify-phases %standard-phases
  9000. (add-before 'check 'fix-versions
  9001. (lambda _
  9002. ;; Fix NameError that appears to already be fixed upstream.
  9003. (substitute* "Rakefile"
  9004. (("DomainName::VERSION")
  9005. "Bundler::GemHelper.gemspec.version"))
  9006. ;; Loosen unnecessarily strict test-unit version specification.
  9007. (substitute* "domain_name.gemspec"
  9008. (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
  9009. #t)))))
  9010. (propagated-inputs
  9011. `(("ruby-unf" ,ruby-unf)))
  9012. (native-inputs
  9013. `(("ruby-shoulda" ,ruby-shoulda)
  9014. ("bundler" ,bundler)
  9015. ("ruby-test-unit" ,ruby-test-unit)))
  9016. (synopsis "Domain name manipulation library")
  9017. (description
  9018. "@code{domain_name} is a Domain name manipulation library. It parses a
  9019. domain name ready for extracting the registered domain and TLD (Top Level
  9020. Domain). It can also be used for cookie domain validation based on the Public
  9021. Suffix List.")
  9022. (home-page "https://github.com/knu/ruby-domain_name")
  9023. (license license:bsd-2)))
  9024. (define-public ruby-http-cookie
  9025. (package
  9026. (name "ruby-http-cookie")
  9027. (version "1.0.3")
  9028. (source
  9029. (origin
  9030. (method url-fetch)
  9031. (uri (rubygems-uri "http-cookie" version))
  9032. (sha256
  9033. (base32
  9034. "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
  9035. (build-system ruby-build-system)
  9036. (arguments
  9037. `(#:phases
  9038. (modify-phases %standard-phases
  9039. (add-before 'check 'add-dependency-to-bundler
  9040. (lambda _
  9041. ;; Fix NameError
  9042. (substitute* "Rakefile"
  9043. (("HTTP::Cookie::VERSION")
  9044. "Bundler::GemHelper.gemspec.version"))
  9045. #t)))))
  9046. (propagated-inputs
  9047. `(("ruby-domain-name" ,ruby-domain-name)))
  9048. (native-inputs
  9049. `(("rubysimplecov" ,ruby-simplecov)
  9050. ("bundler" ,bundler)
  9051. ("ruby-sqlite3" ,ruby-sqlite3)
  9052. ("ruby-test-unit" ,ruby-test-unit)))
  9053. (synopsis "Handle HTTP Cookies based on RFC 6265")
  9054. (description
  9055. "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
  9056. RFC 6265. It has been designed with security, standards compliance and
  9057. compatibility in mind, to behave just the same as today's major web browsers.
  9058. It has built-in support for the legacy @code{cookies.txt} and
  9059. @code{cookies.sqlite} formats of Mozilla Firefox.")
  9060. (home-page "https://github.com/sparklemotion/http-cookie")
  9061. (license license:expat)))
  9062. (define-public ruby-httpclient
  9063. (package
  9064. (name "ruby-httpclient")
  9065. (version "2.8.3")
  9066. (source
  9067. (origin
  9068. (method url-fetch)
  9069. (uri (rubygems-uri "httpclient" version))
  9070. (sha256
  9071. (base32
  9072. "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
  9073. (build-system ruby-build-system)
  9074. (arguments
  9075. '(;; TODO: Some tests currently fail
  9076. ;; ------
  9077. ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
  9078. ;; 2 omissions, 0 notifications
  9079. ;; 91.866% passed
  9080. ;; ------
  9081. ;; 6.49 tests/s, 22.41 assertions/s
  9082. #:tests? #f
  9083. #:phases
  9084. (modify-phases %standard-phases
  9085. (replace 'check
  9086. (lambda* (#:key tests? #:allow-other-keys)
  9087. (if tests?
  9088. (invoke "ruby"
  9089. "-Ilib"
  9090. "test/runner.rb")
  9091. #t))))))
  9092. (native-inputs
  9093. `(("ruby-rack" ,ruby-rack)))
  9094. (synopsis
  9095. "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
  9096. (description
  9097. "The @code{httpclient} ruby library provides functionality related to
  9098. HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
  9099. Cookie, multithreading and authentication (digest, NTLM) support.
  9100. Also provided is a @command{httpclient} command, which can perform HTTP
  9101. requests either using arguments or with an interactive prompt.")
  9102. (home-page "https://github.com/nahi/httpclient")
  9103. (license license:ruby)))
  9104. (define-public ruby-ansi
  9105. (package
  9106. (name "ruby-ansi")
  9107. (version "1.5.0")
  9108. (source
  9109. (origin
  9110. (method git-fetch)
  9111. ;; Fetch from GitHub as the gem does not contain testing code.
  9112. (uri (git-reference
  9113. (url "https://github.com/rubyworks/ansi")
  9114. (commit version)))
  9115. (file-name (git-file-name name version))
  9116. (sha256
  9117. (base32
  9118. "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
  9119. (build-system ruby-build-system)
  9120. (arguments
  9121. `(#:phases
  9122. (modify-phases %standard-phases
  9123. ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
  9124. ;; cycle ansi, qed, ansi. Instead simply test that the library can
  9125. ;; be require'd.
  9126. (replace 'check
  9127. (lambda _
  9128. (invoke "ruby" "-Ilib" "-r" "ansi")))
  9129. (add-before 'validate-runpath 'replace-broken-symlink
  9130. (lambda* (#:key outputs #:allow-other-keys)
  9131. (let* ((out (assoc-ref outputs "out"))
  9132. (file (string-append
  9133. out "/lib/ruby/vendor_ruby/gems/ansi-"
  9134. ,version "/lib/ansi.yml")))
  9135. ;; XXX: This symlink is broken since ruby 2.4.
  9136. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  9137. (delete-file file)
  9138. (symlink "../.index" file)
  9139. #t))))))
  9140. (synopsis "ANSI escape code related libraries")
  9141. (description
  9142. "This package is a collection of ANSI escape code related libraries
  9143. enabling ANSI colorization and stylization of console output. Included in the
  9144. library are the @code{Code} module, which defines ANSI codes as constants and
  9145. methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
  9146. @code{ProgressBar}, and a @code{String} subclass. The library also includes a
  9147. @code{Terminal} module which provides information about the current output
  9148. device.")
  9149. (home-page "https://rubyworks.github.io/ansi/")
  9150. (license license:bsd-2)))
  9151. (define-public ruby-systemu
  9152. (package
  9153. (name "ruby-systemu")
  9154. (version "2.6.5")
  9155. (source
  9156. (origin
  9157. (method url-fetch)
  9158. (uri (rubygems-uri "systemu" version))
  9159. (sha256
  9160. (base32
  9161. "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
  9162. (build-system ruby-build-system)
  9163. (arguments
  9164. `(#:phases
  9165. (modify-phases %standard-phases
  9166. (add-before 'check 'set-version
  9167. (lambda _
  9168. (setenv "VERSION" ,version)
  9169. #t)))))
  9170. (synopsis "Capture of stdout/stderr and handling of child processes")
  9171. (description
  9172. "Systemu can be used on any platform to return status, stdout, and stderr
  9173. of any command. Unlike other methods like @code{open3} and @code{popen4}
  9174. there is no danger of full pipes or threading issues hanging your process or
  9175. subprocess.")
  9176. (home-page "https://github.com/ahoward/systemu")
  9177. (license license:ruby)))
  9178. (define-public ruby-bio-commandeer
  9179. (package
  9180. (name "ruby-bio-commandeer")
  9181. (version "0.4.0")
  9182. (source
  9183. (origin
  9184. (method url-fetch)
  9185. (uri (rubygems-uri "bio-commandeer" version))
  9186. (sha256
  9187. (base32
  9188. "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
  9189. (build-system ruby-build-system)
  9190. (arguments
  9191. `(#:phases
  9192. (modify-phases %standard-phases
  9193. (replace 'check
  9194. ;; Run test without calling 'rake' so that jeweler is
  9195. ;; not required as an input.
  9196. (lambda _
  9197. (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
  9198. (propagated-inputs
  9199. `(("ruby-bio-logger" ,ruby-bio-logger)
  9200. ("ruby-systemu" ,ruby-systemu)))
  9201. (native-inputs
  9202. `(("bundler" ,bundler)
  9203. ("ruby-rspec" ,ruby-rspec)))
  9204. (synopsis "Simplified running of shell commands from within Ruby")
  9205. (description
  9206. "Bio-commandeer provides an opinionated method of running shell commands
  9207. from within Ruby. The advantage of bio-commandeer over other methods of
  9208. running external commands is that when something goes wrong, messages printed
  9209. to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
  9210. detail to ease debugging.")
  9211. (home-page "https://github.com/wwood/bioruby-commandeer")
  9212. (license license:expat)))
  9213. (define-public ruby-rubytest
  9214. (package
  9215. (name "ruby-rubytest")
  9216. (version "0.8.1")
  9217. (source
  9218. (origin
  9219. (method url-fetch)
  9220. (uri (rubygems-uri "rubytest" version))
  9221. (sha256
  9222. (base32
  9223. "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
  9224. (build-system ruby-build-system)
  9225. (arguments
  9226. ;; Disable regular testing to break the cycle rubytest, qed, brass,
  9227. ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
  9228. ;; simply test that the library can be require'd.
  9229. `(#:phases
  9230. (modify-phases %standard-phases
  9231. (replace 'check
  9232. (lambda _
  9233. (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
  9234. (propagated-inputs
  9235. `(("ruby-ansi" ,ruby-ansi)))
  9236. (synopsis "Universal test harness for Ruby")
  9237. (description
  9238. "Rubytest is a testing meta-framework for Ruby. It can handle any
  9239. compliant test framework and can run tests from multiple frameworks in a
  9240. single pass.")
  9241. (home-page "https://rubyworks.github.io/rubytest")
  9242. (license license:bsd-2)))
  9243. (define-public ruby-brass
  9244. (package
  9245. (name "ruby-brass")
  9246. (version "1.2.1")
  9247. (source
  9248. (origin
  9249. (method url-fetch)
  9250. (uri (rubygems-uri "brass" version))
  9251. (sha256
  9252. (base32
  9253. "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
  9254. (build-system ruby-build-system)
  9255. (arguments
  9256. ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
  9257. ;; Instead simply test that the library can be require'd.
  9258. `(#:phases
  9259. (modify-phases %standard-phases
  9260. (replace 'check
  9261. (lambda _
  9262. (invoke "ruby" "-Ilib" "-r" "brass"))))))
  9263. (synopsis "Basic foundational assertions framework")
  9264. (description
  9265. "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
  9266. foundational assertions framework for other assertion and test frameworks to
  9267. make use of.")
  9268. (home-page "https://rubyworks.github.io/brass")
  9269. (license license:bsd-2)))
  9270. (define-public ruby-qed
  9271. (package
  9272. (name "ruby-qed")
  9273. (version "2.9.2")
  9274. (source
  9275. (origin
  9276. (method url-fetch)
  9277. (uri (rubygems-uri "qed" version))
  9278. (sha256
  9279. (base32
  9280. "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
  9281. (build-system ruby-build-system)
  9282. (arguments
  9283. ;; Disable testing to break the cycle qed, ansi, qed, among others.
  9284. ;; Instead simply test that the executable runs using --copyright.
  9285. `(#:phases
  9286. (modify-phases %standard-phases
  9287. (replace 'check
  9288. (lambda _
  9289. (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
  9290. (propagated-inputs
  9291. `(("ruby-ansi" ,ruby-ansi)
  9292. ("ruby-brass" ,ruby-brass)))
  9293. (synopsis "Test framework utilizing literate programming techniques")
  9294. (description
  9295. "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
  9296. @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
  9297. Development} (BDD) utilizing Literate Programming techniques. QED sits
  9298. somewhere between lower-level testing tools like @code{Test::Unit} and
  9299. requirement specifications systems like Cucumber.")
  9300. (home-page "https://rubyworks.github.io/qed")
  9301. (license license:bsd-2)))
  9302. (define-public ruby-que
  9303. (package
  9304. (name "ruby-que")
  9305. (version "1.0.0.beta3")
  9306. (source
  9307. (origin
  9308. (method url-fetch)
  9309. (uri (rubygems-uri "que" version))
  9310. (sha256
  9311. (base32
  9312. "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
  9313. (build-system ruby-build-system)
  9314. (arguments
  9315. '(#:tests? #f)) ; No included tests
  9316. (synopsis "Job queue using PostgreSQL written in Ruby")
  9317. (description
  9318. "This package provides a job queue that uses PostgreSQL for storing jobs
  9319. and locking between worker processes.")
  9320. (home-page "https://github.com/chanks/que")
  9321. (license license:expat)))
  9322. (define-public ruby-ae
  9323. (package
  9324. (name "ruby-ae")
  9325. (version "1.8.2")
  9326. (source
  9327. (origin
  9328. (method git-fetch)
  9329. ;; Fetch from github so tests are included.
  9330. (uri (git-reference
  9331. (url "https://github.com/rubyworks/ae")
  9332. (commit version)))
  9333. (file-name (git-file-name name version))
  9334. (sha256
  9335. (base32
  9336. "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
  9337. (build-system ruby-build-system)
  9338. (arguments
  9339. `(#:phases
  9340. (modify-phases %standard-phases
  9341. (replace 'check
  9342. (lambda _ (invoke "qed")))
  9343. (add-before 'validate-runpath 'replace-broken-symlink
  9344. (lambda* (#:key outputs #:allow-other-keys)
  9345. (let* ((out (assoc-ref outputs "out"))
  9346. (file (string-append
  9347. out "/lib/ruby/vendor_ruby/gems/ae-"
  9348. ,version "/lib/ae.yml")))
  9349. ;; XXX: This symlink is broken since ruby 2.4.
  9350. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
  9351. (delete-file file)
  9352. (symlink "../.index" file)
  9353. #t))))))
  9354. (propagated-inputs
  9355. `(("ruby-ansi" ,ruby-ansi)))
  9356. (native-inputs
  9357. `(("ruby-qed" ,ruby-qed)))
  9358. (synopsis "Assertions library")
  9359. (description
  9360. "Assertive Expressive (AE) is an assertions library specifically designed
  9361. for reuse by other test frameworks.")
  9362. (home-page "https://rubyworks.github.io/ae/")
  9363. (license license:bsd-2)))
  9364. (define-public ruby-lemon
  9365. (package
  9366. (name "ruby-lemon")
  9367. (version "0.9.1")
  9368. (source
  9369. (origin
  9370. (method url-fetch)
  9371. (uri (rubygems-uri "lemon" version))
  9372. (sha256
  9373. (base32
  9374. "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
  9375. (build-system ruby-build-system)
  9376. (arguments
  9377. `(#:phases
  9378. (modify-phases %standard-phases
  9379. (replace 'check (lambda _ (invoke "qed"))))))
  9380. (propagated-inputs
  9381. `(("ruby-ae" ,ruby-ae)
  9382. ("ruby-ansi" ,ruby-ansi)
  9383. ("ruby-rubytest" ,ruby-rubytest)))
  9384. (native-inputs
  9385. `(("ruby-qed" ,ruby-qed)))
  9386. (synopsis "Test framework correlating code structure and test unit")
  9387. (description
  9388. "Lemon is a unit testing framework that enforces highly formal
  9389. case-to-class and unit-to-method test construction. This enforcement can help
  9390. focus concern on individual units of behavior.")
  9391. (home-page "https://rubyworks.github.io/lemon")
  9392. (license license:bsd-2)))
  9393. (define-public ruby-rubytest-cli
  9394. (package
  9395. (name "ruby-rubytest-cli")
  9396. (version "0.2.0")
  9397. (source
  9398. (origin
  9399. (method url-fetch)
  9400. (uri (rubygems-uri "rubytest-cli" version))
  9401. (sha256
  9402. (base32
  9403. "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
  9404. (build-system ruby-build-system)
  9405. (arguments
  9406. `(#:tests? #f)) ; no tests
  9407. (propagated-inputs
  9408. `(("ruby-ansi" ,ruby-ansi)
  9409. ("ruby-rubytest" ,ruby-rubytest)))
  9410. (synopsis "Command-line interface for rubytest")
  9411. (description
  9412. "Rubytest CLI is a command-line interface for running tests for
  9413. Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
  9414. (home-page "https://rubyworks.github.io/rubytest-cli")
  9415. (license license:bsd-2)))
  9416. (define-public ruby-hashery
  9417. (package
  9418. (name "ruby-hashery")
  9419. (version "2.1.2")
  9420. (source
  9421. (origin
  9422. (method url-fetch)
  9423. (uri (rubygems-uri "hashery" version))
  9424. (sha256
  9425. (base32
  9426. "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
  9427. (build-system ruby-build-system)
  9428. (arguments
  9429. `(#:phases
  9430. (modify-phases %standard-phases
  9431. (replace 'check
  9432. (lambda _
  9433. (invoke "qed")
  9434. (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
  9435. (native-inputs
  9436. `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
  9437. ("ruby-qed" ,ruby-qed)
  9438. ("ruby-lemon" ,ruby-lemon)))
  9439. (synopsis "Hash-like classes with extra features")
  9440. (description
  9441. "The Hashery is a tight collection of @code{Hash}-like classes.
  9442. Included are the auto-sorting @code{Dictionary} class, the efficient
  9443. @code{LRUHash}, the flexible @code{OpenHash} and the convenient
  9444. @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
  9445. defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
  9446. standard @code{Hash} making it possible to subclass and augment to fit any
  9447. specific use case.")
  9448. (home-page "https://rubyworks.github.io/hashery")
  9449. (license license:bsd-2)))
  9450. (define-public ruby-rc4
  9451. (package
  9452. (name "ruby-rc4")
  9453. (version "0.1.5")
  9454. (source
  9455. (origin
  9456. (method url-fetch)
  9457. (uri (rubygems-uri "ruby-rc4" version))
  9458. (sha256
  9459. (base32
  9460. "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
  9461. (build-system ruby-build-system)
  9462. (arguments
  9463. `(#:phases
  9464. (modify-phases %standard-phases
  9465. (replace 'check
  9466. (lambda _
  9467. (invoke "rspec" "spec/rc4_spec.rb"))))))
  9468. (native-inputs
  9469. `(("ruby-rspec" ,ruby-rspec-2)))
  9470. (synopsis "Implementation of the RC4 algorithm")
  9471. (description
  9472. "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
  9473. (home-page "https://github.com/caiges/Ruby-RC4")
  9474. (license license:expat)))
  9475. (define-public ruby-afm
  9476. (package
  9477. (name "ruby-afm")
  9478. (version "0.2.2")
  9479. (source
  9480. (origin
  9481. (method url-fetch)
  9482. (uri (rubygems-uri "afm" version))
  9483. (sha256
  9484. (base32
  9485. "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
  9486. (build-system ruby-build-system)
  9487. (native-inputs
  9488. `(("bundler" ,bundler)))
  9489. (synopsis "Read Adobe Font Metrics (afm) files")
  9490. (description
  9491. "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
  9492. files and use the data therein.")
  9493. (home-page "https://github.com/halfbyte/afm")
  9494. (license license:expat)))
  9495. (define-public ruby-ascii85
  9496. (package
  9497. (name "ruby-ascii85")
  9498. (version "1.0.3")
  9499. (source
  9500. (origin
  9501. (method url-fetch)
  9502. (uri (rubygems-uri "Ascii85" version))
  9503. (sha256
  9504. (base32
  9505. "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
  9506. (build-system ruby-build-system)
  9507. (native-inputs
  9508. `(("bundler" ,bundler)))
  9509. (synopsis "Encode and decode Ascii85 binary-to-text encoding")
  9510. (description
  9511. "This library provides methods to encode and decode Ascii85
  9512. binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
  9513. @dfn{Portable Document Format} (PDF) file formats.")
  9514. (home-page "https://github.com/datawraith/ascii85gem")
  9515. (license license:expat)))
  9516. (define-public ruby-ttfunk
  9517. (package
  9518. (name "ruby-ttfunk")
  9519. (version "1.6.2.1")
  9520. (source
  9521. (origin
  9522. (method git-fetch)
  9523. ;; fetch from github as the gem does not contain testing code
  9524. (uri (git-reference
  9525. (url "https://github.com/prawnpdf/ttfunk")
  9526. (commit version)))
  9527. (file-name (git-file-name name version))
  9528. (sha256
  9529. (base32
  9530. "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
  9531. (build-system ruby-build-system)
  9532. (arguments
  9533. `(#:test-target "spec"
  9534. #:phases
  9535. (modify-phases %standard-phases
  9536. (add-before 'build 'remove-ssh
  9537. (lambda _
  9538. ;; remove dependency on an ssh key pair that doesn't exist
  9539. (substitute* "ttfunk.gemspec"
  9540. (("spec.signing_key.*") ""))
  9541. #t))
  9542. (add-before 'check 'remove-rubocop
  9543. (lambda _
  9544. ;; remove rubocop as a dependency as not needed for testing
  9545. (substitute* "ttfunk.gemspec"
  9546. (("spec.add_development_dependency\\('rubocop'.*") ""))
  9547. (substitute* "Rakefile"
  9548. (("require 'rubocop/rake_task'") "")
  9549. (("RuboCop::RakeTask.new") ""))
  9550. #t)))))
  9551. (native-inputs
  9552. `(("ruby-rspec" ,ruby-rspec)
  9553. ("ruby-yard" ,ruby-yard)
  9554. ("bundler" ,bundler)))
  9555. (synopsis "Font metrics parser for the Prawn PDF generator")
  9556. (description
  9557. "TTFunk is a TrueType font parser written in pure Ruby. It is used as
  9558. part of the Prawn PDF generator.")
  9559. (home-page "https://github.com/prawnpdf/ttfunk")
  9560. ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
  9561. ;; for details."
  9562. (license %prawn-project-licenses)))
  9563. (define-public ruby-puma
  9564. (package
  9565. (name "ruby-puma")
  9566. (version "3.9.1")
  9567. (source
  9568. (origin
  9569. (method git-fetch)
  9570. ;; Fetch from GitHub because distributed gem does not contain tests.
  9571. (uri (git-reference
  9572. (url "https://github.com/puma/puma")
  9573. (commit (string-append "v" version))))
  9574. (file-name (git-file-name name version))
  9575. (sha256
  9576. (base32
  9577. "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
  9578. (build-system ruby-build-system)
  9579. (arguments
  9580. `(#:tests? #f ; Tests require an out-dated version of minitest.
  9581. #:phases
  9582. (modify-phases %standard-phases
  9583. (add-before 'build 'fix-gemspec
  9584. (lambda _
  9585. (substitute* "puma.gemspec"
  9586. (("git ls-files") "find * |sort"))
  9587. #t)))))
  9588. (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
  9589. (description
  9590. "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
  9591. for Ruby/Rack applications. Puma is intended for use in both development and
  9592. production environments. In order to get the best throughput, it is highly
  9593. recommended that you use a Ruby implementation with real threads like Rubinius
  9594. or JRuby.")
  9595. (home-page "https://puma.io/")
  9596. (license license:expat)))
  9597. (define-public ruby-hoe-git
  9598. (package
  9599. (name "ruby-hoe-git")
  9600. (version "1.6.0")
  9601. (source
  9602. (origin
  9603. (method url-fetch)
  9604. (uri (rubygems-uri "hoe-git" version))
  9605. (sha256
  9606. (base32
  9607. "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
  9608. (build-system ruby-build-system)
  9609. (propagated-inputs
  9610. `(("ruby-hoe" ,ruby-hoe)))
  9611. (synopsis "Hoe plugins for tighter Git integration")
  9612. (description
  9613. "This package provides a set of Hoe plugins for tighter Git integration.
  9614. It provides tasks to automate release tagging and pushing and changelog
  9615. generation.")
  9616. (home-page "https://github.com/jbarnette/hoe-git")
  9617. (license license:expat)))
  9618. (define-public ruby-sequel
  9619. (package
  9620. (name "ruby-sequel")
  9621. (version "5.47.0")
  9622. (source
  9623. (origin
  9624. (method url-fetch)
  9625. (uri (rubygems-uri "sequel" version))
  9626. (sha256
  9627. (base32
  9628. "03pmhj4kc3ga75wy397l57bvd18jxxmrk3qsznjw93b993qgvj3z"))))
  9629. (build-system ruby-build-system)
  9630. (arguments
  9631. '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
  9632. (synopsis "Database toolkit for Ruby")
  9633. (description "Sequel provides thread safety, connection pooling and a
  9634. concise DSL for constructing SQL queries and table schemas. It includes a
  9635. comprehensive ORM layer for mapping records to Ruby objects and handling
  9636. associated records.")
  9637. (home-page "https://sequel.jeremyevans.net")
  9638. (license license:expat)))
  9639. (define-public ruby-timecop
  9640. (package
  9641. (name "ruby-timecop")
  9642. (version "0.9.1")
  9643. (source
  9644. (origin
  9645. (method url-fetch)
  9646. (uri (rubygems-uri "timecop" version))
  9647. (sha256
  9648. (base32
  9649. "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
  9650. (build-system ruby-build-system)
  9651. (arguments
  9652. `(#:phases
  9653. (modify-phases %standard-phases
  9654. (add-before 'check 'set-check-rubylib
  9655. (lambda _
  9656. ;; Set RUBYLIB so timecop tests finds its own lib.
  9657. (setenv "RUBYLIB" "lib")
  9658. #t)))))
  9659. (native-inputs
  9660. `(("bundler" ,bundler)
  9661. ("ruby-minitest-rg" ,ruby-minitest-rg)
  9662. ("ruby-mocha" ,ruby-mocha)
  9663. ("ruby-activesupport" ,ruby-activesupport)))
  9664. (synopsis "Test mocks for time-dependent functions")
  9665. (description
  9666. "Timecop provides \"time travel\" and \"time freezing\" capabilities,
  9667. making it easier to test time-dependent code. It provides a unified method to
  9668. mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
  9669. call.")
  9670. (home-page "https://github.com/travisjeffery/timecop")
  9671. (license license:expat)))
  9672. (define-public ruby-concurrent
  9673. (package
  9674. (name "ruby-concurrent")
  9675. (version "1.1.5")
  9676. (source
  9677. (origin
  9678. (method git-fetch)
  9679. ;; Download from GitHub because the rubygems version does not contain
  9680. ;; Rakefile.
  9681. (uri (git-reference
  9682. (url "https://github.com/ruby-concurrency/concurrent-ruby")
  9683. (commit (string-append "v" version))))
  9684. (file-name (git-file-name name version))
  9685. (sha256
  9686. (base32
  9687. "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
  9688. (build-system ruby-build-system)
  9689. (arguments
  9690. `(#:test-target "ci"
  9691. #:phases
  9692. (modify-phases %standard-phases
  9693. (add-before 'replace-git-ls-files 'remove-extra-gemspecs
  9694. (lambda _
  9695. ;; Delete extra gemspec files so 'first-gemspec' chooses the
  9696. ;; correct one.
  9697. (delete-file "concurrent-ruby-edge.gemspec")
  9698. (delete-file "concurrent-ruby-ext.gemspec")
  9699. #t))
  9700. (replace 'replace-git-ls-files
  9701. (lambda _
  9702. ;; XXX: The default substitution made by this phase is not fully
  9703. ;; compatible with "git ls-files". The latter produces file names
  9704. ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
  9705. ;; which gives "./lib/foo". That difference in turn breaks the
  9706. ;; comparison against a glob pattern in this script.
  9707. (substitute* "concurrent-ruby.gemspec"
  9708. (("git ls-files") "find * -type f | sort"))
  9709. #t))
  9710. (add-before 'build 'remove-jar-from-gemspec
  9711. (lambda _
  9712. ;; The gemspec wants to include a JAR file that we do not build
  9713. ;; nor need.
  9714. (substitute* "concurrent-ruby.gemspec"
  9715. (("'lib/concurrent/concurrent_ruby.jar'")
  9716. ""))
  9717. #t))
  9718. (add-before 'build 'remove-rake_compiler_dock-dependency
  9719. (lambda _
  9720. ;; This library is only used when building for non-MRI targets.
  9721. (substitute* "Rakefile"
  9722. (("require 'rake_compiler_dock'")
  9723. ""))
  9724. #t))
  9725. (add-before 'check 'remove-timecop-dependency
  9726. ;; Remove timecop-dependent tests as having timecop as a depedency
  9727. ;; causes circular depedencies.
  9728. (lambda _
  9729. (delete-file "spec/concurrent/executor/timer_set_spec.rb")
  9730. (delete-file "spec/concurrent/scheduled_task_spec.rb")
  9731. #t)))))
  9732. (native-inputs
  9733. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  9734. ("ruby-rspec" ,ruby-rspec)))
  9735. (synopsis "Concurrency tools for Ruby")
  9736. (description
  9737. "This library provides modern concurrency tools including agents,
  9738. futures, promises, thread pools, actors, supervisors, and more. It is
  9739. inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
  9740. patterns.")
  9741. (home-page "http://www.concurrent-ruby.com")
  9742. (license license:expat)))
  9743. (define-public ruby-pkg-config
  9744. (package
  9745. (name "ruby-pkg-config")
  9746. (version "1.2.5")
  9747. (source
  9748. (origin
  9749. (method url-fetch)
  9750. (uri (rubygems-uri "pkg-config" version))
  9751. (sha256
  9752. (base32
  9753. "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
  9754. (build-system ruby-build-system)
  9755. (arguments
  9756. ;; Tests require extra files not included in the gem.
  9757. `(#:tests? #f))
  9758. (synopsis "Detect libraries for compiling Ruby native extensions")
  9759. (description
  9760. "@code{pkg-config} can be used in your extconf.rb to properly detect need
  9761. libraries for compiling Ruby native extensions.")
  9762. (home-page "https://github.com/ruby-gnome2/pkg-config")
  9763. (license license:lgpl2.0+)))
  9764. (define-public ruby-net-http-digest-auth
  9765. (package
  9766. (name "ruby-net-http-digest-auth")
  9767. (version "1.4.1")
  9768. (source
  9769. (origin
  9770. (method url-fetch)
  9771. (uri (rubygems-uri "net-http-digest_auth" version))
  9772. (sha256
  9773. (base32
  9774. "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
  9775. (build-system ruby-build-system)
  9776. (native-inputs
  9777. `(("ruby-hoe" ,ruby-hoe)))
  9778. (synopsis "RFC 2617 HTTP digest authentication library")
  9779. (description
  9780. "This library implements HTTP's digest authentication scheme based on
  9781. RFC 2617. This enables the use of the digest authentication scheme instead
  9782. of the more insecure basic authentication scheme.")
  9783. (home-page "https://github.com/drbrain/net-http-digest_auth")
  9784. (license license:expat)))
  9785. (define-public ruby-mail
  9786. (package
  9787. (name "ruby-mail")
  9788. (version "2.7.1")
  9789. (source
  9790. (origin
  9791. (method url-fetch)
  9792. (uri (rubygems-uri "mail" version))
  9793. (sha256
  9794. (base32
  9795. "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"))))
  9796. (build-system ruby-build-system)
  9797. (propagated-inputs
  9798. `(("ruby-mini-mime" ,ruby-mini-mime)))
  9799. (arguments
  9800. '(#:tests? #f)) ; no rakefile
  9801. (synopsis "Mail library for Ruby")
  9802. (description
  9803. "Mail is an internet library for Ruby that is designed to handle email
  9804. generation, parsing and sending. The purpose of this library is to provide
  9805. a single point of access to handle all email functions, including sending
  9806. and receiving emails. All network type actions are done through proxy
  9807. methods to @code{Net::SMTP}, @code{Net::POP3} etc.
  9808. Mail has been designed with a very simple object oriented system that
  9809. really opens up the email messages you are parsing, if you know what you
  9810. are doing, you can fiddle with every last bit of your email directly.")
  9811. (home-page "https://github.com/mikel/mail")
  9812. (license license:expat)))
  9813. (define-public ruby-email-reply-trimmer
  9814. (package
  9815. (name "ruby-email-reply-trimmer")
  9816. (version "0.1.13")
  9817. (source
  9818. (origin
  9819. (method url-fetch)
  9820. (uri (rubygems-uri "email_reply_trimmer" version))
  9821. (sha256
  9822. (base32
  9823. "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
  9824. (build-system ruby-build-system)
  9825. (synopsis "Trim replies from plain text email")
  9826. (description "EmailReplyTrimmer is a Ruby small library to trim replies
  9827. from plain text email.")
  9828. (home-page "https://github.com/discourse/email_reply_trimmer")
  9829. (license license:expat)))
  9830. (define-public ruby-mathn
  9831. (package
  9832. (name "ruby-mathn")
  9833. (version "0.1.0")
  9834. (source
  9835. (origin
  9836. (method url-fetch)
  9837. (uri (rubygems-uri "mathn" version))
  9838. (sha256
  9839. (base32
  9840. "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
  9841. (build-system ruby-build-system)
  9842. (native-inputs
  9843. `(("bundler" ,bundler)
  9844. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  9845. (synopsis "Extends math operations for increased precision")
  9846. (description
  9847. "This gem makes mathematical operations more precise in Ruby and
  9848. integrates other mathematical standard libraries. Prior to Ruby 2.5,
  9849. @code{mathn} was part of the Ruby standard library.")
  9850. (home-page "https://github.com/ruby/mathn")
  9851. (license license:bsd-2)))
  9852. (define-public ruby-code-statistics
  9853. (package
  9854. (name "ruby-code-statistics")
  9855. (version "0.2.13")
  9856. (source
  9857. (origin
  9858. (method url-fetch)
  9859. (uri (rubygems-uri "code_statistics" version))
  9860. (sha256
  9861. (base32
  9862. "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
  9863. (build-system ruby-build-system)
  9864. (arguments
  9865. `(#:tests? #f)) ; Not all test code is included in gem.
  9866. (synopsis "Port of the rails 'rake stats' method")
  9867. (description
  9868. "This gem is a port of the rails 'rake stats' method so it can be made
  9869. more robust and work for non rails projects.")
  9870. (home-page "https://github.com/danmayer/code_statistics")
  9871. (license license:expat)))
  9872. (define-public ruby-rubypants
  9873. (package
  9874. (name "ruby-rubypants")
  9875. (version "0.6.0")
  9876. (source (origin
  9877. (method url-fetch)
  9878. (uri (rubygems-uri "rubypants" version))
  9879. (sha256
  9880. (base32
  9881. "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
  9882. (build-system ruby-build-system)
  9883. (arguments
  9884. '(#:tests? #f)) ; need Codecov
  9885. (synopsis "Port of the smart-quotes library SmartyPants")
  9886. (description
  9887. "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
  9888. original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
  9889. and BBEdit that easily translates plain ASCII punctuation characters into
  9890. smart typographic punctuation HTML entities.")
  9891. (home-page "https://github.com/jmcnevin/rubypants")
  9892. (license license:bsd-2)))
  9893. (define-public ruby-org-ruby
  9894. (package
  9895. (name "ruby-org-ruby")
  9896. (version "0.9.12")
  9897. (source (origin
  9898. (method url-fetch)
  9899. (uri (rubygems-uri "org-ruby" version))
  9900. (sha256
  9901. (base32
  9902. "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
  9903. (build-system ruby-build-system)
  9904. (arguments
  9905. '(#:tests? #f)) ; no rakefile
  9906. (propagated-inputs
  9907. `(("ruby-rubypants" ,ruby-rubypants)))
  9908. (synopsis "Org-mode parser written in Ruby")
  9909. (description
  9910. "Org-ruby is an org-mode parser written in Ruby. The most significant
  9911. thing this library does today is convert org-mode files to HTML or Textile or
  9912. Markdown.")
  9913. (home-page "https://github.com/wallyqs/org-ruby")
  9914. (license license:expat)))
  9915. (define-public ruby-rake
  9916. (package
  9917. (name "ruby-rake")
  9918. (version "13.0.1")
  9919. (source
  9920. (origin
  9921. (method url-fetch)
  9922. (uri (rubygems-uri "rake" version))
  9923. (sha256
  9924. (base32
  9925. "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
  9926. (build-system ruby-build-system)
  9927. (native-inputs
  9928. `(("bundler" ,bundler)))
  9929. (synopsis "Rake is a Make-like program implemented in Ruby")
  9930. (description
  9931. "Rake is a Make-like program where tasks and dependencies are specified
  9932. in standard Ruby syntax.")
  9933. (home-page "https://github.com/ruby/rake")
  9934. (license license:expat)))
  9935. (define-public ruby-childprocess
  9936. (package
  9937. (name "ruby-childprocess")
  9938. (version "3.0.0")
  9939. (source
  9940. (origin
  9941. (method url-fetch)
  9942. (uri (rubygems-uri "childprocess" version))
  9943. (sha256
  9944. (base32
  9945. "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
  9946. (build-system ruby-build-system)
  9947. (arguments
  9948. `(#:tests? #f))
  9949. (native-inputs
  9950. `(("bundler" ,bundler)
  9951. ("ruby-rspec" ,ruby-rspec)))
  9952. (propagated-inputs
  9953. `(("ruby-ffi" ,ruby-ffi)))
  9954. (synopsis "Control external programs running in the background, in Ruby")
  9955. (description "@code{childprocess} provides a gem to control external
  9956. programs running in the background, in Ruby.")
  9957. (home-page "https://github.com/enkessler/childprocess")
  9958. (license license:expat)))
  9959. (define-public ruby-public-suffix
  9960. (package
  9961. (name "ruby-public-suffix")
  9962. (version "4.0.5")
  9963. (source (origin
  9964. (method url-fetch)
  9965. (uri (rubygems-uri "public_suffix" version))
  9966. (sha256
  9967. (base32
  9968. "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
  9969. (build-system ruby-build-system)
  9970. (arguments
  9971. '(#:phases
  9972. (modify-phases %standard-phases
  9973. ;; Remove the requirement on Rubocop, as it isn't useful to run, and
  9974. ;; including it as an input can lead to circular dependencies.
  9975. (add-after 'unpack 'remove-rubocop-from-Rakefile
  9976. (lambda _
  9977. (substitute* "Rakefile"
  9978. (("require \"rubocop/rake\\_task\"") "")
  9979. (("RuboCop::RakeTask\\.new") ""))
  9980. #t)))))
  9981. (native-inputs
  9982. `(("bundler" ,bundler)
  9983. ("ruby-yard" ,ruby-yard)
  9984. ("ruby-mocha" ,ruby-mocha)
  9985. ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
  9986. (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
  9987. (synopsis "Domain name parser")
  9988. (description "The gem @code{public_suffix} is a domain name parser,
  9989. written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
  9990. is one under which Internet users can (or historically could) directly
  9991. register names. Some examples of public suffixes are @code{.com},
  9992. @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
  9993. all known public suffixes.")
  9994. (license license:expat)))
  9995. (define-public ruby-addressable
  9996. (package
  9997. (name "ruby-addressable")
  9998. (version "2.7.0")
  9999. (source (origin
  10000. (method url-fetch)
  10001. (uri (rubygems-uri "addressable" version))
  10002. (sha256
  10003. (base32
  10004. "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
  10005. (build-system ruby-build-system)
  10006. (arguments
  10007. '(#:test-target "spec"
  10008. #:phases
  10009. (modify-phases %standard-phases
  10010. (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
  10011. (lambda _
  10012. (substitute* "Gemfile"
  10013. (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
  10014. ((".*launchy.*") "")
  10015. ((".*rake.*") "gem 'rake'\n")
  10016. ((".*redcarpet.*") ""))
  10017. #t))
  10018. (add-before 'check 'delete-network-dependent-test
  10019. (lambda _
  10020. (delete-file "spec/addressable/net_http_compat_spec.rb")
  10021. #t)))))
  10022. (native-inputs
  10023. `(("ruby-rspec" ,ruby-rspec)
  10024. ("bundler" ,bundler)
  10025. ("ruby-idn-ruby" ,ruby-idn-ruby)
  10026. ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
  10027. ("ruby-rspec-its" ,ruby-rspec-its-minimal)
  10028. ("ruby-yard" ,ruby-yard)
  10029. ("ruby-simplecov" ,ruby-simplecov)))
  10030. (propagated-inputs
  10031. `(("ruby-public-suffix" ,ruby-public-suffix)))
  10032. (home-page "https://github.com/sporkmonger/addressable")
  10033. (synopsis "Alternative URI implementation")
  10034. (description "Addressable is a replacement for the URI implementation that
  10035. is part of Ruby's standard library. It more closely conforms to RFC 3986,
  10036. RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
  10037. (license license:asl2.0)))
  10038. (define-public ruby-colorize
  10039. (package
  10040. (name "ruby-colorize")
  10041. (version "0.8.1")
  10042. (source (origin
  10043. (method url-fetch)
  10044. (uri (rubygems-uri "colorize" version))
  10045. (sha256
  10046. (base32
  10047. "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
  10048. (build-system ruby-build-system)
  10049. (arguments
  10050. '(#:phases (modify-phases %standard-phases
  10051. (add-before 'check 'remove-codeclimate-dependency
  10052. (lambda _
  10053. (substitute* "test/test_colorize.rb"
  10054. ;; Do not hook the tests into the online CodeClimate
  10055. ;; service which is unnecessary for these tests.
  10056. (("require 'codeclimate-test-reporter'")
  10057. "")
  10058. (("CodeClimate.*") ""))
  10059. #t)))))
  10060. (synopsis "Add color effects to the @code{String} class")
  10061. (description
  10062. "This package extends the @code{String} class and adds a
  10063. @code{ColorizedString} with methods to set text color, background color,
  10064. and text effects.")
  10065. (home-page "https://github.com/fazibear/colorize")
  10066. (license license:gpl2+)))
  10067. (define-public ruby-colorator
  10068. (package
  10069. (name "ruby-colorator")
  10070. (version "1.1.0")
  10071. (source (origin
  10072. (method url-fetch)
  10073. (uri (rubygems-uri "colorator" version))
  10074. (sha256
  10075. (base32
  10076. "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
  10077. (build-system ruby-build-system)
  10078. (arguments
  10079. ;; No test target
  10080. `(#:tests? #f))
  10081. (home-page "http://octopress.org/colorator/")
  10082. (synopsis "Terminal color library")
  10083. (description "Colorator is a Ruby gem that helps you colorize your text
  10084. for the terminal.")
  10085. (license license:expat)))
  10086. (define-public ruby-command-line-reporter
  10087. (package
  10088. (name "ruby-command-line-reporter")
  10089. (version "4.0.1")
  10090. (source (origin
  10091. (method url-fetch)
  10092. (uri (rubygems-uri "command_line_reporter" version))
  10093. (sha256
  10094. (base32
  10095. "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
  10096. (build-system ruby-build-system)
  10097. (arguments
  10098. ;; No Rakefile
  10099. `(#:tests? #f
  10100. #:phases
  10101. (modify-phases %standard-phases
  10102. (add-before 'build 'fix-dependencies
  10103. (lambda _
  10104. (substitute* ".gemspec"
  10105. ;; colored is unmaintained
  10106. (("colored") "colorator")
  10107. ;; colorator version
  10108. (("= 1.2") "= 1.1"))
  10109. #t)))))
  10110. (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
  10111. (home-page "https://github.com/wbailey/command_line_reporter")
  10112. (synopsis "Report production while executing Ruby scripts")
  10113. (description "This gem provides a DSL that makes it easy to write reports
  10114. of various types in ruby. It eliminates the need to litter your source with
  10115. puts statements, instead providing a more readable, expressive interface to
  10116. your application.")
  10117. (license license:asl2.0)))
  10118. (define-public ruby-command-line-reporter-3
  10119. (package
  10120. (inherit ruby-command-line-reporter)
  10121. (version "3.3.6")
  10122. (source (origin
  10123. (method url-fetch)
  10124. (uri (rubygems-uri "command_line_reporter" version))
  10125. (sha256
  10126. (base32
  10127. "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
  10128. (define-public ruby-kpeg
  10129. (package
  10130. (name "ruby-kpeg")
  10131. (version "1.1.0")
  10132. (source
  10133. (origin
  10134. (method url-fetch)
  10135. (uri (rubygems-uri "kpeg" version))
  10136. (sha256
  10137. (base32
  10138. "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
  10139. (build-system ruby-build-system)
  10140. (native-inputs
  10141. `(("ruby-hoe" ,ruby-hoe)))
  10142. (synopsis "PEG library for Ruby")
  10143. (description "KPeg is a simple PEG library for Ruby. It provides an API as
  10144. well as native grammar to build the grammar. KPeg supports direct left
  10145. recursion of rules via the
  10146. @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
  10147. technique.")
  10148. (home-page "https://github.com/evanphx/kpeg")
  10149. (license license:expat)))
  10150. (define-public ruby-rdoc
  10151. (package
  10152. (name "ruby-rdoc")
  10153. (version "6.2.0")
  10154. (source
  10155. (origin
  10156. (method git-fetch)
  10157. (uri (git-reference
  10158. (url "https://github.com/ruby/rdoc")
  10159. (commit (string-append "v" version))))
  10160. (file-name (git-file-name name version))
  10161. (sha256
  10162. (base32
  10163. "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
  10164. (build-system ruby-build-system)
  10165. (arguments
  10166. `(#:phases
  10167. (modify-phases %standard-phases
  10168. (add-after 'unpack 'patch-gemspec
  10169. ;; TODO: Remove after next release is tagged.
  10170. (lambda _
  10171. (substitute* "rdoc.gemspec"
  10172. (("\"lib/rdoc/generator/template/darkfish/js/\
  10173. jquery\\.js\", ") ""))
  10174. #t))
  10175. (add-before 'build 'generate
  10176. ;; 'gem build' doesn't honor Rakefile dependencies (see:
  10177. ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
  10178. (lambda _
  10179. (invoke "rake" "generate"))))))
  10180. (native-inputs
  10181. `(("bundler" ,bundler)
  10182. ("ruby-kpeg" ,ruby-kpeg)
  10183. ("ruby-racc" ,ruby-racc)
  10184. ("ruby-rubocop" ,ruby-rubocop)))
  10185. (home-page "https://ruby.github.io/rdoc/")
  10186. (synopsis "HTML and command-line documentation utility")
  10187. (description "RDoc produces HTML and command-line documentation for Ruby
  10188. projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
  10189. documentation from the command-line.")
  10190. (license license:gpl2+)))
  10191. (define-public ruby-sass-listen
  10192. (package
  10193. (name "ruby-sass-listen")
  10194. (version "4.0.0")
  10195. (source (origin
  10196. (method url-fetch)
  10197. (uri (rubygems-uri "sass-listen" version))
  10198. (sha256
  10199. (base32
  10200. "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
  10201. (build-system ruby-build-system)
  10202. (arguments
  10203. ;; No test target
  10204. `(#:tests? #f))
  10205. (propagated-inputs
  10206. `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
  10207. ("ruby-rb-inotify" ,ruby-rb-inotify)))
  10208. (home-page "https://github.com/sass/listen")
  10209. (synopsis "File modification notification library")
  10210. (description "The Listen gem listens to file modifications and notifies you
  10211. about the changes.")
  10212. (license license:expat)))
  10213. (define-public ruby-terminfo
  10214. (package
  10215. (name "ruby-terminfo")
  10216. (version "0.1.1")
  10217. (source
  10218. (origin
  10219. (method url-fetch)
  10220. (uri (rubygems-uri "ruby-terminfo" version))
  10221. (sha256
  10222. (base32
  10223. "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
  10224. (build-system ruby-build-system)
  10225. (arguments
  10226. `(#:test-target "test"
  10227. ;; Rakefile requires old packages and would need modification to
  10228. ;; work with current software.
  10229. #:tests? #f))
  10230. (inputs
  10231. `(("ncurses" ,ncurses)))
  10232. (native-inputs
  10233. `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
  10234. ("ruby-rdoc" ,ruby-rdoc)))
  10235. (home-page "http://www.a-k-r.org/ruby-terminfo/")
  10236. (synopsis "Terminfo binding for Ruby")
  10237. (description "Ruby-terminfo provides terminfo binding for Ruby.")
  10238. (license license:bsd-3)))
  10239. (define-public ruby-diffy
  10240. (package
  10241. (name "ruby-diffy")
  10242. (version "3.2.1")
  10243. (source
  10244. (origin
  10245. (method url-fetch)
  10246. (uri (rubygems-uri "diffy" version))
  10247. (sha256
  10248. (base32
  10249. "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
  10250. (build-system ruby-build-system)
  10251. (arguments
  10252. ;; No tests
  10253. `(#:tests? #f))
  10254. (native-inputs
  10255. `(("ruby-rspec" ,ruby-rspec)))
  10256. (home-page "https://github.com/samg/diffy")
  10257. (synopsis "Convenient diffing in ruby")
  10258. (description "Diffy provides a convenient way to generate a diff from two
  10259. strings or files.")
  10260. (license license:expat)))
  10261. (define-public ruby-sass-spec
  10262. (package
  10263. (name "ruby-sass-spec")
  10264. (version "3.5.4")
  10265. (source
  10266. (origin
  10267. (method git-fetch)
  10268. (uri (git-reference
  10269. (url "https://github.com/sass/sass-spec")
  10270. (commit (string-append "v" version))))
  10271. (file-name (git-file-name name version))
  10272. (sha256
  10273. (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
  10274. (build-system ruby-build-system)
  10275. (propagated-inputs
  10276. `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
  10277. ("ruby-diffy" ,ruby-diffy)
  10278. ("ruby-terminfo" ,ruby-terminfo)))
  10279. (arguments
  10280. `(;; This package contains tests for a sass implementation, and the to
  10281. ;; avoid any circular dependencies, the tests are not run here
  10282. #:tests? #f
  10283. #:phases
  10284. (modify-phases %standard-phases
  10285. (add-after 'unpack 'patch-test
  10286. (lambda _
  10287. (delete-file "spec/values/colors/alpha_hex-3.5/error")
  10288. (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
  10289. (("string") "color")))))))
  10290. (home-page "https://github.com/sass/sass-spec")
  10291. (synopsis "Test suite for Sass")
  10292. (description "Sass Spec is a test suite for Sass. Test cases are all in
  10293. the @file{spec} directory.")
  10294. (license license:expat)))
  10295. (define-public ruby-sass
  10296. (package
  10297. (name "ruby-sass")
  10298. (version "3.6.0")
  10299. (source (origin
  10300. (method url-fetch)
  10301. (uri (rubygems-uri "sass" version))
  10302. (sha256
  10303. (base32
  10304. "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
  10305. (build-system ruby-build-system)
  10306. (propagated-inputs
  10307. `(("ruby-sass-listen" ,ruby-sass-listen)))
  10308. (native-inputs
  10309. `(("ruby-sass-spec" ,ruby-sass-spec)
  10310. ("ruby-mathn" ,ruby-mathn)
  10311. ("ruby-cmath" ,ruby-cmath)))
  10312. (home-page "https://sass-lang.com/")
  10313. (synopsis "CSS extension language")
  10314. (description "Sass is a CSS extension language. It extends CSS with
  10315. features that don't exist yet like variables, nesting, mixins and inheritance.")
  10316. (license license:expat)))
  10317. (define-public ruby-sassc
  10318. (package
  10319. (name "ruby-sassc")
  10320. (version "2.4.0")
  10321. (source
  10322. (origin
  10323. (method url-fetch)
  10324. (uri (rubygems-uri "sassc" version))
  10325. (sha256
  10326. (base32
  10327. "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
  10328. (build-system ruby-build-system)
  10329. (arguments
  10330. '(#:modules ((guix build ruby-build-system)
  10331. (guix build utils)
  10332. (ice-9 textual-ports))
  10333. #:phases
  10334. (modify-phases %standard-phases
  10335. ;; TODO: This would be better as a snippet, but the ruby-build-system
  10336. ;; doesn't seem to support that
  10337. (add-after 'unpack 'remove-libsass
  10338. (lambda _
  10339. (delete-file-recursively "ext")
  10340. (with-atomic-file-replacement "sassc.gemspec"
  10341. (lambda (in out)
  10342. (let* ((gemspec (get-string-all in))
  10343. (index (string-contains gemspec "libsass_dir")))
  10344. (display (string-append
  10345. (string-take gemspec index)
  10346. "\nend\n")
  10347. out))))
  10348. #t))
  10349. (add-after 'unpack 'dont-check-the-libsass-version
  10350. (lambda _
  10351. (substitute* "test/native_test.rb"
  10352. (("assert_equal.*Native\\.version") ""))
  10353. #t))
  10354. (add-after 'unpack 'remove-git-from-gemspec
  10355. (lambda _
  10356. (substitute* "sassc.gemspec"
  10357. (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
  10358. #t))
  10359. (add-after 'unpack 'remove-extensions-from-gemspec
  10360. (lambda _
  10361. (substitute* "sassc.gemspec"
  10362. (("\\[\"ext/extconf.rb\"\\]") "[]"))
  10363. #t))
  10364. (add-after 'unpack 'fix-Rakefile
  10365. (lambda _
  10366. (substitute* "Rakefile"
  10367. (("test: 'compile:libsass'") ":test"))
  10368. #t))
  10369. (add-after 'unpack 'remove-unnecessary-dependencies
  10370. (lambda _
  10371. (substitute* "test/test_helper.rb"
  10372. (("require \"pry\"") ""))
  10373. #t))
  10374. (add-before 'build 'patch-native.rb
  10375. (lambda* (#:key inputs #:allow-other-keys)
  10376. (substitute* "lib/sassc/native.rb"
  10377. ((".*gem_root = spec.gem_dir") "")
  10378. (("ffi_lib .*\n")
  10379. (string-append
  10380. "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
  10381. #t))
  10382. ;; The gemspec still references the libsass files, so just keep the
  10383. ;; one in the gem.
  10384. (delete 'extract-gemspec))))
  10385. (propagated-inputs
  10386. `(("ruby-ffi" ,ruby-ffi)
  10387. ("ruby-rake" ,ruby-rake)))
  10388. (inputs
  10389. `(("libsass" ,libsass)))
  10390. (native-inputs
  10391. `(("bundler" ,bundler)
  10392. ("ruby-rake-compiler" ,ruby-rake-compiler)
  10393. ("ruby-minitest-around" ,ruby-minitest-around)
  10394. ("ruby-test-construct" ,ruby-test-construct)))
  10395. (synopsis "Use libsss from Ruby")
  10396. (description
  10397. "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
  10398. bindings to the libsass library. This enables rendering
  10399. @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
  10400. (home-page "https://github.com/sass/sassc-ruby")
  10401. (license license:expat)))
  10402. (define-public ruby-jekyll-sass-converter
  10403. (package
  10404. (name "ruby-jekyll-sass-converter")
  10405. (version "2.1.0")
  10406. (source (origin
  10407. (method url-fetch)
  10408. (uri (rubygems-uri "jekyll-sass-converter" version))
  10409. (sha256
  10410. (base32
  10411. "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"))))
  10412. (build-system ruby-build-system)
  10413. (propagated-inputs
  10414. `(("ruby-sass" ,ruby-sass)))
  10415. (arguments
  10416. ;; No rakefile
  10417. `(#:tests? #f))
  10418. (home-page "https://github.com/jekyll/jekyll-sass-converter")
  10419. (synopsis "Sass converter for Jekyll")
  10420. (description "This gem provide built-in support for the Sass converter
  10421. in Jekyll.")
  10422. (license license:expat)))
  10423. (define-public ruby-jekyll-watch
  10424. (package
  10425. (name "ruby-jekyll-watch")
  10426. (version "2.1.2")
  10427. (source (origin
  10428. (method url-fetch)
  10429. (uri (rubygems-uri "jekyll-watch" version))
  10430. (sha256
  10431. (base32
  10432. "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
  10433. (build-system ruby-build-system)
  10434. (propagated-inputs
  10435. `(("ruby-listen" ,ruby-listen)))
  10436. (arguments
  10437. ;; No rakefile
  10438. `(#:tests? #f))
  10439. (home-page "https://github.com/jekyll/jekyll-watch")
  10440. (synopsis "Jekyll auto-rebuild support")
  10441. (description "This gems add the @code{--watch} switch to the jekyll CLI
  10442. interface. It allows Jekyll to rebuild your site when a file changes.")
  10443. (license license:expat)))
  10444. (define-public ruby-parallel
  10445. (package
  10446. (name "ruby-parallel")
  10447. (version "1.13.0")
  10448. (source
  10449. (origin
  10450. (method git-fetch)
  10451. (uri (git-reference
  10452. (url "https://github.com/grosser/parallel")
  10453. (commit (string-append "v" version))))
  10454. (file-name (git-file-name name version))
  10455. (sha256
  10456. (base32
  10457. "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
  10458. (build-system ruby-build-system)
  10459. (arguments
  10460. `(;; TODO 3 test failures
  10461. ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
  10462. ;; open unnecessary pipes
  10463. ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
  10464. ;; SQLite in processes
  10465. ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
  10466. ;; SQLite in threads
  10467. #:tests? #f
  10468. #:test-target "rspec-rerun:spec"
  10469. #:phases
  10470. (modify-phases %standard-phases
  10471. (add-after 'unpack 'patch-Gemfile
  10472. (lambda _
  10473. (substitute* "Gemfile"
  10474. (("gem 'rspec-legacy_formatters'") "")
  10475. (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
  10476. (add-before 'check 'delete-Gemfile.lock
  10477. (lambda _
  10478. ;; Bundler isn't being used for fetching dependendencies, so
  10479. ;; delete the Gemfile.lock
  10480. (delete-file "Gemfile.lock")
  10481. #t))
  10482. (add-before 'build 'patch-gemspec
  10483. (lambda _
  10484. (substitute* "parallel.gemspec"
  10485. (("git ls-files") "find"))
  10486. #t)))))
  10487. (native-inputs
  10488. `(("ruby-rspec" ,ruby-rspec)
  10489. ("ruby-rspec-rerun" ,ruby-rspec-rerun)
  10490. ("bundler" ,bundler)
  10491. ("ruby-activerecord" ,ruby-activerecord)
  10492. ("ruby-progressbar" ,ruby-progressbar)
  10493. ("ruby-bump" ,ruby-bump)
  10494. ("procps" ,procps)
  10495. ("lsof" ,lsof)
  10496. ("ruby-mysql2" ,ruby-mysql2)
  10497. ("ruby-sqlite3" ,ruby-sqlite3)
  10498. ("ruby-i18n" ,ruby-i18n)))
  10499. (home-page "https://github.com/grosser/parallel")
  10500. (synopsis "Parallel processing in Ruby")
  10501. (description "Parallel allows you to run any code in parallel Processes
  10502. (to use all CPUs) or Threads(to speedup blocking operations). It is best
  10503. suited for map-reduce or e.g. parallel downloads/uploads.")
  10504. (license license:expat)))
  10505. (define-public ruby-cane
  10506. (package
  10507. (name "ruby-cane")
  10508. (version "3.0.0")
  10509. (source (origin
  10510. (method url-fetch)
  10511. (uri (rubygems-uri "cane" version))
  10512. (sha256
  10513. (base32
  10514. "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
  10515. (build-system ruby-build-system)
  10516. (arguments `(#:tests? #f)); No rakefile
  10517. (home-page "https://github.com/square/cane")
  10518. (propagated-inputs
  10519. `(("ruby-parallel" ,ruby-parallel)))
  10520. (synopsis "Code quality threshold checking")
  10521. (description "Cane fails your build if code quality thresholds are not met.")
  10522. (license license:asl2.0)))
  10523. (define-public ruby-morecane
  10524. (package
  10525. (name "ruby-morecane")
  10526. (version "0.2.0")
  10527. (source (origin
  10528. (method url-fetch)
  10529. (uri (rubygems-uri "morecane" version))
  10530. (sha256
  10531. (base32
  10532. "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
  10533. (build-system ruby-build-system)
  10534. (home-page "https://github.com/yob/morecane")
  10535. (arguments `(#:tests? #f)); No rakefile
  10536. (propagated-inputs
  10537. `(("ruby-parallel" ,ruby-parallel)))
  10538. (synopsis "Extra checks for cane")
  10539. (description "The cane gem provides a great framework for running quality
  10540. checks over your ruby project as part of continuous integration build. It
  10541. comes with a few checks out of the box, but also provides an API for loading
  10542. custom checks. This gem provides a set of additional checks.")
  10543. (license license:expat)))
  10544. (define-public ruby-pdf-reader
  10545. (package
  10546. (name "ruby-pdf-reader")
  10547. (version "2.4.0")
  10548. (source (origin
  10549. (method git-fetch) ;no test in distributed gem archive
  10550. (uri (git-reference
  10551. (url "https://github.com/yob/pdf-reader")
  10552. (commit (string-append "v" version))))
  10553. (file-name (git-file-name name version))
  10554. (sha256
  10555. (base32
  10556. "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
  10557. (build-system ruby-build-system)
  10558. (arguments `(#:test-target "spec"
  10559. #:phases (modify-phases %standard-phases
  10560. (add-after 'unpack 'do-not-use-bundler
  10561. (lambda _
  10562. (substitute* "spec/spec_helper.rb"
  10563. ((".*[Bb]undler.*") ""))
  10564. #t)))))
  10565. (native-inputs
  10566. `(("ruby-rspec" ,ruby-rspec)
  10567. ("ruby-cane" ,ruby-cane)
  10568. ("ruby-morecane" ,ruby-morecane)))
  10569. (propagated-inputs
  10570. `(("ruby-afm" ,ruby-afm)
  10571. ("ruby-ascii85" ,ruby-ascii85)
  10572. ("ruby-hashery" ,ruby-hashery)
  10573. ("ruby-rc4" ,ruby-rc4)
  10574. ("ruby-ttfunk" ,ruby-ttfunk)))
  10575. (home-page "https://github.com/yob/pdf-reader")
  10576. (synopsis "PDF parser in Ruby")
  10577. (description "The PDF::Reader library implements a PDF parser conforming as
  10578. much as possible to the PDF specification from Adobe. It provides programmatic
  10579. access to the contents of a PDF file with a high degree of flexibility.")
  10580. (license license:gpl3+)))
  10581. (define-public ruby-pdf-inspector
  10582. (let ((revision "1")
  10583. (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
  10584. (package
  10585. (name "ruby-pdf-inspector")
  10586. (version (git-version "1.3.0" revision commit))
  10587. (source (origin
  10588. (method git-fetch)
  10589. (uri (git-reference
  10590. (url "https://github.com/prawnpdf/pdf-inspector")
  10591. (commit commit)))
  10592. (file-name (git-file-name name version))
  10593. (sha256
  10594. (base32
  10595. "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
  10596. (build-system ruby-build-system)
  10597. (arguments
  10598. `(#:test-target "spec"
  10599. #:phases (modify-phases %standard-phases
  10600. (add-before 'build 'drop-signing-key-requirement
  10601. (lambda _
  10602. (substitute* "pdf-inspector.gemspec"
  10603. (("spec.signing_key =.*")
  10604. "spec.signing_key = nil"))
  10605. #t))
  10606. (replace 'check
  10607. (lambda _
  10608. (substitute* "pdf-inspector.gemspec"
  10609. ((".*rubocop.*") "")
  10610. ((".*yard.*") ""))
  10611. (invoke "rspec"))))))
  10612. (native-inputs
  10613. `(("ruby-rspec" ,ruby-rspec)))
  10614. (propagated-inputs
  10615. `(("ruby-pdf-reader" ,ruby-pdf-reader)))
  10616. (home-page "https://github.com/prawnpdf/pdf-inspector")
  10617. (synopsis "Analysis classes for inspecting PDF output")
  10618. (description "This library provides a number of PDF::Reader based tools for
  10619. use in testing PDF output. Presently, the primary purpose of this tool is to
  10620. support the tests found in Prawn, a pure Ruby PDF generation library.")
  10621. (license %prawn-project-licenses))))
  10622. (define-public ruby-pdf-core
  10623. (package
  10624. (name "ruby-pdf-core")
  10625. (version "0.8.1")
  10626. (source (origin
  10627. (method url-fetch)
  10628. (uri (rubygems-uri "pdf-core" version))
  10629. (sha256
  10630. (base32
  10631. "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
  10632. (build-system ruby-build-system)
  10633. (arguments
  10634. ; No test target
  10635. `(#:tests? #f))
  10636. (home-page "https://github.com/prawnpdf/pdf-core")
  10637. (synopsis "Low level PDF features for Prawn")
  10638. (description "This is an experimental gem that extracts low-level PDF
  10639. functionality from Prawn.")
  10640. (license license:gpl3+)))
  10641. (define-public ruby-prawn
  10642. ;; There hasn't been a new release since 2017/03/17.
  10643. (let ((revision "1")
  10644. (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
  10645. (package
  10646. (name "ruby-prawn")
  10647. (version (git-version "2.2.2" revision commit))
  10648. (source (origin
  10649. (method git-fetch)
  10650. (uri (git-reference
  10651. (url "https://github.com/prawnpdf/prawn")
  10652. (commit commit)))
  10653. (file-name (git-file-name name version))
  10654. (sha256
  10655. (base32
  10656. "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
  10657. (build-system ruby-build-system)
  10658. (arguments
  10659. `(#:phases
  10660. (modify-phases %standard-phases
  10661. (add-before 'build 'drop-signing-key-requirement
  10662. (lambda _
  10663. (substitute* "prawn.gemspec"
  10664. (("spec.signing_key =.*")
  10665. "spec.signing_key = nil"))
  10666. #t))
  10667. (replace 'check
  10668. (lambda* (#:key tests? #:allow-other-keys)
  10669. (when tests?
  10670. ;; The Prawn manual test fails (see:
  10671. ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
  10672. ;; it.
  10673. (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
  10674. #t)))))
  10675. (propagated-inputs
  10676. `(("ruby-pdf-core" ,ruby-pdf-core)
  10677. ("ruby-ttfunk" ,ruby-ttfunk)))
  10678. (native-inputs
  10679. `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
  10680. ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
  10681. ("ruby-rspec" ,ruby-rspec)
  10682. ("ruby-simplecov" ,ruby-simplecov)
  10683. ("ruby-yard" ,ruby-yard)))
  10684. (home-page "https://prawnpdf.org/api-docs/2.0/")
  10685. (synopsis "PDF generation for Ruby")
  10686. (description "Prawn is a pure Ruby PDF generation library.")
  10687. (license %prawn-project-licenses))))
  10688. (define-public ruby-prawn-table
  10689. (package
  10690. (name "ruby-prawn-table")
  10691. (version "0.2.2")
  10692. (source (origin
  10693. (method url-fetch)
  10694. (uri (rubygems-uri "prawn-table" version))
  10695. (sha256
  10696. (base32
  10697. "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
  10698. (build-system ruby-build-system)
  10699. (propagated-inputs
  10700. `(("ruby-prawn" ,ruby-prawn)
  10701. ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
  10702. (native-inputs
  10703. `(("bundler" ,bundler)
  10704. ("ruby-yard" ,ruby-yard)
  10705. ("ruby-mocha" ,ruby-mocha)
  10706. ("ruby-coderay" ,ruby-coderay)
  10707. ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
  10708. ("ruby-simplecov" ,ruby-simplecov)
  10709. ("ruby-rspec-2" ,ruby-rspec-2)))
  10710. (arguments
  10711. '(;; TODO: 1 test fails
  10712. ;; Failure/Error: pdf.page_count.should == 1
  10713. ;; expected: 1
  10714. ;; got: 2 (using ==)
  10715. ;; # ./spec/table_spec.rb:1308
  10716. ;;
  10717. ;; 225 examples, 1 failure
  10718. #:tests? #f
  10719. #:phases
  10720. (modify-phases %standard-phases
  10721. (add-before 'check 'patch-gemspec
  10722. (lambda _
  10723. (substitute* "prawn-table.gemspec"
  10724. ;; Loosen the requirement for pdf-inspector
  10725. (("~> 1\\.1\\.0") ">= 0")
  10726. ;; Loosen the requirement for pdf-reader
  10727. (("~> 1\\.2") ">= 0"))))
  10728. (replace 'check
  10729. (lambda* (#:key tests? #:allow-other-keys)
  10730. (when tests?
  10731. (invoke "rspec"))
  10732. #t)))))
  10733. (home-page "https://github.com/prawnpdf/prawn-table")
  10734. (synopsis "Tables support for Prawn")
  10735. (description "This gem provides tables support for Prawn.")
  10736. (license license:gpl3+)))
  10737. (define-public ruby-kramdown
  10738. (package
  10739. (name "ruby-kramdown")
  10740. (version "2.3.1")
  10741. (source (origin
  10742. (method url-fetch)
  10743. (uri (rubygems-uri "kramdown" version))
  10744. (sha256
  10745. (base32
  10746. "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
  10747. (build-system ruby-build-system)
  10748. (arguments `(#:tests? #f)); FIXME: some test failures
  10749. (native-inputs
  10750. `(("ruby-prawn" ,ruby-prawn)
  10751. ("ruby-prawn-table" ,ruby-prawn-table)))
  10752. (home-page "https://kramdown.gettalong.org/")
  10753. (synopsis "Markdown parsing and converting library")
  10754. (description "Kramdown is a library for parsing and converting a superset
  10755. of Markdown. It is completely written in Ruby, supports standard Markdown
  10756. (with some minor modifications) and various extensions that have been made
  10757. popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
  10758. (license license:expat)))
  10759. (define-public ruby-kramdown-parser-gfm
  10760. (package
  10761. (name "ruby-kramdown-parser-gfm")
  10762. (version "1.1.0")
  10763. (source
  10764. (origin
  10765. (method url-fetch)
  10766. (uri (rubygems-uri "kramdown-parser-gfm" version))
  10767. (sha256
  10768. (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
  10769. (build-system ruby-build-system)
  10770. (arguments
  10771. `(#:tests? #f)) ;no rakefile
  10772. (propagated-inputs
  10773. `(("ruby-kramdown" ,ruby-kramdown)))
  10774. (synopsis "Kramdown parser for the GFM dialect of Markdown")
  10775. (description
  10776. "This is a parser for kramdown that converts Markdown documents in the
  10777. GFM dialect to HTML.")
  10778. (home-page "https://github.com/kramdown/parser-gfm")
  10779. (license license:expat)))
  10780. (define-public ruby-http-parser.rb
  10781. (package
  10782. (name "ruby-http-parser.rb")
  10783. (version "0.6.0")
  10784. (source
  10785. (origin
  10786. (method url-fetch)
  10787. (uri (rubygems-uri "http_parser.rb" version))
  10788. (sha256
  10789. (base32
  10790. "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
  10791. (build-system ruby-build-system)
  10792. (arguments
  10793. ;; No tests
  10794. `(#:tests? #f))
  10795. (native-inputs
  10796. `(("ruby-rake-compiler" ,ruby-rake-compiler)
  10797. ("ruby-rspec" ,ruby-rspec)))
  10798. (home-page "https://github.com/tmm1/http_parser.rb")
  10799. (synopsis "HTTP parser un Ruby")
  10800. (description "This gem is a simple callback-based HTTP request/response
  10801. parser for writing http servers, clients and proxies.")
  10802. (license license:expat)))
  10803. (define-public ruby-em-websocket
  10804. (package
  10805. (name "ruby-em-websocket")
  10806. (version "0.5.1")
  10807. (source
  10808. (origin
  10809. (method url-fetch)
  10810. (uri (rubygems-uri "em-websocket" version))
  10811. (sha256
  10812. (base32
  10813. "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
  10814. (build-system ruby-build-system)
  10815. (arguments
  10816. ;; No tests
  10817. `(#:tests? #f))
  10818. (propagated-inputs
  10819. `(("ruby-eventmachine" ,ruby-eventmachine)
  10820. ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
  10821. (native-inputs
  10822. `(("bundler" ,bundler)
  10823. ("ruby-rspec" ,ruby-rspec)))
  10824. (home-page "https://github.com/igrigorik/em-websocket")
  10825. (synopsis "EventMachine based WebSocket server")
  10826. (description "Em-websocket is an EventMachine based WebSocket server
  10827. implementation.")
  10828. (license license:expat)))
  10829. (define-public ruby-rouge
  10830. (package
  10831. (name "ruby-rouge")
  10832. (version "3.21.0")
  10833. (source (origin
  10834. (method url-fetch)
  10835. (uri (rubygems-uri "rouge" version))
  10836. (sha256
  10837. (base32
  10838. "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
  10839. (build-system ruby-build-system)
  10840. (arguments `(#:tests? #f)); No rakefile
  10841. (home-page "http://rouge.jneen.net/")
  10842. (synopsis "Code highlighter")
  10843. (description "Rouge is a code highlighter written in Ruby. It supports more
  10844. than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
  10845. is compatible with stylesheets designed for pygments.")
  10846. (license (list
  10847. ;; rouge is licensed under expat
  10848. license:expat
  10849. ;; pygments is licensed under bsd-2
  10850. license:bsd-2))))
  10851. (define-public ruby-hashie
  10852. (package
  10853. (name "ruby-hashie")
  10854. (version "3.6.0")
  10855. (source (origin
  10856. (method url-fetch)
  10857. (uri (rubygems-uri "hashie" version))
  10858. (sha256
  10859. (base32
  10860. "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
  10861. (build-system ruby-build-system)
  10862. (native-inputs
  10863. `(("bundler" ,bundler)))
  10864. (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
  10865. (home-page "https://github.com/intridea/hashie")
  10866. (synopsis "Extensions to Ruby Hashes")
  10867. (description "Hashie is a collection of classes and mixins that make Ruby
  10868. hashes more powerful.")
  10869. (license license:expat)))
  10870. (define-public ruby-heredoc-unindent
  10871. (package
  10872. (name "ruby-heredoc-unindent")
  10873. (version "1.2.0")
  10874. (source (origin
  10875. (method url-fetch)
  10876. (uri (rubygems-uri "heredoc_unindent" version))
  10877. (sha256
  10878. (base32
  10879. "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
  10880. (build-system ruby-build-system)
  10881. (native-inputs
  10882. `(("ruby-hoe" ,ruby-hoe)))
  10883. (home-page "https://github.com/adrianomitre/heredoc_unindent")
  10884. (synopsis "Heredoc indentation cleaner")
  10885. (description "This gem removes common margin from indented strings, such
  10886. as the ones produced by indented heredocs. In other words, it strips out
  10887. leading whitespace chars at the beginning of each line, but only as much as
  10888. the line with the smallest margin.
  10889. It is acknowledged that many strings defined by heredocs are just code and
  10890. fact is that most parsers are insensitive to indentation. If, however, the
  10891. strings are to be used otherwise, be it for printing or testing, the extra
  10892. indentation will probably be an issue and hence this gem.")
  10893. (license license:expat)))
  10894. (define-public ruby-safe-yaml
  10895. (package
  10896. (name "ruby-safe-yaml")
  10897. (version "1.0.5")
  10898. (source
  10899. (origin
  10900. (method git-fetch)
  10901. (uri (git-reference
  10902. (url "https://github.com/dtao/safe_yaml")
  10903. (commit version)))
  10904. (file-name (git-file-name name version))
  10905. (sha256
  10906. (base32
  10907. "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
  10908. (build-system ruby-build-system)
  10909. (native-inputs
  10910. `(("ruby-rspec" ,ruby-rspec)
  10911. ("ruby-hashie" ,ruby-hashie)
  10912. ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
  10913. (arguments
  10914. '(#:test-target "spec"
  10915. #:phases
  10916. (modify-phases %standard-phases
  10917. (add-before 'check 'set-TZ
  10918. (lambda _
  10919. ;; This test is dependent on the timezone
  10920. ;; spec/transform/to_date_spec.rb:35
  10921. ;; # SafeYAML::Transform::ToDate converts times to the local
  10922. ;; timezone
  10923. (setenv "TZ" "UTC-11")
  10924. #t)))))
  10925. (home-page "https://github.com/dtao/safe_yaml")
  10926. (synopsis "YAML parser")
  10927. (description "The SafeYAML gem provides an alternative implementation of
  10928. YAML.load suitable for accepting user input in Ruby applications.")
  10929. (license license:expat)))
  10930. (define-public ruby-yaml-lint
  10931. (package
  10932. (name "ruby-yaml-lint")
  10933. (version "0.0.10")
  10934. (source
  10935. (origin
  10936. (method git-fetch)
  10937. (uri (git-reference
  10938. (url "https://github.com/Pryz/yaml-lint")
  10939. (commit version)))
  10940. (file-name (git-file-name name version))
  10941. (sha256
  10942. (base32
  10943. "1jz26mxjkdyjbgqp7f9isnzd1i6vkizsswyj1v639nmq31hwfh0d"))))
  10944. (build-system ruby-build-system)
  10945. (arguments
  10946. `(#:phases
  10947. (modify-phases %standard-phases
  10948. (replace 'check
  10949. (lambda* (#:key tests? #:allow-other-keys)
  10950. (when tests?
  10951. (invoke "rspec"))
  10952. #t)))))
  10953. (native-inputs
  10954. `(("ruby-coveralls" ,ruby-coveralls)
  10955. ("ruby-rspec" ,ruby-rspec)
  10956. ("ruby-simplecov" ,ruby-simplecov)))
  10957. (synopsis "Simple YAML check tool")
  10958. (description
  10959. "@code{yaml-lint} will simply try to load the YAML file with the built-in
  10960. Ruby yaml library.")
  10961. (home-page "https://github.com/Pryz/yaml-lint")
  10962. (license license:expat)))
  10963. (define-public ruby-mercenary
  10964. (package
  10965. (name "ruby-mercenary")
  10966. (version "0.4.0")
  10967. (source (origin
  10968. (method url-fetch)
  10969. (uri (rubygems-uri "mercenary" version))
  10970. (sha256
  10971. (base32
  10972. "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
  10973. (build-system ruby-build-system)
  10974. (arguments `(#:test-target "spec"))
  10975. (native-inputs
  10976. `(("bundler" ,bundler)))
  10977. (home-page "https://github.com/jekyll/mercenary")
  10978. (synopsis "Command-line apps library in Ruby")
  10979. (description "Mercenary is a lightweight and flexible library for writing
  10980. command-line apps in Ruby.")
  10981. (license license:expat)))
  10982. (define-public ruby-liquid
  10983. (package
  10984. (name "ruby-liquid")
  10985. (version "4.0.0")
  10986. (source (origin
  10987. (method url-fetch)
  10988. (uri (rubygems-uri "liquid" version))
  10989. (sha256
  10990. (base32
  10991. "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
  10992. (build-system ruby-build-system)
  10993. (arguments `(#:tests? #f)); No rakefile
  10994. (home-page "https://shopify.github.io/liquid/")
  10995. (synopsis "Template language")
  10996. (description "Liquid is a template language written in Ruby. It is used
  10997. to load dynamic content on storefronts.")
  10998. (license license:expat)))
  10999. (define-public ruby-forwardable-extended
  11000. (package
  11001. (name "ruby-forwardable-extended")
  11002. (version "2.6.0")
  11003. (source (origin
  11004. (method url-fetch)
  11005. (uri (rubygems-uri "forwardable-extended" version))
  11006. (sha256
  11007. (base32
  11008. "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
  11009. (build-system ruby-build-system)
  11010. (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
  11011. (home-page "https://github.com/envygeeks/forwardable-extended")
  11012. (synopsis "Delegation to hashes and instance variables in Forwardable")
  11013. (description "Forwardable Extended provides more @code{Forwardable}
  11014. methods for your source as @code{Forwardable::Extended}.")
  11015. (license license:expat)))
  11016. (define-public ruby-pathutil
  11017. (package
  11018. (name "ruby-pathutil")
  11019. (version "0.16.2")
  11020. (source (origin
  11021. (method url-fetch)
  11022. (uri (rubygems-uri "pathutil" version))
  11023. (sha256
  11024. (base32
  11025. "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
  11026. (build-system ruby-build-system)
  11027. (propagated-inputs
  11028. `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
  11029. (native-inputs
  11030. `(("bundler" ,bundler)
  11031. ("ruby-rspec" ,ruby-rspec)))
  11032. ;; Fails with: cannot load such file --
  11033. ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
  11034. (arguments `(#:tests? #f))
  11035. (home-page "https://github.com/envygeeks/pathutil")
  11036. (synopsis "Extended implementation of Pathname")
  11037. (description "Pathutil tries to be a faster pure Ruby implementation of
  11038. Pathname.")
  11039. (license license:expat)))
  11040. (define-public ruby-terminal-table
  11041. (package
  11042. (name "ruby-terminal-table")
  11043. (version "2.0.0")
  11044. (source
  11045. (origin
  11046. (method url-fetch)
  11047. (uri (rubygems-uri "terminal-table" version))
  11048. (sha256
  11049. (base32
  11050. "18rbrh464ysqbdv53iwj0r8frshn65566kyj044cp3x9c2754jwh"))))
  11051. (arguments
  11052. '(#:phases
  11053. (modify-phases %standard-phases
  11054. (add-before 'check 'remove-gemfile-lock
  11055. (lambda _
  11056. (delete-file "Gemfile.lock")))
  11057. (add-before 'check 'remove-unnecessary-dependencies
  11058. (lambda _
  11059. (substitute* "terminal-table.gemspec"
  11060. (("s.add_runtime_dependency.*") "\n")
  11061. (("s.add_development_dependency.*") "\n"))
  11062. (substitute* "Gemfile"
  11063. ((".*tins.*") "\n"))))
  11064. (replace 'check
  11065. (lambda* (#:key tests? #:allow-other-keys)
  11066. (when tests?
  11067. (invoke "rspec")))))))
  11068. (build-system ruby-build-system)
  11069. (propagated-inputs
  11070. `(("ruby-unicode-display-width" ,ruby-unicode-display-width)))
  11071. (native-inputs
  11072. `(("ruby-rspec" ,ruby-rspec)))
  11073. (home-page "https://github.com/tj/terminal-table")
  11074. (synopsis "Simple, feature rich ASCII table generation library")
  11075. (description
  11076. "Terminal Table is a fast and simple, yet feature rich
  11077. table generator written in Ruby. It supports ASCII and
  11078. Unicode formatted tables.")
  11079. (license license:expat)))
  11080. (define-public jekyll
  11081. (package
  11082. (name "jekyll")
  11083. (version "4.2.0")
  11084. (source (origin
  11085. (method url-fetch)
  11086. (uri (rubygems-uri "jekyll" version))
  11087. (sha256
  11088. (base32
  11089. "0cqkh78jw8scrajyx5nla0vwm9fvp2qql3kdcvvplcq9mazy8snq"))))
  11090. (build-system ruby-build-system)
  11091. (arguments
  11092. ;; No rakefile, but a test subdirectory.
  11093. `(#:tests? #f
  11094. #:phases
  11095. (modify-phases %standard-phases
  11096. (add-before 'build 'fix-i18n
  11097. (lambda _
  11098. (substitute* ".gemspec"
  11099. (("~> 0.7") ">= 0.7")
  11100. (("~> 1.14") ">= 1.14"))
  11101. #t)))))
  11102. (propagated-inputs
  11103. `(("ruby-addressable" ,ruby-addressable)
  11104. ("ruby-colorator" ,ruby-colorator)
  11105. ("ruby-em-websocket" ,ruby-em-websocket)
  11106. ("ruby-i18n" ,ruby-i18n)
  11107. ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
  11108. ("ruby-jekyll-watch" ,ruby-jekyll-watch)
  11109. ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
  11110. ("ruby-liquid" ,ruby-liquid)
  11111. ("ruby-mercenary" ,ruby-mercenary)
  11112. ("ruby-pathutil" ,ruby-pathutil)
  11113. ("ruby-rouge" ,ruby-rouge)
  11114. ("ruby-safe-yaml" ,ruby-safe-yaml)
  11115. ("ruby-sassc" ,ruby-sassc)
  11116. ("ruby-terminal-table" ,ruby-terminal-table)))
  11117. (home-page "https://jekyllrb.com/")
  11118. (synopsis "Static site generator")
  11119. (description "Jekyll is a simple, blog aware, static site generator.")
  11120. (license license:expat)))
  11121. (define-public ruby-jekyll-paginate-v2
  11122. (package
  11123. (name "ruby-jekyll-paginate-v2")
  11124. (version "3.0.0")
  11125. (source (origin
  11126. (method url-fetch)
  11127. (uri (rubygems-uri "jekyll-paginate-v2" version))
  11128. (sha256
  11129. (base32
  11130. "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
  11131. (build-system ruby-build-system)
  11132. (propagated-inputs
  11133. `(("jekyll" ,jekyll)))
  11134. (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
  11135. (synopsis "Pagination Generator for Jekyll 3")
  11136. (description "The Pagination Generator forms the core of the pagination
  11137. logic in Jekyll. It calculates and generates the pagination pages.")
  11138. (license license:expat)))
  11139. (define-public ruby-faraday
  11140. (package
  11141. (name "ruby-faraday")
  11142. (version "0.15.4")
  11143. (source
  11144. (origin
  11145. (method url-fetch)
  11146. (uri (rubygems-uri "faraday" version))
  11147. (sha256
  11148. (base32
  11149. "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
  11150. (build-system ruby-build-system)
  11151. (arguments
  11152. '(#:tests? #f))
  11153. (propagated-inputs
  11154. `(("ruby-multipart-post" ,ruby-multipart-post)))
  11155. (synopsis "Ruby HTTP/REST API client library")
  11156. (description
  11157. "Faraday is a HTTP/REST API client library which provides a common
  11158. interface over different adapters.")
  11159. (home-page "https://github.com/lostisland/faraday")
  11160. (license license:expat)))
  11161. (define-public ruby-nio4r
  11162. (package
  11163. (name "ruby-nio4r")
  11164. (version "2.5.2")
  11165. (source
  11166. (origin
  11167. (method url-fetch)
  11168. (uri (rubygems-uri "nio4r" version))
  11169. (sha256
  11170. (base32
  11171. "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
  11172. (build-system ruby-build-system)
  11173. (arguments
  11174. '(#:phases
  11175. (modify-phases %standard-phases
  11176. (add-after 'unpack 'remove-unnecessary-dependencies
  11177. (lambda _
  11178. (substitute* "spec/spec_helper.rb"
  11179. ;; Coveralls is for uploading test coverage information to an
  11180. ;; online service, and thus unnecessary for building the Guix
  11181. ;; package
  11182. (("require \"coveralls\"") "")
  11183. (("Coveralls\\.wear!") "")
  11184. ;; Remove rspec/retry as we are not retrying the tests
  11185. (("require \"rspec/retry\"") "")
  11186. (("config\\.display_try_failure_messages = true") "")
  11187. (("config\\.verbose_retry = true") ""))
  11188. #t))
  11189. (add-before 'check 'compile
  11190. (lambda _
  11191. (invoke "rake" "compile")
  11192. #t))
  11193. (replace 'check
  11194. (lambda* (#:key tests? #:allow-other-keys)
  11195. (when tests?
  11196. (invoke "rspec"))
  11197. #t)))))
  11198. (native-inputs
  11199. `(("bundler" ,bundler)
  11200. ("ruby-rake-compiler" ,ruby-rake-compiler)
  11201. ("ruby-rspec" ,ruby-rspec)
  11202. ("ruby-rubocop" ,ruby-rubocop)))
  11203. (synopsis "New I/O for Ruby")
  11204. (description
  11205. "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
  11206. for scalable network clients and servers.")
  11207. (home-page "https://github.com/socketry/nio4r")
  11208. (license license:expat)))
  11209. (define-public ruby-globalid
  11210. (package
  11211. (name "ruby-globalid")
  11212. (version "0.4.2")
  11213. (source
  11214. (origin
  11215. (method url-fetch)
  11216. (uri (rubygems-uri "globalid" version))
  11217. (sha256
  11218. (base32
  11219. "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
  11220. (build-system ruby-build-system)
  11221. (arguments
  11222. '(;; No included tests
  11223. #:tests? #f))
  11224. (propagated-inputs
  11225. `(("ruby-activesupport" ,ruby-activesupport)))
  11226. (synopsis "Generate URIs idenfitying model instances in Ruby")
  11227. (description
  11228. "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
  11229. uniquely identify it.")
  11230. (home-page "https://rubyonrails.org/")
  11231. (license license:expat)))
  11232. (define-public ruby-sprockets
  11233. (package
  11234. (name "ruby-sprockets")
  11235. (version "3.7.2")
  11236. (source
  11237. (origin
  11238. (method url-fetch)
  11239. (uri (rubygems-uri "sprockets" version))
  11240. (sha256
  11241. (base32
  11242. "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
  11243. (build-system ruby-build-system)
  11244. (arguments
  11245. '(;; No included tests
  11246. #:tests? #f))
  11247. (propagated-inputs
  11248. `(("ruby-concurrent" ,ruby-concurrent)
  11249. ("ruby-rack" ,ruby-rack)))
  11250. (synopsis "Sprockets is a Rack-based asset packaging system")
  11251. (description
  11252. "Sprockets is a Rack-based asset packaging system that concatenates and
  11253. serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
  11254. (home-page "https://github.com/rails/sprockets")
  11255. (license license:expat)))
  11256. (define-public ruby-mustache
  11257. (package
  11258. (name "ruby-mustache")
  11259. (version "1.1.1")
  11260. (source
  11261. (origin
  11262. (method url-fetch)
  11263. (uri (rubygems-uri "mustache" version))
  11264. (sha256
  11265. (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
  11266. (build-system ruby-build-system)
  11267. (native-inputs
  11268. `(("ruby-simplecov" ,ruby-simplecov)))
  11269. (synopsis "framework-agnostic way to render logic-free views")
  11270. (description
  11271. "Mustache is a framework-agnostic way to render logic-free views.
  11272. Think of Mustache as a replacement for your views. Instead of views
  11273. consisting of ERB or HAML with random helpers and arbitrary logic,
  11274. your views are broken into two parts: a Ruby class and an HTML
  11275. template.")
  11276. (home-page "https://github.com/mustache/mustache")
  11277. (license license:expat)))
  11278. (define-public ruby-mustermann
  11279. (package
  11280. (name "ruby-mustermann")
  11281. (version "1.0.3")
  11282. (source
  11283. (origin
  11284. (method url-fetch)
  11285. (uri (rubygems-uri "mustermann" version))
  11286. (sha256
  11287. (base32
  11288. "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
  11289. (build-system ruby-build-system)
  11290. (arguments
  11291. ;; No tests.
  11292. '(#:tests? #f))
  11293. (synopsis "Library implementing patterns that behave like regular expressions")
  11294. (description "Given a string pattern, Mustermann will turn it into an
  11295. object that behaves like a regular expression and has comparable performance
  11296. characteristics.")
  11297. (home-page "https://github.com/sinatra/mustermann")
  11298. (license license:expat)))
  11299. (define-public ruby-html-proofer
  11300. (package
  11301. (name "ruby-html-proofer")
  11302. (version "3.18.5")
  11303. (source
  11304. (origin
  11305. (method git-fetch)
  11306. (uri (git-reference
  11307. (url "https://github.com/gjtorikian/html-proofer")
  11308. (commit (string-append "v" version))))
  11309. (file-name (git-file-name name version))
  11310. (sha256
  11311. (base32
  11312. "1pxb0fajb3l3lm7sqj548qwl7vx6sx3jy7n4cns9d4lqx7s9r9xb"))))
  11313. (build-system ruby-build-system)
  11314. (arguments
  11315. `(;; FIXME: Tests depend on rubocop-standard.
  11316. #:tests? #f))
  11317. (native-inputs
  11318. `(("ruby-awesome-print" ,ruby-awesome-print)
  11319. ("ruby-redcarpet" ,ruby-redcarpet)
  11320. ("ruby-rspec" ,ruby-rspec)
  11321. ("ruby-rubocop" ,ruby-rubocop)
  11322. ("ruby-rubocop-performance" ,ruby-rubocop-performance)
  11323. ("ruby-pry-byebug" ,ruby-pry-byebug)))
  11324. (propagated-inputs
  11325. `(("ruby-addressable" ,ruby-addressable)
  11326. ("ruby-mercenary" ,ruby-mercenary)
  11327. ("ruby-nokogumbo" ,ruby-nokogumbo)
  11328. ("ruby-parallel" ,ruby-parallel)
  11329. ("ruby-rainbow" ,ruby-rainbow)
  11330. ("ruby-typhoeus" ,ruby-typhoeus)
  11331. ("ruby-yell" ,ruby-yell)))
  11332. (synopsis "Test your rendered HTML files to make sure they're accurate")
  11333. (description
  11334. "HTMLProofer is a set of tests to validate your HTML output. These
  11335. tests check if your image references are legitimate, if they have alt tags,
  11336. if your internal links are working, and so on. It's intended to be an
  11337. all-in-one checker for your output.")
  11338. (home-page "https://github.com/gjtorikian/html-proofer")
  11339. (license license:expat)))
  11340. (define-public ruby-htmlentities
  11341. (package
  11342. (name "ruby-htmlentities")
  11343. (version "4.3.4")
  11344. (source
  11345. (origin
  11346. (method url-fetch)
  11347. (uri (rubygems-uri "htmlentities" version))
  11348. (sha256
  11349. (base32
  11350. "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
  11351. (build-system ruby-build-system)
  11352. (arguments
  11353. `(#:phases
  11354. (modify-phases %standard-phases
  11355. (replace 'check
  11356. (lambda _
  11357. (map (lambda (file)
  11358. (invoke "ruby" "-Itest" file))
  11359. (find-files "./test" ".*_test\\.rb")))))))
  11360. (synopsis "Encode and decode (X)HTML entities")
  11361. (description
  11362. "This package provides a module for encoding and decoding (X)HTML
  11363. entities.")
  11364. (home-page "https://github.com/threedaymonk/htmlentities")
  11365. (license license:expat)))
  11366. (define-public ruby-sinatra
  11367. (package
  11368. (name "ruby-sinatra")
  11369. (version "2.0.8.1")
  11370. (source
  11371. (origin
  11372. (method url-fetch)
  11373. (uri (rubygems-uri "sinatra" version))
  11374. (sha256
  11375. (base32
  11376. "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
  11377. (build-system ruby-build-system)
  11378. (arguments
  11379. `(#:phases
  11380. (modify-phases %standard-phases
  11381. ;; See: https://github.com/sinatra/sinatra/issues/1578.
  11382. (add-after 'extract-gemspec 'fix-slow-doc-generation
  11383. (lambda _
  11384. (substitute* "sinatra.gemspec"
  11385. (("\"README.rdoc\"\\.freeze," all)
  11386. (string-append all " \"--exclude=.*\\.md\".freeze,")))
  11387. #t)))))
  11388. (propagated-inputs
  11389. `(("ruby-mustermann" ,ruby-mustermann)
  11390. ("ruby-rack" ,ruby-rack)
  11391. ("ruby-rack-protection" ,ruby-rack-protection)
  11392. ("ruby-tilt" ,ruby-tilt)))
  11393. (synopsis "DSL for quick web applications creation in Ruby")
  11394. (description
  11395. "Sinatra is a DSL for quickly creating web applications in Ruby with
  11396. minimal effort.")
  11397. (home-page "http://sinatrarb.com/")
  11398. (license license:expat)))
  11399. (define-public ruby-thin
  11400. (package
  11401. (name "ruby-thin")
  11402. (version "1.7.2")
  11403. (source
  11404. (origin
  11405. (method url-fetch)
  11406. (uri (rubygems-uri "thin" version))
  11407. (sha256
  11408. (base32
  11409. "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
  11410. (build-system ruby-build-system)
  11411. (arguments
  11412. ;; No tests.
  11413. '(#:tests? #f))
  11414. (propagated-inputs
  11415. `(("ruby-daemons" ,ruby-daemons)
  11416. ("ruby-eventmachine" ,ruby-eventmachine)
  11417. ("ruby-rack" ,ruby-rack)))
  11418. (synopsis "Thin and fast web server for Ruby")
  11419. (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
  11420. @itemize
  11421. @item the Mongrel parser,
  11422. @item Event Machine, a network I/O library with high scalability, performance
  11423. and stability,
  11424. @item Rack, a minimal interface between webservers and Ruby frameworks.
  11425. @end itemize\n")
  11426. (home-page "https://github.com/macournoyer/thin")
  11427. (license license:ruby)))
  11428. (define-public ruby-skinny
  11429. (package
  11430. (name "ruby-skinny")
  11431. (version "0.2.4")
  11432. (source
  11433. (origin
  11434. (method url-fetch)
  11435. (uri (rubygems-uri "skinny" version))
  11436. (sha256
  11437. (base32
  11438. "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
  11439. (build-system ruby-build-system)
  11440. (arguments
  11441. '(#:tests? #f ; No included tests
  11442. #:phases
  11443. (modify-phases %standard-phases
  11444. (add-before 'build 'patch-gemspec
  11445. (lambda _
  11446. (substitute* ".gemspec"
  11447. (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
  11448. "<eventmachine>, [\">= 1.0.0\"")
  11449. (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
  11450. #t)))))
  11451. (propagated-inputs
  11452. `(("ruby-eventmachine" ,ruby-eventmachine)
  11453. ("ruby-thin" ,ruby-thin)))
  11454. (synopsis "Simple, upgradable WebSockets for Ruby Thin")
  11455. (description "Skinny is a simple, upgradable WebSockets for Ruby, using
  11456. the Thin library.")
  11457. (home-page "https://github.com/sj26/skinny")
  11458. (license license:expat)))
  11459. (define-public ruby-sys-filesystem
  11460. (package
  11461. (name "ruby-sys-filesystem")
  11462. (version "1.3.4")
  11463. (source (origin
  11464. (method url-fetch)
  11465. (uri (rubygems-uri "sys-filesystem" version))
  11466. (sha256
  11467. (base32
  11468. "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
  11469. (build-system ruby-build-system)
  11470. (arguments
  11471. '(#:phases (modify-phases %standard-phases
  11472. (add-before 'check 'set-HOME
  11473. (lambda _
  11474. ;; Some tests attempt to stat $HOME. Let them.
  11475. (setenv "HOME" "/tmp")
  11476. #t)))))
  11477. (propagated-inputs
  11478. `(("ruby-ffi" ,ruby-ffi)))
  11479. (native-inputs
  11480. `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
  11481. (synopsis "Gather file system information")
  11482. (description
  11483. "The @code{sys-filesystem} library provides a cross-platform interface
  11484. for gathering file system information, such as disk space and mount points.")
  11485. (home-page "https://github.com/djberg96/sys-filesystem")
  11486. (license license:asl2.0)))
  11487. (define-public mailcatcher
  11488. (package
  11489. (name "mailcatcher")
  11490. (version "0.7.1")
  11491. (source
  11492. (origin
  11493. (method url-fetch)
  11494. (uri (rubygems-uri "mailcatcher" version))
  11495. (sha256
  11496. (base32
  11497. "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
  11498. (build-system ruby-build-system)
  11499. (arguments
  11500. ;; Tests require web/assets which is not included in the output. We
  11501. ;; might be able to fix this by adding the Git repository to the GEM_PATH
  11502. ;; of the tests. See ruby-mysql2.
  11503. '(#:tests? #f
  11504. #:phases
  11505. (modify-phases %standard-phases
  11506. (add-before 'build 'patch-gemspec
  11507. (lambda _
  11508. (substitute* ".gemspec"
  11509. (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
  11510. "<eventmachine>, [\">= 1.0.9.1")
  11511. (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
  11512. (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
  11513. (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
  11514. #t))
  11515. (add-before 'build 'loosen-dependency-contraint
  11516. (lambda _
  11517. (substitute* "lib/mail_catcher.rb"
  11518. (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
  11519. (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
  11520. (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
  11521. (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
  11522. #t)))))
  11523. (inputs
  11524. `(("ruby-eventmachine" ,ruby-eventmachine)
  11525. ("ruby-mail" ,ruby-mail)
  11526. ("ruby-rack" ,ruby-rack)
  11527. ("ruby-sinatra" ,ruby-sinatra)
  11528. ("ruby-skinny" ,ruby-skinny)
  11529. ("ruby-sqlite3" ,ruby-sqlite3)
  11530. ("ruby-thin" ,ruby-thin)))
  11531. (synopsis "SMTP server which catches messages to display them a browser")
  11532. (description
  11533. "MailCatcher runs a super simple SMTP server which catches any message
  11534. sent to it to display in a web interface. Run mailcatcher, set your favourite
  11535. app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
  11536. then check out http://127.0.0.1:1080 to see the mail.")
  11537. (home-page "https://mailcatcher.me")
  11538. (license license:expat)))
  11539. (define-public ruby-backport
  11540. (package
  11541. (name "ruby-backport")
  11542. (version "1.1.2")
  11543. (source
  11544. (origin
  11545. ;; The gem does not include test code, so fetch from the Git repository.
  11546. (method git-fetch)
  11547. (uri (git-reference
  11548. (url "https://github.com/castwide/backport")
  11549. (commit (string-append "v" version))))
  11550. (file-name (git-file-name name version))
  11551. (sha256
  11552. (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
  11553. (build-system ruby-build-system)
  11554. (arguments
  11555. `(#:test-target "spec"))
  11556. (native-inputs
  11557. `(("bundler" ,bundler)
  11558. ("ruby-rspec" ,ruby-rspec)))
  11559. (inputs
  11560. `(("ruby-simplecov" ,ruby-simplecov)))
  11561. (synopsis "Pure Ruby library for event-driven IO")
  11562. (description
  11563. "This package provides a pure Ruby library for event-driven IO.")
  11564. (home-page "https://github.com/castwide/backport")
  11565. (license license:expat)))
  11566. (define-public ruby-json-schema
  11567. (package
  11568. (name "ruby-json-schema")
  11569. (version "2.8.1")
  11570. (source
  11571. (origin
  11572. (method url-fetch)
  11573. (uri (rubygems-uri "json-schema" version))
  11574. (sha256
  11575. (base32
  11576. "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
  11577. (build-system ruby-build-system)
  11578. (arguments
  11579. `(#:tests? #f ; no tests
  11580. #:phases
  11581. (modify-phases %standard-phases
  11582. (replace 'build
  11583. (lambda _
  11584. (invoke "gem" "build" ".gemspec"))))))
  11585. (propagated-inputs
  11586. `(("ruby-addressable" ,ruby-addressable)))
  11587. (synopsis "Ruby JSON Schema Validator")
  11588. (description "This library provides Ruby with an interface for validating
  11589. JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
  11590. support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
  11591. is also included.")
  11592. (home-page "https://github.com/ruby-json-schema/json-schema")
  11593. (license license:expat)))
  11594. (define-public swagger-diff
  11595. (package
  11596. (name "swagger-diff")
  11597. (version "1.1.2")
  11598. (source
  11599. (origin
  11600. (method url-fetch)
  11601. (uri (rubygems-uri "swagger-diff" version))
  11602. (sha256
  11603. (base32
  11604. "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
  11605. (build-system ruby-build-system)
  11606. (arguments
  11607. `(#:test-target "spec"
  11608. #:phases
  11609. (modify-phases %standard-phases
  11610. ;; Don't run or require rubocop, the code linting tool, as this is a
  11611. ;; bit unnecessary.
  11612. (add-after 'unpack 'dont-run-rubocop
  11613. (lambda _
  11614. (substitute* "Rakefile"
  11615. ((".*rubocop.*") "")
  11616. ((".*RuboCop.*") ""))
  11617. #t)))))
  11618. (propagated-inputs
  11619. `(("ruby-json-schema" ,ruby-json-schema)))
  11620. (native-inputs
  11621. `(("bundler" ,bundler)
  11622. ("ruby-rspec-core" ,ruby-rspec-core)
  11623. ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
  11624. (synopsis
  11625. "Compare Open API Initiative specification files")
  11626. (description
  11627. "Swagger::Diff is a utility for comparing two different Open API
  11628. Initiative (OAI) specifications (formerly known as Swagger specifications).
  11629. It is intended to determine whether a newer API specification is
  11630. backwards-compatible with an older API specification.")
  11631. (home-page "https://github.com/civisanalytics/swagger-diff")
  11632. (license license:bsd-3)))
  11633. (define-public ruby-reverse-markdown
  11634. (package
  11635. (name "ruby-reverse-markdown")
  11636. (version "1.1.0")
  11637. (source
  11638. (origin
  11639. (method url-fetch)
  11640. (uri (rubygems-uri "reverse_markdown" version))
  11641. (sha256
  11642. (base32
  11643. "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
  11644. (build-system ruby-build-system)
  11645. (propagated-inputs
  11646. `(("ruby-nokogiri" ,ruby-nokogiri)))
  11647. (native-inputs
  11648. `(("bundler" ,bundler)
  11649. ("ruby-rspec" ,ruby-rspec)
  11650. ("ruby-kramdown" ,ruby-kramdown)
  11651. ("ruby-simplecov" ,ruby-simplecov)))
  11652. (arguments
  11653. `(#:phases
  11654. (modify-phases %standard-phases
  11655. (replace 'check
  11656. (lambda* (#:key tests? #:allow-other-keys)
  11657. (when tests?
  11658. (invoke "rspec"))
  11659. #t)))))
  11660. (synopsis "Convert HTML into Markdown")
  11661. (description
  11662. "This Ruby module allows you to map simple HTML back into
  11663. Markdown---e.g., if you want to import existing HTML data in your
  11664. application.")
  11665. (home-page "https://github.com/xijo/reverse_markdown")
  11666. (license license:wtfpl2)))
  11667. (define-public ruby-solargraph
  11668. (package
  11669. (name "ruby-solargraph")
  11670. (version "0.40.3")
  11671. (source
  11672. (origin
  11673. (method url-fetch)
  11674. (uri (rubygems-uri "solargraph" version))
  11675. (sha256
  11676. (base32
  11677. "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
  11678. (build-system ruby-build-system)
  11679. (propagated-inputs
  11680. `(("ruby-backport" ,ruby-backport)
  11681. ("bundler" ,bundler)
  11682. ("ruby-benchmark" ,ruby-benchmark)
  11683. ("ruby-e2mmap" ,ruby-e2mmap)
  11684. ("ruby-jaro-winkler" ,ruby-jaro-winkler)
  11685. ("ruby-kramdown" ,ruby-kramdown)
  11686. ("ruby-kramdown-parser-gfm" ,ruby-kramdown-parser-gfm)
  11687. ("ruby-maruku" ,ruby-maruku)
  11688. ("ruby-nokogiri" ,ruby-nokogiri)
  11689. ("ruby-parser" ,ruby-parser)
  11690. ("ruby-reverse-markdown" ,ruby-reverse-markdown)
  11691. ("ruby-rubocop" ,ruby-rubocop)
  11692. ("ruby-thor" ,ruby-thor)
  11693. ("ruby-tilt" ,ruby-tilt)
  11694. ("ruby-yard" ,ruby-yard)))
  11695. (native-inputs
  11696. `(("ruby-rspec" ,ruby-rspec)
  11697. ("ruby-pry" ,ruby-pry)
  11698. ("ruby-simplecov" ,ruby-simplecov)
  11699. ("ruby-webmock" ,ruby-webmock)))
  11700. ;; FIXME: can't figure out how to run the tests properly:
  11701. ;; An error occurred while loading spec_helper.
  11702. ;; Failure/Error: return gem_original_require(path)
  11703. ;; LoadError:
  11704. ;; cannot load such file -- spec_helper
  11705. (arguments
  11706. '(#:tests? #f
  11707. #:phases
  11708. (modify-phases %standard-phases
  11709. (replace 'check
  11710. (lambda* (#:key tests? #:allow-other-keys)
  11711. (when tests?
  11712. (invoke "rspec"))
  11713. #t)))))
  11714. (synopsis
  11715. "IDE tools for code completion, inline documentation, and static analysis")
  11716. (description
  11717. "Solargraph provides a comprehensive suite of tools for Ruby
  11718. programming: intellisense, diagnostics, inline documentation, and type
  11719. checking.")
  11720. (home-page "https://solargraph.org/")
  11721. (license license:expat)))
  11722. (define-public ruby-wayback-machine-downloader
  11723. (package
  11724. (name "ruby-wayback-machine-downloader")
  11725. (version "2.2.1")
  11726. (source
  11727. (origin
  11728. (method url-fetch)
  11729. (uri (rubygems-uri
  11730. "wayback_machine_downloader"
  11731. version))
  11732. (sha256
  11733. (base32
  11734. "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
  11735. (build-system ruby-build-system)
  11736. (arguments
  11737. '(#:tests? #f)) ; no tests
  11738. (synopsis "Download archived websites from the Wayback Machine")
  11739. (description
  11740. "Wayback Machine Downloader is a command line tool for downloading
  11741. websites from the Internet Archive's Wayback Machine (archive.org).
  11742. It allows fine grained control over what to download by specifying
  11743. which snapshots to consider and what files to include.")
  11744. (home-page
  11745. "https://github.com/hartator/wayback-machine-downloader")
  11746. (license license:expat)))
  11747. (define-public ruby-zeitwerk
  11748. (package
  11749. (name "ruby-zeitwerk")
  11750. (version "2.4.2")
  11751. (source
  11752. (origin
  11753. (method git-fetch)
  11754. (uri (git-reference
  11755. ;; No tests in the released gem.
  11756. (url "https://github.com/fxn/zeitwerk")
  11757. (commit (string-append "v" version))))
  11758. (file-name (git-file-name name version))
  11759. (sha256
  11760. (base32
  11761. "119fgdyb57gmss2yvfwfr47wcy8nny38sai72446krpihyavpizw"))))
  11762. (build-system ruby-build-system)
  11763. (native-inputs
  11764. `(("ruby-minitest" ,ruby-minitest)
  11765. ("ruby-minitest-focus" ,ruby-minitest-focus)
  11766. ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
  11767. (synopsis "Efficient and thread-safe code loader for Ruby")
  11768. (description
  11769. "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
  11770. and application may have their own independent autoloader, with its own
  11771. configuration, inflector, and logger. Supports autoloading, reloading, and
  11772. eager loading.")
  11773. (home-page "https://github.com/fxn/zeitwerk")
  11774. (license license:expat)))
  11775. (define-public ruby-wwtd
  11776. (package
  11777. (name "ruby-wwtd")
  11778. (version "1.4.1")
  11779. (home-page "https://github.com/grosser/wwtd")
  11780. (source (origin
  11781. (method git-fetch)
  11782. (uri (git-reference
  11783. (url home-page)
  11784. (commit (string-append "v" version))))
  11785. (file-name (git-file-name name version))
  11786. (sha256
  11787. (base32
  11788. "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
  11789. (modules '((guix build utils)))
  11790. (snippet
  11791. '(begin
  11792. ;; Remove bundled library.
  11793. (delete-file "spec/rake-12.3.0.gem")
  11794. #t))))
  11795. (build-system ruby-build-system)
  11796. (arguments
  11797. '(;; XXX: Tests need multiple versions of ruby, wants to run
  11798. ;; `bundle install`, etc.
  11799. #:tests? #f
  11800. #:phases (modify-phases %standard-phases
  11801. (replace 'replace-git-ls-files
  11802. (lambda _
  11803. (substitute* "wwtd.gemspec"
  11804. (("git ls-files lib/ bin/`")
  11805. "find lib/ bin/ -type f |sort`"))
  11806. #t))
  11807. (add-before 'check 'remove-version-constraints
  11808. (lambda _
  11809. (delete-file "Gemfile.lock")
  11810. #t))
  11811. (replace 'check
  11812. (lambda* (#:key tests? #:allow-other-keys)
  11813. (if tests?
  11814. (invoke "rspec" "spec/")
  11815. (format #t "test suite not run~%"))
  11816. #t)))))
  11817. (native-inputs
  11818. `(("ruby-bump" ,ruby-bump)
  11819. ("ruby-rspec" ,ruby-rspec)))
  11820. (synopsis "Run @file{.travis.yml} files locally")
  11821. (description
  11822. "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
  11823. defined in @file{.travis.yml} on your local machine, using @code{rvm},
  11824. @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
  11825. (license license:expat)))
  11826. (define-public ruby-rugged
  11827. (package
  11828. (name "ruby-rugged")
  11829. (version "1.1.0")
  11830. (home-page "https://www.rubydoc.info/gems/rugged")
  11831. (source
  11832. (origin
  11833. (method url-fetch)
  11834. (uri (rubygems-uri "rugged" version))
  11835. (sha256
  11836. (base32 "04aq913plcxjw71l5r62qgz3bx3466p0wvgyfqahg5n3nybmcwqy"))))
  11837. (build-system ruby-build-system)
  11838. (arguments
  11839. `(#:tests? #f
  11840. #:gem-flags (list "--" "--use-system-libraries")))
  11841. (inputs
  11842. `(("libgit2" ,libgit2)))
  11843. (native-inputs
  11844. `(("ruby-minitest" ,ruby-minitest)
  11845. ("ruby-pry" ,ruby-pry)
  11846. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  11847. (synopsis "Ruby bindings to the libgit2 linkable C Git library")
  11848. (description "Rugged is a library for accessing libgit2 in Ruby. It gives
  11849. you the speed and portability of libgit2 with the beauty of the Ruby
  11850. language.")
  11851. (license license:expat)))
  11852. (define-public ruby-yell
  11853. (package
  11854. (name "ruby-yell")
  11855. (version "2.2.2")
  11856. (source
  11857. (origin
  11858. (method url-fetch)
  11859. (uri (rubygems-uri "yell" version))
  11860. (sha256
  11861. (base32
  11862. "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
  11863. (build-system ruby-build-system)
  11864. (arguments
  11865. `(#:phases
  11866. (modify-phases %standard-phases
  11867. (replace 'check
  11868. (lambda _
  11869. (invoke "rake" "examples")))))) ; there is no test target.
  11870. (synopsis
  11871. "Extensible logging library for Ruby")
  11872. (description
  11873. "Yell is a comprehensive logging replacement for Ruby. It defines
  11874. multiple adapters, various log level combinations and message formatting
  11875. options.")
  11876. (home-page "https://github.com/rudionrails/yell")
  11877. (license license:expat)))
  11878. (define-public ruby-e2mmap
  11879. (package
  11880. (name "ruby-e2mmap")
  11881. (version "0.1.0")
  11882. (source
  11883. (origin
  11884. (method url-fetch)
  11885. (uri (rubygems-uri "e2mmap" version))
  11886. (sha256
  11887. (base32
  11888. "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
  11889. (build-system ruby-build-system)
  11890. (arguments
  11891. `(#:tests? #f)) ;; There is a rakefile but no tests
  11892. (synopsis
  11893. "Module for defining custom exceptions with specific messages")
  11894. (description
  11895. "Exception2MessageMapper (e2mmap) is a helper module for easily defining
  11896. exceptions with predefined messages.")
  11897. (home-page "https://github.com/ruby/e2mmap")
  11898. (license license:bsd-2)))
  11899. (define-public ruby-benchmark
  11900. (package
  11901. (name "ruby-benchmark")
  11902. (version "0.1.1")
  11903. (source
  11904. (origin
  11905. (method url-fetch)
  11906. (uri (rubygems-uri "benchmark" version))
  11907. (sha256
  11908. (base32
  11909. "1jvrl7400fv7v2jjri1r7ilj3sri36hzipwwgpn5psib4c9c59c6"))))
  11910. (build-system ruby-build-system)
  11911. (synopsis "Performance benchmarking library")
  11912. (description "This package provides methods for benchmarking Ruby code,
  11913. giving detailed reports on the time taken for each task.")
  11914. (home-page "https://github.com/ruby/benchmark")
  11915. (license license:bsd-2)))
  11916. (define-public ruby-jekyll-feed
  11917. (package
  11918. (name "ruby-jekyll-feed")
  11919. (version "0.15.1")
  11920. (source
  11921. (origin
  11922. (method url-fetch)
  11923. (uri (rubygems-uri "jekyll-feed" version))
  11924. (sha256
  11925. (base32
  11926. "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
  11927. (build-system ruby-build-system)
  11928. (arguments
  11929. `(#:tests? #false)) ;there are none
  11930. (propagated-inputs
  11931. `(("jekyll" ,jekyll)))
  11932. (synopsis
  11933. "Jekyll plugin to generate an Atom feed of your Jekyll posts")
  11934. (description
  11935. "This package provides a Jekyll plugin to generate an Atom feed
  11936. of your Jekyll posts.")
  11937. (home-page
  11938. "https://github.com/jekyll/jekyll-feed")
  11939. (license license:expat)))
  11940. (define-public ruby-jekyll-sitemap
  11941. (package
  11942. (name "ruby-jekyll-sitemap")
  11943. (version "1.4.0")
  11944. (source
  11945. (origin
  11946. (method url-fetch)
  11947. (uri (rubygems-uri "jekyll-sitemap" version))
  11948. (sha256
  11949. (base32
  11950. "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
  11951. (build-system ruby-build-system)
  11952. (arguments
  11953. `(#:tests? #false)) ;there are none
  11954. (propagated-inputs
  11955. `(("jekyll" ,jekyll)))
  11956. (synopsis
  11957. "Automatically generate a sitemap.xml for your Jekyll site")
  11958. (description
  11959. "This package provides a Jekyll plugin to silently generate
  11960. a sitemaps.org compliant sitemap for your Jekyll site.")
  11961. (home-page
  11962. "https://github.com/jekyll/jekyll-sitemap")
  11963. (license license:expat)))
  11964. (define-public ruby-jekyll-seo-tag
  11965. (package
  11966. (name "ruby-jekyll-seo-tag")
  11967. (version "2.7.1")
  11968. (source
  11969. (origin
  11970. (method url-fetch)
  11971. (uri (rubygems-uri "jekyll-seo-tag" version))
  11972. (sha256
  11973. (base32
  11974. "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
  11975. (build-system ruby-build-system)
  11976. (arguments
  11977. `(#:tests? #false))
  11978. (propagated-inputs
  11979. `(("jekyll" ,jekyll)))
  11980. (synopsis
  11981. "Jekyll plugin to add metadata tags for search engines and social networks")
  11982. (description
  11983. "This package provides a Jekyll plugin to add metadata tags for search engines
  11984. and social networks to better index and display your site's content.")
  11985. (home-page
  11986. "https://github.com/jekyll/jekyll-seo-tag")
  11987. (license license:expat)))
  11988. (define-public ruby-taskjuggler
  11989. (package
  11990. (name "ruby-taskjuggler")
  11991. (version "3.7.1")
  11992. (source
  11993. (origin
  11994. (method url-fetch)
  11995. (uri (rubygems-uri "taskjuggler" version))
  11996. (sha256
  11997. (base32
  11998. "1jrsajzhzpnfa8hj6lbf7adn8hls56dz3yw1gvzgz9y4zkka3k9v"))))
  11999. (build-system ruby-build-system)
  12000. (native-inputs `(("tzdata" ,tzdata-for-tests)))
  12001. (propagated-inputs
  12002. `(("ruby-mail" ,ruby-mail)
  12003. ("ruby-term-ansicolor" ,ruby-term-ansicolor)))
  12004. (arguments
  12005. '(#:phases (modify-phases %standard-phases
  12006. (replace 'replace-git-ls-files
  12007. (lambda _
  12008. (substitute* "tasks/rdoc.rake"
  12009. (("`git ls-files -- lib`")
  12010. "`find lib/ -type f |sort`"))
  12011. #t))
  12012. (add-before 'check 'tzdir-setup
  12013. (lambda* (#:key inputs #:allow-other-keys)
  12014. (setenv "TZDIR"
  12015. (string-append (assoc-ref inputs "tzdata")
  12016. "/share/zoneinfo"))
  12017. #t))
  12018. (add-before 'check 'delete-test-BatchProcessor
  12019. ;; test_BatchProcessor fails with exeption:
  12020. ;; run> terminated with exception (report_on_exception is true)
  12021. (lambda _
  12022. (delete-file "test/test_BatchProcessor.rb")
  12023. #t)))))
  12024. (synopsis
  12025. "Project management command line tool with a domain specific language")
  12026. (description
  12027. "TaskJuggler (tj3) is a project management tool for project planning and
  12028. tracking using a domain specific language; projects are plain text files
  12029. written using your favourite text editor. It includes reporting in HTML, CSV
  12030. or iCalendar format and an email based status tracking system to send and
  12031. receive time sheets from collaborators.
  12032. It covers the complete spectrum of project management tasks from the first
  12033. idea to the completion of the project. It assists you during project scoping,
  12034. resource assignment, cost and revenue planning, risk and communication
  12035. management, status tracking and reporting.")
  12036. (home-page "https://taskjuggler.org")
  12037. (license license:gpl2)))
  12038. (define-public ruby-cmath
  12039. (package
  12040. (name "ruby-cmath")
  12041. (version "1.0.0")
  12042. (source
  12043. (origin
  12044. (method url-fetch)
  12045. (uri (rubygems-uri "cmath" version))
  12046. (sha256
  12047. (base32
  12048. "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
  12049. (build-system ruby-build-system)
  12050. (arguments
  12051. `(#:tests? #false))
  12052. (native-inputs
  12053. `(("bundler" ,bundler)
  12054. ("ruby-rake-compiler" ,ruby-rake-compiler)))
  12055. (synopsis "Trigonometric functions for complex numbers")
  12056. (description
  12057. "This gem is a library that provides trigonometric and transcendental
  12058. functions for complex numbers. The functions in this module accept integers,
  12059. floating-point numbers or complex numbers as arguments.")
  12060. (home-page "https://github.com/ruby/cmath")
  12061. (license license:bsd-2)))