Commit 845c77f7156624b6189a682f23808d4790249893

Authored by Akzhan Abdulin
1 parent b58a7169
Exists in master and in 1 other branch production

Update README: Fix build status image, syntax highlighting, copyright years

Showing 1 changed file with 59 additions and 32 deletions   Show diff stats
1 -Errbit [![TravisCI](https://secure.travis-ci.org/errbit/errbit.png?branch=master)](http://travis-ci.org/errbit/errbit) 1 +Errbit [![TravisCI](https://travis-ci.org/errbit/errbit.png?branch=master)](http://travis-ci.org/errbit/errbit)
2 ====== 2 ======
3 3
4 **The open source self-hosted error catcher** 4 **The open source self-hosted error catcher**
@@ -39,72 +39,96 @@ for you. Checkout [Airbrake](http://airbrakeapp.com) from the guys over at @@ -39,72 +39,96 @@ for you. Checkout [Airbrake](http://airbrakeapp.com) from the guys over at
39 39
40 1. Install MongoDB. Follow the directions [here](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages), then: 40 1. Install MongoDB. Follow the directions [here](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages), then:
41 41
42 - apt-get update  
43 - apt-get install mongodb 42 +```bash
  43 +apt-get update
  44 +apt-get install mongodb
  45 +```
44 46
45 2. Install libxml and libcurl 47 2. Install libxml and libcurl
46 48
47 - apt-get install libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev 49 +```bash
  50 +apt-get install libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev
  51 +```
48 52
49 3. Install Bundler 53 3. Install Bundler
50 54
51 - gem install bundler 55 +```bash
  56 +gem install bundler
  57 +```
52 58
53 **Running Locally:** 59 **Running Locally:**
54 60
55 1. Install dependencies 61 1. Install dependencies
56 62
57 - bundle install 63 +```bash
  64 +bundle install
  65 +```
58 66
59 2. Bootstrap Errbit. This will copy over config.yml and also seed the database. 67 2. Bootstrap Errbit. This will copy over config.yml and also seed the database.
60 68
61 - rake errbit:bootstrap 69 +```bash
  70 +rake errbit:bootstrap
  71 +```
62 72
63 3. Update the config.yml and mongoid.yml files with information about your environment 73 3. Update the config.yml and mongoid.yml files with information about your environment
64 74
65 4. Start Server 75 4. Start Server
66 76
67 - script/rails server 77 +```bash
  78 +script/rails server
  79 +```
68 80
69 **Deploying:** 81 **Deploying:**
70 82
71 1. Bootstrap Errbit. This will copy over config.yml and also seed the database. 83 1. Bootstrap Errbit. This will copy over config.yml and also seed the database.
72 84
73 - rake errbit:bootstrap 85 +```bash
  86 +rake errbit:bootstrap
  87 +```
74 88
75 2. Update the deploy.rb file with information about your server 89 2. Update the deploy.rb file with information about your server
76 3. Setup server and deploy 90 3. Setup server and deploy
77 91
78 - cap deploy:setup deploy 92 +```bash
  93 +cap deploy:setup deploy
  94 +```
79 95
80 **Deploying to Heroku:** 96 **Deploying to Heroku:**
81 97
82 1. Clone the repository 98 1. Clone the repository
83 99
84 - git clone http://github.com/errbit/errbit.git 100 +```bash
  101 +git clone http://github.com/errbit/errbit.git
  102 +```
85 103
86 2. Create & configure for Heroku 104 2. Create & configure for Heroku
87 105
88 - gem install heroku  
89 - heroku create example-errbit --stack cedar  
90 - heroku addons:add mongohq:free  
91 - heroku addons:add sendgrid:free  
92 - heroku config:add HEROKU=true  
93 - heroku config:add ERRBIT_HOST=some-hostname.example.com  
94 - heroku config:add ERRBIT_EMAIL_FROM=example@example.com  
95 - git push heroku master 106 +```bash
  107 +gem install heroku
  108 +heroku create example-errbit --stack cedar
  109 +heroku addons:add mongohq:free
  110 +heroku addons:add sendgrid:free
  111 +heroku config:add HEROKU=true
  112 +heroku config:add ERRBIT_HOST=some-hostname.example.com
  113 +heroku config:add ERRBIT_EMAIL_FROM=example@example.com
  114 +git push heroku master
  115 +```
96 116
97 3. Seed the DB (_NOTE_: No bootstrap task is used on Heroku!) 117 3. Seed the DB (_NOTE_: No bootstrap task is used on Heroku!)
98 118
99 - heroku run rake db:seed 119 +```bash
  120 +heroku run rake db:seed
  121 +```
100 122
101 4. If you are using a free database on Heroku, you may want to periodically clear resolved errors to free up space. 123 4. If you are using a free database on Heroku, you may want to periodically clear resolved errors to free up space.
102 124
103 - # Install the heroku cron addon, to clear resolved errors daily:  
104 - heroku addons:add cron:daily 125 +```bash
  126 +# Install the heroku cron addon, to clear resolved errors daily:
  127 +heroku addons:add cron:daily
105 128
106 - # Or, clear resolved errors manually:  
107 - heroku rake errbit:db:clear_resolved 129 +# Or, clear resolved errors manually:
  130 +heroku rake errbit:db:clear_resolved
  131 +```
108 132
109 5. Enjoy! 133 5. Enjoy!
110 134
@@ -118,18 +142,21 @@ for you. Checkout [Airbrake](http://airbrakeapp.com) from the guys over at @@ -118,18 +142,21 @@ for you. Checkout [Airbrake](http://airbrakeapp.com) from the guys over at
118 3. If you are authenticating by `username`, you will need to set the user's email 142 3. If you are authenticating by `username`, you will need to set the user's email
119 after authentication. You can do this by adding the following lines to `app/models/user.rb`: 143 after authentication. You can do this by adding the following lines to `app/models/user.rb`:
120 144
121 - before_save :set_ldap_email  
122 - def set_ldap_email  
123 - self.email = Devise::LdapAdapter.get_ldap_param(self.username, "mail")  
124 - end  
125 - 145 +```ruby
  146 + before_save :set_ldap_email
  147 + def set_ldap_email
  148 + self.email = Devise::LdapAdapter.get_ldap_param(self.username, "mail")
  149 + end
  150 +```
126 151
127 Upgrading 152 Upgrading
128 --------- 153 ---------
129 *Note*: When upgrading Errbit, please run: 154 *Note*: When upgrading Errbit, please run:
130 155
131 - 1. git pull origin master ( assuming origin is the github.com/errbit/errbit repo )  
132 - 2. rake db:migrate 156 +```bash
  157 +git pull origin master # assuming origin is the github.com/errbit/errbit repo
  158 +rake db:migrate
  159 +```
133 160
134 If we change the way that data is stored, this will run any migrations to bring your database up to date. 161 If we change the way that data is stored, this will run any migrations to bring your database up to date.
135 162
@@ -220,5 +247,5 @@ Contributing @@ -220,5 +247,5 @@ Contributing
220 Copyright 247 Copyright
221 --------- 248 ---------
222 249
223 -Copyright (c) 2010 Jared Pace. See LICENSE for details. 250 +Copyright (c) 2010-2011 Jared Pace. See LICENSE for details.
224 251