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

Jorja x Noelle Viewing Party Lite #87

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
af1f30e
Create pull_request_template.md
lofi-nowhale Oct 9, 2023
7837159
fix: fix rubocop offenses
lofi-nowhale Oct 9, 2023
3957bae
Merge pull request #12 from lofi-nowhale/rubocop_fixes
JorjaF Oct 9, 2023
f3b9cf4
setup: set up the gems needed for testing and development
lofi-nowhale Oct 9, 2023
f02e883
Merge pull request #13 from lofi-nowhale/gem_setup
JorjaF Oct 9, 2023
9af078c
add:figaro
JorjaF Oct 10, 2023
1f603b1
Merge pull request #14 from lofi-nowhale/add_api
lofi-nowhale Oct 10, 2023
69948ef
Feat: completed landing page
JorjaF Oct 10, 2023
1070e06
Merge pull request #15 from lofi-nowhale/spikej
lofi-nowhale Oct 10, 2023
9ddfa15
add tests for the users dashboard
lofi-nowhale Oct 10, 2023
81c9055
test: write tests for the viewing parties section of the users dashboard
lofi-nowhale Oct 11, 2023
c6ca04a
test: write test for the discover movies button
lofi-nowhale Oct 11, 2023
32012eb
test and db: set up tests for the user dashboard and migrate the view…
lofi-nowhale Oct 11, 2023
4ef4b63
Merge pull request #16 from lofi-nowhale/noelle_6_discover
JorjaF Oct 11, 2023
22886c0
feat: build model realtionships and validations for user, viewing par…
lofi-nowhale Oct 11, 2023
4397f73
Merge pull request #17 from lofi-nowhale/noelle_model_creation
JorjaF Oct 11, 2023
6bfd29c
view: users discover movies button, discover movies page
lofi-nowhale Oct 11, 2023
a9a135f
Merge pull request #18 from lofi-nowhale/noelle_spike
JorjaF Oct 11, 2023
b9e2b7d
add /coverage to our gitignore
lofi-nowhale Oct 12, 2023
2875c4f
Merge pull request #19 from lofi-nowhale/update_git_ignore
JorjaF Oct 12, 2023
3cacad2
test and mvc: wrote tests for the discover movies page and implemente…
lofi-nowhale Oct 12, 2023
e32533a
Merge pull request #20 from lofi-nowhale/noelle_7_discover_movies_page
JorjaF Oct 12, 2023
fe34691
added master key
JorjaF Oct 12, 2023
be394e8
Merge pull request #21 from lofi-nowhale/movie_results_j
lofi-nowhale Oct 12, 2023
d1fb340
Update Master Key again with tim
JorjaF Oct 12, 2023
059e9b4
Merge branch 'main' into spike2
lofi-nowhale Oct 12, 2023
fdf9174
Merge pull request #22 from lofi-nowhale/spike2
lofi-nowhale Oct 12, 2023
a2ef9f0
That damn master key
JorjaF Oct 12, 2023
5b66bc9
Merge pull request #23 from lofi-nowhale/spike2
lofi-nowhale Oct 12, 2023
c3fa08c
Movie results in progress
JorjaF Oct 13, 2023
ba4d6f8
Feat: Discover top rated movies
JorjaF Oct 13, 2023
c978d8b
Feat completed discover top rated movies
JorjaF Oct 13, 2023
516c7c2
Merge pull request #24 from lofi-nowhale/mrspkike
lofi-nowhale Oct 13, 2023
f71e61e
Feat Search movies still working
JorjaF Oct 13, 2023
5dc40d4
Feat: Complete discover Movies by title
JorjaF Oct 13, 2023
e704028
Merge pull request #25 from lofi-nowhale/mrspkike
lofi-nowhale Oct 13, 2023
7f64a6e
Feat: completed first API call for movie results story
JorjaF Oct 14, 2023
c2f9a07
Feat: added cast members to movie results page
JorjaF Oct 14, 2023
bbd7c01
feat and test: starting the new viewing party page
lofi-nowhale Oct 14, 2023
4ef28b8
Feat: Finished Movie_results page, but need to add testing
JorjaF Oct 14, 2023
fe39d8f
Update: added a bunch of tests, including facade specs, poro specs, 1…
JorjaF Oct 14, 2023
ebe0a0f
Merge pull request #27 from lofi-nowhale/movie_results_2
lofi-nowhale Oct 14, 2023
4638aea
wip: new viewing party form
lofi-nowhale Oct 14, 2023
89e8ff1
Merge branch 'main' of github.com:lofi-nowhale/viewing_party_lite_7 i…
lofi-nowhale Oct 14, 2023
71a3b23
feat: create a viewing party
lofi-nowhale Oct 14, 2023
0302998
Merge pull request #28 from lofi-nowhale/noelle_new_viewing_party
JorjaF Oct 14, 2023
47b252d
viewing party
lofi-nowhale Oct 14, 2023
3c754fe
Merge pull request #29 from lofi-nowhale/noelle_new_viewing_party
JorjaF Oct 14, 2023
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@
!/tmp/storage/
!/tmp/storage/.keep


/public/assets

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


# Ignore application configuration
/config/application.yml

/coverage/
echo coverage >> .gitignore
47 changes: 27 additions & 20 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
source "https://rubygems.org"
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.2"
ruby '3.2.2'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.4", ">= 7.0.4.2"
gem 'rails', '~> 7.0.4', '>= 7.0.4.2'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
gem 'sprockets-rails'

# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"
gem 'pg', '~> 1.1'

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem 'puma', '~> 5.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
gem 'importmap-rails'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
gem 'stimulus-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"
gem 'jbuilder'

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
Expand All @@ -37,10 +39,10 @@ gem "jbuilder"
# gem "bcrypt", "~> 3.1.7"

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

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

# Use Sass to process CSS
# gem "sassc-rails"
Expand All @@ -50,24 +52,29 @@ gem "bootsnap", require: false

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "pry"
gem 'pry'
gem 'faraday'
gem 'webmock'
gem 'vcr'
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
gem "rubocop-rails"
gem 'rubocop-rails'
end

group :test do
gem "rspec-rails"
gem "capybara"
gem "launchy"
gem "simplecov"
end
gem 'capybara'
gem 'launchy'
gem 'rspec-rails'
gem 'simplecov'
gem 'shoulda-matchers'
gem 'rails-controller-testing'
end
28 changes: 28 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ GEM
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
Expand All @@ -84,13 +85,21 @@ GEM
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
crack (0.4.5)
rexml
crass (1.0.6)
date (3.3.3)
diff-lcs (1.5.0)
docile (1.4.0)
erubi (1.12.0)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
globalid (1.1.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
importmap-rails (1.2.1)
Expand Down Expand Up @@ -160,6 +169,10 @@ GEM
activesupport (= 7.0.6)
bundler (>= 1.15.0)
railties (= 7.0.6)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.1.1)
activesupport (>= 5.0.0)
minitest
Expand Down Expand Up @@ -213,6 +226,9 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
shoulda-matchers (5.3.0)
activesupport (>= 5.2.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -237,11 +253,16 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
vcr (6.2.0)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -250,27 +271,34 @@ GEM
zeitwerk (2.6.8)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-darwin-21
x86_64-darwin-22

DEPENDENCIES
bootsnap
capybara
faraday
importmap-rails
jbuilder
launchy
pg (~> 1.1)
pry
puma (~> 5.0)
rails (~> 7.0.4, >= 7.0.4.2)
rails-controller-testing
rspec-rails
rubocop-rails
shoulda-matchers
simplecov
sprockets-rails
stimulus-rails
turbo-rails
tzinfo-data
vcr
web-console
webmock

RUBY VERSION
ruby 3.2.2p53
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require_relative "config/application"
require_relative 'config/application'

Rails.application.load_tasks
2 changes: 2 additions & 0 deletions app/channels/application_cable/channel.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ApplicationCable
class Channel < ActionCable::Channel::Base
end
Expand Down
2 changes: 2 additions & 0 deletions app/channels/application_cable/connection.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ApplicationCable
class Connection < ActionCable::Connection::Base
end
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

class ApplicationController < ActionController::Base
end
4 changes: 4 additions & 0 deletions app/controllers/discover_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class DiscoverController < ApplicationController
def index
end
end
5 changes: 5 additions & 0 deletions app/controllers/landing_page_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class LandingPageController < ApplicationController
def index
@users = User.all
end
end
18 changes: 18 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class MoviesController < ApplicationController
def index
@user = User.find(session[:user_id])
if params[:search_by_movie_title]
@movies = MovieFacade.search(params[:search_by_movie_title])
else
@movies = MovieFacade.top_rated_movies
end
end

def show
@user = User.find(session[:user_id])
id = params[:id]
@movie = MovieFacade.find_by_id(params[:id])
@cast = MovieFacade.find_cast(params[:id]).first(10)
@reviews = MovieFacade.find_reviews(params[:id])
end
end
17 changes: 17 additions & 0 deletions app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class SearchController < ApplicationController
def search
conn = Faraday.new(url: 'https://api.themoviedb.org') do |faraday|
faraday.params['api_key'] = ENV['MOVIE_API_KEY']
end
response = conn.get("/3/movie/top_rated")

data = JSON.parse(response.body, symbolize_names: true)

movies = data[:results]

found_movies = movies.map do |movie_data|
# movie_data[:original_title] == params[:search]
end
@movie = found_movies.first
end
end
19 changes: 19 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class UsersController < ApplicationController
def show
@user = User.find(params[:id])
session[:user_id] = @user.id
end

def new

end

def create
@user = User.new(name: params[:name], email: params[:email])
if @user.save
redirect_to user_path(@user)
else
render :new
end
end
end
17 changes: 17 additions & 0 deletions app/controllers/viewing_parties_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class ViewingPartiesController < ApplicationController
def new
@user = User.find_by_id(session[:user_id])
@users = User.all
id = params[:id]
@movie = MovieFacade.find_by_id(params[:id])
end

def create
@user = User.find_by_id(session[:user_id])
# if params[:duration].present? && params[:start_time].present? && params[:movie_id].present?
# @user.viewingparty.create(movie_title: params[:name]
# description:params[:description]

# end
end
end
Loading