-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fire: Ayesha/ Blaine - SLACK API Project Submission #23
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slack CLI
Major Learning Goals/Code Review
Criteria | yes/no, and optionally any details/lines of code to reference |
---|---|
Practices best practices working with APIs. The .env is not checked into git, and no API token was directly used in the Ruby code without ENV . |
✔️ |
Practices error handling with APIs. For all pieces of code that make an API call, it handles API requests that come back with errors/error status codes appropriately. | ✔️ |
Implements inheritance and inheritance idioms. There is a Recipient class. User and Channel inherit from Recipient . In Recipient , there are appropriate methods defined that are used in both User and Channel . Some may be implemented. Some may be template methods. |
✔️ |
Practices clean code. lib/slack.rb only interacts with Workspace to show a separation of responsibilities. Complex logic is broken into smaller helper methods. |
✔️ |
Practices instance methods vs. class methods appropriately. The methods to list all Channels or Users is likely a class method within those respective classes. | ✔️ |
Practices best practices for testing. The project has and uses VCR mocking when running tests, and can run offline. | ✔️ |
Practices writing tests. The User , Channel , and Workspace classes have unit tests. |
✔️ |
Practices writing tests. There are tests for sending messages (the location of these tests may differ, but is likely in Recipient ) |
couldn't find send tests |
Practices git with at least 15 small commits and meaningful commit messages | ✔️ |
Functional Requirements
Functional Requirement | yes/no |
---|---|
As a user of the CLI program, I can list users and channels | ✔️ |
As a user of the CLI program, I can select users and channels | ✔️ |
As a user of the CLI program, I can show the details of a selected user or channel | ✔️ |
As a user of the CLI program, when I input something inappropriately, the program runs without crashing | ✔️ |
Overall Feedback
Overall Feedback | Criteria | yes/no |
---|---|---|
Green (Meets/Exceeds Standards) | 7+ in Code Review && 3+ in Functional Requirements | ✔️ |
Yellow (Approaches Standards) | 6+ in Code Review && 2+ in Functional Requirements | |
Red (Not at Standard) | 0-5 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging |
selected.post_message(end_user_message) | ||
puts "Your message has been sent!" | ||
rescue | ||
puts "You need to select a User or Channel." | ||
puts "Start again." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This piece of code never seems to send my messages, always telling me that I have to select a user or channel, and I suspect that this is because you've made an error with how you're using the keyword rescue
. Here's an example how how to use recuse completely in this situation:
selected.post_message(end_user_message) | |
puts "Your message has been sent!" | |
rescue | |
puts "You need to select a User or Channel." | |
puts "Start again." | |
begin | |
selected.post_message(end_user_message) | |
rescue | |
puts "You need to select a User or Channel." | |
puts "Start again." | |
else | |
puts "Your message has been sent!" | |
end |
def get_details | ||
@selected.get_details | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this is doing? Should this be a template method? @selected
doesn't exist elsewhere in this class.
@@ -0,0 +1,34 @@ | |||
require_relative 'recipient' | |||
require 'prettyprint' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you required prettyprint
in recipient
, you don't need to require it here ;)
Assignment Submission: Slack CLI
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection