\ No newline at end of file
diff --git a/app/views/photos/show.html.erb b/app/views/photos/show.html.erb
new file mode 100644
index 000000000..470431f96
--- /dev/null
+++ b/app/views/photos/show.html.erb
@@ -0,0 +1,48 @@
+
+
+
\ No newline at end of file
diff --git a/app/views/profiles/index.html.erb b/app/views/profiles/index.html.erb
new file mode 100644
index 000000000..f242c8c9c
--- /dev/null
+++ b/app/views/profiles/index.html.erb
@@ -0,0 +1,59 @@
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
+
About Me
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
+
+
+
+
\ No newline at end of file
diff --git a/app/views/profiles/photos.html.erb b/app/views/profiles/photos.html.erb
new file mode 100644
index 000000000..8d61b2243
--- /dev/null
+++ b/app/views/profiles/photos.html.erb
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/profiles/show.html.erb b/app/views/profiles/show.html.erb
new file mode 100644
index 000000000..20b28fbd1
--- /dev/null
+++ b/app/views/profiles/show.html.erb
@@ -0,0 +1,71 @@
+
+ <%= simple_form_for current_user.profile, :url => user_profiles_path(current_user) do |f| %>
+ <%= f.input :college, label: 'Where did you go for college?' %>
+ <%= f.input :home_town, label: 'Where were you born?' %>
+ <%= f.input :currently_lives, placeholder: 'Where do you currently live?' %>
+ <%= f.input :phone_number, inline_label: 'Phone number so ladies can slide in your DM' %>
+ <%= f.button :submit, class: "btn btn-success"%>
+ <% end %>
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
+
About Me
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
+
+
+
+
\ No newline at end of file
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
new file mode 100644
index 000000000..d8c61332c
--- /dev/null
+++ b/app/views/sessions/new.html.erb
@@ -0,0 +1,14 @@
+<%= form_tag session_path do %>
+
+ <%= label_tag do %>
+ Email
+ <%= text_field_tag :email %>
+ <% end %>
+
+ <%= label_tag do %>
+ Password
+ <%= password_field_tag :password %>
+ <% end %>
+
+ <%= submit_tag "Log in" %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/shared/_nav.html.erb b/app/views/shared/_nav.html.erb
new file mode 100644
index 000000000..5c5c03349
--- /dev/null
+++ b/app/views/shared/_nav.html.erb
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/app/views/shared/_nav_login.html.erb b/app/views/shared/_nav_login.html.erb
new file mode 100644
index 000000000..b6bdf527f
--- /dev/null
+++ b/app/views/shared/_nav_login.html.erb
@@ -0,0 +1,48 @@
+<% if !signed_in_user? %>
+ <%= form_tag session_path do %>
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/shared/_wall_post.html.erb b/app/views/shared/_wall_post.html.erb
new file mode 100644
index 000000000..fda7daad0
--- /dev/null
+++ b/app/views/shared/_wall_post.html.erb
@@ -0,0 +1,76 @@
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/timelines/index.html.erb b/app/views/timelines/index.html.erb
new file mode 100644
index 000000000..0beca4d65
--- /dev/null
+++ b/app/views/timelines/index.html.erb
@@ -0,0 +1,23 @@
+
+
\ No newline at end of file
diff --git a/app/views/user_mailer/trigger.html.erb b/app/views/user_mailer/trigger.html.erb
new file mode 100644
index 000000000..96f85f8aa
--- /dev/null
+++ b/app/views/user_mailer/trigger.html.erb
@@ -0,0 +1,16 @@
+
Triggered! No, not the meme. I mean that you have posted or commented somewhere.
+
+
+ Hi <%= @user.username %>
+
+ You posted at:
+ <%= @post.created_at %> on <%= @user.username %>'s wall with the following _::_
+
+
+
+ <%= @post.description %>
+
+
+
+ View your account at <%= link_to "#{user_url(@user.id)}", user_url(@user.id) %>
+
\ No newline at end of file
diff --git a/app/views/user_mailer/trigger.text.erb b/app/views/user_mailer/trigger.text.erb
new file mode 100644
index 000000000..5ff1780d4
--- /dev/null
+++ b/app/views/user_mailer/trigger.text.erb
@@ -0,0 +1,7 @@
+Triggered! No, not the meme. I mean that you have posted or commented somewhere.
+
+Hi <%= @user.username %>,
+
+You posted at: <%= @post.created_at %> on <%= @user.username %>'s wall with the following _::_ <%= @post.description %>
+
+View your account at <%= link_to "#{user_url(@user.id)}", user_url(@user.id) %>
\ No newline at end of file
diff --git a/app/views/user_mailer/welcome.html.erb b/app/views/user_mailer/welcome.html.erb
new file mode 100644
index 000000000..d1e2e839f
--- /dev/null
+++ b/app/views/user_mailer/welcome.html.erb
@@ -0,0 +1,9 @@
+
Welcome!
+
+
+ Hi <%= @user.username %>, welcome to CrudCrud!
+
+
+
+ View your account at <%= link_to "#{user_url(@user.id)}", user_url(@user.id) %>
+
\ No newline at end of file
diff --git a/app/views/user_mailer/welcome.text.erb b/app/views/user_mailer/welcome.text.erb
new file mode 100644
index 000000000..cda6ac193
--- /dev/null
+++ b/app/views/user_mailer/welcome.text.erb
@@ -0,0 +1,5 @@
+Welcome!
+
+Hi <%= @user.username %>, welcome to CrudCrud!
+
+View your account at <%= link_to "#{user_url(@user.id)}", user_url(@user.id) %>
\ No newline at end of file
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
new file mode 100644
index 000000000..2c7c8d21d
--- /dev/null
+++ b/app/views/users/index.html.erb
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
new file mode 100644
index 000000000..a5f42f8c3
--- /dev/null
+++ b/app/views/users/new.html.erb
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
Connect with all your friends!
+
+
+
+
+
See photos and updates in your news feed
+
+
+
Post your status for the world to see from your profile
+
+
+
Get in touch with your friends by "friending" them
+
\ No newline at end of file
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
new file mode 100644
index 000000000..5f2e70124
--- /dev/null
+++ b/app/views/users/show.html.erb
@@ -0,0 +1,110 @@
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+
+
+
+
+
+
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+
+
+
+
+
+
+
+
+ <%= render "shared/wall_post_form"%>
+
+
+
+ <% if current_user && current_user.id == @user.id %>
+ <% @posts.reverse.each do |post| %>
+ <%= render partial: "shared/wall_post", locals: { post: post} %>
+ <% end %>
+ <% end %>
+
+
+
+
+
\ No newline at end of file
diff --git a/assignment_danebook_homepage b/assignment_danebook_homepage
new file mode 160000
index 000000000..7c5e235f7
--- /dev/null
+++ b/assignment_danebook_homepage
@@ -0,0 +1 @@
+Subproject commit 7c5e235f7f86d138e15f9d08b9b620f7cab6c659
diff --git a/bin/bundle b/bin/bundle
new file mode 100755
index 000000000..66e9889e8
--- /dev/null
+++ b/bin/bundle
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+load Gem.bin_path('bundler', 'bundle')
diff --git a/bin/delayed_job b/bin/delayed_job
new file mode 100755
index 000000000..edf195985
--- /dev/null
+++ b/bin/delayed_job
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
+require 'delayed/command'
+Delayed::Command.new(ARGV).daemonize
diff --git a/bin/rails b/bin/rails
new file mode 100755
index 000000000..073966023
--- /dev/null
+++ b/bin/rails
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+APP_PATH = File.expand_path('../config/application', __dir__)
+require_relative '../config/boot'
+require 'rails/commands'
diff --git a/bin/rake b/bin/rake
new file mode 100755
index 000000000..17240489f
--- /dev/null
+++ b/bin/rake
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 000000000..e620b4dad
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,34 @@
+#!/usr/bin/env ruby
+require 'pathname'
+require 'fileutils'
+include FileUtils
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file.
+
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?('config/database.yml')
+ # cp 'config/database.yml.sample', 'config/database.yml'
+ # end
+
+ puts "\n== Preparing database =="
+ system! 'bin/rails db:setup'
+
+ puts "\n== Removing old logs and tempfiles =="
+ system! 'bin/rails log:clear tmp:clear'
+
+ puts "\n== Restarting application server =="
+ system! 'bin/rails restart'
+end
diff --git a/bin/update b/bin/update
new file mode 100755
index 000000000..a8e4462f2
--- /dev/null
+++ b/bin/update
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+require 'pathname'
+require 'fileutils'
+include FileUtils
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
+ # This script is a way to update your development environment automatically.
+ # Add necessary update steps to this file.
+
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
+
+ puts "\n== Updating database =="
+ system! 'bin/rails db:migrate'
+
+ puts "\n== Removing old logs and tempfiles =="
+ system! 'bin/rails log:clear tmp:clear'
+
+ puts "\n== Restarting application server =="
+ system! 'bin/rails restart'
+end
diff --git a/config.ru b/config.ru
new file mode 100644
index 000000000..f7ba0b527
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,5 @@
+# This file is used by Rack-based servers to start the application.
+
+require_relative 'config/environment'
+
+run Rails.application
diff --git a/config/application.rb b/config/application.rb
new file mode 100644
index 000000000..af54ad3ac
--- /dev/null
+++ b/config/application.rb
@@ -0,0 +1,15 @@
+require_relative 'boot'
+
+require 'rails/all'
+
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(*Rails.groups)
+
+module ProjectDanebook
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+ end
+end
diff --git a/config/boot.rb b/config/boot.rb
new file mode 100644
index 000000000..30f5120df
--- /dev/null
+++ b/config/boot.rb
@@ -0,0 +1,3 @@
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
+
+require 'bundler/setup' # Set up gems listed in the Gemfile.
diff --git a/config/cable.yml b/config/cable.yml
new file mode 100644
index 000000000..0bbde6f74
--- /dev/null
+++ b/config/cable.yml
@@ -0,0 +1,9 @@
+development:
+ adapter: async
+
+test:
+ adapter: async
+
+production:
+ adapter: redis
+ url: redis://localhost:6379/1
diff --git a/config/database.yml b/config/database.yml
new file mode 100644
index 000000000..3bd0fe3c4
--- /dev/null
+++ b/config/database.yml
@@ -0,0 +1,31 @@
+# SQLite version 3.x
+# gem install sqlite3
+#
+# Ensure the SQLite 3 gem is defined in your Gemfile
+# gem 'sqlite3'
+#
+default: &default
+ adapter: postgresql
+ pool: 5
+ timeout: 5000
+
+development:
+ adapter: postgresql
+ database: db/project_development
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: postgresql
+ database: db/project_test
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: postgresql
+ database: db/project_production
+ pool: 5
+ timeout: 5000
diff --git a/config/environment.rb b/config/environment.rb
new file mode 100644
index 000000000..426333bb4
--- /dev/null
+++ b/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the Rails application.
+require_relative 'application'
+
+# Initialize the Rails application.
+Rails.application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
new file mode 100644
index 000000000..555fa05a8
--- /dev/null
+++ b/config/environments/development.rb
@@ -0,0 +1,82 @@
+Rails.application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ #letter
+
+ config.action_mailer.delivery_method = :letter_opener
+
+ config.action_mailer.default_url_options = { :host => "thebombdot.com" }
+ Paperclip.options[:command_path] = "/user/local/bin"
+
+ config.paperclip_defaults = {
+
+ # Don't forget to make S3 your storage option!
+ :storage => :s3,
+
+ :s3_credentials => {
+
+ # put your host name here if needed
+ # see the reading below for more details
+ # NOTE: This must be the correct region for YOU
+ :s3_host_name => "s3-us-west-2.amazonaws.com",
+ :s3_region => "us-west-2",
+
+ # NOTE: these lines are changed to use secrets.yml
+ # from the examples (which use ENV vars instead)
+ :bucket => Rails.application.secrets.s3_bucket_name,
+ :access_key_id => Rails.application.secrets.aws_access_key_id,
+ :secret_access_key => Rails.application.secrets.aws_secret_access_key
+ }
+ }
+
+ config.cache_classes = false
+
+ # Do not eager load code on boot.
+ config.eager_load = false
+
+ # Show full error reports.
+ config.consider_all_requests_local = true
+
+ # Enable/disable caching. By default caching is disabled.
+ if Rails.root.join('tmp/caching-dev.txt').exist?
+ config.action_controller.perform_caching = true
+
+ config.cache_store = :memory_store
+ config.public_file_server.headers = {
+ 'Cache-Control' => 'public, max-age=172800'
+ }
+ else
+ config.action_controller.perform_caching = false
+
+ config.cache_store = :null_store
+ end
+
+ # Don't care if the mailer can't send.
+ config.action_mailer.raise_delivery_errors = false
+
+ config.action_mailer.perform_caching = false
+
+ # Print deprecation notices to the Rails logger.
+ config.active_support.deprecation = :log
+
+ # Raise an error on page load if there are pending migrations.
+ config.active_record.migration_error = :page_load
+
+ # Debug mode disables concatenation and preprocessing of assets.
+ # This option may cause significant delays in view rendering with a large
+ # number of complex assets.
+ config.assets.debug = true
+
+ # Suppress logger output for asset requests.
+ config.assets.quiet = true
+
+ # Raises error for missing translations
+ # config.action_view.raise_on_missing_translations = true
+
+ # Use an evented file watcher to asynchronously detect changes in source code,
+ # routes, locales, etc. This feature depends on the listen gem.
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+end
diff --git a/config/environments/production.rb b/config/environments/production.rb
new file mode 100644
index 000000000..ce7b0b02c
--- /dev/null
+++ b/config/environments/production.rb
@@ -0,0 +1,118 @@
+Rails.application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+ config.serve_static_assets = true
+
+ config.action_mailer.smtp_settings = {
+ :address => 'smtp.sendgrid.net',
+ :port => '587',
+ :authentication => :plain,
+ :user_name => ENV['SENDGRID_USERNAME'],
+ :password => ENV['SENDGRID_PASSWORD'],
+ :domain => 'heroku.com',
+ :enable_starttls_auto => true
+ }
+ config.action_mailer.delivery_method ||= :smtp
+
+ config.action_mailer.default_url_options = { :host => 'daneb00k.herokuapp.com'}
+
+ config.paperclip_defaults = {
+ :storage => :s3,
+ :s3_credentials => {
+
+ # put your host name here if needed
+ # see the reading below for more details
+ # NOTE: This must be the correct region for YOU
+ :s3_host_name => "s3-us-west-2.amazonaws.com",
+ :s3_region => "us-west-2",
+
+ # NOTE: these lines are changed to use secrets.yml
+ # from the examples (which use ENV vars instead)
+ :bucket => Rails.application.secrets.s3_bucket_name,
+ :access_key_id => Rails.application.secrets.aws_access_key_id,
+ :secret_access_key => Rails.application.secrets.aws_secret_access_key
+ }
+ }
+
+ # Code is not reloaded between requests.
+ config.cache_classes = true
+
+ # Eager load code on boot. This eager loads most of Rails and
+ # your application in memory, allowing both threaded web servers
+ # and those relying on copy on write to perform better.
+ # Rake tasks automatically ignore this option for performance.
+ config.eager_load = true
+
+ # Full error reports are disabled and caching is turned on.
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Disable serving static files from the `/public` folder by default since
+ # Apache or NGINX already handles this.
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
+
+ # Compress JavaScripts and CSS.
+ config.assets.js_compressor = :uglifier
+ # config.assets.css_compressor = :sass
+
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
+ config.assets.compile = false
+
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+ # config.action_controller.asset_host = 'http://assets.example.com'
+
+ # Specifies the header that your server uses for sending files.
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
+
+ # Mount Action Cable outside main process or domain
+ # config.action_cable.mount_path = nil
+ # config.action_cable.url = 'wss://example.com/cable'
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # Use the lowest log level to ensure availability of diagnostic information
+ # when problems arise.
+ config.log_level = :debug
+
+ # Prepend all log lines with the following tags.
+ config.log_tags = [ :request_id ]
+
+ # Use a different cache store in production.
+ # config.cache_store = :mem_cache_store
+
+ # Use a real queuing backend for Active Job (and separate queues per environment)
+ # config.active_job.queue_adapter = :resque
+ # config.active_job.queue_name_prefix = "project_danebook_#{Rails.env}"
+ config.action_mailer.perform_caching = false
+
+ # Ignore bad email addresses and do not raise email delivery errors.
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation cannot be found).
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners.
+ config.active_support.deprecation = :notify
+
+ # Use default logging formatter so that PID and timestamp are not suppressed.
+ config.log_formatter = ::Logger::Formatter.new
+
+ # Use a different logger for distributed setups.
+ # require 'syslog/logger'
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
+
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
+ logger = ActiveSupport::Logger.new(STDOUT)
+ logger.formatter = config.log_formatter
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
+ end
+
+ # Do not dump schema after migrations.
+ config.active_record.dump_schema_after_migration = false
+end
diff --git a/config/environments/test.rb b/config/environments/test.rb
new file mode 100644
index 000000000..30587ef6d
--- /dev/null
+++ b/config/environments/test.rb
@@ -0,0 +1,42 @@
+Rails.application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Do not eager load code on boot. This avoids loading your whole application
+ # just for the purpose of running a single test. If you are using a tool that
+ # preloads Rails for running tests, you may have to set it to true.
+ config.eager_load = false
+
+ # Configure public file server for tests with Cache-Control for performance.
+ config.public_file_server.enabled = true
+ config.public_file_server.headers = {
+ 'Cache-Control' => 'public, max-age=3600'
+ }
+
+ # Show full error reports and disable caching.
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates.
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment.
+ config.action_controller.allow_forgery_protection = false
+ config.action_mailer.perform_caching = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Print deprecation notices to the stderr.
+ config.active_support.deprecation = :stderr
+
+ # Raises error for missing translations
+ # config.action_view.raise_on_missing_translations = true
+end
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb
new file mode 100644
index 000000000..51639b67a
--- /dev/null
+++ b/config/initializers/application_controller_renderer.rb
@@ -0,0 +1,6 @@
+# Be sure to restart your server when you modify this file.
+
+# ApplicationController.renderer.defaults.merge!(
+# http_host: 'example.org',
+# https: false
+# )
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
new file mode 100644
index 000000000..01ef3e663
--- /dev/null
+++ b/config/initializers/assets.rb
@@ -0,0 +1,11 @@
+# Be sure to restart your server when you modify this file.
+
+# Version of your assets, change this if you want to expire all your assets.
+Rails.application.config.assets.version = '1.0'
+
+# Add additional assets to the asset load path
+# Rails.application.config.assets.paths << Emoji.images_path
+
+# Precompile additional assets.
+# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
+# Rails.application.config.assets.precompile += %w( search.js )
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
new file mode 100644
index 000000000..59385cdf3
--- /dev/null
+++ b/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
new file mode 100644
index 000000000..5a6a32d37
--- /dev/null
+++ b/config/initializers/cookies_serializer.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Specify a serializer for the signed and encrypted cookie jars.
+# Valid options are :json, :marshal, and :hybrid.
+Rails.application.config.action_dispatch.cookies_serializer = :json
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
new file mode 100644
index 000000000..4a994e1e7
--- /dev/null
+++ b/config/initializers/filter_parameter_logging.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Configure sensitive parameters which will be filtered from the log file.
+Rails.application.config.filter_parameters += [:password]
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
new file mode 100644
index 000000000..ac033bf9d
--- /dev/null
+++ b/config/initializers/inflections.rb
@@ -0,0 +1,16 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format. Inflections
+# are locale specific, and you may define rules for as many different
+# locales as you wish. All of these examples are active by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.acronym 'RESTful'
+# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
new file mode 100644
index 000000000..dc1899682
--- /dev/null
+++ b/config/initializers/mime_types.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
new file mode 100644
index 000000000..0706cafd4
--- /dev/null
+++ b/config/initializers/new_framework_defaults.rb
@@ -0,0 +1,24 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains migration options to ease your Rails 5.0 upgrade.
+#
+# Read the Rails 5.0 release notes for more info on each option.
+
+# Enable per-form CSRF tokens. Previous versions had false.
+Rails.application.config.action_controller.per_form_csrf_tokens = true
+
+# Enable origin-checking CSRF mitigation. Previous versions had false.
+Rails.application.config.action_controller.forgery_protection_origin_check = true
+
+# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
+# Previous versions had false.
+ActiveSupport.to_time_preserves_timezone = true
+
+# Require `belongs_to` associations by default. Previous versions had false.
+Rails.application.config.active_record.belongs_to_required_by_default = true
+
+# Do not halt callback chains when a callback returns false. Previous versions had true.
+ActiveSupport.halt_callback_chains_on_return_false = false
+
+# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
+Rails.application.config.ssl_options = { hsts: { subdomains: true } }
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
new file mode 100644
index 000000000..f2d118131
--- /dev/null
+++ b/config/initializers/session_store.rb
@@ -0,0 +1,3 @@
+# Be sure to restart your server when you modify this file.
+
+Rails.application.config.session_store :cookie_store, key: '_project_danebook_session'
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
new file mode 100644
index 000000000..934487af6
--- /dev/null
+++ b/config/initializers/simple_form.rb
@@ -0,0 +1,165 @@
+# Use this setup block to configure all options available in SimpleForm.
+SimpleForm.setup do |config|
+ # Wrappers are used by the form builder to generate a
+ # complete input. You can remove any component from the
+ # wrapper, change the order or even add your own to the
+ # stack. The options given below are used to wrap the
+ # whole input.
+ config.wrappers :default, class: :input,
+ hint_class: :field_with_hint, error_class: :field_with_errors do |b|
+ ## Extensions enabled by default
+ # Any of these extensions can be disabled for a
+ # given input by passing: `f.input EXTENSION_NAME => false`.
+ # You can make any of these extensions optional by
+ # renaming `b.use` to `b.optional`.
+
+ # Determines whether to use HTML5 (:email, :url, ...)
+ # and required attributes
+ b.use :html5
+
+ # Calculates placeholders automatically from I18n
+ # You can also pass a string as f.input placeholder: "Placeholder"
+ b.use :placeholder
+
+ ## Optional extensions
+ # They are disabled unless you pass `f.input EXTENSION_NAME => true`
+ # to the input. If so, they will retrieve the values from the model
+ # if any exists. If you want to enable any of those
+ # extensions by default, you can change `b.optional` to `b.use`.
+
+ # Calculates maxlength from length validations for string inputs
+ b.optional :maxlength
+
+ # Calculates pattern from format validations for string inputs
+ b.optional :pattern
+
+ # Calculates min and max from length validations for numeric inputs
+ b.optional :min_max
+
+ # Calculates readonly automatically from readonly attributes
+ b.optional :readonly
+
+ ## Inputs
+ b.use :label_input
+ b.use :hint, wrap_with: { tag: :span, class: :hint }
+ b.use :error, wrap_with: { tag: :span, class: :error }
+
+ ## full_messages_for
+ # If you want to display the full error message for the attribute, you can
+ # use the component :full_error, like:
+ #
+ # b.use :full_error, wrap_with: { tag: :span, class: :error }
+ end
+
+ # The default wrapper to be used by the FormBuilder.
+ config.default_wrapper = :default
+
+ # Define the way to render check boxes / radio buttons with labels.
+ # Defaults to :nested for bootstrap config.
+ # inline: input + label
+ # nested: label > input
+ config.boolean_style = :nested
+
+ # Default class for buttons
+ config.button_class = 'btn'
+
+ # Method used to tidy up errors. Specify any Rails Array method.
+ # :first lists the first message for each field.
+ # Use :to_sentence to list all errors for each field.
+ # config.error_method = :first
+
+ # Default tag used for error notification helper.
+ config.error_notification_tag = :div
+
+ # CSS class to add for error notification helper.
+ config.error_notification_class = 'error_notification'
+
+ # ID to add for error notification helper.
+ # config.error_notification_id = nil
+
+ # Series of attempts to detect a default label method for collection.
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
+
+ # Series of attempts to detect a default value method for collection.
+ # config.collection_value_methods = [ :id, :to_s ]
+
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
+ # config.collection_wrapper_tag = nil
+
+ # You can define the class to use on all collection wrappers. Defaulting to none.
+ # config.collection_wrapper_class = nil
+
+ # You can wrap each item in a collection of radio/check boxes with a tag,
+ # defaulting to :span.
+ # config.item_wrapper_tag = :span
+
+ # You can define a class to use in all item wrappers. Defaulting to none.
+ # config.item_wrapper_class = nil
+
+ # How the label text should be generated altogether with the required text.
+ # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
+
+ # You can define the class to use on all labels. Default is nil.
+ # config.label_class = nil
+
+ # You can define the default class to be used on forms. Can be overriden
+ # with `html: { :class }`. Defaulting to none.
+ # config.default_form_class = nil
+
+ # You can define which elements should obtain additional classes
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
+
+ # Whether attributes are required by default (or not). Default is true.
+ # config.required_by_default = true
+
+ # Tell browsers whether to use the native HTML5 validations (novalidate form option).
+ # These validations are enabled in SimpleForm's internal config but disabled by default
+ # in this configuration, which is recommended due to some quirks from different browsers.
+ # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
+ # change this configuration to true.
+ config.browser_validations = false
+
+ # Collection of methods to detect if a file type was given.
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
+
+ # Custom mappings for input types. This should be a hash containing a regexp
+ # to match as key, and the input type that will be used when the field name
+ # matches the regexp as value.
+ # config.input_mappings = { /count/ => :integer }
+
+ # Custom wrappers for input types. This should be a hash containing an input
+ # type as key and the wrapper that will be used for all inputs with specified type.
+ # config.wrapper_mappings = { string: :prepend }
+
+ # Namespaces where SimpleForm should look for custom input classes that
+ # override default inputs.
+ # config.custom_inputs_namespaces << "CustomInputs"
+
+ # Default priority for time_zone inputs.
+ # config.time_zone_priority = nil
+
+ # Default priority for country inputs.
+ # config.country_priority = nil
+
+ # When false, do not use translations for labels.
+ # config.translate_labels = true
+
+ # Automatically discover new inputs in Rails' autoload path.
+ # config.inputs_discovery = true
+
+ # Cache SimpleForm inputs discovery
+ # config.cache_discovery = !Rails.env.development?
+
+ # Default class for inputs
+ # config.input_class = nil
+
+ # Define the default class of the input wrapper of the boolean input.
+ config.boolean_label_class = 'checkbox'
+
+ # Defines if the default input wrapper class should be included in radio
+ # collection wrappers.
+ # config.include_default_input_wrapper_class = true
+
+ # Defines which i18n scope will be used in Simple Form.
+ # config.i18n_scope = 'simple_form'
+end
diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb
new file mode 100644
index 000000000..109d29a37
--- /dev/null
+++ b/config/initializers/simple_form_bootstrap.rb
@@ -0,0 +1,149 @@
+# Use this setup block to configure all options available in SimpleForm.
+SimpleForm.setup do |config|
+ config.error_notification_class = 'alert alert-danger'
+ config.button_class = 'btn btn-default'
+ config.boolean_label_class = nil
+
+ config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.optional :maxlength
+ b.optional :pattern
+ b.optional :min_max
+ b.optional :readonly
+ b.use :label, class: 'control-label'
+
+ b.use :input, class: 'form-control'
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+
+ config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.optional :maxlength
+ b.optional :readonly
+ b.use :label, class: 'control-label'
+
+ b.use :input
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+
+ config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+
+ b.wrapper tag: 'div', class: 'checkbox' do |ba|
+ ba.use :label_input
+ end
+
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+
+ config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+ b.use :label, class: 'control-label'
+ b.use :input
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+
+ config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.optional :maxlength
+ b.optional :pattern
+ b.optional :min_max
+ b.optional :readonly
+ b.use :label, class: 'col-sm-3 control-label'
+
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
+ ba.use :input, class: 'form-control'
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+ end
+
+ config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.optional :maxlength
+ b.optional :readonly
+ b.use :label, class: 'col-sm-3 control-label'
+
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
+ ba.use :input
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+ end
+
+ config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+
+ b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
+ wr.wrapper tag: 'div', class: 'checkbox' do |ba|
+ ba.use :label_input
+ end
+
+ wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+ end
+
+ config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+
+ b.use :label, class: 'col-sm-3 control-label'
+
+ b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
+ ba.use :input
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+ end
+
+ config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.optional :maxlength
+ b.optional :pattern
+ b.optional :min_max
+ b.optional :readonly
+ b.use :label, class: 'sr-only'
+
+ b.use :input, class: 'form-control'
+ b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+
+ config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
+ b.use :html5
+ b.optional :readonly
+ b.use :label, class: 'control-label'
+ b.wrapper tag: 'div', class: 'form-inline' do |ba|
+ ba.use :input, class: 'form-control'
+ ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
+ ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
+ end
+ end
+ # Wrappers for forms and inputs using the Bootstrap toolkit.
+ # Check the Bootstrap docs (http://getbootstrap.com)
+ # to learn about the different styles for forms and inputs,
+ # buttons and other elements.
+ config.default_wrapper = :vertical_form
+ config.wrapper_mappings = {
+ check_boxes: :vertical_radio_and_checkboxes,
+ radio_buttons: :vertical_radio_and_checkboxes,
+ file: :vertical_file_input,
+ boolean: :vertical_boolean,
+ datetime: :multi_select,
+ date: :multi_select,
+ time: :multi_select
+ }
+end
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
new file mode 100644
index 000000000..bbfc3961b
--- /dev/null
+++ b/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json]
+end
+
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+# self.include_root_in_json = true
+# end
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 000000000..065395716
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,23 @@
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
+#
+# To use the locales, use `I18n.t`:
+#
+# I18n.t 'hello'
+#
+# In views, this is aliased to just `t`:
+#
+# <%= t('hello') %>
+#
+# To use a different locale, set it with `I18n.locale`:
+#
+# I18n.locale = :es
+#
+# This would use the information in config/locales/es.yml.
+#
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
+
+en:
+ hello: "Hello world"
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
new file mode 100644
index 000000000..237438334
--- /dev/null
+++ b/config/locales/simple_form.en.yml
@@ -0,0 +1,31 @@
+en:
+ simple_form:
+ "yes": 'Yes'
+ "no": 'No'
+ required:
+ text: 'required'
+ mark: '*'
+ # You can uncomment the line below if you need to overwrite the whole required html.
+ # When using html, text and mark won't be used.
+ # html: '*'
+ error_notification:
+ default_message: "Please review the problems below:"
+ # Examples
+ # labels:
+ # defaults:
+ # password: 'Password'
+ # user:
+ # new:
+ # email: 'E-mail to sign in.'
+ # edit:
+ # email: 'E-mail.'
+ # hints:
+ # defaults:
+ # username: 'User name to sign in.'
+ # password: 'No special characters, please.'
+ # include_blanks:
+ # defaults:
+ # age: 'Rather not say'
+ # prompts:
+ # defaults:
+ # age: 'Select your age'
diff --git a/config/puma.rb b/config/puma.rb
new file mode 100644
index 000000000..c7f311f81
--- /dev/null
+++ b/config/puma.rb
@@ -0,0 +1,47 @@
+# Puma can serve each request in a thread from an internal thread pool.
+# The `threads` method setting takes two numbers a minimum and maximum.
+# Any libraries that use thread pools should be configured to match
+# the maximum value specified for Puma. Default is set to 5 threads for minimum
+# and maximum, this matches the default thread size of Active Record.
+#
+threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
+threads threads_count, threads_count
+
+# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
+#
+port ENV.fetch("PORT") { 3000 }
+
+# Specifies the `environment` that Puma will run in.
+#
+environment ENV.fetch("RAILS_ENV") { "development" }
+
+# Specifies the number of `workers` to boot in clustered mode.
+# Workers are forked webserver processes. If using threads and workers together
+# the concurrency of the application would be max `threads` * `workers`.
+# Workers do not work on JRuby or Windows (both of which do not support
+# processes).
+#
+# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
+
+# Use the `preload_app!` method when specifying a `workers` number.
+# This directive tells Puma to first boot the application and load code
+# before forking the application. This takes advantage of Copy On Write
+# process behavior so workers use less memory. If you use this option
+# you need to make sure to reconnect any threads in the `on_worker_boot`
+# block.
+#
+# preload_app!
+
+# The code in the `on_worker_boot` will be called if you are using
+# clustered mode by specifying a number of `workers`. After each worker
+# process is booted this block will be run, if you are using `preload_app!`
+# option you will want to use this block to reconnect to any threads
+# or connections that may have been created at application boot, Ruby
+# cannot share connections between processes.
+#
+# on_worker_boot do
+# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
+# end
+
+# Allow puma to be restarted by `rails restart` command.
+plugin :tmp_restart
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 000000000..45b60ee2f
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,33 @@
+Rails.application.routes.draw do
+ root to: 'users#new'
+ resources :users, :except => [:update, :destroy] do
+ resources :photos, :defaults => { :photoable => 'User'}
+ resources :friendings, :only => [:index, :create, :index]
+
+ resources :posts, :only => [:create, :destroy] do
+ resources :photos, :defaults => { :photoable => 'Post'}, :only => [:create]
+ resources :likings, :only => [:create]
+ end
+
+ resource :profiles, :except => [:create, :destroy] do
+ resources :photos, :defaults => { :photoable => 'Profile'}, :only => [:create]
+ get "/edit" => "profiles#show"
+ get "/" => "profiles#index"
+ end
+ end
+
+ resources :posts, :except => [:create, :destroy] do
+ resources :comments, :defaults => { :commentable => 'Post'}, :except => [:destroy]
+ end
+
+ resources :comments, :only => [:destroy]
+
+ resources :timelines, :only => [:index]
+ resources :friendings, :only => [:destroy]
+ resources :likings, :only => [:destroy]
+ resource :session, :only => [:new, :create, :destroy]
+
+ get "login" => "sessions#new"
+ delete "logout" => "sessions#destroy"
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
+end
diff --git a/config/secrets.yml b/config/secrets.yml
new file mode 100644
index 000000000..9dbc59eb2
--- /dev/null
+++ b/config/secrets.yml
@@ -0,0 +1,28 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key is used for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+# You can use `rails secret` to generate a secure secret key.
+
+# Make sure the secrets in this file are kept private
+# if you're sharing your code publicly.
+
+development:
+ secret_key_base: a33cf0bc51531d81b29af66b636ef52b44ed88fc69f706fba42832bd38461ac5638a5c28c7fee022f671930fcfb5f9f1e8d521e03f5814f933ddc0f98d6a992d
+ s3_bucket_name: <%= ENV["S3_BUCKET_NAME"] %>
+ aws_access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
+ aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
+
+test:
+ secret_key_base: 6f2239f357284dc5574ffe9ca724a23ecb5d092838a612e88d1cdb7b109552909af90618d4bc776bd6a5d8ca75ccf8f7830f9320c5fbf51924ab6711a19d9add
+
+# Do not keep production secrets in the repository,
+# instead read values from the environment.
+production:
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
+ s3_bucket_name: <%= ENV["S3_BUCKET_NAME"] %>
+ aws_access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
+ aws_secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
diff --git a/config/spring.rb b/config/spring.rb
new file mode 100644
index 000000000..c9119b40c
--- /dev/null
+++ b/config/spring.rb
@@ -0,0 +1,6 @@
+%w(
+ .ruby-version
+ .rbenv-vars
+ tmp/restart.txt
+ tmp/caching-dev.txt
+).each { |path| Spring.watch(path) }
diff --git a/db/migrate/20160810213243_create_users.rb b/db/migrate/20160810213243_create_users.rb
new file mode 100644
index 000000000..a835c0c99
--- /dev/null
+++ b/db/migrate/20160810213243_create_users.rb
@@ -0,0 +1,11 @@
+class CreateUsers < ActiveRecord::Migration[5.0]
+ def change
+ create_table :users do |t|
+ t.string :username
+ t.string :email
+ t.string :password_digest
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20160810224508_add_auth_token_to_users.rb b/db/migrate/20160810224508_add_auth_token_to_users.rb
new file mode 100644
index 000000000..350799bed
--- /dev/null
+++ b/db/migrate/20160810224508_add_auth_token_to_users.rb
@@ -0,0 +1,6 @@
+class AddAuthTokenToUsers < ActiveRecord::Migration[5.0]
+ def change
+ add_column :users, :auth_token, :string
+ add_index :users, :auth_token, :unique => true
+ end
+end
diff --git a/db/migrate/20160811182202_create_profiles.rb b/db/migrate/20160811182202_create_profiles.rb
new file mode 100644
index 000000000..cf09f7391
--- /dev/null
+++ b/db/migrate/20160811182202_create_profiles.rb
@@ -0,0 +1,16 @@
+class CreateProfiles < ActiveRecord::Migration[5.0]
+ def change
+ create_table :profiles do |t|
+ t.string :first_name
+ t.string :last_name
+ t.string :month
+ t.integer :day
+ t.integer :year
+ t.string :gender
+
+ t.references :user, index: true, foreign_key: true
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20160811232849_add_basic_information_to_profile.rb b/db/migrate/20160811232849_add_basic_information_to_profile.rb
new file mode 100644
index 000000000..66c428b43
--- /dev/null
+++ b/db/migrate/20160811232849_add_basic_information_to_profile.rb
@@ -0,0 +1,8 @@
+class AddBasicInformationToProfile < ActiveRecord::Migration[5.0]
+ def change
+ add_column :profiles, :college, :string, optional: true
+ add_column :profiles, :home_town, :string, optional: true
+ add_column :profiles, :currently_lives, :string, optional: true
+ add_column :profiles, :phone_number, :string, optional: true
+ end
+end
diff --git a/db/migrate/20160812161906_create_posts.rb b/db/migrate/20160812161906_create_posts.rb
new file mode 100644
index 000000000..ce6c96f4d
--- /dev/null
+++ b/db/migrate/20160812161906_create_posts.rb
@@ -0,0 +1,10 @@
+class CreatePosts < ActiveRecord::Migration[5.0]
+ def change
+ create_table :posts do |t|
+ t.string :description
+
+ t.references :user, index: true, foreign_key: true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20160815081204_create_likings.rb b/db/migrate/20160815081204_create_likings.rb
new file mode 100644
index 000000000..2e5bd8d0e
--- /dev/null
+++ b/db/migrate/20160815081204_create_likings.rb
@@ -0,0 +1,11 @@
+class CreateLikings < ActiveRecord::Migration[5.0]
+ def change
+ create_table :likings do |t|
+ t.integer :user_id
+ t.integer :likeable_id
+ t.string :likeable_type
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20160818220430_create_photos.rb b/db/migrate/20160818220430_create_photos.rb
new file mode 100644
index 000000000..06e40ca99
--- /dev/null
+++ b/db/migrate/20160818220430_create_photos.rb
@@ -0,0 +1,11 @@
+class CreatePhotos < ActiveRecord::Migration[5.0]
+ def change
+ create_table :photos do |t|
+ t.integer :user_id
+ t.string :label
+
+ t.references :photoable, :polymorphic => true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20160819201330_create_delayed_jobs.rb b/db/migrate/20160819201330_create_delayed_jobs.rb
new file mode 100644
index 000000000..27fdcf6cc
--- /dev/null
+++ b/db/migrate/20160819201330_create_delayed_jobs.rb
@@ -0,0 +1,22 @@
+class CreateDelayedJobs < ActiveRecord::Migration
+ def self.up
+ create_table :delayed_jobs, force: true do |table|
+ table.integer :priority, default: 0, null: false # Allows some jobs to jump to the front of the queue
+ table.integer :attempts, default: 0, null: false # Provides for retries, but still fail eventually.
+ table.text :handler, null: false # YAML-encoded string of the object that will do work
+ table.text :last_error # reason for last failure (See Note below)
+ table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
+ table.datetime :locked_at # Set when a client is working on this object
+ table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
+ table.string :locked_by # Who is working on this object (if locked)
+ table.string :queue # The name of the queue this job is in
+ table.timestamps null: true
+ end
+
+ add_index :delayed_jobs, [:priority, :run_at], name: "delayed_jobs_priority"
+ end
+
+ def self.down
+ drop_table :delayed_jobs
+ end
+end
diff --git a/db/migrate/20160819230223_create_friendings.rb b/db/migrate/20160819230223_create_friendings.rb
new file mode 100644
index 000000000..931ba6f44
--- /dev/null
+++ b/db/migrate/20160819230223_create_friendings.rb
@@ -0,0 +1,12 @@
+class CreateFriendings < ActiveRecord::Migration[5.0]
+ def change
+ create_table :friendings do |t|
+ t.integer :friend_id, :null => false
+ t.integer :friender_id, :null => false
+
+ t.timestamps
+ end
+
+ add_index :friendings, [:friend_id, :friender_id], :unique => true
+ end
+end
diff --git a/db/migrate/20160822211904_create_comments.rb b/db/migrate/20160822211904_create_comments.rb
new file mode 100644
index 000000000..17d3cbf9c
--- /dev/null
+++ b/db/migrate/20160822211904_create_comments.rb
@@ -0,0 +1,11 @@
+class CreateComments < ActiveRecord::Migration[5.0]
+ def change
+ create_table :comments do |t|
+ t.string :user_id
+ t.string :description
+
+ t.references :commentable, :polymorphic => true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 000000000..4079a4b6d
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,115 @@
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema.define(version: 20160822211904) do
+
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
+
+ create_table "comments", force: :cascade do |t|
+ t.string "user_id"
+ t.string "description"
+ t.string "commentable_type"
+ t.integer "commentable_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["commentable_type", "commentable_id"], name: "index_comments_on_commentable_type_and_commentable_id", using: :btree
+ end
+
+ create_table "delayed_jobs", force: :cascade do |t|
+ t.integer "priority", default: 0, null: false
+ t.integer "attempts", default: 0, null: false
+ t.text "handler", null: false
+ t.text "last_error"
+ t.datetime "run_at"
+ t.datetime "locked_at"
+ t.datetime "failed_at"
+ t.string "locked_by"
+ t.string "queue"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.index ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
+ end
+
+ create_table "friendings", force: :cascade do |t|
+ t.integer "friend_id", null: false
+ t.integer "friender_id", null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["friend_id", "friender_id"], name: "index_friendings_on_friend_id_and_friender_id", unique: true, using: :btree
+ end
+
+ create_table "likes", force: :cascade do |t|
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ create_table "likings", force: :cascade do |t|
+ t.integer "user_id"
+ t.integer "likeable_id"
+ t.string "likeable_type"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+ create_table "photos", force: :cascade do |t|
+ t.integer "user_id"
+ t.string "label"
+ t.string "photoable_type"
+ t.integer "photoable_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "avatar_file_name"
+ t.string "avatar_content_type"
+ t.integer "avatar_file_size"
+ t.datetime "avatar_updated_at"
+ t.index ["photoable_type", "photoable_id"], name: "index_photos_on_photoable_type_and_photoable_id", using: :btree
+ end
+
+ create_table "posts", force: :cascade do |t|
+ t.string "description"
+ t.integer "user_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["user_id"], name: "index_posts_on_user_id", using: :btree
+ end
+
+ create_table "profiles", force: :cascade do |t|
+ t.string "first_name"
+ t.string "last_name"
+ t.string "month"
+ t.integer "day"
+ t.integer "year"
+ t.string "gender"
+ t.integer "user_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "college"
+ t.string "home_town"
+ t.string "currently_lives"
+ t.string "phone_number"
+ t.index ["user_id"], name: "index_profiles_on_user_id", using: :btree
+ end
+
+ create_table "users", force: :cascade do |t|
+ t.string "username"
+ t.string "email"
+ t.string "password_digest"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "auth_token"
+ t.index ["auth_token"], name: "index_users_on_auth_token", unique: true, using: :btree
+ end
+
+ add_foreign_key "posts", "users"
+ add_foreign_key "profiles", "users"
+end
diff --git a/db/seeds.rb b/db/seeds.rb
new file mode 100644
index 000000000..802053b66
--- /dev/null
+++ b/db/seeds.rb
@@ -0,0 +1,10 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
+#
+# Examples:
+#
+# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
+# Character.create(name: 'Luke', movie: movies.first)
+Post.destroy_all
+Profile.destroy_all
+User.destroy_all
\ No newline at end of file
diff --git a/lib/assets/.keep b/lib/assets/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/lib/tasks/.keep b/lib/tasks/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/lib/templates/erb/scaffold/_form.html.erb b/lib/templates/erb/scaffold/_form.html.erb
new file mode 100644
index 000000000..201a069e2
--- /dev/null
+++ b/lib/templates/erb/scaffold/_form.html.erb
@@ -0,0 +1,13 @@
+<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
+ <%%= f.error_notification %>
+
+
+<%% end %>
diff --git a/log/.keep b/log/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/project_danebook_pages b/project_danebook_pages
new file mode 160000
index 000000000..400df2dbf
--- /dev/null
+++ b/project_danebook_pages
@@ -0,0 +1 @@
+Subproject commit 400df2dbf13353f99c4448318bbf3b8af8550f7a
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 000000000..b612547fc
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,67 @@
+
+
+
+ The page you were looking for doesn't exist (404)
+
+
+
+
+
+
+
+
+
The page you were looking for doesn't exist.
+
You may have mistyped the address or the page may have moved.
+
+
If you are the application owner check the logs for more information.
+
+
+
diff --git a/public/422.html b/public/422.html
new file mode 100644
index 000000000..a21f82b3b
--- /dev/null
+++ b/public/422.html
@@ -0,0 +1,67 @@
+
+
+
+ The change you wanted was rejected (422)
+
+
+
+
+
+
+
+
+
The change you wanted was rejected.
+
Maybe you tried to change something you didn't have access to.
+
+
If you are the application owner check the logs for more information.
+
+
+
diff --git a/public/500.html b/public/500.html
new file mode 100644
index 000000000..061abc587
--- /dev/null
+++ b/public/500.html
@@ -0,0 +1,66 @@
+
+
+
+ We're sorry, but something went wrong (500)
+
+
+
+
+
+
+
+
+
We're sorry, but something went wrong.
+
+
If you are the application owner check the logs for more information.
+
+
+
diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 000000000..3c9c7c01f
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-agent: *
+# Disallow: /
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb
new file mode 100644
index 000000000..ebb867fa2
--- /dev/null
+++ b/spec/controllers/comments_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe CommentsController, type: :controller do
+
+end
diff --git a/spec/controllers/friendings_controller_spec.rb b/spec/controllers/friendings_controller_spec.rb
new file mode 100644
index 000000000..55d19a900
--- /dev/null
+++ b/spec/controllers/friendings_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe FriendingsController, type: :controller do
+
+end
diff --git a/spec/controllers/news_feeds_controller_spec.rb b/spec/controllers/news_feeds_controller_spec.rb
new file mode 100644
index 000000000..d82348f26
--- /dev/null
+++ b/spec/controllers/news_feeds_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe NewsFeedsController, type: :controller do
+
+end
diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb
new file mode 100644
index 000000000..89e503b82
--- /dev/null
+++ b/spec/controllers/photos_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe PhotosController, type: :controller do
+
+end
diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb
new file mode 100644
index 000000000..676cbd06e
--- /dev/null
+++ b/spec/controllers/profiles_controller_spec.rb
@@ -0,0 +1,82 @@
+require 'rails_helper'
+require 'pry'
+
+describe ProfilesController do
+ let(:user){create(:user)}
+ let(:profile){create(:profile, user: user)}
+
+ context 'for a visitor' do
+ end
+
+ context 'for self/current_user' do
+ describe 'GET index' do
+ end
+
+ describe 'GET show' do
+ end
+
+ describe 'PATCH #update' do
+ end
+ end
+
+
+ context 'for logged in as user' do
+
+ before :each do
+ cookies[:auth_token] = user.auth_token
+ end
+
+ describe 'GET index' do
+ it "renders the :index template for profile" do
+ get :index, user_id: user.id
+ expect(response).to render_template :index
+ end
+ end
+
+ describe 'GET show' do
+ it "renders the :index template for profile" do
+
+ get :show, user_id: user.id
+ expect(response).to render_template :show
+ end
+ end
+
+ describe 'PATCH #update' do
+ context "with valid attributes" do
+ let(:updated_year){1969}
+
+
+ before :each do
+ profile
+ put :update,
+ user_id: user.id,
+ profile: attributes_for(
+ :profile,
+ :year => updated_year)
+ profile.reload
+ end
+
+ it "finds the specific secret" do
+ expect(assigns(:profile)).to eq(profile)
+ end
+
+ it "redirects to the updated secret" do
+ expect(response).to redirect_to user_profiles_path(user)
+ end
+
+ it "actually updates the secret" do
+ expect(user.profile.year).to eq(updated_year)
+ end
+ end
+
+ context "with invalid attributes" do
+ it "stuff" do end
+ end
+ end
+ end
+
+
+
+
+
+end
\ No newline at end of file
diff --git a/spec/controllers/timelines_controller_spec.rb b/spec/controllers/timelines_controller_spec.rb
new file mode 100644
index 000000000..a32fafe64
--- /dev/null
+++ b/spec/controllers/timelines_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe TimelinesController, type: :controller do
+
+end
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
new file mode 100644
index 000000000..076881fe3
--- /dev/null
+++ b/spec/controllers/users_controller_spec.rb
@@ -0,0 +1,60 @@
+require 'rails_helper'
+
+describe UsersController do
+ let(:user){create(:user)}
+ let(:profile){user.create_profile(attributes_for(:profile))}
+
+ context "for visitor" do
+ describe 'GET #show' do
+ it "redirects to sign_up page" do
+ get :show, params: { id: user.id }
+ expect(response).to render_template :show
+ end
+ end
+
+ describe 'GET #new' do
+ it "renders the :new template for user" do
+ get :new
+ expect(response).to render_template :new
+ end
+ end
+
+ describe 'POST #create' do
+
+ context "with proper attributes" do
+ it "creates a new user" do
+ expect{
+
+ post :create, user: attributes_for(:user)
+ }.to change(User, :count).by(1)
+ end
+
+ it "redirects to new user" do
+ post :create, user: attributes_for(:user)
+ expect(response).to redirect_to user_path(assigns(:user))
+ end
+
+ it "sets a flash message" do
+ post :create, user: attributes_for(:user)
+ assert_equal flash[:success], "User was saved in database"
+ end
+ end
+ end
+ end
+
+ context "for logged in user" do
+ before :each do
+ cookies[:auth_token] = user.auth_token
+ end
+
+ describe 'GET #show' do
+ it "renders the :show template for user" do
+ get :show, id: user.id
+ expect(response).to render_template :show
+ end
+ end
+
+ describe '#update'
+ end
+
+end
\ No newline at end of file
diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb
new file mode 100644
index 000000000..cc687ac62
--- /dev/null
+++ b/spec/factories/comments.rb
@@ -0,0 +1,5 @@
+FactoryGirl.define do
+ factory :comment do
+
+ end
+end
diff --git a/spec/factories/friendings.rb b/spec/factories/friendings.rb
new file mode 100644
index 000000000..024c1bfc6
--- /dev/null
+++ b/spec/factories/friendings.rb
@@ -0,0 +1,5 @@
+FactoryGirl.define do
+ factory :friending do
+
+ end
+end
diff --git a/spec/factories/liking_factory.rb b/spec/factories/liking_factory.rb
new file mode 100644
index 000000000..f91dcb278
--- /dev/null
+++ b/spec/factories/liking_factory.rb
@@ -0,0 +1,7 @@
+FactoryGirl.define do
+
+ factory :liking do
+ user
+ #f.association :liking, factory: :likeable
+ end
+end
\ No newline at end of file
diff --git a/spec/factories/photos.rb b/spec/factories/photos.rb
new file mode 100644
index 000000000..8893964de
--- /dev/null
+++ b/spec/factories/photos.rb
@@ -0,0 +1,5 @@
+FactoryGirl.define do
+ factory :photo do
+
+ end
+end
diff --git a/spec/factories/post_factory.rb b/spec/factories/post_factory.rb
new file mode 100644
index 000000000..60926b115
--- /dev/null
+++ b/spec/factories/post_factory.rb
@@ -0,0 +1,7 @@
+FactoryGirl.define do
+
+ factory :post do
+ user
+ description "abcdefg"
+ end
+end
\ No newline at end of file
diff --git a/spec/factories/profile_factory.rb b/spec/factories/profile_factory.rb
new file mode 100644
index 000000000..c3c3c14bf
--- /dev/null
+++ b/spec/factories/profile_factory.rb
@@ -0,0 +1,12 @@
+FactoryGirl.define do
+
+ factory :profile do
+ user
+ sequence(:first_name) { |n| "fname_#{n}"}
+ sequence(:last_name) { |n| "lname#{n}"}
+ month "Jan"
+ day 26
+ year 1995
+ gender "male"
+ end
+end
\ No newline at end of file
diff --git a/spec/factories/user_factory.rb b/spec/factories/user_factory.rb
new file mode 100644
index 000000000..48d9c06cc
--- /dev/null
+++ b/spec/factories/user_factory.rb
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+
+ factory :user do
+ sequence(:username) { |n| "user_#{n}"}
+ email { "#{username}@email.com"}
+ password "abc123."
+ password_confirmation "abc123."
+
+ end
+end
\ No newline at end of file
diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb
new file mode 100644
index 000000000..ce8190ad8
--- /dev/null
+++ b/spec/features/users_spec.rb
@@ -0,0 +1,89 @@
+require 'rails_helper'
+
+feature 'User accounts' do
+ before do
+ visit root_path
+ user.profile = profile
+ user.posts << post
+
+ end
+
+ let(:user) { build(:user)}
+ let(:profile) { build(:profile)}
+ let(:post) {build(:post)}
+ let(:liking) {build(:liking)}
+
+ context "as a visitor" do
+
+ scenario "I want to sign up" do
+ fill_sign_up(user)
+
+ expect(page).to have_content('User was saved in database')
+ end
+
+ scenario "to sign in to my account" do
+ user.save!
+ fill_sign_in(user)
+
+ expect(page).to have_content("You've successfully signed in")
+ end
+ end
+
+ context "as a signed-in user" do
+ before do
+ user.save!
+ fill_sign_in(user)
+ end
+
+ context "in terms of redirection" do
+
+ scenario "clicking Danebook redirects me to my profile" do
+ click_link(user.username)
+ expect(page).to have_content("About(Text Area)")
+ end
+
+ scenario "clicking my name redirects me to my profile" do
+ click_link(user.username)
+ expect(page).to have_content("About(Text Area)")
+ end
+
+ scenario "logout of my account" do
+ click_link("Logout")
+ expect(page).to have_content("You've successfully signed out")
+ end
+ end
+
+ context "in terms of posts" do
+ before do
+ visit root_path
+ end
+
+ scenario "create a post on my timeline" do
+ fill_post(post)
+ expect(page).to have_content("Post was created in User")
+ end
+
+ context "when a post exists" do
+ before do
+ fill_post(post)
+
+ end
+
+ scenario "delete a post on my timeline" do
+ first(:link, "Destroy").click
+ expect(page).to have_content("Post was deleted in User")
+ end
+
+ scenario "like a post on my timeline" do
+ first(:link, "Like").click
+ expect(page).to have_content("#{user.username} likes this..")
+ end
+ end
+
+ context "when a post doesn't exist" do
+ end
+ end
+ end
+
+end
+
diff --git a/spec/helpers/comments_helper_spec.rb b/spec/helpers/comments_helper_spec.rb
new file mode 100644
index 000000000..729cd87bf
--- /dev/null
+++ b/spec/helpers/comments_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the CommentsHelper. For example:
+#
+# describe CommentsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe CommentsHelper, type: :helper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/friendings_helper_spec.rb b/spec/helpers/friendings_helper_spec.rb
new file mode 100644
index 000000000..e8a5977d7
--- /dev/null
+++ b/spec/helpers/friendings_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the FriendingsHelper. For example:
+#
+# describe FriendingsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe FriendingsHelper, type: :helper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/news_feeds_helper_spec.rb b/spec/helpers/news_feeds_helper_spec.rb
new file mode 100644
index 000000000..8a7c02b2a
--- /dev/null
+++ b/spec/helpers/news_feeds_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the NewsFeedsHelper. For example:
+#
+# describe NewsFeedsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe NewsFeedsHelper, type: :helper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/photos_helper_spec.rb b/spec/helpers/photos_helper_spec.rb
new file mode 100644
index 000000000..6b5aa7d30
--- /dev/null
+++ b/spec/helpers/photos_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PhotosHelper. For example:
+#
+# describe PhotosHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe PhotosHelper, type: :helper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/helpers/timelines_helper_spec.rb b/spec/helpers/timelines_helper_spec.rb
new file mode 100644
index 000000000..ad5c3e45d
--- /dev/null
+++ b/spec/helpers/timelines_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the TimelinesHelper. For example:
+#
+# describe TimelinesHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# expect(helper.concat_strings("this","that")).to eq("this that")
+# end
+# end
+# end
+RSpec.describe TimelinesHelper, type: :helper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/mailers/previews/user_mailer_preview.rb b/spec/mailers/previews/user_mailer_preview.rb
new file mode 100644
index 000000000..957e12b64
--- /dev/null
+++ b/spec/mailers/previews/user_mailer_preview.rb
@@ -0,0 +1,4 @@
+# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
+class UserMailerPreview < ActionMailer::Preview
+
+end
diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb
new file mode 100644
index 000000000..c48d3adee
--- /dev/null
+++ b/spec/mailers/user_mailer_spec.rb
@@ -0,0 +1,5 @@
+require "rails_helper"
+
+RSpec.describe UserMailerMailer, type: :mailer do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb
new file mode 100644
index 000000000..c10688d91
--- /dev/null
+++ b/spec/models/comment_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Comment, type: :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/friending_spec.rb b/spec/models/friending_spec.rb
new file mode 100644
index 000000000..e5b208edf
--- /dev/null
+++ b/spec/models/friending_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Friending, type: :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/liking_spec.rb b/spec/models/liking_spec.rb
new file mode 100644
index 000000000..e69de29bb
diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb
new file mode 100644
index 000000000..568cabbc1
--- /dev/null
+++ b/spec/models/photo_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Photo, type: :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb
new file mode 100644
index 000000000..de3762a7f
--- /dev/null
+++ b/spec/models/post_spec.rb
@@ -0,0 +1,26 @@
+require 'rails_helper'
+
+describe Post do
+ let(:post){build(:post)}
+
+ describe 'validations' do
+ it "invalid if description is nil/empty" do
+ new_user = build(:post, :description => nil)
+ expect(new_user.valid?).to eq(false)
+ end
+ end
+
+ describe 'associations' do
+ it "responds to user association" do
+ expect(post).to respond_to(:user)
+ end
+
+ it "responds to comment association" do
+ expect(post).to respond_to(:comments)
+ end
+
+ it "responds to likes association" do
+ expect(post).to respond_to(:likes)
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb
new file mode 100644
index 000000000..bbf1d146b
--- /dev/null
+++ b/spec/models/profile_spec.rb
@@ -0,0 +1,112 @@
+require 'rails_helper'
+
+describe Profile do
+ let(:profile){build(:profile)}
+
+ describe 'validations' do
+
+ it "is valid with default attributes" do
+ expect(profile).to be_valid
+ end
+
+ it "saves with default attributes" do
+ expect{ profile.save! }.to_not raise_error
+ end
+
+ it "doesn't allow first_name to be nil/empty" do
+ new_user = build(:profile, :first_name => nil)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow last_name to be nil/empty" do
+ new_user = build(:profile, :last_name => nil)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ context "month" do
+
+ it "doesn't allow month to be a non-string" do
+ new_user = build(:profile, :month => 123)
+ expect(new_user.valid?).to eq(false)
+ end
+ end
+
+ context "day" do
+
+ it "doesn't allow day to be a non-integer" do
+ new_user = build(:profile, :day => "hehe")
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow day to be a below 1" do
+ new_user = build(:profile, :day => 0)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "allow day to be a 1" do
+ new_user = build(:profile, :day => 1)
+ expect(new_user.valid?).to eq(true)
+ end
+
+ it "doesn't allow day to be a above 30" do
+ new_user = build(:profile, :day => 31)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "allow day to be a 30" do
+ new_user = build(:profile, :day => 30)
+ expect(new_user.valid?).to eq(true)
+ end
+ end
+
+ context "year" do
+
+ it "doesn't allow year to be a non-integer" do
+ new_user = build(:profile, :year => "hehe")
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow year to be a below 1900" do
+ new_user = build(:profile, :year => 1899)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "allow year to be a 1900" do
+ new_user = build(:profile, :year => 1900)
+ expect(new_user.valid?).to eq(true)
+ end
+
+ it "doesn't allow year to be a above 2016" do
+ new_user = build(:profile, :year => 2017)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "allow year to be a 2016" do
+ new_user = build(:profile, :year => 2016)
+ expect(new_user.valid?).to eq(true)
+ end
+ end
+
+ describe 'gender' do
+ it "valid when gender to be male" do
+ new_user = build(:profile, :gender => "male")
+ expect(new_user.valid?).to eq(true)
+ end
+
+ it "valid when gender to be female" do
+ new_user = build(:profile, :gender => "female")
+ expect(new_user.valid?).to eq(true)
+ end
+
+ it "invalid when gender is not male/female" do
+ new_user = build(:profile, :gender => 123123)
+ expect(new_user.valid?).to eq(false)
+ end
+ end
+ end
+ describe 'associations' do
+ it "responds to user association" do
+ expect(profile).to respond_to(:user)
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
new file mode 100644
index 000000000..2c7b62ea1
--- /dev/null
+++ b/spec/models/user_spec.rb
@@ -0,0 +1,76 @@
+require 'rails_helper'
+
+describe User do
+ let(:user){build(:user)}
+
+ describe 'validations' do
+ it "is valid with default attributes" do
+ expect(user).to be_valid
+ end
+
+ it "saves with default attributes" do
+ expect{ user.save! }.to_not raise_error
+ end
+
+ it "doesn't allow username to be nil/empty" do
+ new_user = build(:user, :username => nil)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow email to be in the wrong format" do
+ new_user = build(:user, :email => "sdfsd@.comsdf")
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow password to be below 5 and above 25 in length" do
+ new_user1 = build(:user, :password => "i" * 4)
+ expect(new_user1.valid?).to eq(false)
+
+ new_user2 = build(:user, :password => "i" * 26)
+ expect(new_user2.valid?).to eq(false)
+ end
+
+ it "doesn't allow password to be empty/nil" do
+ new_user = build(:user, :password => nil)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ context "when saving multiple users" do
+ before do
+ user.save!
+ end
+ it "doesn't allow identical email addresses" do
+ new_user = build(:user, :email => user.email)
+ expect(new_user.valid?).to eq(false)
+ end
+
+ it "doesn't allow identical usernames" do
+ new_user = build(:user, :username => user.username)
+ expect(new_user.valid?).to eq(false)
+ end
+ end
+ end
+
+ describe 'associations' do
+ it "responds to single profile association" do
+ expect(user).to respond_to(:profile)
+ end
+
+ it "responds to post association" do
+ expect(user).to respond_to(:posts)
+ end
+
+ it "responds to comment association" do
+ expect(user).to respond_to(:comments)
+ end
+ end
+
+
+ describe '#regenerate_auth_token by calling generate_auth_token' do
+ it "generates new token for nil token user" do
+ new_user = build(:user, auth_token: nil)
+
+ expect(new_user.regenerate_auth_token).to_not eq(nil)
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
new file mode 100644
index 000000000..c1612cf77
--- /dev/null
+++ b/spec/rails_helper.rb
@@ -0,0 +1,80 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+# Prevent database truncation if the environment is production
+abort("The Rails environment is running in production mode!") if Rails.env.production?
+require 'spec_helper'
+require 'rspec/rails'
+require 'factory_girl_rails'
+require 'capybara/rails'
+
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ config.include LoginMacros
+ config.include PostMacros
+end
+
+
+Shoulda::Matchers.configure do |config|
+ config.integrate do |with|
+ # Choose a test framework:
+ with.test_framework :rspec
+
+ with.library :rails
+ end
+end
+
+RSpec.configure do |config|
+ config.include FactoryGirl::Syntax::Methods
+end
+# Add additional requires below this line. Rails is not loaded until this point!
+
+# Requires supporting ruby files with custom matchers and macros, etc, in
+# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
+# run as spec files by default. This means that files in spec/support that end
+# in _spec.rb will both be required and run as specs, causing the specs to be
+# run twice. It is recommended that you do not name files matching this glob to
+# end with _spec.rb. You can configure this pattern with the --pattern
+# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
+#
+# The following line is provided for convenience purposes. It has the downside
+# of increasing the boot-up time by auto-requiring all files in the support
+# directory. Alternatively, in the individual `*_spec.rb` files, manually
+# require only the support files necessary.
+#
+# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
+
+# Checks for pending migration and applies them before tests are run.
+# If you are not using ActiveRecord, you can remove this line.
+ActiveRecord::Migration.maintain_test_schema!
+
+RSpec.configure do |config|
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ config.use_transactional_fixtures = true
+
+ # RSpec Rails can automatically mix in different behaviours to your tests
+ # based on their file location, for example enabling you to call `get` and
+ # `post` in specs under `spec/controllers`.
+ #
+ # You can disable this behaviour by removing the line below, and instead
+ # explicitly tag your specs with their type, e.g.:
+ #
+ # RSpec.describe UsersController, :type => :controller do
+ # # ...
+ # end
+ #
+ # The different available types are documented in the features, such as in
+ # https://relishapp.com/rspec/rspec-rails/docs
+ config.infer_spec_type_from_file_location!
+
+ # Filter lines from Rails gems in backtraces.
+ config.filter_rails_from_backtrace!
+ # arbitrary gems may also be filtered via:
+ # config.filter_gems_from_backtrace("gem name")
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 000000000..8f698be46
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,99 @@
+# This file was generated by the `rails generate rspec:install` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# The `.rspec` file also contains a few flags that are not defaults but that
+# users commonly want.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
+ # have no way to turn it off -- the option exists only for backwards
+ # compatibility in RSpec 3). It causes shared context metadata to be
+ # inherited by the metadata hash of host groups and examples, rather than
+ # triggering implicit auto-inclusion in groups with matching metadata.
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = 'doc'
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end
diff --git a/spec/support/login_macros.rb b/spec/support/login_macros.rb
new file mode 100644
index 000000000..15480a847
--- /dev/null
+++ b/spec/support/login_macros.rb
@@ -0,0 +1,19 @@
+module LoginMacros
+ def fill_sign_up(user)
+ within('.col-md-6 .new_user') do
+ fill_in 'Username', with: user.username
+ fill_in 'Email', with: user.email
+ fill_in 'Password', with: user.password
+ fill_in 'Password confirmation', with: user.password
+ click_button('Sign Up')
+ end
+ end
+
+ def fill_sign_in(user)
+ within('#nav-bar') do
+ fill_in 'Email:', with: user.email
+ fill_in 'Password:', with: user.password
+ click_button('Log in')
+ end
+ end
+end
\ No newline at end of file
diff --git a/spec/support/post_macros.rb b/spec/support/post_macros.rb
new file mode 100644
index 000000000..f3f95791c
--- /dev/null
+++ b/spec/support/post_macros.rb
@@ -0,0 +1,6 @@
+module PostMacros
+ def fill_post(post)
+ fill_in 'Description', with: post.description
+ click_button("Post the Post")
+ end
+end
\ No newline at end of file
diff --git a/test/controllers/.keep b/test/controllers/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/controllers/likings_controller_test.rb b/test/controllers/likings_controller_test.rb
new file mode 100644
index 000000000..2a32ccc50
--- /dev/null
+++ b/test/controllers/likings_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class LikingsControllerTest < ActionDispatch::IntegrationTest
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb
new file mode 100644
index 000000000..6135ce6af
--- /dev/null
+++ b/test/controllers/sessions_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class SessionsControllerTest < ActionDispatch::IntegrationTest
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/fixtures/.keep b/test/fixtures/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/helpers/.keep b/test/helpers/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/integration/.keep b/test/integration/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/mailers/.keep b/test/mailers/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/models/.keep b/test/models/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 000000000..92e39b2d7
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,10 @@
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end
diff --git a/tmp/.keep b/tmp/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep
new file mode 100644
index 000000000..e69de29bb