{"id":26057575,"url":"https://github.com/folkengine/harshed","last_synced_at":"2026-04-25T03:35:21.254Z","repository":{"id":56875876,"uuid":"56469247","full_name":"folkengine/harshed","owner":"folkengine","description":"Ruby Serializable Hashed Array Utility","archived":false,"fork":false,"pushed_at":"2016-04-30T19:05:31.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T07:19:56.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folkengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-18T01:57:11.000Z","updated_at":"2016-04-18T02:11:01.000Z","dependencies_parsed_at":"2022-08-20T22:00:48.096Z","dependency_job_id":null,"html_url":"https://github.com/folkengine/harshed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/folkengine/harshed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fharshed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fharshed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fharshed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fharshed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folkengine","download_url":"https://codeload.github.com/folkengine/harshed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkengine%2Fharshed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32249091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T03:17:44.950Z","status":"ssl_error","status_checked_at":"2026-04-25T03:16:45.208Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-08T11:24:12.460Z","updated_at":"2026-04-25T03:35:21.238Z","avatar_url":"https://github.com/folkengine.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harshed\n\n[![Gem Version](https://badge.fury.io/rb/harshed.svg)](https://badge.fury.io/rb/harshed)\n[![Build Status](https://travis-ci.org/folkengine/harshed.svg?branch=master)](https://travis-ci.org/folkengine/harshed)\n\nRuby Serializable Hashed Array Utility\n\nA Harsh is a hashed array that can be quickly written to and read from disk in a format that can be easily reviewed. \nTake a collection of same type objects. Pick a pivot point, aka, a field unique to each object that can be used as the key \nfor the hash. \n\nI wrote this module to support development/testing techniques that I've grown use to. As a developer I am squarely in the \n[classical, anti-mockist camp](https://agilewarrior.wordpress.com/2015/04/18/classical-vs-mockist-testing/). Harshed helps with that. \nYou can an early version of Harshed in action over @ my [DX-EverCraft repo](https://github.com/folkengine/dx_evercraft).\n\nEventually, I'd like to update this module to support the following features:\n\n1. Support for JSON\n2. Support for XML\n3. Ability to pivot on a field not in the object being serialized.\n4. Harshed DB support\n5. Deal with the sure to be their defect of spaces on the pivot field\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'harshed'\n```\n\nAnd then execute:\n\n    $\u003e bundle\n\nOr install it yourself as:\n\n    $\u003e gem install harshed\n\n## Usage\n\n      class Character\n        attr_reader :character_name, :strength, :dexterity, :constitution, :wisdom, :intelligence, :charisma\n    \n        def initialize(character_name)\n          @character_name = character_name\n          @strength = 10\n          @dexterity = 10\n          @constitution = 10\n          @wisdom = 10\n          @intelligence = 10\n          @charisma = 10\n        end\n      end\n      \n      @heroes = Harshed::Harsh.new(:character_name, storage_folder: 'characters')\n      \n      sir_fumblealot = Character.new('SirFumbleAlot')\n      stinky = Character.new('StinkyTheBeggar')\n      \n      @heroes.store([sir_fumblealot, stinky])\n      \n      @heroes.to_disk\n      \n      @heroes_reborn = Harshed::Harsh.new(:character_name, storage_folder: 'characters')\n                           .from_disk\n                 \n## Development\n\nTo run tests:\n\n    $\u003e rake \n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/folkengine/harshed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkengine%2Fharshed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolkengine%2Fharshed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkengine%2Fharshed/lists"}