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

Alex Lach's Danebook #34

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
bf5c546
initial commit
alexglach Aug 10, 2016
ebf3f1d
done with moving static pages
alexglach Aug 10, 2016
693b93c
log in and log out working
alexglach Aug 10, 2016
f014961
cookie works
alexglach Aug 10, 2016
fbd0753
profiles can be created
alexglach Aug 10, 2016
45a22d1
update to get ready for deployment
alexglach Aug 11, 2016
ce797df
edit form wired up
alexglach Aug 11, 2016
cf6ce60
timeline links work
alexglach Aug 11, 2016
b51da76
full redirects working and remember me
alexglach Aug 11, 2016
3728509
simple form added
alexglach Aug 11, 2016
06d3ae5
photo and friends controller working
alexglach Aug 11, 2016
57e939a
error messages now show up
alexglach Aug 12, 2016
5a2eb85
handles case of user not existing
alexglach Aug 12, 2016
95db315
new models built and migrated and connected
alexglach Aug 12, 2016
17e534c
posts working
alexglach Aug 12, 2016
2070bdc
posts can be deleted
alexglach Aug 12, 2016
93af060
comments on posts working
alexglach Aug 12, 2016
8e296dc
fixed bug
alexglach Aug 12, 2016
6fc68e9
fixed likable
alexglach Aug 12, 2016
cd5bccb
fixed models to has_one
alexglach Aug 12, 2016
d5ef7af
can like and unlike both posts and comments
alexglach Aug 14, 2016
370bd2c
commenting and liking are done
alexglach Aug 15, 2016
f86c6a4
done with testing
alexglach Aug 15, 2016
fd67273
working on testing
alexglach Aug 18, 2016
a4bda6a
initial friending done
alexglach Aug 18, 2016
9a4b713
working on photos
alexglach Aug 19, 2016
364f82b
uploading photos works
alexglach Aug 19, 2016
2a9ee11
fixed photo sizing
alexglach Aug 19, 2016
30f024c
got rid of app
alexglach Aug 19, 2016
d5cf765
altered gemfile
alexglach Aug 19, 2016
648d059
email on sign-up complete
alexglach Aug 19, 2016
3676a36
emails working on comments
alexglach Aug 19, 2016
25f2303
friends can now be searched
alexglach Aug 19, 2016
77255fd
cover and profile photos and search bar working
alexglach Aug 19, 2016
bfe4eba
search reconfigured
alexglach Aug 19, 2016
b014e1c
de-nested photos from users
alexglach Aug 19, 2016
1f1bf25
photos now fully working again
alexglach Aug 19, 2016
0eb6028
photo cropping done
alexglach Aug 22, 2016
aedaed7
de-nested likes
alexglach Aug 22, 2016
86be413
can add comments to photos, but styling needed
alexglach Aug 22, 2016
2796c4a
comment messages working in development, even with photos
alexglach Aug 22, 2016
35bbd7f
pushing email function to heroku
alexglach Aug 22, 2016
0da477a
one-off emails working
alexglach Aug 22, 2016
4a4d65c
profile pictures appearing everywhere
alexglach Aug 22, 2016
6c6b02e
comments section for photos working
alexglach Aug 22, 2016
4485903
edit page is updated
alexglach Aug 22, 2016
d113c74
updating cover photo in edit page
alexglach Aug 22, 2016
f5e75f0
fixed not liking things multiple times, nearby friends, default cover…
alexglach Sep 1, 2016
431889f
fixed liking, friending, likes display
alexglach Sep 2, 2016
492ef37
Update README.md
alexglach Sep 2, 2016
ef53dcb
Update README.md
alexglach Sep 2, 2016
4603338
fixed navbar
alexglach Sep 2, 2016
920ec25
Merge branch 'master' of https://github.com/alexglach/project_danebook
alexglach Sep 2, 2016
192f86b
navbar totally fixed
alexglach Sep 2, 2016
0deeb68
Update README.md
alexglach Sep 2, 2016
6118e61
new comment section toggling
alexglach Sep 21, 2016
40e8955
ajax posts now working
alexglach Sep 21, 2016
a9412b9
newsfeed working in order
alexglach Sep 21, 2016
1c36a9c
redirecting to newsfeed upon login
alexglach Sep 21, 2016
72f4220
like button turns to unlike
alexglach Sep 21, 2016
33d2aee
comments working everywhere but the photo page
alexglach Sep 21, 2016
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
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

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

# Ignore Byebug command history file.
.byebug_history
56 changes: 56 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'rails_12factor'
gem 'simple_form'
gem 'validates_timeliness', '~> 4.0'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# 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', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

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

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'better_errors'
end

gem 'faker'
gem 'binding_of_caller'
gem 'hirb'

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# 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

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
205 changes: 205 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0)
actionpack (= 5.0.0)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0)
actionpack (= 5.0.0)
actionview (= 5.0.0)
activejob (= 5.0.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.0)
actionview (= 5.0.0)
activesupport (= 5.0.0)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.0)
activesupport (= 5.0.0)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.0)
activesupport (= 5.0.0)
globalid (>= 0.3.6)
activemodel (5.0.0)
activesupport (= 5.0.0)
activerecord (5.0.0)
activemodel (= 5.0.0)
activesupport (= 5.0.0)
arel (~> 7.0)
activesupport (5.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (7.1.1)
bcrypt (3.1.11)
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (9.0.5)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
faker (1.6.6)
i18n (~> 0.5)
ffi (1.9.14)
globalid (0.3.7)
activesupport (>= 4.1.0)
hirb (0.7.3)
i18n (0.7.0)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pg (0.18.4)
pkg-config (1.1.7)
puma (3.6.0)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.0)
actioncable (= 5.0.0)
actionmailer (= 5.0.0)
actionpack (= 5.0.0)
actionview (= 5.0.0)
activejob (= 5.0.0)
activemodel (= 5.0.0)
activerecord (= 5.0.0)
activesupport (= 5.0.0)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.0.0)
actionpack (= 5.0.0)
activesupport (= 5.0.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.2.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
simple_form (3.2.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
spring (1.7.2)
spring-watcher-listen (2.0.0)
listen (>= 2.7, < 4.0)
spring (~> 1.2)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
timeliness (0.3.8)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.1)
execjs (>= 0.3.0, < 3)
validates_timeliness (4.0.2)
timeliness (~> 0.3.7)
web-console (3.3.1)
actionview (>= 5.0)
activemodel (>= 5.0)
debug_inspector
railties (>= 5.0)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby

DEPENDENCIES
bcrypt (~> 3.1.7)
better_errors
binding_of_caller
byebug
coffee-rails (~> 4.2)
faker
hirb
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
pg
puma (~> 3.0)
rails (~> 5.0.0)
rails_12factor
sass-rails (~> 5.0)
simple_form
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
validates_timeliness (~> 4.0)
web-console

BUNDLED WITH
1.12.5
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
danebook
========

Alex Lach's Danebook

This is the Real Dane Deal.

User
- has many posts_written
- has many posts_received
- has many comments_written
- has many likes_given

Post
- belongs_to :postable, :polymorphic =>
- belongs_to user
- has_one receiving_user
- has_many comments
- has_many likes

Comment
-has_one parent (polymorphic for comment or post)
-has_many comments
-has_many likes

Likes
- belongs_to user
- belongs_to likeable (polymorphic for posts and comments)

PostText
- has_one :post, :as => :postable

Photo
- has_one :post, :as => :postable

Video
- has_one :post, :as => :postable
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 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'

Rails.application.load_tasks
3 changes: 3 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
Empty file added app/assets/images/.keep
Empty file.
16 changes: 16 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
13 changes: 13 additions & 0 deletions app/assets/javascripts/cable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the rails generate channel command.
//
//= require action_cable
//= require_self
//= require_tree ./channels

(function() {
this.App || (this.App = {});

App.cable = ActionCable.createConsumer();

}).call(this);
Empty file.
3 changes: 3 additions & 0 deletions app/assets/javascripts/friends.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/likes.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/photos.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/posts.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/sessions.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/static_pages.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/timelines.coffee
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/
3 changes: 3 additions & 0 deletions app/assets/javascripts/users.coffee
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/
Loading