forked from AdaGold/tunes-takeout
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Tunes&Takeout, Val edition! #18
Open
digivava
wants to merge
47
commits into
Ada-C5:master
Choose a base branch
from
digivava:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
32cc186
Got basic setup of project... unsure of how to do Users just yet, so …
digivava e6518e9
started Restaurant api wrappy model class thing
digivava f8a4172
Started beginning of wrapper for spotify item
digivava 8a8afdb
set up basic barebones HTML structure for front page
digivava 7d17487
TunestakeoutWrapper now has ability to find a suggestion pairing from…
digivava f2d2ac0
Suggestions index now has searchbar which reloads the same page with …
digivava e8999b2
Suggestions index now can connect to the spotify item name.
digivava 6c3ce61
Set up test_helper and gemfile for use of VCR
digivava 7738de2
Wrote unit tests for TunesTakeoutWrapper class using VCR. At first I …
digivava 0c248e2
Added simplecov capabilities
digivava 7c41d97
Removed playlist requirements code, and updated spotify_item wrapper …
digivava 05aa4a9
Rearranged components on index page so they make more sense semantica…
digivava 411272a
Set up tests for spotify items
digivava 31820b8
Added some more super basic tests for spotify_item_test
digivava a2665ab
Set up omniauth for spotify
digivava abda1a5
Setting up auth_hash, changed uid column to accept integers instead o…
digivava be208f8
Actually the last migration didn't work, fixed it
digivava 0bd311f
Session controller now has a create method, not sure if working until…
digivava bfd5fab
Adjusted greeting box at top of page so that it should respond to log…
digivava 6063523
Added logout_path and gave sessions#create the name login_path
digivava 4525d51
Added flash notices for when authentication goes wrong, and added des…
digivava 0d13701
Added find_or_create_from_omniauth class, largely copypaste from kari…
digivava a5ebd1b
Switched column uid back to string type in case that's the problem
digivava eb47ae4
Fixed the uid id jumbley madness and created current_user helper meth…
digivava b4fd898
The suggestion is now a partial
digivava e556223
Schema for user now contains image and profile, so that logged in use…
digivava 689c6b9
user name and image now links to profile
digivava 4a471ae
Only logged in users can see searchbar now
digivava 1a3c33f
Set up yelp wrapper
digivava 3f06486
Phone number of restaurant now looks like a phone number instead of a…
digivava d5738fc
Address formatted with newlines
digivava 5b1f5af
music suggestion now links to relevant spotify page, I didn't notice …
digivava 96df446
Index page now shows top 20 suggestions and did some refactoring
digivava fdfd510
the tunestakeoutwrapper search now uses the sample method on the sugg…
digivava f061b91
Added divs surrounding the different sections of the index, and adjus…
digivava a05b34a
Added link for Favorites page to top of every page
digivava 9e56eb5
Made suggestions routes on routes.rb more clear
digivava 498a916
suggestions partial now has a fave option
digivava e558fb0
FOR THE LOVE OF GOD FINALLY. Clicking fave on a suggestion now change…
digivava 65fded5
I WANT TO KISS SOMETHING. User favorites page works now. Still a litt…
digivava f064394
Made it so favoriting-related items are only visible for logged-in us…
digivava d7afb7c
Unfave link now works, yay
digivava 5129046
Added spotify logo above greeting box for more clarity as to who is b…
digivava b1b9fda
Added custom validation methods
digivava 8927875
Added link back to index at top of page for logged-in users
digivava 010250b
Oops, forgot the equal sign
digivava d2df956
Added some tests for user model
digivava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the sessions controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the suggestions controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class SessionsController < ApplicationController | ||
|
||
def new | ||
|
||
end | ||
|
||
def create | ||
auth_hash = request.env['omniauth.auth'] | ||
@user = User.find_or_create_from_omniauth(auth_hash) | ||
if @user | ||
session[:user_id] = @user.id | ||
redirect_to root_path | ||
else | ||
flash[:notice] = "Failed to save the user" | ||
redirect_to root_path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great job adding an error handling case |
||
end | ||
end | ||
|
||
def destroy | ||
session.delete(:user_id) | ||
@user = nil | ||
redirect_to root_path | ||
end | ||
|
||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Empty controller methods like this can be re-written in one line like:
def new; end