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
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'capybara/rails'
|
2
|
+
require 'capybara/cucumber'
|
3
|
+
|
4
|
+
Capybara.default_driver = :selenium
|
5
|
+
Capybara.app_host = "http://localhost:8888"
|
6
|
+
Capybara.default_wait_time = 10
|
7
|
+
|
8
|
+
require "selenium-webdriver"
|
9
|
+
Selenium::WebDriver::Firefox::Binary.path = '/Applications/Firefox.app/Contents/MacOS/firefox-bin'
|
10
|
+
|
11
|
+
require 'factory_girl'
|
12
|
+
require 'muck_test_helper'
|
13
|
+
|
14
|
+
Before do
|
15
|
+
# Create admin user:
|
16
|
+
Rake::Task[ 'muck:users:create_admin' ].execute
|
17
|
+
|
18
|
+
visit "/logout"
|
19
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
ENV["RAILS_ENV"] ||= "test"
|
8
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
|
9
|
+
|
10
|
+
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
|
11
|
+
require 'cucumber/rails/rspec'
|
12
|
+
require 'cucumber/rails/world'
|
13
|
+
require 'cucumber/rails/active_record'
|
14
|
+
require 'cucumber/web/tableish'
|
15
|
+
|
16
|
+
require 'capybara/rails'
|
17
|
+
require 'capybara/cucumber'
|
18
|
+
require 'capybara/session'
|
19
|
+
require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
|
20
|
+
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
|
21
|
+
# order to ease the transition to Capybara we set the default here. If you'd
|
22
|
+
# prefer to use XPath just remove this line and adjust any selectors in your
|
23
|
+
# steps to use the XPath syntax.
|
24
|
+
Capybara.default_selector = :css
|
25
|
+
|
26
|
+
# If you set this to false, any error raised from within your app will bubble
|
27
|
+
# up to your step definition and out to cucumber unless you catch it somewhere
|
28
|
+
# on the way. You can make Rails rescue errors and render error pages on a
|
29
|
+
# per-scenario basis by tagging a scenario or feature with the @allow-rescue tag.
|
30
|
+
#
|
31
|
+
# If you set this to true, Rails will rescue all errors and render error
|
32
|
+
# pages, more or less in the same way your application would behave in the
|
33
|
+
# default production environment. It's not recommended to do this for all
|
34
|
+
# of your scenarios, as this makes it hard to discover errors in your application.
|
35
|
+
ActionController::Base.allow_rescue = false
|
36
|
+
|
37
|
+
# If you set this to true, each scenario will run in a database transaction.
|
38
|
+
# You can still turn off transactions on a per-scenario basis, simply tagging
|
39
|
+
# a feature or scenario with the @no-txn tag. If you are using Capybara,
|
40
|
+
# tagging with @culerity or @javascript will also turn transactions off.
|
41
|
+
#
|
42
|
+
# If you set this to false, transactions will be off for all scenarios,
|
43
|
+
# regardless of whether you use @no-txn or not.
|
44
|
+
#
|
45
|
+
# Beware that turning transactions off will leave data in your database
|
46
|
+
# after each scenario, which can lead to hard-to-debug failures in
|
47
|
+
# subsequent scenarios. If you do this, we recommend you create a Before
|
48
|
+
# block that will explicitly put your database in a known state.
|
49
|
+
Cucumber::Rails::World.use_transactional_fixtures = true
|
50
|
+
# How to clean your database when transactions are turned off. See
|
51
|
+
# http://github.com/bmabey/database_cleaner for more info.
|
52
|
+
if defined?(ActiveRecord::Base)
|
53
|
+
begin
|
54
|
+
require 'database_cleaner'
|
55
|
+
DatabaseCleaner.strategy = :truncation
|
56
|
+
rescue LoadError => ignore_if_database_cleaner_not_present
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module NavigationHelpers
|
2
|
+
# Maps a name to a path. Used by the
|
3
|
+
#
|
4
|
+
# When /^I go to (.+)$/ do |page_name|
|
5
|
+
#
|
6
|
+
# step definition in web_steps.rb
|
7
|
+
#
|
8
|
+
def path_to(page_name)
|
9
|
+
case page_name
|
10
|
+
|
11
|
+
when /the home\s?page/
|
12
|
+
'/'
|
13
|
+
|
14
|
+
# Add more mappings here.
|
15
|
+
# Here is an example that pulls values out of the Regexp:
|
16
|
+
#
|
17
|
+
# when /^(.*)'s profile page$/i
|
18
|
+
# user_profile_path(User.find_by_login($1))
|
19
|
+
|
20
|
+
else
|
21
|
+
begin
|
22
|
+
page_name =~ /the (.*) page/
|
23
|
+
path_components = $1.split(/\s+/)
|
24
|
+
self.send(path_components.push('path').join('_').to_sym)
|
25
|
+
rescue Object => e
|
26
|
+
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
|
27
|
+
"Now, go and add a mapping in #{__FILE__}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
World(NavigationHelpers)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# You might want to change this
|
4
|
+
ENV["RAILS_ENV"] ||= "production"
|
5
|
+
|
6
|
+
require File.dirname(__FILE__) + "/../../config/environment"
|
7
|
+
|
8
|
+
$running = true
|
9
|
+
Signal.trap("TERM") do
|
10
|
+
$running = false
|
11
|
+
end
|
12
|
+
|
13
|
+
# Waiting is a timer variable to allow the daemon to restart
|
14
|
+
# within two seconds of the Signal rather than using a long
|
15
|
+
# sleep command and forcing the daemon to wait.
|
16
|
+
$waiting = 0
|
17
|
+
|
18
|
+
ActiveRecord::Base.logger.info "[AmazonS3] Migration daemon started at #{Time.now}.\n"
|
19
|
+
|
20
|
+
while($running) do
|
21
|
+
|
22
|
+
if $waiting < 120
|
23
|
+
$waiting += 2
|
24
|
+
sleep 2
|
25
|
+
else
|
26
|
+
$waiting = 0
|
27
|
+
upload = Upload.pending_s3_migrations.first
|
28
|
+
|
29
|
+
if upload
|
30
|
+
$waiting = 120 - 2
|
31
|
+
ActiveRecord::Base.logger.info "[AmazonS3] Migrating upload ##{upload.id}\n"
|
32
|
+
upload.remote = upload.local
|
33
|
+
upload.save!
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
File without changes
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe Admin::Muck::FeedsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "admin feeds controller" do
|
8
|
+
|
9
|
+
it { should require_login :index, :get }
|
10
|
+
it { should require_login :update, :put }
|
11
|
+
|
12
|
+
describe "logged in as admin" do
|
13
|
+
before do
|
14
|
+
@admin = Factory(:user)
|
15
|
+
@admin_role = Factory(:role, :rolename => 'administrator')
|
16
|
+
@admin.roles << @admin_role
|
17
|
+
activate_authlogic
|
18
|
+
login_as @admin
|
19
|
+
end
|
20
|
+
describe "GET index" do
|
21
|
+
before do
|
22
|
+
get :index
|
23
|
+
end
|
24
|
+
it { should_not set_the_flash }
|
25
|
+
it { should respond_with :success }
|
26
|
+
it { should render_template :index }
|
27
|
+
end
|
28
|
+
describe "PUT update" do
|
29
|
+
before do
|
30
|
+
@feed = Factory(:feed)
|
31
|
+
put :update, :id => @feed, :status => true
|
32
|
+
end
|
33
|
+
it { should redirect_to( admin_feeds_path ) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe Admin::Muck::OaiEndpointsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "admin oai endpoints controller" do
|
8
|
+
|
9
|
+
it { should require_login :index, :get }
|
10
|
+
|
11
|
+
describe "logged in as admin" do
|
12
|
+
before do
|
13
|
+
@admin = Factory(:user)
|
14
|
+
@admin_role = Factory(:role, :rolename => 'administrator')
|
15
|
+
@admin.roles << @admin_role
|
16
|
+
activate_authlogic
|
17
|
+
login_as @admin
|
18
|
+
end
|
19
|
+
describe "GET index" do
|
20
|
+
before do
|
21
|
+
get :index
|
22
|
+
end
|
23
|
+
it { should_not set_the_flash }
|
24
|
+
it { should respond_with :success }
|
25
|
+
it { should render_template :index }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -1,38 +1,38 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
describe Muck::AggregationFeedsController do
|
4
|
+
|
5
|
+
render_views
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
describe "aggregation feeds controller" do
|
8
|
+
before do
|
9
9
|
@aggregation = Factory(:aggregation)
|
10
10
|
@feed = Factory(:feed)
|
11
11
|
@aggregation.feeds << @feed
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
describe "not logged in" do
|
15
|
+
describe "DELETE destroy" do
|
16
|
+
before do
|
17
17
|
delete :destroy, :id => -1, :aggregation_id => @aggregation.id, :feed_id => @feed.id
|
18
18
|
end
|
19
|
-
|
20
|
-
should
|
19
|
+
it { should redirect_to( login_path ) }
|
20
|
+
it "should set the flash to can't delete" do
|
21
21
|
ensure_flash_contains(I18n.t('muck.services.cant_modify_aggregation'))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
describe "DELETE destroy json" do
|
26
|
+
before do
|
27
27
|
delete :destroy, :id => -1, :aggregation_id => @aggregation.id, :feed_id => @feed.id, :format => 'json'
|
28
28
|
end
|
29
|
-
|
29
|
+
it { should redirect_to( login_path ) }
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
|
34
|
+
describe "logged in with permissions" do
|
35
|
+
before do
|
36
36
|
@admin = Factory(:user)
|
37
37
|
@admin_role = Factory(:role, :rolename => 'administrator')
|
38
38
|
@admin.roles << @admin_role
|
@@ -40,22 +40,22 @@ class Muck::AggregationFeedsControllerTest < ActionController::TestCase
|
|
40
40
|
login_as @admin
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
describe "DELETE destroy" do
|
44
|
+
before do
|
45
45
|
delete :destroy, :id => -1, :aggregation_id => @aggregation.id, :feed_id => @feed.id
|
46
46
|
end
|
47
|
-
|
48
|
-
should
|
47
|
+
it { should redirect_to( user_aggregation_path(@aggregation.ownable, @aggregation) ) }
|
48
|
+
it "should set the flash to deleted" do
|
49
49
|
ensure_flash_contains(I18n.t('muck.services.feed_remove'))
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
|
53
|
+
describe "DELETE destroy json" do
|
54
|
+
before do
|
55
55
|
delete :destroy, :id => -1, :aggregation_id => @aggregation.id, :feed_id => @feed.id, :format => 'json'
|
56
56
|
end
|
57
|
-
|
58
|
-
should
|
57
|
+
it { should respond_with :success }
|
58
|
+
it "should contain success:false in the result" do
|
59
59
|
JSON.parse(@response.body)['success'] == true
|
60
60
|
end
|
61
61
|
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe Muck::AggregationsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "aggregations controller" do
|
8
|
+
before do
|
9
|
+
@admin = Factory(:user)
|
10
|
+
@admin_role = Factory(:role, :rolename => 'administrator')
|
11
|
+
@admin.roles << @admin_role
|
12
|
+
activate_authlogic
|
13
|
+
login_as @admin
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "GET index" do
|
17
|
+
before do
|
18
|
+
get :index
|
19
|
+
end
|
20
|
+
it { should_not set_the_flash }
|
21
|
+
it { should respond_with :success }
|
22
|
+
it { should render_template :index }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "GET new" do
|
26
|
+
before do
|
27
|
+
get :new
|
28
|
+
end
|
29
|
+
it { should_not set_the_flash }
|
30
|
+
it { should respond_with :success }
|
31
|
+
it { should render_template :new }
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "GET show" do
|
35
|
+
before do
|
36
|
+
@aggregation = Factory(:aggregation)
|
37
|
+
get :show, :id => @aggregation.to_param
|
38
|
+
end
|
39
|
+
it { should_not set_the_flash }
|
40
|
+
it { should respond_with :success }
|
41
|
+
it { should render_template :show }
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "GET edit" do
|
45
|
+
before do
|
46
|
+
@aggregation = Factory(:aggregation)
|
47
|
+
get :edit, :id => @aggregation.to_param
|
48
|
+
end
|
49
|
+
it { should_not set_the_flash }
|
50
|
+
it { should respond_with :success }
|
51
|
+
it { should render_template :edit }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "POST create" do
|
55
|
+
before do
|
56
|
+
@term = 'example'
|
57
|
+
post :create, :aggregation => { :terms => @term }
|
58
|
+
end
|
59
|
+
it { should redirect_to( edit_aggregation_path(assigns(:aggregation)) ) }
|
60
|
+
it "should set the flash to add feeds" do
|
61
|
+
ensure_flash_contains(I18n.t('muck.services.add_feeds_to_aggregation', :title => @term))
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe "PUT update" do
|
66
|
+
before do
|
67
|
+
@aggregation = Factory(:aggregation)
|
68
|
+
put :update, :id => @aggregation.to_param, :aggregation => { :terms => 'fish' }
|
69
|
+
end
|
70
|
+
it { should redirect_to( edit_user_aggregation_path(@aggregation.ownable, assigns(:aggregation)) ) }
|
71
|
+
it "should set the flash to updated aggregation" do
|
72
|
+
ensure_flash_contains(I18n.t('muck.services.aggregation_updated'))
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe "DELETE destroy" do
|
77
|
+
before do
|
78
|
+
@aggregation = Factory(:aggregation)
|
79
|
+
delete :destroy, :id => @aggregation.to_param
|
80
|
+
end
|
81
|
+
it { should redirect_to( user_aggregations_path(@aggregation.ownable) ) }
|
82
|
+
it "should set the flash to deleted" do
|
83
|
+
ensure_flash_contains(I18n.t('muck.services.aggregation_deleted', :title => ''))
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe Muck::FeedPreviewsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "feed previews controller" do
|
8
|
+
|
9
|
+
describe "GET new" do
|
10
|
+
before do
|
11
|
+
get :new
|
12
|
+
end
|
13
|
+
it { should_not set_the_flash }
|
14
|
+
it { should respond_with :success }
|
15
|
+
it { should render_template :new }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "POST to select_feeds" do
|
19
|
+
before do
|
20
|
+
post :select_feeds, :feed => { :uri => TEST_URI }
|
21
|
+
end
|
22
|
+
it { should_not set_the_flash }
|
23
|
+
it { should respond_with :success }
|
24
|
+
it { should render_template :select_feeds }
|
25
|
+
it "should return feeds for the given uri" do
|
26
|
+
assert assigns(:feeds).length > 0
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe Muck::FeedsController do
|
4
|
+
|
5
|
+
render_views
|
6
|
+
|
7
|
+
describe "feeds controller" do
|
8
|
+
|
9
|
+
describe "GET index" do
|
10
|
+
before do
|
11
|
+
get :index
|
12
|
+
end
|
13
|
+
it { should_not set_the_flash }
|
14
|
+
it { should respond_with :success }
|
15
|
+
it { should render_template :index }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "GET show" do
|
19
|
+
before do
|
20
|
+
@feed = Factory(:feed)
|
21
|
+
get :show, :id => @feed.to_param, :format => 'html'
|
22
|
+
end
|
23
|
+
it { should_not set_the_flash }
|
24
|
+
it { should respond_with :success }
|
25
|
+
it { should render_template :show }
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "logged in" do
|
29
|
+
before do
|
30
|
+
@admin = Factory(:user)
|
31
|
+
@admin_role = Factory(:role, :rolename => 'administrator')
|
32
|
+
@admin.roles << @admin_role
|
33
|
+
activate_authlogic
|
34
|
+
login_as @admin
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "GET new" do
|
38
|
+
before do
|
39
|
+
get :new
|
40
|
+
end
|
41
|
+
it { should_not set_the_flash }
|
42
|
+
it { should respond_with :success }
|
43
|
+
it { should render_template :new }
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "GET new_extended" do
|
47
|
+
before do
|
48
|
+
get :new_extended
|
49
|
+
end
|
50
|
+
it { should_not set_the_flash }
|
51
|
+
it { should respond_with :success }
|
52
|
+
it { should render_template :new_extended }
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "POST create (simple)" do
|
56
|
+
before do
|
57
|
+
post :create, :feed => { :uri => TEST_RSS_URI }
|
58
|
+
end
|
59
|
+
it { should redirect_to( feed_path(assigns(:feed), :layout => true) ) }
|
60
|
+
it { should set_the_flash.to(I18n.t('muck.services.feed_successfully_created', :uri => TEST_RSS_URI)) }
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "POST create (advanced)" do
|
64
|
+
before do
|
65
|
+
post :create, :feed => { :uri => TEST_RSS_URI,
|
66
|
+
:display_uri => 'http://www.example.com',
|
67
|
+
:title => 'test feed long',
|
68
|
+
:short_title => 'test feed',
|
69
|
+
:description => 'foo bar' }
|
70
|
+
end
|
71
|
+
it { should set_the_flash.to(I18n.t('muck.services.feed_successfully_created', :uri => TEST_RSS_URI)) }
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|