GithubHelp home page GithubHelp logo

ibi8588 / publify-debugging-lab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sf-wdi-38/publify-debugging-lab

0.0 0.0 0.0 27.63 MB

Fix bugs in a mature rails app

License: MIT License

Ruby 67.05% HTML 13.86% JavaScript 16.08% CSS 3.01%

publify-debugging-lab's Introduction

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…

Getting Started: Installing Publify Locally

To install Publify you need the following:

  • Ruby >= 2.2.5
  • Ruby On Rails ~> 4.2.5
  • Postgresql
  • ImageMagick

Setup Dependencies

First things first, Fork & Clone the Publify repo.

If necessary, update rake to ~> 11.1.

$ rake --version
# if rake version >= 11.1 then STOP, otherwise...
$ bundle update rake

If necessary, switch to ruby 2.2.5.

$ ruby -v
# if ruby version >= 2.2.5 then STOP, otherwise...
$ rvm get 2.2.5
$ rvm use 2.2.5 --default # sets ruby-2.2.5 as global default

If necessary, install imagemagick (used by mini_magick gem).

$ which convert
# if you see path/to/bin/convert then STOP, otherwise...
$ brew update
$ brew link
$ brew install imagemagick # this can take a while!

Finally, you should be ready to bundle:

$ bundle install

Stop and check for errors in your bundle output. (A "warning" is not an error! Warnings are okay for now, but errors are bad!)

Setup Rails Application

Now we'll set up and seed our database:

$ rake db:setup
$ rake db:migrate

Launch you browser and access 127.0.0.1:3000.

$ rails server

Supply a blog title and email:

setup blog screenshot

Write down your admin username and password:

setup example login info screenshot

Choose a theme:

  • in the /admin section, click Design > Choose theme
  • select the "bootstrap-2" theme option.

Finally, seed your blog with articles:

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

Now Look Around!

  • Poke around in the /admin section (it's similar to wordpress).
  • Visit your blog homepage at localhost:3000/
  • Publish 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). We suggest you do them in order:

  1. Inconsistent Sidebar Styles
  2. Post tags are shown as "object"
  3. Load spinner does not go away
  4. Top Month Always Empty (Archive Sidebar)
  5. Months sorted incorrectly (Archive Sidebar)

To view more details, go to the "issues" section of this repo!

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.

Make sure to explicitily reference the issue you are resolving in the body of your pull request!

You can even close an issue from inside your commit message)!

example pull request

We will hold you to the highest professional standards of software development.

We will not accept pull requests that:

  • fail to reference the issue number in the body of the pull request
  • have poor code style -- e.g. incorrect indentation / whitespace
  • modify files that are not immediately relevant to the bug at hand
  • have poor commit messages or too many commits
  • fail to explain, in plain english, what the problem was and how and why the pull request fixes it

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

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.

publify-debugging-lab's People

Contributors

mvz avatar pdcawley avatar shingara avatar kevin-genon avatar ook avatar fdevillamil avatar hmallett avatar randomecho avatar flameeyes avatar emiddleton avatar eostrom avatar emk avatar szymon-jez avatar nathanallen avatar mthmulders avatar apsheronets avatar kantena avatar giniouxe avatar basmoura avatar graaff avatar andyw8 avatar hernamvel avatar skudo avatar larstobi avatar stevenwilkin avatar weijen avatar mcary avatar mukaer avatar agiamas avatar ramirovarandas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.