Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Becca and Tammy Shipping API #20

Open
wants to merge 24 commits into
base: RTTH/master
Choose a base branch
from

Conversation

rmtolmach
Copy link

We chose UPS and USPS. Right now, users of the bEtsy app can see shipping options (rates and estimated shipping if available). Currently working on localhost (but not on heroku). Shipping API app: https://quartzy-shipping.herokuapp.com/
Our version of bEtsy: https://shipping-quartzy.herokuapp.com/
Trello Board: https://trello.com/b/9DpQ4ypX/shipping-service-api
See Trello Board for bugs and future features. Submit a issue if you're interested in helping out!
Thank you for reading our code and for the helpful comments!

@a-lmx a-lmx assigned a-lmx and unassigned a-lmx Feb 2, 2016
@amirahaile amirahaile self-assigned this Feb 2, 2016
@amirahaile
Copy link

So there are two empty files, Seattle, and WA, which look unintentional? Don't forget to clean up your files.

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get in the habit of deleting files you don't use. Rails can be really heavy and comes with a lot of features you won't need. Keep your workspace tidy & it can potentially speed up performance.


usps_response = usps.find_rates(origin, destination, package)
usps_rates = usps_response.rates.sort_by(&:price).collect {|rate| [rate.service_name, rate.price, rate.delivery_date]}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 14-15 & 17-18 seem like copy pasta code (i.e. identical). Could this have been pulled out into its own method?

def collectRates(shipper, origin, destination package)
    # returns sorted rates
end

@amirahaile
Copy link

Nice job! Your code is really clean, legible and your methods practice single responsibility (9/10 times; see my earlier comment). I was also really pleased with your tests. Phrasing the test names so they sound like proper sentences is exactly how RSpec was meant to be used & y'all follow the convention perfectly. 👍

@amirahaile amirahaile removed their assignment Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants