Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 88 lines (67 sloc) 3.366 kb
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
1 # MONOLOGUE
c95c468 Jean-Philippe Boily modified README
authored
2 Monologue is a basic mountable blogging engine in Rails built to be easily mounted in an already existing Rails app, but it can also be used alone.
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
3
d0d9561 Jean-Philippe Boily added travis image in README
authored
4 [![Build Status](https://secure.travis-ci.org/jipiboily/monologue.png)](http://travis-ci.org/jipiboily/monologue)
5
6
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
7 ## Features
082292e Jean-Philippe Boily modified README a bit
authored
8 - Rails mountable engine (fully named spaced)
5b098a3 Jean-Philippe Boily
authored
9 - tested
c95c468 Jean-Philippe Boily modified README
authored
10 - back to basics: few features
11 - it has post revisions (no UI to choose published revision yet, but it keeps your modification history)
f650538 Jean-Philippe Boily updated README
authored
12 - few external dependencies (no Devise or Sorcery, etc…) so we don't face problem integrating with existing Rails app.([Rails mountable engines: dependency nightmare?](http://jipiboily.com/2012/rails-mountable-engines-dependency-nightmare))
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
13 - comments handled by disqus
c95c468 Jean-Philippe Boily modified README
authored
14 - enforcing [Rails cache](http://edgeguides.rubyonrails.org/caching_with_rails.html) for better performance (only support file store for now)
15 - runs on Heroku
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
16
f650538 Jean-Philippe Boily updated README
authored
17 ### missing features
18 - categories
c95c468 Jean-Philippe Boily modified README
authored
19 - UI for posts revisions and to manage user
f650538 Jean-Philippe Boily updated README
authored
20 - much more…see issues!
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
21
c95c468 Jean-Philippe Boily modified README
authored
22
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
23 ## Installation
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
24 ### 1. Add the gem to your `Gemfile`
25 ```ruby
26 gem "monologue"
27 ```
28 And run `bundle install` to fetch the gem and update your 'Gemfile.lock'.
29
30 ### 2. Route to Monologue
31
32 Add this to your route file (`config/route.rb`)
33 ```ruby
34 # This line mounts Monologue's routes at the root of your application.
35 # This means, any requests to URLs such as /my-post, will go to Monologue::PostsController.
36 # If you would like to change where this engine is mounted, simply change the :at option to something different.
37 #
38 # We ask that you don't use the :as option here, as Monologue relies on it being the default of "monologue"
39 mount Monologue::Engine, :at => '/' # or whatever path, be it "/blog" or "/monologue"
40 ```
41
42 ### 3. Migrate Monologue's database tables
43 Run these commands:
44
45 1. $`bundle exec rake monologue:install:migrations`
46 2. $`bundle exec rake db:create` (only if this is a new project)
47 3. $`bundle exec rake db:migrate`
48
888d1bb Jean-Philippe Boily added a few things in README in regard ton install and caching
authored
49
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
50 ### 4. Create a user
51 Open your development console with `rails c`, then:
52 ```ruby
53 Monologue::User.create(name: "monologue", email:"monologue@example.com", password:"my-password", password_confirmation: "my-password")
54 ```
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
55
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
56 ### 5. Configure Monologue.
57 This is all done in an initializer file, say `config/initializers/monologue.rb`. More on this in the [Wiki - Configuration](https://github.com/jipiboily/monologue/wiki/Configuration).
888d1bb Jean-Philippe Boily added a few things in README in regard ton install and caching
authored
58
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
59 ### 6. Ready
60 Start your server and head on [http://localhost:3000/monologue](http://localhost:3000/monologue) to log in the admin section.
c6607d0 Jean-Philippe Boily added a step to the README with admin section's URL
authored
61
9bed047 Jean-Philippe Boily Add clarification about cache disabling for Heroku (#55)
authored
62 ### Note to Heroku users
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
63 Additionnal step: turn caching off in `config/environments/production.rb`:
9bed047 Jean-Philippe Boily Add clarification about cache disabling for Heroku (#55)
authored
64 ```ruby
b843695 Jean-Philippe Boily fixed an error in README. Turning cache off means perform_caching = fals...
authored
65 config.action_controller.perform_caching = false
9bed047 Jean-Philippe Boily Add clarification about cache disabling for Heroku (#55)
authored
66 ```
67
f650538 Jean-Philippe Boily updated README
authored
68 ## Enable caching
17a9e73 Jean-Philippe Boily added caching (fix #15)
authored
69 Just turn perform_caching to true in your environment config file (`config/environment/{environment}.rb):
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
70 ```ruby
71 config.action_controller.perform_caching = true
72 ```
888d1bb Jean-Philippe Boily added a few things in README in regard ton install and caching
authored
73
74 **IMPORTANT**: if monologue is mounted at root ("/"), you must also add that in your `routes.rb` file, before the monologue mount:
75
8b5d69f Olivier Lacan Proper Ruby syntax highlighting, 1.9 syntax consistency, combine 1st & 2...
olivierlacan authored
76 ```ruby
77 root to: 'monologue/posts#index'
78 ```
17a9e73 Jean-Philippe Boily added caching (fix #15)
authored
79
e200b30 Jean-Philippe Boily Modified README
authored
80 ## Customization
3fe1c83 Jean-Philippe Boily Some wiki links in README
authored
81 See the [Wiki - Customizations](https://github.com/jipiboily/monologue/wiki/Customizations).
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
82
e200b30 Jean-Philippe Boily Modified README
authored
83 ## Requirements
c95c468 Jean-Philippe Boily modified README
authored
84 - Rails 3.1 +
85 - Database: MySQL & Postgres are supported but other databases might work too.
c8fe19b Jean-Philippe Boily added rspec and capybara
authored
86
e200b30 Jean-Philippe Boily Modified README
authored
87 ## Contribute
f650538 Jean-Philippe Boily updated README
authored
88 Fork it, then pull request. Please add tests for your feature or bug fix.
Something went wrong with that request. Please try again.