README.md in grape-gen-0.0.5 vs README.md in grape-gen-0.0.6
- old
+ new
@@ -1,31 +1,77 @@
-# Grape::Scaffold
+# Grape::Generate
+Grape application template generator with batteries included
-TODO: Write a gem description
+## Getting started
-## Installation
+First, install gem into your system
-Add this line to your application's Gemfile:
+ $ gem install 'grape-gen'
+then grape-gen binary will be available in your shell.
+To generate default app skeleton, simply use:
-```ruby
-gem 'grape-scaffold'
-```
+ $ grape-gen app your_app_name
+After executing complete, dir __your_app_name__ will be created in current dir.
+Navigate into created dir and do ```$ bundle```
-And then execute:
+## Whats included?
+* carrierwave
+* sidekiq
+* faye
+* elastic search
+* redis
- $ bundle
+## Grape API rack app
+Rack app intended to be run under EventMachine-powered server (skeleton app using Thin)
+Every library used is patched to play ball with EventMachine event loop.
+To start web server:
-Or install it yourself as:
+ $ RACK_ENV=production thin start -p 9292
+Example webserver responding to following API methods:
- $ gem install grape-scaffold
+* POST /api/auth/register (display_name, email)
+* POST /api/auth/approve_email (email, email_approvement_code)
+* GET /api/profile
+* PUT /api/profile (avatar, remove_avatar, display_name)
-## Usage
+/api/profile methods is restricted to use only by registered users.
+API user must supply X-Authorize header, received from /api/auth/approve_email
-TODO: Write usage instructions here
+When user approves email by calling POST /api/auth/approve_email with valid data,
+message containing user __display_name__ will be published into faye __/user/registered__ channel
+so all faye connections subscribed to /user/registered channel will receive info about newly registered user
+## Faye (optional, enabled by default)
+Include faye support into skeleton app.
+To start faye server:
+
+ $ thin start -p 9393 -R faye.ru -e production
+While running web server and faye server, please, visit http://localhost:9292/faye
+Webpage contains simple implementation of faye client, connecting to localhost:9393 server
+After successful connection client subscribes on two channels: __/user/registered__ and __/time__
+Faye events received displayed at the top of webpage
+
+## Sidekiq (optional, enabled by default)
+Include support for background jobs via Sidekiq gem
+Besides of main Sidekiq gem it also adds gem supporting jobs scheduling
+Out of the box skeleton app have one scheduled job defined - __/jobs/pong_time.rb__
+Job, scheduled to run each 5 seconds, simply publishes current time into /time faye channel
+so all faye connections subscribed to /time channel will receive current time string
+For more information take a look at /config/sidekiq.yml
+
+## Mandrill (optional, enabled by default)
+Include support for email delivery with Mandrill service via MandrillMailer gem.
+To have this gem running you should add your Mandrill api key to __/config/application.yml__
+After successful registration with __POST /api/auth/register__ app tries to send message to user email using __/mailers/registraion_mailer.rb__
+To have email delivered please make sure you have changed __from__ address in __/mailers/registraion_mailer.rb__ and appropriate domain name is registered for api key you add to config.file.
+
+## TODO
+
+More documentation
+
## Contributing
-1. Fork it ( https://github.com/[my-github-username]/grape-scaffold/fork )
+1. Fork it ( https://github.com/AlexYankee/grape-gen/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request