{"id":22025166,"url":"https://github.com/drexed/lite-errors","last_synced_at":"2026-02-11T18:31:42.184Z","repository":{"id":52064604,"uuid":"193539108","full_name":"drexed/lite-errors","owner":"drexed","description":"Build ActiveModel::Errors like errors in Ruby","archived":false,"fork":false,"pushed_at":"2024-08-01T23:35:16.000Z","size":37,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-19T11:14:06.717Z","etag":null,"topics":["activemodel","activerecord","errors","ruby"],"latest_commit_sha":null,"homepage":"http://drexed.github.io/lite-errors","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/drexed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-24T16:14:59.000Z","updated_at":"2021-07-22T20:16:12.000Z","dependencies_parsed_at":"2024-11-30T07:14:52.206Z","dependency_job_id":"6c742edc-453d-41ea-aa8c-29deefcc3f4c","html_url":"https://github.com/drexed/lite-errors","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.02857142857142858,"last_synced_commit":"b622d8d82745b05f1b9e7dfb3f0f82664b1e8d4b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/drexed/lite-errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drexed%2Flite-errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drexed%2Flite-errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drexed%2Flite-errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drexed%2Flite-errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drexed","download_url":"https://codeload.github.com/drexed/lite-errors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drexed%2Flite-errors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29341219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T18:24:36.877Z","status":"ssl_error","status_checked_at":"2026-02-11T18:23:50.867Z","response_time":97,"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":["activemodel","activerecord","errors","ruby"],"created_at":"2024-11-30T07:14:46.654Z","updated_at":"2026-02-11T18:31:42.165Z","avatar_url":"https://github.com/drexed.png","language":"Ruby","readme":"# Lite::Errors\n\n[![Gem Version](https://badge.fury.io/rb/lite-errors.svg)](http://badge.fury.io/rb/lite-errors)\n[![Build Status](https://travis-ci.org/drexed/lite-errors.svg?branch=master)](https://travis-ci.org/drexed/lite-errors)\n\nLite::Errors provides an API for generating and accessing error messages.\nThe API is ~90% compatible with `ActiveModel::Errors` except that it returns\nhashes instead of error objects (use Rails =\u003c 6.0 documentation). There are\nfew extra handy methods for interacting with errors so we encourage you to\nlook through the lib files.\n\n**NOTE:** If you are coming from `ActiveErrors`, please read the [port](#port) section.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'lite-errors'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install lite-errors\n\n## Table of Contents\n\n* [Usage](#usage)\n* [Port](#port)\n\n## Usage\n\n```ruby\nclass Shipment\n\n  def errors\n    @errors ||= Lite::Errors::Messages.new\n  end\n\n  def messages\n    @errors.full_messages\n  end\n\n  def process\n    ShipmentItem.each do |item|\n      item.add_to_box!\n    rescue Shipment::OutOfStock =\u003e e\n      errors.add(item.name, :out_of_stock)\n    rescue Shipment::DoesNotExist =\u003e e\n      errors[item.name] = I18n.t('errors.does_not_exist')\n    rescue ActiveRecord::RecordInvalid\n      errors.merge!(item.errors)\n    end\n  end\n\nend\n```\n\n## Port\n\n`Lite::Errors` is a compatible port of [ActiveErrors](https://github.com/drexed/active_errors).\n\nSwitching is as easy as renaming `ActiveError::Messages` to `Lite::Errors::Messages`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lite-errors. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Lite::Errors project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lite-errors/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrexed%2Flite-errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrexed%2Flite-errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrexed%2Flite-errors/lists"}