Muck Services

Muck Services adds functionality that aggregates, searches and analyzes data from many different web sources. This gem works in conjunction with the Muck Raker gem to handle aggregation, recommendations and search. It is recommended that you install both gems together.

Installation

Be sure to add github as a gem source before proceeding as acts-as-taggable-on, mislav-will_paginate (and many other gems) live there.

gem sources -a http://gems.github.com

Install muck services:

sudo gem install muck-services

Install muck raker: sudo gem install muck-raker

Installing muck services should install all of it’s dependancies. You can also install them manually:

sudo gem install httparty
sudo gem install mbleigh-acts-as-taggable-on
sudo gem install mislav-will_paginate
sudo gem install muck-feedbag
sudo gem install pauldix-feedzirra

After install acts-as-taggable-on be sure to include the helper in application_helper.rb:

module ApplicationHelper
  include TagsHelper
end

Add rake tasks to your Rakefile

require 'muck_services/tasks'

Add routes Depending on which features you use from muck raker you may need to add additional routes to your application. For example, a user with has_muck_feeds and acts_as_muck_feed_owner the following routes would be required:

map.resources :users, :controller => 'muck/users' do |users|
  # have to map into the muck/identity_feeds controller or rails can't find the identity_feeds
  users.resources :identity_feeds, :controller => 'muck/identity_feeds'
  users.resources :feeds, :controller => 'muck/feeds'
  users.resources :aggregations, :controller => 'muck/aggregations'
end

Usage

Muck raker aggregates data feeds and analyzes the results to make recommendations.

environment.rb

Add the following to environment.rb to include all the required gems:

config.gem “muck-feedbag”, :lib => “feedbag”, :source => “gems.github.com” config.gem “pauldix-feedzirra”, :lib => ‘feedzirra’, :source => “gems.github.com” config.gem ‘muck-engine’, :lib => ‘muck_engine’ config.gem ‘muck-users’, :lib => ‘muck_users’ config.gem ‘muck-solr’, :lib => ‘acts_as_solr’ # The following are optional but almost always used so you may as well pull them in. config.gem ‘muck-comments’, :lib => ‘muck_comments’ config.gem ‘muck-activities’, :lib => ‘muck_activities’ config.gem ‘muck-shares’, :lib => ‘muck_shares’ config.gem ‘muck-raker’, :lib => ‘muck_raker’

Database

There are a number of rake tasks meant to help you get your database setup: rake muck:services:db:bootstrap # Loads some feeds oai endpoints to get things started rake muck:services:db:bootstrap_services # Deletes and reloads all services and service categories rake muck:services:db:populate # Flags the languages that the muck raker supports rake muck:services:import_attention # Imports attention data for use in testing

Bring in required files - migrations etc:

rake muck:services:sync # Sync files from muck services.

Identity Feeds

Specific feeds can be attached to objects. For example, a user might produce a blog or a flickr photo stream. The identity feed system associated the resulting data with the user so that recommendations can be improved.

Notes

muck-services uses muck-comments and muck-activities to add comments to entries in the ‘visits’ frame view. You can omit these gems if you don’t desire comments. muck-services also uses muck-shares and muck-activities to share entries with other users. Again you can omit these gems if you don’t desire the share capability.

To turn on this functionality add these lines to your global_config.yml file:

enable_raker_comments: true
enable_raker_shares: true

To install these gems:

sudo gem install muck-comments
sudo gem install muck-activities
sudo gem install muck-shares

If you enable comments you will need a comment model with ‘acts_as_muck_services_comment’:

class Comment < ActiveRecord::Base

acts_as_muck_comment
acts_as_muck_services_comment

end

CSS

Running rake muck:raker:sync will copy a default css file called muck-raker.css into your stylesheets directory.

You can include that file in your layout or copy it and modify it to meet your needs. (Don’t change the file as each time you run rake muck:raker:sync it will overwrite any changes you might have made.)

Frame css

There is an example css file for the framed page in frame.css.

Testing

You will need to have mysql setup to run the migrations for the test database. Muck raker has a few customizations which require mysql.

Copyright © 2009 Tatemae.com, released under the MIT license