Skip to content

Commit 9fb5f02

Browse files
committed
updated readme
1 parent 8631d57 commit 9fb5f02

File tree

1 file changed

+94
-98
lines changed

1 file changed

+94
-98
lines changed

README.md

Lines changed: 94 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Publify
1+
# Rails Legacy App
22

3-
**The Ruby on Rails publishing software formerly known as Typo**
3+
> This Rails application has been intentionally broken!
44
5-
[![Build Status](https://travis-ci.org/publify/publify.png?branch=master)](https://travis-ci.org/publify/publify)
6-
[![Code Climate](https://codeclimate.com/github/publify/publify.png)](https://codeclimate.com/github/publify/publify)
7-
[![Dependency Status](https://gemnasium.com/publify/publify.png)](https://gemnasium.com/publify/publify)
5+
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.
86

9-
## What's Publify?
7+
We encourage you work together and tackle it in pairs.
8+
9+
10+
### What's Publify?
11+
You will be forking & cloning an open source (MIT LICENSE) blogging platform called [Publify](github.com/publify/publify).
1012

1113
Publify is a simple but full featured web publishing software. It's built
1214
around a blogging engine and a small message system connected to Twitter.
@@ -17,7 +19,7 @@ site, and Publish On your Own Site, Syndicate Everywhere.
1719
Publify has been around since 2004 and is the oldest Ruby on Rails open source
1820
project alive.
1921

20-
## Features
22+
#### Features
2123

2224
- A classic multi user blogging engine
2325
- Short messages with a Twitter connection
@@ -29,137 +31,131 @@ project alive.
2931
German, Danish, Norwegian, Japanese, Hebrew, Simplified Chinese, Mexican
3032
Spanish, Italian, Lithuanian, Dutch, Polish, Romanian…
3133

32-
## Demo site
34+
## Getting Started: Installing Publify Locally
3335

34-
You can [give Publify a try](http://demo.publify.co)
36+
To install Publify you need the following:
3537

36-
The login / password [to the admin](http://demo.publify.co/admin)
37-
are:
38+
- [ ] Ruby >= 2.2.5
39+
- [ ] Ruby On Rails ~> 4.2.5
40+
- [ ] Postgresql
41+
- [ ] ImageMagick
3842

39-
- Administrator: admin / admin
40-
- Publisher: publish / publish
43+
#### Setup Dependencies
44+
First things first, **Fork** & Clone the Publify repo.
4145

42-
The demo is reset every 2 hours.
46+
If necessary, update `rake` to `~> 11.1`.
4347

44-
## Install
48+
``` bash
49+
$ rake --version
50+
# if rake version >= 11.1 then STOP, otherwise...
51+
$ bundle update rake
52+
```
4553

46-
### Download
54+
If necessary, switch to ruby 2.2.5.
4755

48-
You can download the latest
49-
Publify [stable release (8.3.3)](https://github.com/publify/publify/archive/v8.3.3.tar.gz)
56+
``` bash
57+
$ ruby -v
58+
# if ruby version >= 2.2.5 then STOP, otherwise...
59+
$ rvm get 2.2.5
60+
$ rvm use 2.2.5 --default # sets ruby-2.2.5 as global default
61+
```
5062

51-
If you want to run the master branch, you can [clone the Publify
52-
repository](https://github.com/publify/publify.git). However, random things may
53-
be broken there at any time, so tread carefully!
63+
If necessary, install `imagemagick` (used by `mini_magick` gem).
5464

55-
**Running the master branch in production is not recommended!**
65+
```bash
66+
$ which convert
67+
# if you see path/to/bin/convert then STOP, otherwise...
68+
$ brew update
69+
$ brew link
70+
$ brew install imagemagick # this can take a while!
71+
```
5672

57-
### Install Publify locally
73+
Finally, you should be ready to `bundle`:
5874

59-
To install Publify you need the following:
75+
``` bash
76+
$ bundle install
77+
```
6078

61-
- CRuby (MRI) 2.1, 2.2 or 2.3
62-
- Ruby on Rails 4.2.x
63-
- A database engine, MySQL, PgSQL or SQLite3
64-
- A compatible JavaScript installation for asset compilation. See [the execjs
65-
readme](https://github.com/sstephenson/execjs#readme) for details.
66-
- ImageMagick (used by mini_magick).
79+
> Stop and check for **errors** in your bundle output. (A "warning" is not an error! Warnings are okay for now, but errors are bad!)
6780
68-
1. Unzip Publify archive
69-
2. Rename database.yml.yourEngine as database.yml
70-
3. Edit database.yml to add your database name, login and password.
81+
#### Setup Rails Application
82+
Now we'll set up and seed our database:
7183

7284
```bash
73-
$ bundle install
7485
$ rake db:setup
7586
$ rake db:migrate
76-
$ rake db:seed
77-
$ rake assets:precompile
78-
$ rails server
7987
```
8088

81-
You can now launch you browser and access 127.0.0.1:3000.
89+
Launch you browser and access 127.0.0.1:3000.
8290

83-
### Install Publify on Heroku
84-
85-
In order to install Publify on Heroku, you’ll need to do some minor tweaks.
86-
87-
First of all, you need to setup Amazon S3 storage to be able to upload files on
88-
your blog. Set Heroku config vars.
89-
90-
```yaml
91-
heroku config:set provider=AWS
92-
aws_access_key_id=YOUR_AWS_ACCESS_KEY_ID
93-
aws_secret_access_key=YOUR_AWS_SECRET_ACCESS_KEY
94-
aws_bucket=YOUR_AWS_BUCKET_NAME
95-
```
96-
97-
To generate the Gemfile.lock, run:
9891
```bash
99-
HEROKU=true bundle install
92+
$ rails server
10093
```
10194

102-
Remove Gemfile.lock from .gitignore and commit it.
95+
Supply a blog `title` and `email`:
10396

104-
Add the HEROKU config variable to your Heroku instance:
97+
<img width="382" alt="setup blog screenshot" src="https://cloud.githubusercontent.com/assets/1489337/12763124/9cbd3a5e-c9a7-11e5-97e3-e39e6098adf3.png">
10598

106-
```bash
107-
heroku config:set HEROKU=true
108-
```
99+
Write down your *admin* `username` and `password`:
100+
101+
<img width="380" alt="setup example login info screenshot" src="https://cloud.githubusercontent.com/assets/1489337/12763208/0440d834-c9a8-11e5-9c81-05a4b60e9722.png">
109102

110-
Push the repository to Heroku.
103+
Choose a theme:
111104

112-
When deploying for the first time, Heroku will automatically add a Database
113-
plugin to your instance and links it to the application. After the first
114-
deployment, don't forget to run the database migration and seed.
105+
* in the `/admin` section, click `Design > Choose theme`
106+
* select the "bootstrap-2" theme option.
115107

108+
Finally, **seed your blog with `articles`**:
116109
```bash
117-
heroku run rake db:migrate db:seed
110+
$ rake db:seed:articles
111+
# => Seeded 24 articles...
118112
```
119113

120-
If application error has occurred after migration, you need to restart Heroku server.
114+
## Now Look Around!
115+
* Poke around in the `/admin` section (it's similar to wordpress).
116+
* Visit your blog homepage at `localhost:3000/`
117+
* Publish your first blog post!
121118

122-
```bash
123-
heroku restart
124-
```
119+
##The Bugs
120+
121+
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:
125122

126-
## Resources
123+
1. Inconsistent Sidebar Styles
124+
2. Post tags are shown as "object"
125+
3. Load spinner does not go away
126+
4. Top Month Always Empty (Archive Sidebar)
127+
5. Months sorted incorrectly (Archive Sidebar)
127128

128-
- [Sidebar Plugins](https://github.com/publify/publify/wiki/Sidebar-plugins)
129-
- [In page Plugins](https://github.com/publify/publify/wiki/In-Page-Plugins)
130-
- [**Report a bug**](https://github.com/publify/publify/issues)
131-
- [**Frequently Asked Questions**](https://github.com/publify/publify/wiki/frequently-asked-questions)
132-
- [Publify blog](http://blog.publify.co)
133-
- [Publify on Twitter](https://twitter.com/getpublify)
134-
- IRC: \#publify on irc.freenode.net
129+
> To view more details, go to the "issues" section of this repo!
135130
136-
## Maintainers
131+
### Resolving the Issue
132+
Please fix each bug on its own branch (e.g. `fix_sidebar_styles`).
137133

138-
This is a list of Publify maintainers. If you have committed, please add
139-
your name and contact details to the list.
134+
When you're finished with a bug, create a pull request from your fork back to the main repo.
140135

141-
**Frédéric de Villamil** <frederic@publify.co>
142-
blog: http://t37.net
143-
irc: neuro`
136+
Make sure to [explicitily reference](https://help.github.com/articles/autolinked-references-and-urls/#issues-and-pull-requests) the issue you are resolving in the _body_ of your pull request!
144137

145-
**Matijs van Zuijlen**
146-
blog: http://www.matijs.net/blog/
147-
irc: matijs
138+
You can even [close an issue from inside your commit message](https://help.github.com/articles/closing-issues-via-commit-messages/))!
148139

149-
**Thomas Lecavelier**
150-
blog: http://blog.ookook.fr/
151-
irc: ook
140+
<img width="1239" alt="example pull request" src="https://cloud.githubusercontent.com/assets/1489337/12763002/f2f3a6b6-c9a6-11e5-9e62-cff790c1a89a.png">
152141

153-
**Yannick François**
154-
blog: http://elsif.fr
155-
irc: yaf
142+
**We will hold you to the highest professional standards of software development**.
156143

157-
And [many more cool people who’ve one day or another contributed to
158-
Publify](https://github.com/publify/publify/graphs/contributors).
144+
We will not accept pull requests that:
145+
* fail to reference the issue number in the _body_ of the pull request
146+
* have poor code style -- e.g. incorrect indentation / whitespace
147+
* modify files that are not immediately relevant to the bug at hand
148+
* have poor commit messages or too many commits
149+
* fail to explain, in plain english, what the problem was and how and why the pull request fixes it
159150

160-
**Original Author: Tobias Luetke**
161-
blog: http://blog.leetsoft.com/
162-
irc: xal
151+
> Before you push, make sure to run `rubocop` to lint your ruby code and ensure it meets the standards established by this project.
163152
164-
Enjoy,
165-
The Publify team
153+
## Helpful Hints
154+
* Use **Rubber Duck Debugging** -- Make sure you understand the issue!
155+
* Use frequent **Sanity Checks**
156+
- What are you testing / what are you expecting?
157+
* **Follow the trail**
158+
- How do you work backwards from the view to the server?
159+
- How do you find specific files in your rails application?
160+
- How do you find specific keywords or method calls?
161+
* Sometimes you need to **resart the server** if the views you are working with are being cached.

0 commit comments

Comments
 (0)