This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README | ||
| |
Rakefile | ||
| |
TODO | ||
| |
app/ | ||
| |
config/ | ||
| |
lib/ | ||
| |
merb_background.gemspec | ||
| |
public/ | ||
| |
script/ | ||
| |
spec/ | ||
| |
stubs/ |
README
MerbBackground ============== A slice for the Merb framework that offers background tasks for DataMapper. This is ported from background-fu that works with Rails + AR. Original: http://github.com/ncr/background-fu/ Methods ======= same as background-fu. MerbBackground::Job.enqueue!(ExampleWorker, :add, 1, 2) Setup ===== MerbBackground::Job.auto_upgrade! or rake slices:merb_background:migrate Daemon ====== ruby slices/merb_background/script/background.rb ------------------------------------------------------------------------------ To see all available tasks for MerbBackground run: rake -T slices:merb_background ------------------------------------------------------------------------------ Instructions for installation: file: config/init.rb # add the slice as a regular dependency dependency 'merb_background' # if needed, configure which slices to load and in which order Merb::Plugins.config[:merb_slices] = { :queue => ["MerbBackground", ...] } # optionally configure the plugins in a before_app_loads callback Merb::BootLoader.before_app_loads do Merb::Slices::config[:merb_background][:option] = value end file: config/router.rb # example: /merb_background/:controller/:action/:id add_slice(:MerbBackground) # example: /:lang/:controller/:action/:id add_slice(:MerbBackground, :path => ':lang') # example: /:controller/:action/:id slice(:MerbBackground) Normally you should also run the following rake task: rake slices:merb_background:install ------------------------------------------------------------------------------ You can put your application-level overrides in: host-app/slices/merb_background/app - controllers, models, views ... Templates are located in this order: 1. host-app/slices/merb_background/app/views/* 2. gems/merb_background/app/views/* 3. host-app/app/views/* You can use the host application's layout by configuring the merb_background slice in a before_app_loads block: Merb::Slices.config[:merb_background] = { :layout => :application } By default :merb_background is used. If you need to override stylesheets or javascripts, just specify your own files in your layout instead/in addition to the ones supplied (if any) in host-app/public/slices/merb_background. In any case don't edit those files directly as they may be clobbered any time rake merb_background:install is run.








