{"id":17814912,"url":"https://github.com/tacodtripe/ruby-math-linter","last_synced_at":"2025-04-02T07:43:38.192Z","repository":{"id":75194708,"uuid":"279578984","full_name":"tacodtripe/ruby-math-linter","owner":"tacodtripe","description":"Code linter for plain text Mathematical Equations built with Ruby.","archived":false,"fork":false,"pushed_at":"2020-07-17T15:04:17.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"development","last_synced_at":"2025-02-07T22:46:47.166Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","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/tacodtripe.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":"2020-07-14T12:28:22.000Z","updated_at":"2023-02-06T22:49:08.000Z","dependencies_parsed_at":"2023-06-05T17:45:32.633Z","dependency_job_id":null,"html_url":"https://github.com/tacodtripe/ruby-math-linter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacodtripe%2Fruby-math-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacodtripe%2Fruby-math-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacodtripe%2Fruby-math-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacodtripe%2Fruby-math-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tacodtripe","download_url":"https://codeload.github.com/tacodtripe/ruby-math-linter/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777829,"owners_count":20832032,"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","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":["ruby"],"created_at":"2024-10-27T16:08:27.219Z","updated_at":"2025-04-02T07:43:38.171Z","avatar_url":"https://github.com/tacodtripe.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"200\" height=\"150\" src=\"https://raw.githubusercontent.com/tacodtripe/ruby-math-linter/features/images/microverse-logo.png\"\u003e\n\u003c/p\u003e\n\n# Ruby Capstone project :  Plain text math linter.\n\n## About the project\n  This is the **Ruby Capstone Project** required at the end of **Ruby** module in Microverse Curriculum.\n  Specifically is a **Math Linter** with the purpose to check for spacing, function's arguments correctly enclosed, and general syntax corrections when writing math expresions in plain text.\n## Built With\n  Ruby\n  \n## Rules\nIn order to use the general Mathematical specifications I used [this](https://pages.uoregon.edu/ncp/Courses/MathInPlainTextEmail.html) guide as a reference to create the linter format. Let's take a look to a few examples to make it clearer.\n\n**Spacing**\n* Al elements separated by the \"+\" and \"-\" signs must have one blank space before and after the corresponding sign, this makes the code more readable.\n\nbad code:\n```\n5x-1+3cos (3x)\n```\n\ngood code:\n```\n5x - 1 + 3cos (3x)\n```\n\n**Unmatched grouping symbols**\n* Whenever you open a grouping symbol, i.e (, [, {, the corresponding ending symbol must be used.\n\nbad code:\n```\n[5x-1) +3cos (3x)\n```\n\ngood code:\n```\n[5x - 1] + 3cos (3x)\n```\n\n**Function's arguments**\n* A way to avoid confusion is to correctly enclosed the arguments of a function with parenthesees, this will help the readers know what is the function is working over.\n\nbad code:\n```\n3cos 3x - 1\n```\n\ngood code:\n```\n3cos (3x) - 1\n```\n\n**Division's Syntax**\n* It's pretty common to be confused about the order of a pretty simple algebraic operation that includes the \"/\" sign, the solution for this might be adding some parentheses to explicitly define the numerator and denominator.\n\nbad code: here we are obligated to start with the division of 6 / x, but maybe the author meant something else.\n```\nx - 6 / x + 9\n```\n\ngood code: now it's clear what we are supposed to do.\n```\n (x - 6) / (x + 9)\n```\n\n## Instructions to use the linter\n1. Clone the repository to your local machine.\n\n2. `cd` inside the bin the folder\n\n3. Go to terminal and Install Colorize by `gem install colorize`\n\n4. Run the command `ruby main.rb` to test the attached 'test.txt' file\n\nNote: if you would like to test your own math expressions edit the 'test.txt' as much as you want, just keep in mind that comment lines must start with a '#' so the linter works properly.\n\n## Live version\n1. If you are in a hurry try [this](https://repl.it/@tacodtripe/ruby-math-linter#bin/test.txt) so you can have a quick look at what the linter does.\n\n## Instructions to test using Rspec\n1. Clone the repository to your local machine.\n\n2. `cd` inside the folder\n\n3. Go to terminal and Install Rspec by `gem install rspec`\n\n4. To run tests run `rspec` in the terminal\n\n5. Tests that are passing will be displayed along with those failing.\n\n## Authors\n\n👨 **Raul Figueroa**\n- Twitter: https://twitter.com/raul_figueroa17\n- Github: https://github.com/tacodtripe\n- Linkedin: https://www.linkedin.com/in/luis-raul-figueroa-soto-63411118a/\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nSupport this project with a ⭐️ and let us now if you would like to become a contributor!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacodtripe%2Fruby-math-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftacodtripe%2Fruby-math-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacodtripe%2Fruby-math-linter/lists"}