/eng-intern-assessment-rails

A Starter repo for Shopify Rails Intern assessments

Primary LanguageRuby

Technical Instructions

  1. Fork this repo to your local Github account.
  2. Create a new branch to complete all your work in.
  3. Test your work using the provided tests
  4. Create a Pull Request against the Shopify Main branch when you're done and all tests are passing

Project Overview

The Rails application you will be working on is an Encyclopedia, which allows users to create, view, edit, and delete articles. The application also provides search functionality to help users find relevant articles. Be sure to implement basic CRUD actions on articles. Your task is to implement these features as well as write the code that makes the tests pass.

Project Goals

The main goal of this internship project is to implement the functionality required to make the existing tests pass. The provided tests cover various aspects of the application, including creating and viewing articles, editing and updating articles, deleting articles, and searching for articles. Along with completing the tests, be sure to implement all basic CRUD actions on your articles on a controller and create views to see your work in the app.

Your specific goals for this project are as follows:

  1. Review Existing Tests: Start by reviewing the existing tests provided in the article_test.rb file located in the test/models directory. Understand the requirements and expectations of each test.

  2. Implement Functionality: Write the code necessary to make the existing tests pass. This involves implementing the required actions and logic in the models, controllers, and views to fulfill the specified requirements. Also be sure to implement basic CRUD actions and demonstrate proper MVC principals.

  3. Ensure Code Quality: Write clean, well-structured, and maintainable code. Follow best practices and adhere to the Ruby on Rails conventions. Pay attention to code readability, modularity, and performance.

  4. Test Your Code: After implementing the functionality, run the tests to ensure that they pass successfully. Fix any failures or errors that occur and retest until all tests pass.

  5. Code Documentation: Document your code by adding comments and explanatory notes where necessary. This will help other developers understand your implementation and make future maintenance easier.

  6. Version Control: Use Git for version control. Commit your changes regularly and push them to a branch in your forked repository.

  7. Create a Pull Request: Once you have completed the project goals, create a pull request to merge your changes into the main repository. Provide a clear description of the changes made and any relevant information for the code review.

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository to your local development environment.

  2. Install the necessary dependencies by running bundle install in the project directory.

  3. Familiarize yourself with the existing codebase, including the models, controllers, and views.

  4. Review the existing tests in the article_test.rb file and understand their purpose and functionality.

  5. Run the tests locally using the rspec command to ensure they are passing.

  6. Start working on the goals outlined above, making improvements to the existing tests and adding new tests as needed.

  7. Commit your changes regularly and push them to a branch in your forked repository.

  8. Once you have completed the project goals, create a pull request to merge your changes into the main repository.

Resources

Here are some resources that may be helpful during your internship project:

  • Ruby on Rails Guides - Comprehensive guides on Ruby on Rails, covering various aspects of web application development.

  • Ruby Style Guide - A community-driven Ruby coding style guide to ensure consistent and readable code.

  • Git Documentation - Official documentation for Git, the version control system used in this project.