{"id":15463524,"url":"https://github.com/cored/users-csv","last_synced_at":"2026-06-30T10:31:46.110Z","repository":{"id":248026289,"uuid":"827464549","full_name":"cored/users-csv","owner":"cored","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-30T21:22:47.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-21T12:35:09.466Z","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/cored.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":"2024-07-11T17:38:42.000Z","updated_at":"2024-07-16T21:59:08.000Z","dependencies_parsed_at":"2024-07-31T01:17:07.581Z","dependency_job_id":null,"html_url":"https://github.com/cored/users-csv","commit_stats":null,"previous_names":["cored/users-csv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cored/users-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fusers-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fusers-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fusers-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fusers-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cored","download_url":"https://codeload.github.com/cored/users-csv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cored%2Fusers-csv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34963633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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-02T00:21:44.046Z","updated_at":"2026-06-30T10:31:46.080Z","avatar_url":"https://github.com/cored.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User Data Upload Application\n\nThis application allows users to upload a CSV file containing user data. Each user entry in the CSV file is validated against specific criteria before being saved to the database.\n\n## Technologies Used\n\n- [Ruby on Rails](https://rubyonrails.org/) - A web application framework written in Ruby.\n- [RSpec](https://rspec.info/) - A testing framework for Ruby.\n- [CSV](https://ruby-doc.org/stdlib-2.7.4/libdoc/csv/rdoc/CSV.html) - Ruby's built-in library for reading and writing CSV files.\n- [FactoryBot](https://github.com/thoughtbot/factory_bot) - A library for setting up Ruby objects as test data.\n- [Turbo Streams](https://turbo.hotwired.dev/) - Used for updating HTML pages in real-time.\n\n## Problem Statement\n\nThe application's main goal is to handle CSV uploads containing user data. Each user record must include a `name` and a `password` that meets specific criteria to be considered valid:\n- The `name` attribute is required.\n- The `password` attribute must:\n\t- Be between 10 and 16 characters long.\n\t- Include at least one lowercase letter, one uppercase letter, and one digit.\n\t- Not contain three repeating characters in a row.\n\nUpon uploading a CSV file, the application processes each row, attempts to create a user record, and displays the result (success or failure) for each row.\n\n## Implementation Structure\n\nThe application is structured as follows:\n\n- **Controllers**:\n\t- `UsersController`: Handles CSV file uploads and displays results.\n\n- **Models**:\n\t- `User`: Represents a user with validations for `name` and `password`.\n\n- **Services**:\n\t- `Imports::UploadCsv`: Responsible for parsing and validating CSV data, creating `User` records, and handling exceptions for invalid CSV files.\n\n- **Views**:\n\t- Minimal views are used, primarily to display results after CSV upload.\n\n## How to Run Tests\n\nTo run tests for the application:\n\n1. **Install Dependencies**: Make sure all dependencies specified in the `Gemfile` are installed by running:\n\t ```bash\n\t bundle install\n\t ```\n\n2. **Run RSpec Tests**: Execute the following command to run the RSpec tests located in the `spec` directory:\n\t ```bash\n\t rspec\n\t ```\n\t This command will run all tests and display the results in your terminal.\n\n## How to Run and Try the Application\n\nTo run and try out the application locally, follow these steps:\n\n1. **Clone the Repository**: Clone the Git repository to your local machine:\n\t ```bash\n\t git clone \u003crepository-url\u003e\n\t cd \u003crepository-name\u003e\n\t ```\n\n2. **Install Dependencies**: Install all dependencies specified in the `Gemfile`:\n\t ```bash\n\t bundle install\n\t ```\n\n3. **Setup Database**: If necessary, setup your database with:\n\t ```bash\n\t rails db:create\n\t rails db:migrate\n\t ```\n\n4. **Start the Rails Server**: Start the Rails server to run the application locally:\n\t ```bash\n\t rails server\n\t ```\n\n5. **Access the Application**: Open your web browser and navigate to `http://localhost:3000` to access the application.\n\n6. **Upload CSV File**: On the homepage, you can upload a CSV file containing user data following the specified format.\n\n7. **View Results**: After uploading the CSV file, the application will display the results (success or failure) for each row processed.\n\n## Contributing\n\nContributions are welcome! Feel free to fork the repository, create pull requests, and suggest improvements.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcored%2Fusers-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcored%2Fusers-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcored%2Fusers-csv/lists"}