tatemae / muck-services

services for muck

This URL has Read+Write access

name age message
file .document Tue Nov 03 12:50:47 -0800 2009 initial commit [jbasdf]
file .gitignore Fri Nov 06 14:25:46 -0800 2009 added exception handling for topic_path generation [jbasdf]
file LICENSE Tue Nov 03 12:50:47 -0800 2009 initial commit [jbasdf]
file README.rdoc Fri Dec 18 14:37:06 -0800 2009 updated readme [jbasdf]
file Rakefile Tue Dec 15 13:40:41 -0800 2009 added catch for nil. Fixed tests [jbasdf]
file VERSION Mon Dec 21 10:33:53 -0800 2009 Version bump to 0.1.25 [jbasdf]
directory app/ Mon Dec 21 10:31:57 -0800 2009 removed unused method [jbasdf]
directory config/ Thu Nov 12 21:21:58 -0800 2009 Nuked solr config files from the root The mast... [Joel Duffin]
directory db/ Wed Nov 25 08:35:47 -0800 2009 got rid of slugs migration [jbasdf]
directory lib/ Fri Dec 11 13:18:14 -0800 2009 Version bump to 0.1.23 [jbasdf]
directory locales/ Fri Dec 11 13:18:14 -0800 2009 Version bump to 0.1.23 [jbasdf]
file muck-services.gemspec Mon Dec 21 10:46:14 -0800 2009 released gem [jbasdf]
directory public/ Tue Dec 29 13:03:54 -0800 2009 Fixed mit specific bugs in the recommender grea... [Joel Duffin]
directory rails/ Wed Nov 18 00:03:10 -0800 2009 updated annotations. Added muck recommendations [jbasdf]
directory test/ Tue Dec 15 13:40:41 -0800 2009 added catch for nil. Fixed tests [jbasdf]
README.rdoc

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:

  inform_admin_of_global_feed: true   # If true then the 'admin_email' will recieve an email anytime a global feed (one that is not
                                      # attached to any object) is added.
  enable_services_comments: true      # Enables or disables comments in the frame that wraps content as a user browses recommendation results
  enable_services_shares: true        # Enables or disables sharing in the frame that wraps content as a user browses recommendation results

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