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

samjo's recipe-muncher #32

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a426eb3
Run rails new
sjlee3157 Oct 30, 2018
f8a003b
Added .env to gitignore
sjlee3157 Oct 30, 2018
1be3c92
Set local: true as default for form_with
sjlee3157 Oct 30, 2018
5eb2e48
Created RecipeSearch Controller
sjlee3157 Oct 31, 2018
fdeead7
Added dotevn-rails gem, moved httparty to top
sjlee3157 Oct 31, 2018
9ce046c
Automatically load all code from <rails_root>/lib
sjlee3157 Oct 31, 2018
222be44
Added Recipe class and API wrapper
sjlee3157 Oct 31, 2018
aea404a
Added Edamam attribution in footer
sjlee3157 Oct 31, 2018
01a14a7
Added recipe_uri field to Recipe class
sjlee3157 Oct 31, 2018
a8bb7a3
Created cards for index that link to show pages for each recipe
sjlee3157 Oct 31, 2018
dee3ae2
Wrote lib test for recipe.rb
sjlee3157 Oct 31, 2018
0b2ff0d
Add and configure VCR and Webmock
sjlee3157 Oct 31, 2018
af2eae7
Wrote edamam_api_wrapper tests
sjlee3157 Oct 31, 2018
c592948
Wrote controller tests for recipe_search search index show, failures
sjlee3157 Oct 31, 2018
9139bf2
Fixed missing constants in test_helper.rb
sjlee3157 Oct 31, 2018
c59abf5
Index links to show page, but there's an issue with tests
sjlee3157 Oct 31, 2018
60d4bee
Controller tests pass
sjlee3157 Oct 31, 2018
3645fc0
Filled out show page with minimum required elements
sjlee3157 Oct 31, 2018
0dc42e6
Fleshed out tests for wrapper and controller, passing
sjlee3157 Oct 31, 2018
e2075ab
Nothing to see here especially not secret keys nope
sjlee3157 Oct 31, 2018
3d86752
Added will_paginate with custom css to index
sjlee3157 Nov 1, 2018
360caab
Added will_paginate with custom css to index
sjlee3157 Nov 1, 2018
7c56502
Merged in search branch pagination and card styling
sjlee3157 Nov 1, 2018
c3d4072
Smaller ingredient list line spacing on cards
sjlee3157 Nov 1, 2018
00498d3
Removed require pry
sjlee3157 Nov 1, 2018
c50da80
Removed extraneous head tags for external stylesheets
sjlee3157 Nov 2, 2018
bbf1355
Exceptions raised by bad search terms handled with 'no results' message
sjlee3157 Nov 2, 2018
d13d67f
Larger clickable area to access search text field
sjlee3157 Nov 2, 2018
e1d993a
Tweaked layouts
sjlee3157 Nov 2, 2018
8568ea9
More styling
sjlee3157 Nov 2, 2018
0d7f912
Moved recipe.rb back to lib, and added simplecov
sjlee3157 Nov 2, 2018
3095314
Tests passing for rescue and .valid? in Recipe.rb
sjlee3157 Nov 2, 2018
1ffa4bf
Current tests passing
sjlee3157 Nov 2, 2018
d90e957
Index lists a set union of health labels for the search results
sjlee3157 Nov 2, 2018
e68469b
Wrote test for EdamamApiWrapper.list_tags, passing
sjlee3157 Nov 2, 2018
6512238
Can do a very basic search filter with checkboxes
sjlee3157 Nov 3, 2018
e1ae24d
Reapplied styling for search bar
sjlee3157 Nov 3, 2018
b28014b
Added view helper to keep filter tags checked if they're in uri
sjlee3157 Nov 3, 2018
f2529eb
Tags are sorted alphabetically
sjlee3157 Nov 3, 2018
0a2204a
Added shuffle/unshuffle buttons, but they don't preserve filters
sjlee3157 Nov 3, 2018
f5da811
Default order button only shows if the recipes are shuffled
sjlee3157 Nov 3, 2018
304c733
Created Query model and controller
sjlee3157 Nov 3, 2018
e450672
Renamed routes restfully - eg RecipeSearchES controller
sjlee3157 Nov 3, 2018
10d6306
Created sessions controller
sjlee3157 Nov 3, 2018
4c43684
Added OmniAuth google and github
sjlee3157 Nov 5, 2018
c112e34
Fixed typo
sjlee3157 Nov 5, 2018
5d69800
Fixed database relationships Users-Queries
sjlee3157 Nov 5, 2018
7a52b3a
Fixed typo
sjlee3157 Nov 5, 2018
1260190
Fixed bugs with User model
sjlee3157 Nov 5, 2018
afed55f
Removed protect from forgery
sjlee3157 Nov 5, 2018
628ba2c
Added OAuth Google and Github
sjlee3157 Nov 5, 2018
8084d33
logged-in user can save to favorites
sjlee3157 Nov 5, 2018
edd0b7b
If user isn't logged in, redirect back
sjlee3157 Nov 5, 2018
3e8ba0a
User can clear all favorites if Edamam is throttling because of loadi…
sjlee3157 Nov 5, 2018
9e84b85
User can delete favorite from show page
sjlee3157 Nov 5, 2018
eda5dae
User can return to a recent search by q (query) only
sjlee3157 Nov 5, 2018
40f3d12
Added comment
sjlee3157 Nov 5, 2018
4c52aa9
Styled recent search buttons
sjlee3157 Nov 5, 2018
16c62ed
Set up to write tests
sjlee3157 Nov 5, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore uploaded files in development
/storage/*
!/storage/.keep

/node_modules
/yarn-error.log

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

# Environment file for all my secrets
.env

# SimpleCov
/coverage/*
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.5.1
92 changes: 92 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.1'
gem 'httparty'
gem "omniauth"
gem "omniauth-github"
gem 'omniauth-google-oauth2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
# gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'dotenv-rails'
gem 'minitest-vcr'
gem 'webmock'
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
gem 'simplecov', require: false
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'jquery-rails'
gem 'jquery-turbolinks'
gem 'bootstrap', '~> 4.1.3'
group :development, :test do
gem 'pry-rails'
end

group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'guard'
gem 'guard-minitest'
end

group :test do
gem 'minitest-rails'
gem 'minitest-reporters'
end

gem "font-awesome-rails"
gem 'will_paginate', '~> 3.1.0'
Loading