muck-raker 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.rdoc +39 -4
- data/VERSION +1 -1
- data/app/controllers/muck/feeds_controller.rb +8 -2
- data/app/controllers/muck/identity_feeds_controller.rb +154 -0
- data/app/controllers/muck/visits_controller.rb +7 -1
- data/app/helpers/muck_raker_services_helper.rb +117 -0
- data/app/models/aggregation.rb +17 -0
- data/app/models/amazon.rb +59 -0
- data/app/models/amazon_request.rb +83 -0
- data/app/models/click.rb +0 -8
- data/app/models/entry.rb +2 -1
- data/app/models/feed.rb +53 -57
- data/app/models/feed_parent.rb +0 -5
- data/app/models/identity_feed.rb +26 -0
- data/app/models/recommendation.rb +0 -5
- data/app/models/service.rb +53 -8
- data/app/models/service_category.rb +14 -0
- data/app/models/tag_cloud.rb +0 -4
- data/app/views/activity_templates/_entry_comment.html.erb +8 -0
- data/app/views/activity_templates/_entry_share.html.erb +8 -0
- data/app/views/identity_feeds/_form.html.erb +20 -0
- data/app/views/identity_feeds/_service_categories.html.erb +13 -0
- data/app/views/identity_feeds/_services_for_user.html.erb +25 -0
- data/app/views/identity_feeds/edit.html.erb +2 -0
- data/app/views/identity_feeds/index.html.erb +32 -0
- data/app/views/identity_feeds/new.html.erb +1 -0
- data/app/views/parts/_add_extended_feed.html.erb +1 -1
- data/app/views/parts/_add_feed.html.erb +1 -1
- data/app/views/parts/_add_single_feed.html.erb +1 -1
- data/app/views/service_templates/_facebook.html.erb +4 -0
- data/app/views/service_templates/_friendfeed.html.erb +2 -0
- data/app/views/service_templates/_goodreads.html.erb +2 -0
- data/app/views/service_templates/_linkedin.html.erb +2 -0
- data/app/views/service_templates/_netflix.html.erb +2 -0
- data/app/views/service_templates/_polyvore.html.erb +2 -0
- data/app/views/service_templates/_zotero_group.html.erb +2 -0
- data/app/views/services/_edit_service.html.erb +1 -0
- data/app/views/services/_new_service.html.erb +1 -0
- data/app/views/services/_summary.html.erb +5 -0
- data/app/views/services/_view_service.html.erb +1 -0
- data/app/views/visits/_comments_tool.html.erb +19 -0
- data/app/views/visits/_frame_scripts.html.erb +26 -0
- data/app/views/visits/_share_tool.html.erb +22 -0
- data/app/views/visits/_toolbar.html.erb +25 -0
- data/app/views/visits/show.html.erb +4 -96
- data/config/muck_raker_routes.rb +2 -0
- data/db/bootstrap/service_categories.yml +40 -0
- data/db/bootstrap/services.yml +605 -153
- data/db/migrate/20090826220530_change_services_sequence_to_sort.rb +9 -0
- data/db/migrate/20090826225652_create_identity_feeds.rb +14 -0
- data/db/migrate/20090827005105_add_identity_fields_to_services.rb +13 -0
- data/db/migrate/20090827015308_create_service_categories.rb +12 -0
- data/db/migrate/20090827221502_add_prompt_and_template_to_services.rb +11 -0
- data/lib/active_record/acts/muck_feed_owner.rb +31 -0
- data/lib/active_record/acts/muck_feed_parent.rb +3 -2
- data/lib/active_record/acts/muck_raker_comment.rb +39 -0
- data/lib/active_record/acts/muck_raker_share.rb +32 -0
- data/lib/muck_raker/tasks.rb +19 -0
- data/lib/muck_raker.rb +6 -0
- data/locales/ar.yml +98 -61
- data/locales/bg.yml +90 -53
- data/locales/ca.yml +87 -50
- data/locales/cs.yml +82 -45
- data/locales/da.yml +69 -32
- data/locales/de.yml +75 -38
- data/locales/el.yml +78 -41
- data/locales/en.yml +39 -2
- data/locales/es.yml +82 -45
- data/locales/et.yml +89 -52
- data/locales/fa.yml +82 -45
- data/locales/fi.yml +95 -58
- data/locales/fr.yml +80 -43
- data/locales/gl.yml +94 -57
- data/locales/hi.yml +77 -40
- data/locales/hr.yml +84 -47
- data/locales/hu.yml +101 -64
- data/locales/id.yml +81 -44
- data/locales/it.yml +84 -47
- data/locales/iw.yml +91 -54
- data/locales/ja.yml +96 -59
- data/locales/ko.yml +77 -40
- data/locales/lt.yml +85 -48
- data/locales/lv.yml +87 -50
- data/locales/mt.yml +90 -53
- data/locales/nl.yml +75 -38
- data/locales/no.yml +77 -40
- data/locales/pl.yml +79 -42
- data/locales/pt-PT.yml +87 -50
- data/locales/ro.yml +100 -63
- data/locales/ru.yml +94 -57
- data/locales/sk.yml +83 -46
- data/locales/sl.yml +84 -47
- data/locales/sq.yml +101 -64
- data/locales/sr.yml +106 -69
- data/locales/sv.yml +87 -50
- data/locales/th.yml +100 -63
- data/locales/tl.yml +73 -36
- data/locales/tr.yml +84 -47
- data/locales/uk.yml +98 -61
- data/locales/vi.yml +87 -50
- data/locales/zh-CN.yml +82 -45
- data/locales/zh-TW.yml +82 -45
- data/locales/zh.yml +83 -46
- data/muck-raker.gemspec +517 -5
- data/public/ecs_to_rss-wishlist.xslt +41 -0
- data/public/images/service_icons/16/blogger.png +0 -0
- data/public/images/service_icons/16/citeulike.png +0 -0
- data/public/images/service_icons/16/clipmarks.png +0 -0
- data/public/images/service_icons/16/dailymotion.png +0 -0
- data/public/images/service_icons/16/delicious.png +0 -0
- data/public/images/service_icons/16/digg.png +0 -0
- data/public/images/service_icons/16/diigo.png +0 -0
- data/public/images/service_icons/16/facebook.png +0 -0
- data/public/images/service_icons/16/feed.png +0 -0
- data/public/images/service_icons/16/flickr.png +0 -0
- data/public/images/service_icons/16/fotolog.png +0 -0
- data/public/images/service_icons/16/friendfeed.png +0 -0
- data/public/images/service_icons/16/friendster.png +0 -0
- data/public/images/service_icons/16/furl.png +0 -0
- data/public/images/service_icons/16/goodreads.png +0 -0
- data/public/images/service_icons/16/google.png +0 -0
- data/public/images/service_icons/16/googleblog.png +0 -0
- data/public/images/service_icons/16/googlenews.png +0 -0
- data/public/images/service_icons/16/identica.png +0 -0
- data/public/images/service_icons/16/joost.png +0 -0
- data/public/images/service_icons/16/lastfm.png +0 -0
- data/public/images/service_icons/16/librarything.png +0 -0
- data/public/images/service_icons/16/linkedin.png +0 -0
- data/public/images/service_icons/16/livejournal.png +0 -0
- data/public/images/service_icons/16/magnolia.png +0 -0
- data/public/images/service_icons/16/mendeley.png +0 -0
- data/public/images/service_icons/16/mixx.png +0 -0
- data/public/images/service_icons/16/myspace.png +0 -0
- data/public/images/service_icons/16/netflix.png +0 -0
- data/public/images/service_icons/16/netvibes.png +0 -0
- data/public/images/service_icons/16/newsvine.png +0 -0
- data/public/images/service_icons/16/oai.png +0 -0
- data/public/images/service_icons/16/odeo.png +0 -0
- data/public/images/service_icons/16/opml.png +0 -0
- data/public/images/service_icons/16/pandora.png +0 -0
- data/public/images/service_icons/16/photobucket.png +0 -0
- data/public/images/service_icons/16/picasa.png +0 -0
- data/public/images/service_icons/16/polyvore.png +0 -0
- data/public/images/service_icons/16/pownce.png +0 -0
- data/public/images/service_icons/16/reddit.png +0 -0
- data/public/images/service_icons/16/simpy.png +0 -0
- data/public/images/service_icons/16/smugmug.png +0 -0
- data/public/images/service_icons/16/stumbleupon.png +0 -0
- data/public/images/service_icons/16/tag.png +0 -0
- data/public/images/service_icons/16/technorati.png +0 -0
- data/public/images/service_icons/16/tumblr.png +0 -0
- data/public/images/service_icons/16/twitter.png +0 -0
- data/public/images/service_icons/16/vimeo.png +0 -0
- data/public/images/service_icons/16/webshots.png +0 -0
- data/public/images/service_icons/16/wordpress.png +0 -0
- data/public/images/service_icons/16/xanga.png +0 -0
- data/public/images/service_icons/16/yahoo.png +0 -0
- data/public/images/service_icons/16/yelp.png +0 -0
- data/public/images/service_icons/16/youtube.png +0 -0
- data/public/images/service_icons/16/zooomr.png +0 -0
- data/public/images/service_icons/16/zotero.png +0 -0
- data/public/images/service_icons/24/amazon.png +0 -0
- data/public/images/service_icons/24/blogger.png +0 -0
- data/public/images/service_icons/24/citeulike.png +0 -0
- data/public/images/service_icons/24/clipmarks.png +0 -0
- data/public/images/service_icons/24/dailymotion.png +0 -0
- data/public/images/service_icons/24/delicious.png +0 -0
- data/public/images/service_icons/24/digg.png +0 -0
- data/public/images/service_icons/24/diigo.png +0 -0
- data/public/images/service_icons/24/facebook.png +0 -0
- data/public/images/service_icons/24/feed.png +0 -0
- data/public/images/service_icons/24/flickr.png +0 -0
- data/public/images/service_icons/24/fotolog.png +0 -0
- data/public/images/service_icons/24/friendfeed.png +0 -0
- data/public/images/service_icons/24/friendster.png +0 -0
- data/public/images/service_icons/24/furl.png +0 -0
- data/public/images/service_icons/24/goodreads.png +0 -0
- data/public/images/service_icons/24/google.png +0 -0
- data/public/images/service_icons/24/googleblog.png +0 -0
- data/public/images/service_icons/24/googlenews.png +0 -0
- data/public/images/service_icons/24/identica.png +0 -0
- data/public/images/service_icons/24/joost.png +0 -0
- data/public/images/service_icons/24/lastfm.png +0 -0
- data/public/images/service_icons/24/librarything.png +0 -0
- data/public/images/service_icons/24/linkedin.png +0 -0
- data/public/images/service_icons/24/livejournal.png +0 -0
- data/public/images/service_icons/24/magnolia.png +0 -0
- data/public/images/service_icons/24/mendeley.png +0 -0
- data/public/images/service_icons/24/mixx.png +0 -0
- data/public/images/service_icons/24/myspace.png +0 -0
- data/public/images/service_icons/24/netflix.png +0 -0
- data/public/images/service_icons/24/netvibes.png +0 -0
- data/public/images/service_icons/24/newsvine.png +0 -0
- data/public/images/service_icons/24/oai.png +0 -0
- data/public/images/service_icons/24/odeo.png +0 -0
- data/public/images/service_icons/24/opml.png +0 -0
- data/public/images/service_icons/24/pandora.png +0 -0
- data/public/images/service_icons/24/photobucket.png +0 -0
- data/public/images/service_icons/24/picasa.png +0 -0
- data/public/images/service_icons/24/polyvore.png +0 -0
- data/public/images/service_icons/24/pownce.png +0 -0
- data/public/images/service_icons/24/reddit.png +0 -0
- data/public/images/service_icons/24/simpy.png +0 -0
- data/public/images/service_icons/24/smugmug.png +0 -0
- data/public/images/service_icons/24/stumbleupon.png +0 -0
- data/public/images/service_icons/24/tag.png +0 -0
- data/public/images/service_icons/24/technorati.png +0 -0
- data/public/images/service_icons/24/tumblr.png +0 -0
- data/public/images/service_icons/24/twitter.png +0 -0
- data/public/images/service_icons/24/vimeo.png +0 -0
- data/public/images/service_icons/24/webshots.png +0 -0
- data/public/images/service_icons/24/wordpress.png +0 -0
- data/public/images/service_icons/24/xanga.png +0 -0
- data/public/images/service_icons/24/yahoo.png +0 -0
- data/public/images/service_icons/24/yelp.png +0 -0
- data/public/images/service_icons/24/youtube.png +0 -0
- data/public/images/service_icons/24/zooomr.png +0 -0
- data/public/images/service_icons/24/zotero.png +0 -0
- data/public/images/service_icons/48/amazon.png +0 -0
- data/public/images/service_icons/48/blogger.png +0 -0
- data/public/images/service_icons/48/citeulike.png +0 -0
- data/public/images/service_icons/48/clipmarks.png +0 -0
- data/public/images/service_icons/48/dailymotion.png +0 -0
- data/public/images/service_icons/48/delicious.png +0 -0
- data/public/images/service_icons/48/digg.png +0 -0
- data/public/images/service_icons/48/diigo.png +0 -0
- data/public/images/service_icons/48/facebook.png +0 -0
- data/public/images/service_icons/48/feed.png +0 -0
- data/public/images/service_icons/48/flickr.png +0 -0
- data/public/images/service_icons/48/fotolog.png +0 -0
- data/public/images/service_icons/48/friendfeed.png +0 -0
- data/public/images/service_icons/48/friendster.png +0 -0
- data/public/images/service_icons/48/furl.png +0 -0
- data/public/images/service_icons/48/goodreads.png +0 -0
- data/public/images/service_icons/48/google.png +0 -0
- data/public/images/service_icons/48/googleblog.png +0 -0
- data/public/images/service_icons/48/googlenews.png +0 -0
- data/public/images/service_icons/48/identica.png +0 -0
- data/public/images/service_icons/48/joost.png +0 -0
- data/public/images/service_icons/48/lastfm.png +0 -0
- data/public/images/service_icons/48/librarything.png +0 -0
- data/public/images/service_icons/48/linkedin.png +0 -0
- data/public/images/service_icons/48/livejournal.png +0 -0
- data/public/images/service_icons/48/magnolia.png +0 -0
- data/public/images/service_icons/48/mendeley.png +0 -0
- data/public/images/service_icons/48/mixx.png +0 -0
- data/public/images/service_icons/48/myspace.png +0 -0
- data/public/images/service_icons/48/netflix.png +0 -0
- data/public/images/service_icons/48/netvibes.png +0 -0
- data/public/images/service_icons/48/newsvine.png +0 -0
- data/public/images/service_icons/48/oai.png +0 -0
- data/public/images/service_icons/48/odeo.png +0 -0
- data/public/images/service_icons/48/opml.png +0 -0
- data/public/images/service_icons/48/pandora.png +0 -0
- data/public/images/service_icons/48/photobucket.png +0 -0
- data/public/images/service_icons/48/picasa.png +0 -0
- data/public/images/service_icons/48/polyvore.png +0 -0
- data/public/images/service_icons/48/pownce.png +0 -0
- data/public/images/service_icons/48/reddit.png +0 -0
- data/public/images/service_icons/48/simpy.png +0 -0
- data/public/images/service_icons/48/smugmug.png +0 -0
- data/public/images/service_icons/48/stumbleupon.png +0 -0
- data/public/images/service_icons/48/tag.png +0 -0
- data/public/images/service_icons/48/technorati.png +0 -0
- data/public/images/service_icons/48/tumblr.png +0 -0
- data/public/images/service_icons/48/twitter.png +0 -0
- data/public/images/service_icons/48/vimeo.png +0 -0
- data/public/images/service_icons/48/webshots.png +0 -0
- data/public/images/service_icons/48/wordpress.png +0 -0
- data/public/images/service_icons/48/xanga.png +0 -0
- data/public/images/service_icons/48/yahoo.png +0 -0
- data/public/images/service_icons/48/yelp.png +0 -0
- data/public/images/service_icons/48/youtube.png +0 -0
- data/public/images/service_icons/48/zooomr.png +0 -0
- data/public/images/service_icons/48/zotero.png +0 -0
- data/public/images/service_icons/60/amazon.png +0 -0
- data/public/images/service_icons/60/blogger.png +0 -0
- data/public/images/service_icons/60/citeulike.png +0 -0
- data/public/images/service_icons/60/clipmarks.png +0 -0
- data/public/images/service_icons/60/dailymotion.png +0 -0
- data/public/images/service_icons/60/delicious.png +0 -0
- data/public/images/service_icons/60/digg.png +0 -0
- data/public/images/service_icons/60/diigo.png +0 -0
- data/public/images/service_icons/60/facebook.png +0 -0
- data/public/images/service_icons/60/feed.png +0 -0
- data/public/images/service_icons/60/flickr.png +0 -0
- data/public/images/service_icons/60/fotolog.png +0 -0
- data/public/images/service_icons/60/friendfeed.png +0 -0
- data/public/images/service_icons/60/friendster.png +0 -0
- data/public/images/service_icons/60/furl.png +0 -0
- data/public/images/service_icons/60/goodreads.png +0 -0
- data/public/images/service_icons/60/google.png +0 -0
- data/public/images/service_icons/60/googleblog.png +0 -0
- data/public/images/service_icons/60/googlenews.png +0 -0
- data/public/images/service_icons/60/identica.png +0 -0
- data/public/images/service_icons/60/joost.png +0 -0
- data/public/images/service_icons/60/lastfm.png +0 -0
- data/public/images/service_icons/60/librarything.png +0 -0
- data/public/images/service_icons/60/linkedin.png +0 -0
- data/public/images/service_icons/60/livejournal.png +0 -0
- data/public/images/service_icons/60/magnolia.png +0 -0
- data/public/images/service_icons/60/mendeley.png +0 -0
- data/public/images/service_icons/60/mixx.png +0 -0
- data/public/images/service_icons/60/myspace.png +0 -0
- data/public/images/service_icons/60/netflix.png +0 -0
- data/public/images/service_icons/60/netvibes.png +0 -0
- data/public/images/service_icons/60/newsvine.png +0 -0
- data/public/images/service_icons/60/oai.png +0 -0
- data/public/images/service_icons/60/odeo.png +0 -0
- data/public/images/service_icons/60/opml.png +0 -0
- data/public/images/service_icons/60/pandora.png +0 -0
- data/public/images/service_icons/60/photobucket.png +0 -0
- data/public/images/service_icons/60/picasa.png +0 -0
- data/public/images/service_icons/60/polyvore.png +0 -0
- data/public/images/service_icons/60/pownce.png +0 -0
- data/public/images/service_icons/60/reddit.png +0 -0
- data/public/images/service_icons/60/simpy.png +0 -0
- data/public/images/service_icons/60/smugmug.png +0 -0
- data/public/images/service_icons/60/stumbleupon.png +0 -0
- data/public/images/service_icons/60/tag.png +0 -0
- data/public/images/service_icons/60/technorati.png +0 -0
- data/public/images/service_icons/60/tumblr.png +0 -0
- data/public/images/service_icons/60/twitter.png +0 -0
- data/public/images/service_icons/60/vimeo.png +0 -0
- data/public/images/service_icons/60/webshots.png +0 -0
- data/public/images/service_icons/60/wordpress.png +0 -0
- data/public/images/service_icons/60/xanga.png +0 -0
- data/public/images/service_icons/60/yahoo.png +0 -0
- data/public/images/service_icons/60/yelp.png +0 -0
- data/public/images/service_icons/60/youtube.png +0 -0
- data/public/images/service_icons/60/zooomr.png +0 -0
- data/public/images/service_icons/60/zotero.png +0 -0
- data/public/images/service_icons/amazon.png +0 -0
- data/public/images/service_icons/facebook_friend_links.jpg +0 -0
- data/public/images/service_icons/facebook_my_links.jpg +0 -0
- data/public/images/service_icons/source/Aquaticus_Social_Icon_template_by_jwloh.psd +0 -0
- data/public/images/service_icons/source/Google.psd +0 -0
- data/public/images/service_icons/source/Quake 9 Design.webloc +0 -0
- data/public/images/service_icons/source/ReadMe.rtf +52 -0
- data/public/images/service_icons/source/aquaticus.social.png +0 -0
- data/public/images/service_icons/source/citeulike.png +0 -0
- data/public/images/service_icons/source/clipmarks.png +0 -0
- data/public/images/service_icons/source/netflix.png +0 -0
- data/public/images/service_icons/source/oai.png +0 -0
- data/public/images/service_icons/source/odeo.png +0 -0
- data/public/images/service_icons/source/opml.png +0 -0
- data/public/images/service_icons/source/pandora.png +0 -0
- data/public/images/service_icons/source/simpy.png +0 -0
- data/public/images/service_icons/source/template.png +0 -0
- data/public/images/service_icons/source/xanga.png +0 -0
- data/public/javascripts/muck_raker.js +19 -5
- data/public/stylesheets/frame.css +52 -0
- data/raker/lib/aggregatord.jar +0 -0
- data/test/rails_root/app/controllers/application_controller.rb +2 -0
- data/test/rails_root/app/models/activity.rb +22 -1
- data/test/rails_root/app/models/comment.rb +21 -1
- data/test/rails_root/app/models/share.rb +19 -2
- data/test/rails_root/app/models/user.rb +2 -1
- data/test/rails_root/config/global_config.yml +4 -1
- data/test/rails_root/config/routes.rb +8 -1
- data/test/rails_root/db/bootstrap/service_categories.yml +40 -0
- data/test/rails_root/db/bootstrap/services.yml +605 -153
- data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
- data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
- data/test/rails_root/db/migrate/20090826220530_change_services_sequence_to_sort.rb +9 -0
- data/test/rails_root/db/migrate/20090826225652_create_identity_feeds.rb +14 -0
- data/test/rails_root/db/migrate/20090827005105_add_identity_fields_to_services.rb +13 -0
- data/test/rails_root/db/migrate/20090827015308_create_service_categories.rb +12 -0
- data/test/rails_root/db/migrate/20090827221502_add_prompt_and_template_to_services.rb +11 -0
- data/test/rails_root/public/ecs_to_rss-wishlist.xslt +41 -0
- data/test/rails_root/public/images/icons/comment.png +0 -0
- data/test/rails_root/public/images/service_icons/16/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/16/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/16/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/16/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/16/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/16/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/16/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/16/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/16/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/16/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/16/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/16/google.png +0 -0
- data/test/rails_root/public/images/service_icons/16/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/16/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/16/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/16/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/16/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/16/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/16/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/16/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/16/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/16/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/16/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/16/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/16/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/16/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/16/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/16/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/16/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/16/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/16/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/16/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/16/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/16/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/16/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/16/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/16/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/24/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/24/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/24/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/24/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/24/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/24/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/24/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/24/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/24/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/24/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/24/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/24/google.png +0 -0
- data/test/rails_root/public/images/service_icons/24/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/24/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/24/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/24/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/24/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/24/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/24/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/24/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/24/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/24/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/24/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/24/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/24/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/24/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/24/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/24/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/24/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/24/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/24/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/24/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/24/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/24/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/24/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/24/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/24/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/48/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/48/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/48/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/48/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/48/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/48/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/48/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/48/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/48/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/48/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/48/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/48/google.png +0 -0
- data/test/rails_root/public/images/service_icons/48/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/48/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/48/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/48/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/48/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/48/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/48/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/48/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/48/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/48/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/48/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/48/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/48/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/48/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/48/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/48/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/48/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/48/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/48/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/48/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/48/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/48/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/48/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/48/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/48/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/60/blogger.png +0 -0
- data/test/rails_root/public/images/service_icons/60/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/60/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/60/delicious.png +0 -0
- data/test/rails_root/public/images/service_icons/60/digg.png +0 -0
- data/test/rails_root/public/images/service_icons/60/facebook.png +0 -0
- data/test/rails_root/public/images/service_icons/60/feed.png +0 -0
- data/test/rails_root/public/images/service_icons/60/flickr.png +0 -0
- data/test/rails_root/public/images/service_icons/60/friendfeed.png +0 -0
- data/test/rails_root/public/images/service_icons/60/friendster.png +0 -0
- data/test/rails_root/public/images/service_icons/60/furl.png +0 -0
- data/test/rails_root/public/images/service_icons/60/google.png +0 -0
- data/test/rails_root/public/images/service_icons/60/lastfm.png +0 -0
- data/test/rails_root/public/images/service_icons/60/linkedin.png +0 -0
- data/test/rails_root/public/images/service_icons/60/livejournal.png +0 -0
- data/test/rails_root/public/images/service_icons/60/magnolia.png +0 -0
- data/test/rails_root/public/images/service_icons/60/mixx.png +0 -0
- data/test/rails_root/public/images/service_icons/60/myspace.png +0 -0
- data/test/rails_root/public/images/service_icons/60/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/60/netvibes.png +0 -0
- data/test/rails_root/public/images/service_icons/60/newsvine.png +0 -0
- data/test/rails_root/public/images/service_icons/60/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/60/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/60/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/60/picasa.png +0 -0
- data/test/rails_root/public/images/service_icons/60/pownce.png +0 -0
- data/test/rails_root/public/images/service_icons/60/reddit.png +0 -0
- data/test/rails_root/public/images/service_icons/60/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/60/stumbleupon.png +0 -0
- data/test/rails_root/public/images/service_icons/60/technorati.png +0 -0
- data/test/rails_root/public/images/service_icons/60/twitter.png +0 -0
- data/test/rails_root/public/images/service_icons/60/vimeo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/webshots.png +0 -0
- data/test/rails_root/public/images/service_icons/60/wordpress.png +0 -0
- data/test/rails_root/public/images/service_icons/60/xanga.png +0 -0
- data/test/rails_root/public/images/service_icons/60/yahoo.png +0 -0
- data/test/rails_root/public/images/service_icons/60/yelp.png +0 -0
- data/test/rails_root/public/images/service_icons/60/youtube.png +0 -0
- data/test/rails_root/public/images/service_icons/ReadMe.rtf +52 -0
- data/test/rails_root/public/images/service_icons/facebook_friend_links.jpg +0 -0
- data/test/rails_root/public/images/service_icons/facebook_my_links.jpg +0 -0
- data/test/rails_root/public/images/service_icons/source/Aquaticus_Social_Icon_template_by_jwloh.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/Google.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/Quake 9 Design.webloc +0 -0
- data/test/rails_root/public/images/service_icons/source/ReadMe.rtf +52 -0
- data/test/rails_root/public/images/service_icons/source/aquaticus.social.png +0 -0
- data/test/rails_root/public/images/service_icons/source/citeulike.png +0 -0
- data/test/rails_root/public/images/service_icons/source/clipmarks.png +0 -0
- data/test/rails_root/public/images/service_icons/source/netflix.png +0 -0
- data/test/rails_root/public/images/service_icons/source/oai.png +0 -0
- data/test/rails_root/public/images/service_icons/source/odeo.png +0 -0
- data/test/rails_root/public/images/service_icons/source/opml.png +0 -0
- data/test/rails_root/public/images/service_icons/source/pandora.png +0 -0
- data/test/rails_root/public/images/service_icons/source/simpy.png +0 -0
- data/test/rails_root/public/images/service_icons/source/template.png +0 -0
- data/test/rails_root/public/images/service_icons/source/xanga.png +0 -0
- data/test/rails_root/public/javascripts/jquery-ui.js +188 -0
- data/test/rails_root/public/javascripts/jquery.js +19 -0
- data/test/rails_root/public/javascripts/jrails.js +1 -0
- data/test/rails_root/public/javascripts/muck.js +5 -18
- data/test/rails_root/public/javascripts/muck_activities.js +3 -3
- data/test/rails_root/public/javascripts/muck_raker.js +19 -5
- data/test/rails_root/public/stylesheets/application.css +48 -2
- data/test/rails_root/public/stylesheets/frame.css +52 -0
- data/test/rails_root/public/stylesheets/styles.css +1 -1
- data/test/rails_root/test/factories.rb +16 -0
- data/test/rails_root/test/functional/feeds_controller_test.rb +2 -2
- data/test/rails_root/test/functional/identity_feeds_controller_test.rb +107 -0
- data/test/rails_root/test/test_helper.rb +1 -0
- data/test/rails_root/test/unit/comment_test.rb +38 -0
- data/test/rails_root/test/unit/feed_parent_test.rb +0 -5
- data/test/rails_root/test/unit/feed_test.rb +45 -7
- data/test/rails_root/test/unit/identity_feed_test.rb +8 -0
- data/test/rails_root/test/unit/service_category_test.rb +19 -0
- data/test/rails_root/test/unit/service_test.rb +68 -0
- data/test/rails_root/test/unit/share_test.rb +31 -0
- data/test/rails_root/test/unit/tag_cloud_test.rb +0 -4
- data/test/rails_root/test/unit/user_test.rb +30 -1
- data/test/rails_root/vendor/plugins/jrails/CHANGELOG +43 -0
- data/test/rails_root/vendor/plugins/jrails/LICENSE +18 -0
- data/test/rails_root/vendor/plugins/jrails/README.rdoc +21 -0
- data/test/rails_root/vendor/plugins/jrails/Rakefile +18 -0
- data/test/rails_root/vendor/plugins/jrails/VERSION.yml +4 -0
- data/test/rails_root/vendor/plugins/jrails/bin/jrails +30 -0
- data/test/rails_root/vendor/plugins/jrails/init.rb +1 -0
- data/test/rails_root/vendor/plugins/jrails/install.rb +9 -0
- data/test/rails_root/vendor/plugins/jrails/javascripts/jquery-ui.js +188 -0
- data/test/rails_root/vendor/plugins/jrails/javascripts/jquery.js +19 -0
- data/test/rails_root/vendor/plugins/jrails/javascripts/jrails.js +1 -0
- data/test/rails_root/vendor/plugins/jrails/javascripts/sources/jrails.js +197 -0
- data/test/rails_root/vendor/plugins/jrails/jrails.gemspec +50 -0
- data/test/rails_root/vendor/plugins/jrails/lib/jrails.rb +421 -0
- data/test/rails_root/vendor/plugins/jrails/rails/init.rb +15 -0
- data/test/rails_root/vendor/plugins/jrails/tasks/jrails.rake +25 -0
- metadata +519 -4
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
|
@@ -22,11 +22,42 @@ After install acts-as-taggable-on be sure to include the helper in application_h
|
|
|
22
22
|
include TagsHelper
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
Add rake tasks to your Rakefile
|
|
27
26
|
|
|
28
27
|
require 'muck_raker/tasks'
|
|
29
28
|
|
|
29
|
+
Add routes
|
|
30
|
+
Depending on which features you use from muck raker you may need to add additional routes to your application. For example,
|
|
31
|
+
a user with has_muck_feeds and acts_as_muck_feed_owner the following routes would be required:
|
|
32
|
+
|
|
33
|
+
map.resources :users, :controller => 'muck/users' do |users|
|
|
34
|
+
# have to map into the muck/identity_feeds controller or rails can't find the identity_feeds
|
|
35
|
+
users.resources :identity_feeds, :controller => 'muck/identity_feeds'
|
|
36
|
+
users.resources :feeds, :controller => 'muck/feeds'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
== Usage
|
|
40
|
+
Muck raker aggregates data feeds and analyzes the results to make recommendations.
|
|
41
|
+
|
|
42
|
+
=== environment.rb
|
|
43
|
+
Add the following to environment.rb to include all the required gems:
|
|
44
|
+
|
|
45
|
+
config.gem "muck-feedbag", :lib => "feedbag", :source => "http://gems.github.com"
|
|
46
|
+
config.gem "pauldix-feedzirra", :lib => 'feedzirra', :source => "http://gems.github.com"
|
|
47
|
+
config.gem 'muck-engine', :lib => 'muck_engine'
|
|
48
|
+
config.gem 'muck-users', :lib => 'muck_users'
|
|
49
|
+
config.gem 'muck-solr', :lib => 'acts_as_solr'
|
|
50
|
+
# The following are optional but almost always used so you may as well pull them in.
|
|
51
|
+
config.gem 'muck-comments', :lib => 'muck_comments'
|
|
52
|
+
config.gem 'muck-activities', :lib => 'muck_activities'
|
|
53
|
+
config.gem 'muck-shares', :lib => 'muck_shares'
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
=== Identity Feeds
|
|
58
|
+
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
|
|
59
|
+
data with the user so that recommendations can be improved.
|
|
60
|
+
|
|
30
61
|
== Notes
|
|
31
62
|
muck-raker 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.
|
|
32
63
|
muck-raker 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.
|
|
@@ -40,11 +71,15 @@ To install these gems:
|
|
|
40
71
|
sudo gem install muck-activities
|
|
41
72
|
sudo gem install muck-shares
|
|
42
73
|
|
|
74
|
+
If you enable comments you will need a comment model with 'acts_as_muck_raker_comment':
|
|
43
75
|
|
|
44
|
-
|
|
45
|
-
|
|
76
|
+
class Comment < ActiveRecord::Base
|
|
77
|
+
acts_as_muck_comment
|
|
78
|
+
acts_as_muck_raker_comment
|
|
79
|
+
end
|
|
46
80
|
|
|
47
|
-
|
|
81
|
+
=== Frame css
|
|
82
|
+
There is an example css file for the framed page in frame.css.
|
|
48
83
|
|
|
49
84
|
=== Testing
|
|
50
85
|
You will need to have mysql setup to run the migrations for the test database. Muck raker has a few customizations which require mysql.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.27
|
|
@@ -51,7 +51,13 @@ class Muck::FeedsController < ApplicationController
|
|
|
51
51
|
after_create_response(@feed.save)
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
def edit
|
|
55
|
+
@feed = Feed.find(params[:id])
|
|
56
|
+
respond_to do |format|
|
|
57
|
+
format.html { render :template => 'feeds/edit', :layout => 'popup' }
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
55
61
|
def update
|
|
56
62
|
@feed = Feed.find(params[:id])
|
|
57
63
|
after_update_response(@feed.update_attributes(params[:feed]))
|
|
@@ -124,5 +130,5 @@ class Muck::FeedsController < ApplicationController
|
|
|
124
130
|
format.xml { head :ok }
|
|
125
131
|
end
|
|
126
132
|
end
|
|
127
|
-
|
|
133
|
+
|
|
128
134
|
end
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
class Muck::IdentityFeedsController < ApplicationController
|
|
2
|
+
|
|
3
|
+
unloadable
|
|
4
|
+
|
|
5
|
+
before_filter :get_owner, :only => [:index, :new, :create]
|
|
6
|
+
before_filter :has_permission?, :only => [:index, :new, :create]
|
|
7
|
+
|
|
8
|
+
before_filter :get_identity_feed, :only => [:destroy, :update]
|
|
9
|
+
before_filter :has_identity_feed_permission?, :only => [:destroy, :update]
|
|
10
|
+
|
|
11
|
+
def index
|
|
12
|
+
@service_categories = ServiceCategory.sorted.find(:all, :include => [:identity_services])
|
|
13
|
+
@user_services = @parent.identity_feeds.find(:all, :include => [{:feed => :service}])
|
|
14
|
+
respond_to do |format|
|
|
15
|
+
format.html { render :template => 'identity_feeds/index' }
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def new
|
|
20
|
+
@service = Service.find(params[:service_id])
|
|
21
|
+
@feed = Feed.new
|
|
22
|
+
respond_to do |format|
|
|
23
|
+
format.html { render :template => 'identity_feeds/new' }
|
|
24
|
+
format.pjs { render :text => get_new_html(@service, @parent, @feed) }
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def create
|
|
29
|
+
@service = Service.find(params[:service_id])
|
|
30
|
+
@feed = Feed.new(:uri => params[:uri], :login => params[:username])
|
|
31
|
+
feeds = Feed.create_service_feeds(@service, params[:uri], params[:username], params[:password], current_user.id)
|
|
32
|
+
if feeds.blank?
|
|
33
|
+
success = false
|
|
34
|
+
if params[:username]
|
|
35
|
+
message = I18n.t('muck.raker.no_feeds_from_username')
|
|
36
|
+
else
|
|
37
|
+
message = I18n.t('muck.raker.no_feeds_at_uri')
|
|
38
|
+
end
|
|
39
|
+
else
|
|
40
|
+
success, messages = add_feeds_to_parent(@parent, feeds)
|
|
41
|
+
message = messages.join('<br />')
|
|
42
|
+
end
|
|
43
|
+
respond_to do |format|
|
|
44
|
+
format.html do
|
|
45
|
+
flash[:notice] = message if message
|
|
46
|
+
redirect_to polymorphic_url([@parent, :identity_feeds])
|
|
47
|
+
end
|
|
48
|
+
format.pjs do
|
|
49
|
+
flash[:notice] = message if message
|
|
50
|
+
render :template => 'identity_feeds/new', :layout => false
|
|
51
|
+
end
|
|
52
|
+
format.json do
|
|
53
|
+
render :json => {:parent => @parent, :service => @service, :feeds => feeds, :success => success, :message => message }.as_json
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def edit
|
|
59
|
+
@identity_feed = IdentityFeed.find(params[:id])
|
|
60
|
+
respond_to do |format|
|
|
61
|
+
format.html { render :template => 'identity_feeds/edit' }
|
|
62
|
+
format.pjs { render :text => get_edit_html(@identity_feed) }
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def update
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def destroy
|
|
70
|
+
feed = @identity_feed.feed
|
|
71
|
+
@identity_feed.destroy
|
|
72
|
+
feed.delete_if_unused(current_user) # Delete the feed if there are no references to it
|
|
73
|
+
respond_to do |format|
|
|
74
|
+
format.html do
|
|
75
|
+
flash[:notice] = t("muck.raker.identity_feed_removed")
|
|
76
|
+
redirect_to polymorphic_url([@identity_feed.ownable, :identity_feeds])
|
|
77
|
+
end
|
|
78
|
+
format.js do
|
|
79
|
+
render(:update) do |page|
|
|
80
|
+
page << "jQuery('##{@identity_feed.dom_id}').fadeOut();"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
format.json do
|
|
84
|
+
render :json => { :success => true,
|
|
85
|
+
:identity_feed => @identity_feed,
|
|
86
|
+
:message => t("muck.raker.identity_feed_removed") }
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
protected
|
|
92
|
+
|
|
93
|
+
def get_owner
|
|
94
|
+
setup_parent('service')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def get_identity_feed
|
|
98
|
+
@identity_feed = IdentityFeed.find(params[:id])
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def has_identity_feed_permission?
|
|
102
|
+
if !@identity_feed.can_edit?(current_user)
|
|
103
|
+
message = I18n.t('muck.raker.cant_modify_identity_feed')
|
|
104
|
+
respond_to do |format|
|
|
105
|
+
format.html do
|
|
106
|
+
flash[:notice] = message
|
|
107
|
+
redirect_back_or_default current_user
|
|
108
|
+
end
|
|
109
|
+
format.js { render(:update){|page| page.alert message}}
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def has_permission?
|
|
115
|
+
@parent.can_edit?(current_user)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def get_new_html(service, parent, feed)
|
|
119
|
+
render_as_html do
|
|
120
|
+
render_to_string(:partial=> 'identity_feeds/form', :locals => { :service => service, :parent => parent, :feed => feed })
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def get_edit_html(identity_feed)
|
|
125
|
+
render_as_html do
|
|
126
|
+
render_to_string(:partial=> 'identity_feeds/form', :locals => { :service => identity_feed.feed.service, :parent => identity_feed.ownable, :feed => identity_feed.feed })
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def add_feeds_to_parent(parent, feeds)
|
|
131
|
+
messages = []
|
|
132
|
+
success = false
|
|
133
|
+
feeds.each do |feed|
|
|
134
|
+
begin
|
|
135
|
+
parent.own_feeds << feed
|
|
136
|
+
success = true
|
|
137
|
+
if params[:username]
|
|
138
|
+
messages << I18n.t('muck.raker.successfully_added_username_feed', :service => feed.title || @service.name)
|
|
139
|
+
else
|
|
140
|
+
messages << I18n.t('muck.raker.successfully_added_uri_feed', :service => @service.name, :uri => feed.title || params[:uri])
|
|
141
|
+
end
|
|
142
|
+
rescue ActiveRecord::RecordInvalid => ex
|
|
143
|
+
if ex.to_s == 'Validation failed: Feed has already been taken'
|
|
144
|
+
if params[:username]
|
|
145
|
+
messages << I18n.t('muck.raker.already_added_username_feed', :service => feed.title || @service.name, :username => params[:username])
|
|
146
|
+
else
|
|
147
|
+
messages << I18n.t('muck.raker.already_added_uri_feed', :service => @service.name, :uri => feed.title || params[:uri])
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
[success, messages]
|
|
153
|
+
end
|
|
154
|
+
end
|
|
@@ -8,8 +8,14 @@ class Muck::VisitsController < ApplicationController
|
|
|
8
8
|
@entry = Entry.find(params[:id])
|
|
9
9
|
@page_title = @entry.title
|
|
10
10
|
@resource_uri = @entry.resource_uri
|
|
11
|
-
@comments = @entry.comments.by_newest if GlobalConfig.enable_raker_comments
|
|
12
11
|
@share = Share.new(:title => @entry.title, :uri => @resource_uri, :entry_id => @entry.id) if GlobalConfig.enable_raker_shares
|
|
12
|
+
|
|
13
|
+
if GlobalConfig.enable_raker_comments
|
|
14
|
+
# Show the activities related to this entry
|
|
15
|
+
@activities = @entry.activities.oldest.only_public.find(:all, :include => ['comments'])
|
|
16
|
+
@comment_count = @activities.length + @activities.inject(0) {|n,activity| activity.comments.length + n }
|
|
17
|
+
end
|
|
18
|
+
|
|
13
19
|
respond_to do |format|
|
|
14
20
|
format.html { render :template => 'visits/show', :layout => 'frame' }
|
|
15
21
|
format.pjs { render :template => 'visits/show', :layout => false }
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
module MuckRakerServicesHelper
|
|
2
|
+
|
|
3
|
+
# Render a summary of all services for the given parent. The parent should 'acts_as_muck_feed_owner'
|
|
4
|
+
def services_summary(parent)
|
|
5
|
+
identity_feeds = parent.identity_feeds.find(:all, :include => [{:feed => :service}])
|
|
6
|
+
render :partial => 'services/summary', :locals => { :identity_feeds => identity_feeds }
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
# Render a view with all services in categories.
|
|
10
|
+
# service_categories: Results from a query to service_categories. For performance try something like this:
|
|
11
|
+
# ServiceCategory.sorted.find(:all, :include => [:identity_services])
|
|
12
|
+
# title: Optional title. Default is 'Available Services' - from I18n.t('muck.raker.available_services')
|
|
13
|
+
# css: Optional css to be added to the div that surrounds the categories
|
|
14
|
+
def service_categories(service_categories, title = nil, css = '')
|
|
15
|
+
render :partial => 'identity_feeds/service_categories', :locals => { :service_categories => service_categories, :css => css, :title => title }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Render a view with the user's registered services.
|
|
19
|
+
# identity_feeds: Results from a query to service_categories. For performance try something like this:
|
|
20
|
+
# @user.identity_feeds.find(:all, :include => [{:feed => :service}])
|
|
21
|
+
# title: Optional title. Default is 'My Services' - from I18n.t('muck.raker.my_services')
|
|
22
|
+
# css: Optional css to be added to the div that surrounds the categories
|
|
23
|
+
def services_for_user(identity_feeds, title = nil, css = '')
|
|
24
|
+
render :partial => 'identity_feeds/services_for_user', :locals => { :identity_feeds => identity_feeds, :css => css, :title => title, :edit => false }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Render an edit view with the user's registered services.
|
|
28
|
+
# identity_feeds: Results from a query to service_categories. For performance try something like this:
|
|
29
|
+
# @user.identity_feeds.find(:all, :include => [{:feed => :service}])
|
|
30
|
+
# title: Optional title. Default is 'My Services' - from I18n.t('muck.raker.my_services')
|
|
31
|
+
# css: Optional css to be added to the div that surrounds the categories
|
|
32
|
+
def services_for_user_edit(identity_feeds, title = nil, css = '')
|
|
33
|
+
render :partial => 'identity_feeds/services_for_user', :locals => { :identity_feeds => identity_feeds, :css => css, :title => title, :edit => true }
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Renders an icon for the given service
|
|
37
|
+
# Name is the name of the image file associated with the service
|
|
38
|
+
# Size can be one of 16, 24, 48 or 60.
|
|
39
|
+
def service_icon(name, size = 24)
|
|
40
|
+
%Q{<img src="/images/service_icons/#{size}/#{name}" />}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def service_image(name, size = 24)
|
|
44
|
+
%Q{/images/service_icons/#{size}/#{name}}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Renders name and icon for the service
|
|
48
|
+
def service_title(service)
|
|
49
|
+
%Q{<div class="identity-service-title" #{service_icon_background(service)}>#{service_prompt(service)}</div>}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# By default renders Service username e.g. Flickr username
|
|
53
|
+
# If the service has a 'prompt' set it will look for a value in the localization
|
|
54
|
+
# files. For example, setting service.prompt to 'blog_url' will cause this method
|
|
55
|
+
# to look for a translation at muck.raker.blog_url and will pass the name of the service
|
|
56
|
+
# using 'service' so your translation might look like:
|
|
57
|
+
# muck.raker.blog_url: "Blog Url" or
|
|
58
|
+
# muck.raker.facebook_prompt: "{{service}} Feeds"
|
|
59
|
+
def service_prompt(service)
|
|
60
|
+
if @service.prompt.blank?
|
|
61
|
+
I18n.t('muck.raker.service_username', :service => @service.name)
|
|
62
|
+
else
|
|
63
|
+
I18n.t("muck.raker.#{@service.prompt}", :service => @service.name)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Renders a link for a new user service with class 'lightbox' or optional css set on the link.
|
|
68
|
+
def service_lightbox(parent, service, link_css = 'lightbox', wrapper = 'li')
|
|
69
|
+
path = new_polymorphic_url([parent, :identity_feed], :service_id => service.to_param)
|
|
70
|
+
service_link(path, service, link_css, wrapper, nil, nil, "#{service.name.parameterize}-link")
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Renders a link for editing a user feed with class 'lightbox' or optional css set on the link.
|
|
74
|
+
def service_lightbox_edit(parent, identity_feed, link_css = 'lightbox', wrapper = nil)
|
|
75
|
+
path = edit_polymorphic_url([parent, identity_feed])
|
|
76
|
+
link_text = identity_feed.feed.title unless identity_feed.feed.title.blank?
|
|
77
|
+
service_link(path, identity_feed.feed.service, link_css, wrapper, link_text)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def service_external_link(identity_feed, link_css = nil, wrapper = nil)
|
|
81
|
+
path = identity_feed.feed.display_uri || identity_feed.feed.uri
|
|
82
|
+
link_text = identity_feed.feed.title unless identity_feed.feed.title.blank?
|
|
83
|
+
service_link(path, identity_feed.feed.service, link_css, wrapper, link_text, 'blank')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Renders a delete button for an identity_feed
|
|
87
|
+
def service_delete(identity_feed, button_type = :button, button_text = t("muck.general.delete"))
|
|
88
|
+
render :partial => 'shared/delete', :locals => { :delete_object => identity_feed,
|
|
89
|
+
:button_type => button_type,
|
|
90
|
+
:button_text => button_text,
|
|
91
|
+
:form_class => 'identity-feed-delete',
|
|
92
|
+
:delete_path => identity_feed_path(identity_feed, :format => 'js') }
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Renders a service link optionally wrapping it in the specified element
|
|
96
|
+
def service_link(path, service, link_css, wrapper, link_text = nil, target = nil, id = nil)
|
|
97
|
+
link = %Q{<a #{'id=' + id if id} href="#{path}" #{service_icon_background(service)} #{'target=' + target if target} class="service-link #{link_css}">#{link_text || service.name}</a>}
|
|
98
|
+
if wrapper
|
|
99
|
+
content_tag wrapper, link, :class => 'identity-service'
|
|
100
|
+
else
|
|
101
|
+
link
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def service_icon_background(service)
|
|
106
|
+
%Q{style="background: transparent url('#{service_image(service.icon, 24)}') no-repeat scroll left top;"}
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def url_by_identity_feed(owner, identity_feed, service)
|
|
110
|
+
if identity_feed
|
|
111
|
+
polymorphic_url([owner, @identity_feed], :service_id => service.to_param)
|
|
112
|
+
else
|
|
113
|
+
polymorphic_url([owner, :identity_feeds], :service_id => service.to_param)
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Aggregation < ActiveRecord::Base
|
|
2
|
+
|
|
3
|
+
# ##########################################################
|
|
4
|
+
# # adds a feed to an aggregation and saves the feed
|
|
5
|
+
# def add_feed_to_aggregation(aggregation, feed)
|
|
6
|
+
# if aggregation.feeds.include?(feed)
|
|
7
|
+
# self.already_feeds.push(feed)
|
|
8
|
+
# else
|
|
9
|
+
# if feed.save # have to save here so that feed has an id. Without id can't associate with aggregation
|
|
10
|
+
# feed.aggregations << aggregation
|
|
11
|
+
# self.added_feeds.push(feed )
|
|
12
|
+
# end
|
|
13
|
+
# end
|
|
14
|
+
# feed.save
|
|
15
|
+
# end
|
|
16
|
+
|
|
17
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require 'openssl'
|
|
2
|
+
|
|
3
|
+
class Amazon
|
|
4
|
+
|
|
5
|
+
# Do we have support for the SHA-256 Secure Hash Algorithm?
|
|
6
|
+
# Note that Module#constants returns Strings in Ruby 1.8 and Symbols in 1.9.
|
|
7
|
+
DIGEST_SUPPORT = OpenSSL::Digest.constants.include?('SHA256') || OpenSSL::Digest.constants.include?(:SHA256)
|
|
8
|
+
|
|
9
|
+
# Requests are authenticated using the SHA-256 Secure Hash Algorithm.
|
|
10
|
+
DIGEST = OpenSSL::Digest::Digest.new('sha256') if DIGEST_SUPPORT
|
|
11
|
+
|
|
12
|
+
ECS_TO_RSS_WISHLIST = "http://www.folksemantic.com/ecs_to_rss-wishlist.xslt"
|
|
13
|
+
|
|
14
|
+
AMAZON_SITES = {
|
|
15
|
+
:ca => 'http://ecs.amazonaws.ca/onca/xml',
|
|
16
|
+
:de => 'http://ecs.amazonaws.de/onca/xml',
|
|
17
|
+
:fr => 'http://ecs.amazonaws.fr/onca/xml',
|
|
18
|
+
:jp => 'http://ecs.amazonaws.jp/onca/xml',
|
|
19
|
+
:uk => 'http://ecs.amazonaws.co.uk/onca/xml',
|
|
20
|
+
:us => 'http://ecs.amazonaws.com/onca/xml'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
AMAZON_XSLT_SITES = {
|
|
24
|
+
:ca => 'http://xml-ca.amznxslt.com/onca/xml',
|
|
25
|
+
:de => 'http://xml-de.amznxslt.com/onca/xml',
|
|
26
|
+
:fr => 'http://xml-fr.amznxslt.com/onca/xml',
|
|
27
|
+
:jp => 'http://xml-jp.amznxslt.com/onca/xml',
|
|
28
|
+
:uk => 'http://xml-uk.amznxslt.com/onca/xml',
|
|
29
|
+
:us => 'http://xml-us.amznxslt.com/onca/xml'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# Sign an amazon query
|
|
33
|
+
# Requires openssl and that GlobalConfig.amazon_secret_access_key be defined.
|
|
34
|
+
# Based on ruby-aaws and documentation here
|
|
35
|
+
# http://www.caliban.org/ruby/ruby-aws/
|
|
36
|
+
# http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?RequestAuthenticationArticle.html
|
|
37
|
+
# Parameters
|
|
38
|
+
# query: The query to be signed
|
|
39
|
+
def self.sign_query(uri, query, amazon_secret_access_key)
|
|
40
|
+
raise 'SHA-256 not available in this version of openssl. Cannot sign Amazon requests.' unless DIGEST_SUPPORT
|
|
41
|
+
query << "&Timestamp=#{Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ')}"
|
|
42
|
+
new_query = query.split('&').collect{|param| "#{param.split('=')[0]}=#{url_encode(param.split('=')[1])}"}.sort.join('&')
|
|
43
|
+
to_sign = "GET\n%s\n%s\n%s" % [uri.host, uri.path, new_query]
|
|
44
|
+
hmac = OpenSSL::HMAC.digest(DIGEST, amazon_secret_access_key, to_sign)
|
|
45
|
+
base64_hmac = [hmac].pack('m').chomp
|
|
46
|
+
signature = url_encode(base64_hmac)
|
|
47
|
+
new_query << "&Signature=#{signature}"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Encode a string, such that it is suitable for HTTP transmission.
|
|
51
|
+
def self.url_encode(string)
|
|
52
|
+
return '' if string.nil?
|
|
53
|
+
# Shamelessly plagiarised from Wakou Aoyama's cgi.rb, but then altered slightly to please AWS.
|
|
54
|
+
string.gsub( /([^a-zA-Z0-9_.~-]+)/ ) do
|
|
55
|
+
'%' + $1.unpack( 'H2' * $1.bytesize ).join( '%' ).upcase
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
class AmazonRequest
|
|
2
|
+
include HTTParty
|
|
3
|
+
format :xml
|
|
4
|
+
|
|
5
|
+
# Initialize Amazon Request. Obtain valid Amazon credentials from your developer account
|
|
6
|
+
# Parameters:
|
|
7
|
+
# amazon_access_key_id: Valid Amazon access key
|
|
8
|
+
# amazon_secret_access_key: Valid Amazon secret access key
|
|
9
|
+
# amazon_associate_tag: Valid Amazon associates tag (optional)
|
|
10
|
+
# locale: Locale for the specific amazon site to use valid values are :ca, :de, :fr, :jp, :uk, :us (optional, default is us)
|
|
11
|
+
def initialize(amazon_access_key_id, amazon_secret_access_key, amazon_associate_tag = nil, locale = :us)
|
|
12
|
+
@amazon_access_key_id = amazon_access_key_id
|
|
13
|
+
@amazon_secret_access_key = amazon_secret_access_key
|
|
14
|
+
@amazon_associate_tag = amazon_associate_tag
|
|
15
|
+
@locale = locale
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Generate rss feeds for the give email
|
|
19
|
+
# Parameters:
|
|
20
|
+
# email: email for which to find feeds.
|
|
21
|
+
def get_amazon_feeds(email)
|
|
22
|
+
wishlists = get_customer_wishlists(email)
|
|
23
|
+
if !wishlists.blank?
|
|
24
|
+
wishlist_ids = wishlists.collect{|list| list['ListId']}
|
|
25
|
+
generate_wishlist_rss(wishlist_ids)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Get matching id for the given email
|
|
30
|
+
# Parameters:
|
|
31
|
+
# email: customer's email.
|
|
32
|
+
def get_customer_id(email)
|
|
33
|
+
query = "Operation=CustomerContentSearch&Email=#{email}"
|
|
34
|
+
result = make_request(query)
|
|
35
|
+
if result['CustomerContentSearchResponse']['Customers']['TotalResults'].to_i > 0
|
|
36
|
+
result['CustomerContentSearchResponse']['Customers']['Customer'][0]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Get information for the given customer id
|
|
41
|
+
def get_customer_information(customer_id)
|
|
42
|
+
query = "Operation=CustomerContentLookup&ResponseGroup=CustomerLists&CustomerId=#{customer_id}"
|
|
43
|
+
make_request(query)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Get customer's wishlist ids
|
|
47
|
+
def get_customer_wishlists(email)
|
|
48
|
+
query = "Operation=ListSearch&ListType=WishList&Email=#{email}"
|
|
49
|
+
result = make_request(query)
|
|
50
|
+
result['ListSearchResponse']['Lists']['List']
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def generate_wishlist_rss(wishlist_ids)
|
|
54
|
+
feeds = []
|
|
55
|
+
wishlist_ids.each do |wishlist_id|
|
|
56
|
+
query = "Operation=ListLookup&ListType=WishList&ListId=#{wishlist_id}&ResponseGroup=ItemAttributes,ListItems,ListInfo,Offers&Sort=DateAdded&Style=#{Amazon::ECS_TO_RSS_WISHLIST}"
|
|
57
|
+
feeds << make_xslt_request(query)
|
|
58
|
+
end
|
|
59
|
+
feeds
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
protected
|
|
63
|
+
def make_request(query)
|
|
64
|
+
add_required_params(query)
|
|
65
|
+
uri = Amazon::AMAZON_SITES[@locale]
|
|
66
|
+
signed_query = Amazon.sign_query(URI.parse(uri), query, @amazon_secret_access_key)
|
|
67
|
+
AmazonRequest.get(uri, :query => signed_query)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def make_xslt_request(query)
|
|
71
|
+
add_required_params(query)
|
|
72
|
+
uri = Amazon::AMAZON_XSLT_SITES[@locale]
|
|
73
|
+
signed_query = Amazon.sign_query(URI.parse(uri), query, @amazon_secret_access_key)
|
|
74
|
+
"#{uri}?#{signed_query}"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def add_required_params(query)
|
|
78
|
+
query << "&Service=AWSECommerceService"
|
|
79
|
+
query << "&AWSAccessKeyId=#{@amazon_access_key_id}"
|
|
80
|
+
query << "&AssociateTag=#{@amazon_associate_tag}" if @amazon_associate_tag
|
|
81
|
+
query << "&Version=2009-07-01"
|
|
82
|
+
end
|
|
83
|
+
end
|
data/app/models/click.rb
CHANGED
|
@@ -9,14 +9,6 @@
|
|
|
9
9
|
# requester :string(255)
|
|
10
10
|
# user_agent :string(2083)
|
|
11
11
|
#
|
|
12
|
-
# Indexes
|
|
13
|
-
#
|
|
14
|
-
# index_clicks_on_recommendation_id (recommendation_id)
|
|
15
|
-
# index_clicks_on_referrer (referrer)
|
|
16
|
-
# index_clicks_on_requester (requester)
|
|
17
|
-
# index_clicks_on_user_agent (user_agent)
|
|
18
|
-
# index_clicks_on_when (when)
|
|
19
|
-
#
|
|
20
12
|
|
|
21
13
|
class Click < ActiveRecord::Base
|
|
22
14
|
end
|
data/app/models/entry.rb
CHANGED