{"id":15619690,"url":"https://github.com/drbragg/user-account-validator","last_synced_at":"2025-10-28T22:48:56.741Z","repository":{"id":122872374,"uuid":"98538461","full_name":"DRBragg/user-account-validator","owner":"DRBragg","description":"Practice with error and exception handling ","archived":false,"fork":false,"pushed_at":"2017-07-27T13:24:02.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T04:27:01.753Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DRBragg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2017-07-27T13:22:13.000Z","updated_at":"2017-07-27T13:23:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"07d81860-9bd0-4513-a40a-3f3bab8734eb","html_url":"https://github.com/DRBragg/user-account-validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DRBragg/user-account-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2Fuser-account-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2Fuser-account-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2Fuser-account-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2Fuser-account-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DRBragg","download_url":"https://codeload.github.com/DRBragg/user-account-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DRBragg%2Fuser-account-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281527386,"owners_count":26516845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-10-03T08:41:03.301Z","updated_at":"2025-10-28T22:48:56.727Z","avatar_url":"https://github.com/DRBragg.png","language":"Ruby","readme":"### Introduction\n\nWe have a data set of user accounts. However, some user data is missing or incomplete.\n\n### Instructions\n\n#### Part 1\n\nCreate a `UserAccountValidator` class, that takes in a hash to its constructor.\nThe hash should have the following keys.\n\n* `:email`\n* `:username`\n* `:name`\n\nAssign the values of theses keys to instance variables and create readers for them.\n\n#### Part 2\n\nThe following conditions should `raise` an exception:\n\n* email is missing.\n* email does not contain an `@` symbol.\n* username is missing.\n\nUse the simple `raise 'message'` format for raising an exception.\n\n#### Part 3\n\nCreate a custom error class, which inherits from `StandardError`, to handle\nwhen emails are missing. Give the class a descriptive name.\n\n#### Part 4\n\nIn the `runner.rb` file, use a `begin..rescue..end` code block to rescue all\n`StandardError`s, and print out the details of what went wrong to the console.\n\n#### Part 5\n\nWrite unit test for the `UserAccountValidator` class.\n\n### Resources\n\n* [StandardError - ruby-doc.org](https://ruby-doc.org/core/StandardError.html)\n* [Exception - ruby-doc.org](https://ruby-doc.org/core/Exception.html)\n* [Ruby Error Handling, Beyond the Basics](https://www.sitepoint.com/ruby-error-handling-beyond-basics/)\n* [Exception Handling - Dan Nguyen](http://ruby.bastardsbook.com/chapters/exception-handling/)\n* [Ruby Exceptions - RubyLearning.com](http://rubylearning.com/satishtalim/ruby_exceptions.html)\n* [RSpec raise_error matcher](https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/raise-error-matcher)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbragg%2Fuser-account-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbragg%2Fuser-account-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbragg%2Fuser-account-validator/lists"}