tstaros23 / little-esty-shop-1

1 stars 3 forks source link

GitHub API: Repo Name #4

Open tstaros23 opened 2 years ago

tstaros23 commented 2 years ago

As a visitor or an admin user When I visit any page on the site I see the name of the Github repo somewhere on the site

WMudgeEllis commented 2 years ago

api path https://api.github.com/repos/tstaros23/little-esty-shop

WMudgeEllis commented 2 years ago

Needs some refactor. Current implementations may lead to api request limit being reached very quickly with a full test suite.

Do not recommend a merge into main until there is a mitigation plan put into place and/or a structural refactor.

Some possible ideas for refactor:

  1. change from a class method to an instance method to save on api requests.
  2. central api data manipulator class with supporting classes dealing with the api requests.
  3. current naming may not be semantically sound. Could be worthwhile to change the names.
  4. tweak the file structure to something else (idk what it could look like, but experiments, yay).

mitigation possibilities:

  1. mocking and stubbing, recommended by Jamison in class, however scope may be an issue when writing tests. Maybe factory bot could help? Needs looking into/ironing out for both possible scope issues as well as factory bot implementation
  2. just not merge into main until every api story is functional/has an acceptable level of completion.
  3. create an alternate integration to every view instead of threading into application.html.erb