/table.id-old

Reddit-like app that launched in July 2017

Primary LanguageRuby

README

Server

DigitalOcean Using this tutorial Deploying a Rails App on Ubuntu 14.04 with Capistrano, Nginx, and Puma

SSL Let's Encrypt
Renewal:

certbot renew --dry-run

nginx configuration

TODO

Installing

  • Ruby version:
2.4.0
  • Rails version:
5.1.1

Then run:

bundle install
rails db:migrate
# Or
# Rails db:reset if you already have a development database
rails server

Testing

Using guide from "Everyday Testing with Rails."

Added to gemfile:

group :development, :test do 
    gem "rspec-rails"
    gem "factory_girl_rails"
    gem "faker"
    gem "database_cleaner"
    gem "launchy"
    # On chapter 9, Speedng up specs
    gem "guard-rspec"
    gem 'spring-commands-rspec'
end

To run the automatic test: Install phantomJS first,

brew install phantomjs

then run

guard

Then press return to run all the test

Testing Syntax

context "associations" do
  should have_many(:posts)
end

Application

Authentication

Act as viewable

Model

Post

Views

Todo

  • Logo

  • Favicon

  • Ensure you have flash messages in app/views/layouts/application.html.erb. For example:

   <p class="notice"><%= notice %></p>
   <p class="alert"><%= alert %></p>
  • Confirmable email
  • Instant update vote system
  • Remove change upvote seed
  • Feature specs

Bug

  • Not setting firewall
  • Devise, when error occur while signing up, will redirect to post instead of the sign up link