muck-services 0.1.47 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/LICENSE +1 -1
- data/README.rdoc +32 -48
- data/Rakefile +14 -16
- data/VERSION +1 -1
- data/app/controllers/admin/muck/feeds_controller.rb +1 -1
- data/app/controllers/muck/aggregations_controller.rb +4 -6
- data/app/controllers/muck/feed_previews_controller.rb +2 -10
- data/app/controllers/muck/feeds_controller.rb +1 -1
- data/app/controllers/muck/identity_feeds_controller.rb +2 -6
- data/app/controllers/muck/topics_controller.rb +3 -3
- data/app/controllers/muck/visits_controller.rb +3 -3
- data/app/helpers/muck_services_feeds_helper.rb +3 -3
- data/app/helpers/muck_services_service_helper.rb +2 -2
- data/app/models/aggregation.rb +4 -18
- data/app/models/entry.rb +2 -2
- data/app/models/feed.rb +7 -9
- data/app/models/oai_endpoint.rb +6 -6
- data/app/models/personal_recommendation.rb +4 -5
- data/app/models/service.rb +6 -6
- data/app/models/service_category.rb +1 -1
- data/app/models/services_mailer.rb +10 -12
- data/app/views/activity_templates/{_entry_comment.html.erb → _entry_comment.erb} +0 -0
- data/app/views/activity_templates/{_entry_share.html.erb → _entry_share.erb} +0 -0
- data/app/views/admin/feeds/index.html.erb +8 -9
- data/app/views/admin/oai_endpoints/index.html.erb +4 -4
- data/app/views/aggregations/{_feeds.html.erb → _feeds.erb} +0 -0
- data/app/views/aggregations/edit.html.erb +3 -3
- data/app/views/aggregations/index.html.erb +1 -1
- data/app/views/aggregations/new.html.erb +1 -1
- data/app/views/aggregations/preview.html.erb +1 -1
- data/app/views/feed_previews/{new.html.erb → new.erb} +0 -0
- data/app/views/feed_previews/{select_feeds.html.erb → select_feeds.erb} +0 -0
- data/app/views/feeds/_feed.html.erb +1 -1
- data/app/views/feeds/_feed_row.html.erb +1 -1
- data/app/views/feeds/_form.html.erb +2 -2
- data/app/views/feeds/edit.html.erb +2 -2
- data/app/views/feeds/index.html.erb +7 -8
- data/app/views/feeds/new.html.erb +2 -2
- data/app/views/feeds/new_extended.html.erb +2 -2
- data/app/views/feeds/new_oai_rss.html.erb +2 -2
- data/app/views/identity_feeds/{_form.html.erb → _form.erb} +1 -1
- data/app/views/oai_endpoints/_form.html.erb +2 -2
- data/app/views/oai_endpoints/_oai_endpoint_row.html.erb +1 -1
- data/app/views/parts/_add_feed.html.erb +1 -1
- data/app/views/services_mailer/{notification_feed_added.text.html.erb → notification_feed_added.html.erb} +0 -0
- data/app/views/services_mailer/{notification_feed_added.text.plain.erb → notification_feed_added.text.erb} +0 -0
- data/app/views/services_mailer/{notification_oai_endpoint_added.text.html.erb → notification_oai_endpoint_added.html.erb} +0 -0
- data/app/views/services_mailer/{notification_oai_endpoint_added.text.plain.erb → notification_oai_endpoint_added.text.erb} +0 -0
- data/app/views/topics/_form.html.erb +1 -1
- data/app/views/topics/new.html.erb +1 -1
- data/app/views/visits/_toolbar.html.erb +3 -3
- data/{locales → config/locales}/ar.yml +34 -34
- data/{locales → config/locales}/bg.yml +34 -34
- data/{locales → config/locales}/ca.yml +34 -34
- data/{locales → config/locales}/cs.yml +34 -34
- data/{locales → config/locales}/da.yml +34 -34
- data/{locales → config/locales}/de.yml +34 -34
- data/{locales → config/locales}/el.yml +34 -34
- data/{locales → config/locales}/en.yml +34 -36
- data/{locales → config/locales}/es.yml +34 -34
- data/{locales → config/locales}/et.yml +34 -34
- data/{locales → config/locales}/fa.yml +34 -34
- data/{locales → config/locales}/fi.yml +34 -34
- data/{locales → config/locales}/fr.yml +34 -34
- data/{locales → config/locales}/gl.yml +34 -34
- data/{locales → config/locales}/hi.yml +34 -34
- data/{locales → config/locales}/hr.yml +34 -34
- data/{locales → config/locales}/hu.yml +34 -34
- data/{locales → config/locales}/id.yml +34 -34
- data/{locales → config/locales}/it.yml +34 -34
- data/{locales → config/locales}/iw.yml +34 -34
- data/{locales → config/locales}/ja.yml +34 -34
- data/{locales → config/locales}/ko.yml +34 -34
- data/{locales → config/locales}/lt.yml +34 -34
- data/{locales → config/locales}/lv.yml +34 -34
- data/{locales → config/locales}/mt.yml +34 -34
- data/{locales → config/locales}/nl.yml +34 -34
- data/{locales → config/locales}/no.yml +34 -34
- data/{locales → config/locales}/pl.yml +34 -34
- data/{locales → config/locales}/pt-PT.yml +34 -34
- data/{locales → config/locales}/ro.yml +34 -34
- data/{locales → config/locales}/ru.yml +34 -34
- data/{locales → config/locales}/sk.yml +34 -34
- data/{locales → config/locales}/sl.yml +34 -34
- data/{locales → config/locales}/sq.yml +34 -34
- data/{locales → config/locales}/sr.yml +34 -34
- data/{locales → config/locales}/sv.yml +34 -34
- data/{locales → config/locales}/th.yml +34 -34
- data/{locales → config/locales}/tl.yml +34 -34
- data/{locales → config/locales}/tr.yml +34 -34
- data/{locales → config/locales}/uk.yml +34 -34
- data/{locales → config/locales}/vi.yml +34 -34
- data/{locales → config/locales}/zh-CN.yml +34 -34
- data/{locales → config/locales}/zh-TW.yml +34 -34
- data/{locales → config/locales}/zh.yml +34 -34
- data/config/routes.rb +73 -0
- data/lib/muck-services.rb +24 -0
- data/lib/muck-services/config.rb +36 -0
- data/lib/muck-services/engine.rb +32 -0
- data/lib/{muck_services → muck-services}/exceptions.rb +0 -0
- data/lib/{muck_services → muck-services}/languages.rb +0 -0
- data/lib/muck-services/models/aggregation_owner.rb +17 -0
- data/lib/muck-services/models/feed_owner.rb +24 -0
- data/lib/muck-services/models/feed_parent.rb +18 -0
- data/lib/muck-services/models/recommendation.rb +14 -0
- data/lib/muck-services/models/recommendation_owner.rb +15 -0
- data/lib/muck-services/models/services_comment.rb +24 -0
- data/lib/muck-services/models/services_share.rb +18 -0
- data/lib/{muck_services → muck-services}/muck_custom_form_builder.rb +1 -3
- data/lib/{muck_services → muck-services}/services.rb +0 -0
- data/lib/tasks/muck_services.rake +101 -0
- data/muck-services.gemspec +364 -520
- data/test/{rails_root → rails_test}/app/controllers/application_controller.rb +1 -9
- data/test/{rails_root → rails_test}/app/controllers/default_controller.rb +0 -0
- data/test/{rails_root → rails_test}/app/helpers/application_helper.rb +0 -0
- data/test/{rails_root → rails_test}/app/models/activity.rb +1 -1
- data/test/{rails_root → rails_test}/app/models/comment.rb +3 -3
- data/test/rails_test/app/models/country.rb +13 -0
- data/test/rails_test/app/models/language.rb +15 -0
- data/test/{rails_root → rails_test}/app/models/share.rb +3 -3
- data/test/rails_test/app/models/state.rb +13 -0
- data/test/{rails_root → rails_test}/app/models/user.rb +8 -8
- data/test/{rails_root → rails_test}/app/models/user_session.rb +0 -0
- data/test/rails_test/config/application.rb +42 -0
- data/test/rails_test/config/boot.rb +13 -0
- data/test/rails_test/config/environment.rb +5 -0
- data/test/rails_test/config/environments/development.rb +26 -0
- data/test/rails_test/config/environments/production.rb +49 -0
- data/test/rails_test/config/environments/test.rb +35 -0
- data/test/rails_test/config/initializers/backtrace_silencers.rb +7 -0
- data/test/{rails_root → rails_test}/config/initializers/inflections.rb +2 -2
- data/test/rails_test/config/initializers/mce_options.rb +83 -0
- data/test/{rails_root → rails_test}/config/initializers/mime_types.rb +0 -0
- data/test/rails_test/config/initializers/muck.rb +66 -0
- data/test/rails_test/config/initializers/secret_token.rb +7 -0
- data/test/rails_test/config/initializers/session_store.rb +8 -0
- data/test/rails_test/config/routes.rb +12 -0
- data/test/{rails_root → rails_test}/db/migrate/20090320174818_create_muck_permissions_and_roles.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090327231918_create_users.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090402033319_add_muck_activities.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090402234137_create_languages.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090426041056_create_countries.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090426041103_create_states.rb +0 -0
- data/test/rails_test/db/migrate/20090512013727_create_profiles.rb +21 -0
- data/test/rails_test/db/migrate/20090517040220_create_uploads.rb +38 -0
- data/test/{rails_root → rails_test}/db/migrate/20090602191243_create_muck_raker.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090613173314_create_comments.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090619211125_create_tag_clouds.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090623181458_add_grain_size_to_entries.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb +0 -0
- data/test/rails_test/db/migrate/20090703055724_add_contents.rb +49 -0
- data/test/{rails_root → rails_test}/db/migrate/20090703175825_denormalize_entries_subjects.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090704220055_create_slugs.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090716035935_change_tag_cloud_grain_sizes.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090717173900_add_contributor_to_feeds.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090717175825_normalize_entries_subjects.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090721043213_change_services_title_to_name.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090723050510_create_feed_parents.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090728165716_add_etag_to_feeds.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090730044139_add_comment_cache.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090730045848_add_comment_cache_to_entries.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090730154102_allow_null_user.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090803185323_create_shares.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090804184247_add_comment_count_to_shares.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090804211240_add_entry_id_to_shares.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090804231857_add_shares_uri_index.rb +0 -0
- data/test/rails_test/db/migrate/20090806230610_add_layout_to_contents.rb +9 -0
- data/test/rails_test/db/migrate/20090808175401_add_contents_comment_counter_cache.rb +9 -0
- data/test/{rails_root → rails_test}/db/migrate/20090818204527_add_activity_indexes.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090819030523_add_attachable_to_activities.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090826220530_change_services_sequence_to_sort.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090826225652_create_identity_feeds.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090827005105_add_identity_fields_to_services.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090827015308_create_service_categories.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090827221502_add_prompt_and_template_to_services.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090915041650_aggregations_to_polymorphic.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090922174200_update_oai_endpoints.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090922231552_add_dates_to_oai_endpoints.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090923150807_rename_name_in_aggregation.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20090924200750_add_uri_data_template_to_services.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20091006183742_add_feed_count_to_aggregation.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20091022150615_add_uri_key_to_services.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20091115011828_add_aggregations_for_personal_recs.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20091116094447_rename_action_table.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20091118203605_add_default_feed_type_to_aggregation_feed.rb +0 -0
- data/test/rails_test/db/migrate/20091124203137_add_location_to_profiles.rb +15 -0
- data/test/rails_test/db/migrate/20091124205819_add_fields_to_profiles.rb +21 -0
- data/test/{rails_root → rails_test}/db/migrate/20100123035450_create_access_codes.rb +0 -0
- data/test/{rails_root → rails_test}/db/migrate/20100123233654_create_access_code_requests.rb +0 -0
- data/test/rails_test/db/migrate/20100206000906_remove_name_fields.rb +15 -0
- data/test/rails_test/db/migrate/20100903205928_add_dead_entry_fields.rb +13 -0
- data/test/{rails_root → rails_test}/features/step_definitions/common_steps.rb +0 -0
- data/test/{rails_root → rails_test}/features/step_definitions/visit_steps.rb +0 -0
- data/test/rails_test/features/step_definitions/web_steps.rb +219 -0
- data/test/{rails_root → rails_test}/features/step_definitions/webrat_steps.rb +0 -0
- data/test/rails_test/features/support/custom_env.rb +19 -0
- data/test/rails_test/features/support/env.rb +58 -0
- data/test/rails_test/features/support/paths.rb +33 -0
- data/test/rails_test/lib/daemons/amazonaws.rb +36 -0
- data/test/{rails_root → rails_test}/public/dispatch.rb +0 -0
- data/test/rails_test/spec/controllers/admin/feeds_controller_spec.rb +38 -0
- data/test/rails_test/spec/controllers/admin/oai_endpoints_controller_spec.rb +30 -0
- data/test/{rails_root/test/functional/aggregation_feeds_controller_test.rb → rails_test/spec/controllers/aggregation_feeds_controller_spec.rb} +24 -24
- data/test/rails_test/spec/controllers/aggregations_controller_spec.rb +89 -0
- data/test/rails_test/spec/controllers/feed_previews_controller_spec.rb +32 -0
- data/test/rails_test/spec/controllers/feeds_controller_spec.rb +78 -0
- data/test/{rails_root/test/functional/identity_feeds_controller_test.rb → rails_test/spec/controllers/identity_feeds_controller_spec.rb} +44 -44
- data/test/rails_test/spec/controllers/oai_endpoints_controller_spec.rb +42 -0
- data/test/rails_test/spec/controllers/topics_controller_spec.rb +50 -0
- data/test/rails_test/spec/controllers/visits_controller_spec.rb +21 -0
- data/test/{rails_root/test → rails_test/spec}/factories.rb +6 -1
- data/test/rails_test/spec/mailers/services_mailer_spec.rb +31 -0
- data/test/{rails_root/test/unit/aggregation_feed_test.rb → rails_test/spec/models/aggregation_feed_spec.rb} +6 -9
- data/test/{rails_root/test/unit/aggregation_test.rb → rails_test/spec/models/aggregation_spec.rb} +23 -23
- data/test/{rails_root/test/unit/entry_test.rb → rails_test/spec/models/entry_spec.rb} +70 -74
- data/test/{rails_root/test/unit/feed_parent_test.rb → rails_test/spec/models/feed_parent_spec.rb} +5 -5
- data/test/{rails_root/test/unit/feed_test.rb → rails_test/spec/models/feed_spec.rb} +77 -81
- data/test/{rails_root/test/unit/identity_feed_test.rb → rails_test/spec/models/identity_feed_spec.rb} +5 -5
- data/test/rails_test/spec/models/oai_endpoint_spec.rb +78 -0
- data/test/rails_test/spec/models/personal_recommendation_spec.rb +60 -0
- data/test/{rails_root/test/unit/recommendation_test.rb → rails_test/spec/models/recommendation_spec.rb} +6 -8
- data/test/rails_test/spec/models/service_category_spec.rb +19 -0
- data/test/rails_test/spec/models/service_spec.rb +383 -0
- data/test/{rails_root/test/unit/share_test.rb → rails_test/spec/models/share_spec.rb} +8 -11
- data/test/{rails_root/test/unit/tag_cloud_test.rb → rails_test/spec/models/tag_cloud_spec.rb} +4 -4
- data/test/{rails_root/test/unit/user_test.rb → rails_test/spec/models/user_spec.rb} +9 -11
- data/test/{rails_root/test/test_helper.rb → rails_test/spec/spec_helper.rb} +8 -19
- metadata +345 -470
- data/app/views/services_mailer/notification_feed_added.text.ar.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ar.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.bg.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.bg.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.ca.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ca.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.cs.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.cs.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.da.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.da.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.de.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.de.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.el.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.el.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.es.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.es.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.et.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.et.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.fa.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.fa.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.fi.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.fi.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.fr.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.fr.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.gl.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.gl.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.hi.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.hi.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.hr.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.hr.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.hu.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.hu.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.id.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.id.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.it.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.it.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.iw.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.iw.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.ja.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ja.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.ko.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ko.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.lt.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.lt.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.lv.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.lv.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.mt.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.mt.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.nl.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.nl.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.no.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.no.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.pl.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.pl.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.pt-PT.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.pt-PT.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.ro.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ro.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.ru.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.ru.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.sk.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.sk.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.sl.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.sl.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.sq.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.sq.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.sr.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.sr.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.sv.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.sv.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.th.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.th.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.tl.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.tl.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.tr.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.tr.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.uk.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.uk.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.vi.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.vi.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.zh-CN.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.zh-CN.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.zh-TW.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.zh-TW.plain.erb +0 -7
- data/app/views/services_mailer/notification_feed_added.text.zh.html.erb +0 -4
- data/app/views/services_mailer/notification_feed_added.text.zh.plain.erb +0 -7
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ar.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ar.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.bg.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.bg.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ca.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ca.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.cs.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.cs.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.da.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.da.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.de.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.de.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.el.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.el.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.es.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.es.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.et.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.et.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fa.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fa.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fi.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fi.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fr.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.fr.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.gl.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.gl.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hi.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hi.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hr.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hr.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hu.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.hu.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.id.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.id.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.it.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.it.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.iw.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.iw.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ja.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ja.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ko.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ko.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.lt.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.lt.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.lv.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.lv.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.mt.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.mt.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.nl.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.nl.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.no.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.no.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.pl.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.pl.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.pt-PT.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.pt-PT.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ro.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ro.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ru.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.ru.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sk.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sk.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sl.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sl.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sq.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sq.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sr.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sr.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sv.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.sv.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.th.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.th.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.tl.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.tl.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.tr.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.tr.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.uk.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.uk.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.vi.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.vi.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh-CN.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh-CN.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh-TW.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh-TW.plain.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh.html.erb +0 -4
- data/app/views/services_mailer/notification_oai_endpoint_added.text.zh.plain.erb +0 -4
- data/config/muck_services_routes.rb +0 -43
- data/lib/active_record/acts/muck_aggregation_owner.rb +0 -30
- data/lib/active_record/acts/muck_feed_owner.rb +0 -36
- data/lib/active_record/acts/muck_feed_parent.rb +0 -23
- data/lib/active_record/acts/muck_recommendations.rb +0 -24
- data/lib/active_record/acts/muck_services_comment.rb +0 -40
- data/lib/active_record/acts/muck_services_share.rb +0 -32
- data/lib/muck_services.rb +0 -23
- data/lib/muck_services/initialize_routes.rb +0 -8
- data/lib/muck_services/tasks.rb +0 -117
- data/rails/init.rb +0 -18
- data/test/rails_root/config/boot.rb +0 -109
- data/test/rails_root/config/environment.rb +0 -41
- data/test/rails_root/config/environments/cucumber.rb +0 -21
- data/test/rails_root/config/environments/development.rb +0 -37
- data/test/rails_root/config/environments/production.rb +0 -1
- data/test/rails_root/config/environments/test.rb +0 -24
- data/test/rails_root/config/initializers/requires.rb +0 -13
- data/test/rails_root/config/initializers/session_store.rb +0 -8
- data/test/rails_root/config/routes.rb +0 -11
- data/test/rails_root/db/schema.rb +0 -504
- data/test/rails_root/features/support/env.rb +0 -14
- data/test/rails_root/features/support/paths.rb +0 -36
- data/test/rails_root/script/create_project.rb +0 -52
- data/test/rails_root/test/functional/admin/feeds_controller_test.rb +0 -37
- data/test/rails_root/test/functional/admin/oai_endpoints_controller_test.rb +0 -30
- data/test/rails_root/test/functional/aggregations_controller_test.rb +0 -89
- data/test/rails_root/test/functional/feed_previews_controller_test.rb +0 -32
- data/test/rails_root/test/functional/feeds_controller_test.rb +0 -78
- data/test/rails_root/test/functional/oai_endpoints_controller_test.rb +0 -42
- data/test/rails_root/test/functional/topics_controller_test.rb +0 -50
- data/test/rails_root/test/functional/visits_controller_test.rb +0 -21
- data/test/rails_root/test/unit/comment_test.rb +0 -38
- data/test/rails_root/test/unit/oai_endpoint_test.rb +0 -84
- data/test/rails_root/test/unit/personal_recommendation_test.rb +0 -78
- data/test/rails_root/test/unit/service_category_test.rb +0 -19
- data/test/rails_root/test/unit/service_test.rb +0 -386
- data/test/rails_root/test/unit/services_mailer_test.rb +0 -35
- data/test/rails_root/vendor/plugins/jrails/init.rb +0 -1
- data/test/rails_root/vendor/plugins/jrails/install.rb +0 -9
- data/test/rails_root/vendor/plugins/jrails/lib/jrails.rb +0 -421
- data/test/rails_root/vendor/plugins/jrails/rails/init.rb +0 -15
- data/test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb +0 -62
- data/test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb +0 -132
data/.gitignore
CHANGED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -4,35 +4,19 @@ Muck Raker gem to handle aggregation, recommendations and search. It is recomme
|
|
4
4
|
|
5
5
|
== Installation
|
6
6
|
|
7
|
-
|
8
|
-
gem
|
7
|
+
Add muck services to your Gemfile:
|
8
|
+
gem 'muck-services'
|
9
9
|
|
10
|
-
Install muck services:
|
11
|
-
sudo gem install muck-services
|
12
10
|
|
13
|
-
|
14
|
-
sudo gem install muck-raker
|
15
|
-
|
16
|
-
Installing muck services should install all of it's dependancies. You can also install them manually:
|
17
|
-
sudo gem install httparty
|
18
|
-
sudo gem install mbleigh-acts-as-taggable-on
|
19
|
-
sudo gem install mislav-will_paginate
|
20
|
-
sudo gem install muck-feedbag
|
21
|
-
sudo gem install pauldix-feedzirra
|
22
|
-
|
23
|
-
After install acts-as-taggable-on be sure to include the helper in application_helper.rb:
|
11
|
+
After installing acts-as-taggable-on be sure to include the helper in application_helper.rb:
|
24
12
|
|
25
13
|
module ApplicationHelper
|
26
14
|
include TagsHelper
|
27
15
|
end
|
28
16
|
|
29
|
-
Add rake tasks to your Rakefile
|
30
|
-
|
31
|
-
require 'muck_services/tasks'
|
32
|
-
|
33
17
|
Add routes
|
34
18
|
Depending on which features you use from muck raker you may need to add additional routes to your application. For example,
|
35
|
-
a user with
|
19
|
+
a user with include MuckServices::Models::MuckFeedParent and include MuckServices::Models::MuckFeedOwner the following routes would be required:
|
36
20
|
|
37
21
|
map.resources :users, :controller => 'muck/users' do |users|
|
38
22
|
# have to map into the muck/identity_feeds controller or rails can't find the identity_feeds
|
@@ -44,20 +28,20 @@ a user with has_muck_feeds and acts_as_muck_feed_owner the following routes woul
|
|
44
28
|
== Usage
|
45
29
|
Muck raker aggregates data feeds and analyzes the results to make recommendations.
|
46
30
|
|
47
|
-
===
|
48
|
-
Add the following to
|
31
|
+
=== Gemfile
|
32
|
+
Add the following to your Gemfile:
|
49
33
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
34
|
+
gem "muck-feedbag", :require => "feedbag"
|
35
|
+
gem "feedzirra"
|
36
|
+
gem 'muck-engine'
|
37
|
+
gem 'muck-users'
|
38
|
+
gem 'muck-solr', :require => 'acts_as_solr'
|
55
39
|
|
56
40
|
The following are optional but almost always used so you may as well pull them in.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
41
|
+
gem 'muck-comments'
|
42
|
+
gem 'muck-activities'
|
43
|
+
gem 'muck-shares'
|
44
|
+
gem 'muck-raker'
|
61
45
|
|
62
46
|
=== Database
|
63
47
|
There are a number of rake tasks meant to help you get your database setup:
|
@@ -77,23 +61,23 @@ data with the user so that recommendations can be improved.
|
|
77
61
|
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.
|
78
62
|
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.
|
79
63
|
|
80
|
-
To turn on this functionality
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
If you enable comments you will need a comment model with '
|
64
|
+
To turn on this functionality create an initializer:
|
65
|
+
MuckServices.configure.do |config|
|
66
|
+
config.inform_admin_of_global_feed = true # If true then the 'admin_email' will recieve an email anytime a global feed (one that is not
|
67
|
+
# attached to any object) is added.
|
68
|
+
config.enable_services_comments = true # Enables or disables comments in the frame that wraps content as a user browses recommendation results
|
69
|
+
config.enable_services_shares = true # Enables or disables sharing in the frame that wraps content as a user browses recommendation results
|
70
|
+
config.show_google_search = true # Determines whether or not a google search is displayed on the topic page
|
71
|
+
config.load_feeds_on_server = false # Determines whether feeds on a topic page are loaded on the server or the client. Loading on the server can take a while
|
72
|
+
config.combine_feeds_on_server = false # Combines feeds loaded on the server
|
73
|
+
end
|
74
|
+
|
75
|
+
If you enable comments you will need a comment model with 'include MuckServices::Models::MuckServicesComment':
|
92
76
|
|
93
|
-
class Comment < ActiveRecord::Base
|
94
|
-
|
95
|
-
|
96
|
-
end
|
77
|
+
class Comment < ActiveRecord::Base
|
78
|
+
include MuckComments::Models::MuckComment
|
79
|
+
include MuckServices::Models::MuckServicesComment
|
80
|
+
end
|
97
81
|
|
98
82
|
=== CSS
|
99
83
|
Running rake muck:raker:sync will copy a default css file called muck-raker.css into your stylesheets directory.
|
@@ -108,4 +92,4 @@ You will need to have mysql setup to run the migrations for the test database.
|
|
108
92
|
|
109
93
|
|
110
94
|
|
111
|
-
Copyright (c) 2009 Tatemae.com, released under the MIT license
|
95
|
+
Copyright (c) 2009-2010 Tatemae.com, released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
-
require 'rake/testtask'
|
4
3
|
require 'rake/rdoctask'
|
4
|
+
require 'rspec/core/rake_task'
|
5
5
|
|
6
|
-
desc 'Default: run
|
7
|
-
task :default => :
|
6
|
+
desc 'Default: run specs.'
|
7
|
+
task :default => :spec
|
8
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
9
|
+
t.rspec_opts = ["--color", "-c", "-f progress", "-r test/rails_test/spec/spec_helper.rb"]
|
10
|
+
t.pattern = 'test/rails_test/spec/**/*_spec.rb'
|
11
|
+
end
|
8
12
|
|
9
13
|
desc 'Translate this gem'
|
10
14
|
task :translate do
|
11
|
-
file = File.join(File.dirname(__FILE__), 'locales', 'en.yml')
|
15
|
+
file = File.join(File.dirname(__FILE__), 'config', 'locales', 'en.yml')
|
12
16
|
system("babelphish -o -y #{file}")
|
13
17
|
path = File.join(File.dirname(__FILE__), 'app', 'views', 'services_mailer')
|
14
18
|
system("babelphish -o -h #{path} -l en")
|
@@ -18,8 +22,8 @@ begin
|
|
18
22
|
require 'rcov/rcovtask'
|
19
23
|
Rcov::RcovTask.new do |t|
|
20
24
|
#t.libs << 'lib'
|
21
|
-
t.libs << 'test/
|
22
|
-
t.pattern = 'test/
|
25
|
+
t.libs << 'test/rails_test/lib'
|
26
|
+
t.pattern = 'test/rails_test/test/**/*_test.rb'
|
23
27
|
t.verbose = true
|
24
28
|
t.output_dir = 'coverage'
|
25
29
|
t.rcov_opts << '--exclude "gems/*"'
|
@@ -30,14 +34,6 @@ rescue LoadError
|
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
33
|
-
desc 'Test muck-services.'
|
34
|
-
Rake::TestTask.new(:test) do |t|
|
35
|
-
t.libs << 'lib'
|
36
|
-
t.libs << 'test/rails_root/test'
|
37
|
-
t.pattern = 'test/rails_root/test/**/*_test.rb'
|
38
|
-
t.verbose = true
|
39
|
-
end
|
40
|
-
|
41
37
|
begin
|
42
38
|
require 'jeweler'
|
43
39
|
Jeweler::Tasks.new do |gem|
|
@@ -45,16 +41,18 @@ begin
|
|
45
41
|
gem.summary = "Feeds, aggregations and services for muck"
|
46
42
|
gem.description = "This gem contains the rails specific code for dealing with feeds, aggregations and recommendations. It is meant to work with the muck-raker gem."
|
47
43
|
gem.email = "justin@tatemae.com"
|
48
|
-
gem.homepage = "http://github.com/tatemae/
|
44
|
+
gem.homepage = "http://github.com/tatemae/muck_services"
|
49
45
|
gem.authors = ["Joel Duffin", "Justin Ball"]
|
50
46
|
gem.add_dependency "acts-as-taggable-on"
|
51
47
|
gem.add_dependency "will_paginate"
|
52
48
|
gem.add_dependency "httparty"
|
53
49
|
gem.add_dependency "nokogiri"
|
50
|
+
gem.add_dependency "hpricot"
|
54
51
|
gem.add_dependency "muck-feedbag"
|
55
52
|
gem.add_dependency "river"
|
56
53
|
gem.add_dependency "overlord"
|
57
54
|
gem.add_dependency "feedzirra"
|
55
|
+
gem.add_dependency "muck-raker"
|
58
56
|
gem.add_dependency "muck-engine"
|
59
57
|
gem.add_dependency "muck-users"
|
60
58
|
gem.add_dependency "muck-comments"
|
@@ -63,7 +61,7 @@ begin
|
|
63
61
|
gem.files.exclude "public/images/service_icons/source/*"
|
64
62
|
gem.files.exclude "test/*"
|
65
63
|
gem.test_files.exclude 'test/feed_archive/**'
|
66
|
-
gem.test_files.exclude 'test/
|
64
|
+
gem.test_files.exclude 'test/rails_test/public/images/*'
|
67
65
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
68
66
|
end
|
69
67
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
3.0.0
|
@@ -3,7 +3,7 @@ class Admin::Muck::FeedsController < Admin::Muck::BaseController
|
|
3
3
|
unloadable
|
4
4
|
|
5
5
|
def index
|
6
|
-
@feeds =
|
6
|
+
@feeds = Feed.find(:all, :order => (params[:order] || 'created_at') + (params[:asc] == 'false' ? ' DESC' : ' ASC') + ', title', :include => [:default_language]).paginate(:page => @page, :per_page => @per_page)
|
7
7
|
respond_to do |format|
|
8
8
|
format.html { render :template => 'admin/feeds/index' }
|
9
9
|
format.xml { render :xml => @feeds.to_xml }
|
@@ -16,7 +16,7 @@ class Muck::AggregationsController < ApplicationController
|
|
16
16
|
if @parent
|
17
17
|
@aggregations = @parent.aggregations.by_title
|
18
18
|
else
|
19
|
-
@aggregations = Aggregation.
|
19
|
+
@aggregations = Aggregation.by_newest
|
20
20
|
end
|
21
21
|
render(:template => 'aggregations/index')
|
22
22
|
# respond_to do |format|
|
@@ -39,9 +39,9 @@ class Muck::AggregationsController < ApplicationController
|
|
39
39
|
@music_feeds = @aggregation.music_feeds
|
40
40
|
@general_feeds = @aggregation.general_feeds
|
41
41
|
|
42
|
-
if
|
42
|
+
if MuckServices.configuration.render_feeds_client_side
|
43
43
|
|
44
|
-
elsif
|
44
|
+
elsif MuckServices.configuration.render_feeds_server_side
|
45
45
|
@feeds = @aggregation.feeds
|
46
46
|
else
|
47
47
|
@entries = @aggregation.feeds.entries.paginate(:page => @page, :per_page => @per_page)
|
@@ -227,9 +227,7 @@ class Muck::AggregationsController < ApplicationController
|
|
227
227
|
end
|
228
228
|
|
229
229
|
def get_google_feed_html
|
230
|
-
|
231
|
-
render_to_string(:partial => 'aggregations/feeds')
|
232
|
-
end
|
230
|
+
render_to_string(:partial => 'aggregations/feeds')
|
233
231
|
end
|
234
232
|
|
235
233
|
end
|
@@ -4,11 +4,7 @@ class Muck::FeedPreviewsController < ApplicationController
|
|
4
4
|
|
5
5
|
def new
|
6
6
|
respond_to do |format|
|
7
|
-
format.pjs
|
8
|
-
render_as_html do
|
9
|
-
render :template => 'feed_previews/new', :layout => false
|
10
|
-
end
|
11
|
-
end
|
7
|
+
format.pjs { render :template => 'feed_previews/new', :layout => false }
|
12
8
|
format.html { render :template => 'feed_previews/new' }
|
13
9
|
end
|
14
10
|
end
|
@@ -17,11 +13,7 @@ class Muck::FeedPreviewsController < ApplicationController
|
|
17
13
|
@feed = Feed.new(params[:feed])
|
18
14
|
@feeds = Feed.gather_information(@feed.uri).compact
|
19
15
|
respond_to do |format|
|
20
|
-
format.pjs
|
21
|
-
render_as_html do
|
22
|
-
render :template => 'feed_previews/select_feeds', :layout => false
|
23
|
-
end
|
24
|
-
end
|
16
|
+
format.pjs { render :template => 'feed_previews/select_feeds', :layout => false }
|
25
17
|
format.html { render :template => 'feed_previews/select_feeds' }
|
26
18
|
end
|
27
19
|
end
|
@@ -6,7 +6,7 @@ class Muck::FeedsController < ApplicationController
|
|
6
6
|
before_filter :get_owner, :except => ['index', 'show']
|
7
7
|
|
8
8
|
def index
|
9
|
-
@feeds =
|
9
|
+
@feeds = Feed.find(:all, :conditions => 'status >= 0', :order => (params[:order] || 'title') + (params[:asc] == 'false' ? ' DESC' : ' ASC') + ', title', :include => [:default_language]).paginate(:page => @page, :per_page => @per_page)
|
10
10
|
respond_to do |format|
|
11
11
|
format.html { render :template => 'feeds/index' }
|
12
12
|
format.xml { render :xml => @feeds.to_xml }
|
@@ -123,15 +123,11 @@ class Muck::IdentityFeedsController < ApplicationController
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def get_new_html(service, parent, feed)
|
126
|
-
|
127
|
-
render_to_string(:partial => 'identity_feeds/form', :locals => { :service => service, :parent => parent, :feed => feed })
|
128
|
-
end
|
126
|
+
render_to_string(:partial => 'identity_feeds/form', :locals => { :service => service, :parent => parent, :feed => feed })
|
129
127
|
end
|
130
128
|
|
131
129
|
def get_edit_html(identity_feed)
|
132
|
-
|
133
|
-
render_to_string(:partial => 'identity_feeds/form', :locals => { :service => identity_feed.feed.service, :parent => identity_feed.ownable, :feed => identity_feed.feed })
|
134
|
-
end
|
130
|
+
render_to_string(:partial => 'identity_feeds/form', :locals => { :service => identity_feed.feed.service, :parent => identity_feed.ownable, :feed => identity_feed.feed })
|
135
131
|
end
|
136
132
|
|
137
133
|
def add_feeds_to_parent(parent, feeds)
|
@@ -155,9 +155,9 @@ class Muck::TopicsController < ApplicationController
|
|
155
155
|
@number_of_images = 12
|
156
156
|
@number_of_videos = 6
|
157
157
|
|
158
|
-
@show_google_search =
|
159
|
-
@show_combined =
|
160
|
-
@load_feeds_on_server =
|
158
|
+
@show_google_search = MuckServices.configuration.show_google_search
|
159
|
+
@show_combined = MuckServices.configuration.combine_feeds_on_server
|
160
|
+
@load_feeds_on_server = MuckServices.configuration.load_feeds_on_server
|
161
161
|
end
|
162
162
|
|
163
163
|
end
|
@@ -8,12 +8,12 @@ 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
|
-
@share = Share.new(:title => @entry.title, :uri => @resource_uri, :entry_id => @entry.id) if
|
11
|
+
@share = Share.new(:title => @entry.title, :uri => @resource_uri, :entry_id => @entry.id) if MuckServices.configuration.enable_services_shares
|
12
12
|
@recommendations = @entry.related_entries.top
|
13
13
|
|
14
|
-
if
|
14
|
+
if MuckServices.configuration.enable_services_comments
|
15
15
|
# Show the activities related to this entry
|
16
|
-
@activities = @entry.activities.
|
16
|
+
@activities = @entry.activities.by_oldest.is_public.find(:all, :include => ['comments'])
|
17
17
|
@comment_count = @activities.length + @activities.inject(0) {|n,activity| activity.comments.length + n }
|
18
18
|
end
|
19
19
|
|
@@ -14,18 +14,18 @@ module MuckServicesFeedsHelper
|
|
14
14
|
|
15
15
|
def feed_contributor_link(feed)
|
16
16
|
if feed.contributor_id.nil?
|
17
|
-
|
17
|
+
admin = Feed.find_by_login('admin')
|
18
18
|
'unknown'
|
19
19
|
else
|
20
20
|
link_to feed.contributor.display_name, profile_path(feed.contributor)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
24
|
+
def sort_feeds_link(current_order, current_asc, new_order, admin = false)
|
25
25
|
if admin == true
|
26
26
|
admin_feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
|
27
27
|
else
|
28
|
-
feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == '
|
28
|
+
feeds_url(:order => new_order, :asc => (current_order == new_order && (current_asc == 'true' || current_asc == nil)) ? 'false' : 'true')
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module MuckServicesServiceHelper
|
2
2
|
|
3
|
-
# Render a summary of all services for the given parent. The parent should '
|
3
|
+
# Render a summary of all services for the given parent. The parent should 'include MuckServices::Models::MuckFeedOwner'
|
4
4
|
def services_summary(parent)
|
5
5
|
identity_feeds = parent.identity_feeds.find(:all, :include => [{:feed => :service}])
|
6
6
|
render :partial => 'services/summary', :locals => { :identity_feeds => identity_feeds }
|
@@ -49,7 +49,7 @@ module MuckServicesServiceHelper
|
|
49
49
|
# to look for a translation at muck.services.blog_url and will pass the name of the service
|
50
50
|
# using 'service' so your translation might look like:
|
51
51
|
# muck.services.blog_url: "Blog Url" or
|
52
|
-
# muck.services.facebook_prompt: "{
|
52
|
+
# muck.services.facebook_prompt: "%{service} Feeds"
|
53
53
|
def service_prompt(service)
|
54
54
|
if @service.prompt.blank?
|
55
55
|
I18n.t('muck.services.service_username', :service => @service.name)
|
data/app/models/aggregation.rb
CHANGED
@@ -26,25 +26,11 @@ class Aggregation < ActiveRecord::Base
|
|
26
26
|
has_many :feeds, :through => :aggregation_feeds
|
27
27
|
has_many :oai_endpoints, :through => :aggregation_feeds
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
def self.global_feeds(order_field = 'title', ascending = 'true')
|
35
|
-
allowed_fields = ['languages.english_name','status','entries_count','harvested_from_title','last_harvested_at','created_at','feed_contributor']
|
36
|
-
order_direction = (ascending == 'false' ? ' DESC' : ' ASC')
|
37
|
-
order_by = allowed_fields.include?(order_field) ? (order_field + order_direction + ', title') : ('title ' + order_direction)
|
38
|
-
|
39
|
-
Feed.find_by_sql("SELECT users.id feed_contributor_id, users.login feed_contributor, languages.english_name default_language_name, feeds.*, aggregation_id <=> 1 FROM aggregations " +
|
40
|
-
"INNER JOIN aggregation_feeds ON aggregations.id = aggregation_feeds.aggregation_id " +
|
41
|
-
"RIGHT OUTER JOIN feeds ON aggregation_feeds.feed_id = feeds.id " +
|
42
|
-
"INNER JOIN languages ON feeds.default_language_id = languages.id " +
|
43
|
-
"LEFT OUTER JOIN users ON feeds.contributor_id = users.id " +
|
44
|
-
# "WHERE aggregations.title = 'global_feeds' AND feeds.status >= 0 " +
|
45
|
-
"ORDER BY #{order_by}")
|
46
|
-
end
|
29
|
+
scope :by_title, order("title ASC")
|
30
|
+
scope :newer_than, lambda { |*args| where("created_at > ?", args.first || DateTime.now) }
|
31
|
+
scope :by_newest, order("created_at DESC")
|
47
32
|
|
33
|
+
|
48
34
|
# Builds and then adds feeds for a given terms
|
49
35
|
# user: User to be associated with each feed. Default is nil which makes each feed global.
|
50
36
|
# service_ids: An array of service ids. Nil will generate a feed for every available service.
|
data/app/models/entry.rb
CHANGED
@@ -49,9 +49,9 @@ class Entry < ActiveRecord::Base
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
include MuckComments::Models::MuckCommentable
|
53
53
|
acts_as_taggable
|
54
|
-
|
54
|
+
include MuckServices::Models::MuckRecommendation
|
55
55
|
|
56
56
|
@@min_secs_tracked = 5
|
57
57
|
@@max_secs_tracked = 120
|
data/app/models/feed.rb
CHANGED
@@ -50,17 +50,15 @@ class Feed < ActiveRecord::Base
|
|
50
50
|
belongs_to :default_language, :class_name => 'Language', :foreign_key => 'default_language_id'
|
51
51
|
belongs_to :service
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
scope :banned, where("status = ?", MuckServices::Status::BANNED)
|
54
|
+
scope :valid, where("status >= 0").includes(:default_language)
|
55
|
+
scope :by_title, order("title ASC").includes(:default_language)
|
56
|
+
scope :newer_than, lambda { |*args| where("created_at > ?", args.first || DateTime.now) }
|
57
|
+
scope :by_newest, order("created_at DESC").includes(:default_language)
|
58
58
|
|
59
59
|
attr_protected :status, :last_requested_at, :last_harvested_at, :harvest_interval, :failed_requests,
|
60
60
|
:created_at, :updated_at, :entries_changed_at, :entries_count, :contributor_id
|
61
61
|
|
62
|
-
# named_scope :ready_to_harvest, lambda { |*args| { :conditions => [ "feeds.last_harvested_at < ?", args.first || 1.day.ago.end_of_day ] } }
|
63
|
-
|
64
62
|
def banned?
|
65
63
|
self.status == MuckServices::Status::BANNED
|
66
64
|
end
|
@@ -70,8 +68,8 @@ class Feed < ActiveRecord::Base
|
|
70
68
|
end
|
71
69
|
|
72
70
|
def inform_admin
|
73
|
-
if
|
74
|
-
ServicesMailer.
|
71
|
+
if MuckServices.configuration.inform_admin_of_global_feed && global?
|
72
|
+
ServicesMailer.notification_feed_added(self).deliver # Global feed. Email the admin to let them know a feed has been added
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|