eps / publify_debugging_lab_27

Fix bugs in a mature rails app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails Legacy App

This Rails application has been intentionally broken!

In this lab you will dive into a mature rails application and attempt to fix some reported bugs. This lab will stretch your debugging skills and your ability to navigate a large rails project. It will also simulate a real-world scenario: contributing to an open source project.

We encourage you work together and tackle it in pairs.

What's Publify?

You will be forking & cloning an open source (MIT LICENSE) blogging platform called Publify.

Publify is a simple but full featured web publishing software. It's built around a blogging engine and a small message system connected to Twitter.

Publify follows the principles of the IndieWeb, which are self hosting your Web site, and Publish On your Own Site, Syndicate Everywhere.

Publify has been around since 2004 and is the oldest Ruby on Rails open source project alive.

Features

  • A classic multi user blogging engine
  • Short messages with a Twitter connection
  • Text filters (Markdown, Textile, SmartyPants, @mention to link, #hashtag to link)
  • A widgets system and a plugin API
  • Custom themes
  • Advanced SEO capabilities
  • Multilingual : Publify is (more or less) translated in English, French, German, Danish, Norwegian, Japanese, Hebrew, Simplified Chinese, Mexican Spanish, Italian, Lithuanian, Dutch, Polish, Romanian…

Resources

Build Status Code Climate Dependency Status

Getting Started: Installing Publify Locally

To install Publify you need the following:

  • Ruby 2.0, 2.1 or 2.2

  • Ruby On Rails 4.2.0

  • A database engine, MySQL, PgSQL or SQLite3

  • A compatible JavaScript installation for asset compilation. See the execjs readme for details.

  • ImageMagick

Setup ImageMagick Dependency

Make sure that you have ImageMagick installed (used by mini_magick).

Check for imagemagick:

$ which convert
# /path/to/bin/convert

Install it if it's missing (this can take a few minutes):

$ brew update
$ brew link
$ brew install imagemagick

Setup Rails Application

Fork & Clone the Publify repo:

$ bundle install
$ rake db:setup
$ rake db:migrate
$ rails server

You can now launch you browser and access 127.0.0.1:3000.

You will be prompted to supply a blog title and email:

setup blog screenshot

You will be signed in and issued a username and password:

setup example login info screenshot

Seed your blog with posts & tags

$ rake db:seed
# => Seeded 24 articles...

Look around!

  • Visit your blog homepage at localhost:3000/
  • Go to the /admin backend and poke around (it's similar to wordpress).
  • Create your first blog post!

##The Bugs

A number of issues have been added to the main github repo. Please fix each bug on its own branch (e.g. fix_sidebar_styles).

Make sure to visit the issues section of this repo for more detailed bug descriptions + screenshots.

####Issue #1: Inconsistent Sidebar Styles

  • All titles in the sidebar should have monospace style font
  • All bullets should be circles.

####Issue #8: Post tags are shown as "object" The list of tags associated with a given blog post always display "tags object, object, object".

####Issue #7: Sign-in form displays raw span html in input fields The http://localhost:3000/users/sign_in page shows <span class= in the input fields, and other HTML "debris" below them.

####Issue #2: Top Month Always Empty (Archive Sidebar)

  • When I click on the top-most month in the Archive Sidebar it says "No posts found...".
  • When I create a post in the current month (e.g. February) it displays a link in the sidebar for next month (e.g. March), and says "No posts found..."

####Issue #3: Months sorted incorrectly (Archive Sidebar) The sort order of months in the Archive Sidebar is off, with January 2015 appearing directly above December 2015:

Resolving the Issue

Please fix each bug on its own branch (e.g. fix_sidebar_styles).

When you're finished with a bug, create a pull request from your fork back to the main repo.

Before you push, make sure to run rubocop to lint your ruby code and ensure it meets the standards established by this project.

example pull request

Make sure to reference the issue you are resolving! (You can even close an issue from inside your commit message!)

Helpful Hints

  • Use Rubber Duck Debugging -- Make sure you understand the issue!
  • Use frequent Sanity Checks
    • What are you testing / what are you expecting?
  • Follow the trail
    • How do you work backwards from the view to the server?
    • How do you find specific files in your rails application?
    • How do you find specific keywords or method calls?
  • Sometimes you need to resart the server if the views you are working with are being cached.

About

Fix bugs in a mature rails app

License:MIT License


Languages

Language:Ruby 56.0%Language:JavaScript 16.5%Language:CSS 14.4%Language:HTML 13.1%