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
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
RailsTest::Application.config.secret_token = '9dokr4d5e1od335fdfb1caec46711pdodkiec976d0ba95b4c0f575cb046cc358bce7a335ee36eb29253fb680d8u3838d871f6baeff48220fee8e9e42ab88diub'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
RailsTest::Application.config.session_store :cookie_store, :key => '_muck_services_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rake db:sessions:create")
|
8
|
+
# RailsTest::Application.config.session_store :active_record_store
|
@@ -0,0 +1,12 @@
|
|
1
|
+
RailsTest::Application.routes.draw do
|
2
|
+
root :to => "default#index"
|
3
|
+
|
4
|
+
resources :users, :controller => 'muck/users' do
|
5
|
+
# have to map into the muck/identity_feeds controller or rails can't find the identity_feeds
|
6
|
+
resources :identity_feeds, :controller => 'muck/identity_feeds'
|
7
|
+
resources :aggregations, :controller => 'muck/aggregations'
|
8
|
+
resources :feeds, :controller => 'muck/feeds'
|
9
|
+
end
|
10
|
+
|
11
|
+
match ':controller(/:action(/:id(.:format)))'
|
12
|
+
end
|
data/test/{rails_root → rails_test}/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateProfiles < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def self.up
|
4
|
+
|
5
|
+
create_table :profiles, :force => true do |t|
|
6
|
+
t.integer :user_id
|
7
|
+
t.string :photo_file_name
|
8
|
+
t.string :photo_content_type
|
9
|
+
t.integer :photo_file_size
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index :profiles, ['user_id']
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :profiles
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class CreateUploads < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :uploads, :force => true do |t|
|
4
|
+
t.integer :creator_id
|
5
|
+
t.string :name
|
6
|
+
t.string :caption, :limit => 1000
|
7
|
+
t.text :description
|
8
|
+
t.boolean :is_public, :default => true
|
9
|
+
t.integer :uploadable_id
|
10
|
+
t.string :uploadable_type
|
11
|
+
t.string :width
|
12
|
+
t.string :height
|
13
|
+
|
14
|
+
t.string :local_file_name
|
15
|
+
t.string :local_content_type
|
16
|
+
t.integer :local_file_size
|
17
|
+
t.datetime :local_updated_at
|
18
|
+
|
19
|
+
t.string :remote_file_name
|
20
|
+
t.string :remote_content_type
|
21
|
+
t.integer :remote_file_size
|
22
|
+
t.datetime :remote_updated_at
|
23
|
+
|
24
|
+
t.timestamps
|
25
|
+
end
|
26
|
+
|
27
|
+
add_index :uploads, ["creator_id"]
|
28
|
+
add_index :uploads, ["uploadable_id"]
|
29
|
+
add_index :uploads, ["uploadable_type"]
|
30
|
+
add_index :uploads, ["local_content_type"]
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.down
|
35
|
+
drop_table :uploads
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090623193525_add_grain_size_to_tag_clouds.rb
RENAMED
File without changes
|
@@ -0,0 +1,49 @@
|
|
1
|
+
class AddContents < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :contents, :force => true do |t|
|
4
|
+
t.integer :creator_id
|
5
|
+
t.string :title
|
6
|
+
t.text :body
|
7
|
+
t.string :locale
|
8
|
+
t.text :body_raw
|
9
|
+
t.integer :contentable_id
|
10
|
+
t.string :contentable_type
|
11
|
+
t.integer :parent_id
|
12
|
+
t.integer :lft
|
13
|
+
t.integer :rgt
|
14
|
+
t.boolean :is_public
|
15
|
+
t.string :state
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
|
19
|
+
create_table :content_translations, :force => true do |t|
|
20
|
+
t.integer :content_id
|
21
|
+
t.string :title
|
22
|
+
t.text :body
|
23
|
+
t.string :locale
|
24
|
+
t.boolean :user_edited, :default => false
|
25
|
+
t.timestamps
|
26
|
+
end
|
27
|
+
|
28
|
+
create_table :content_permissions, :force => true do |t|
|
29
|
+
t.integer :content_id
|
30
|
+
t.integer :user_id
|
31
|
+
t.timestamps
|
32
|
+
end
|
33
|
+
|
34
|
+
add_index :contents, :parent_id
|
35
|
+
add_index :contents, :creator_id
|
36
|
+
|
37
|
+
add_index :content_translations, :content_id
|
38
|
+
add_index :content_translations, :locale
|
39
|
+
|
40
|
+
add_index :content_permissions, [:content_id, :user_id]
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.down
|
44
|
+
drop_table :content_versions
|
45
|
+
drop_table :contents
|
46
|
+
drop_table :content_translations
|
47
|
+
drop_table :content_permissions
|
48
|
+
end
|
49
|
+
end
|
data/test/{rails_root → rails_test}/db/migrate/20090703175825_denormalize_entries_subjects.rb
RENAMED
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090716035935_change_tag_cloud_grain_sizes.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090721043213_change_services_title_to_name.rb
RENAMED
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090721054927_remove_services_not_null_from_feeds.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090730045848_add_comment_cache_to_entries.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090804184247_add_comment_count_to_shares.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090819030523_add_attachable_to_activities.rb
RENAMED
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090826220530_change_services_sequence_to_sort.rb
RENAMED
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090827005105_add_identity_fields_to_services.rb
RENAMED
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090827221502_add_prompt_and_template_to_services.rb
RENAMED
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090915041650_aggregations_to_polymorphic.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20090924200750_add_uri_data_template_to_services.rb
RENAMED
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20091006183742_add_feed_count_to_aggregation.rb
RENAMED
File without changes
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20091115011828_add_aggregations_for_personal_recs.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AddLocationToProfiles < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :profiles, :location, :string
|
4
|
+
add_column :profiles, :lat, :decimal, :precision => 15, :scale => 10
|
5
|
+
add_column :profiles, :lng, :decimal, :precision => 15, :scale => 10
|
6
|
+
add_index :profiles, [:lat, :lng]
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
remove_index :profiles, [:lat, :lng]
|
11
|
+
remove_column :profiles, :location
|
12
|
+
remove_column :profiles, :lat
|
13
|
+
remove_column :profiles, :lng
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class AddFieldsToProfiles < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :profiles, :about, :text
|
4
|
+
add_column :profiles, :first_name, :string
|
5
|
+
add_column :profiles, :last_name, :string
|
6
|
+
add_column :profiles, :city, :string
|
7
|
+
add_column :profiles, :state_id, :integer
|
8
|
+
add_column :profiles, :country_id, :integer
|
9
|
+
add_column :profiles, :language_id, :integer
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
remove_column :profiles, :about
|
14
|
+
remove_column :profiles, :first_name
|
15
|
+
remove_column :profiles, :last_name
|
16
|
+
remove_column :profiles, :city
|
17
|
+
remove_column :profiles, :state_id
|
18
|
+
remove_column :profiles, :country_id
|
19
|
+
remove_column :profiles, :language_id
|
20
|
+
end
|
21
|
+
end
|
File without changes
|
data/test/{rails_root → rails_test}/db/migrate/20100123233654_create_access_code_requests.rb
RENAMED
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class RemoveNameFields < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
remove_column :profiles, :first_name
|
4
|
+
remove_column :profiles, :last_name
|
5
|
+
add_column :profiles, :profile_views, :integer
|
6
|
+
add_column :profiles, :policy, :text
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
add_column :profiles, :first_name, :string
|
11
|
+
add_column :profiles, :last_name, :string
|
12
|
+
remove_column :profiles, :profile_views
|
13
|
+
remove_column :profiles, :policy
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddDeadEntryFields < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :entries, :permalink_good, :boolean, :default => true
|
4
|
+
add_column :entries, :permalink_checked_at, :datetime, :default => '1971-01-01 01:01:01', :null => false
|
5
|
+
add_index :entries, :permalink_good
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_index :entries, :permalink_good
|
10
|
+
remove_column :entries, :permalink_good
|
11
|
+
remove_column :entries, :permalink_checked_at
|
12
|
+
end
|
13
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,219 @@
|
|
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
|
+
|
8
|
+
require 'uri'
|
9
|
+
require 'cgi'
|
10
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
|
11
|
+
|
12
|
+
module WithinHelpers
|
13
|
+
def with_scope(locator)
|
14
|
+
locator ? within(locator) { yield } : yield
|
15
|
+
end
|
16
|
+
end
|
17
|
+
World(WithinHelpers)
|
18
|
+
|
19
|
+
Given /^(?:|I )am on (.+)$/ do |page_name|
|
20
|
+
visit path_to(page_name)
|
21
|
+
end
|
22
|
+
|
23
|
+
When /^(?:|I )go to (.+)$/ do |page_name|
|
24
|
+
visit path_to(page_name)
|
25
|
+
end
|
26
|
+
|
27
|
+
When /^(?:|I )press "([^"]*)"(?: within "([^"]*)")?$/ do |button, selector|
|
28
|
+
with_scope(selector) do
|
29
|
+
click_button(button)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
When /^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector|
|
34
|
+
with_scope(selector) do
|
35
|
+
click_link(link)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
When /^(?:|I )fill in "([^"]*)" with "([^"]*)"(?: within "([^"]*)")?$/ do |field, value, selector|
|
40
|
+
with_scope(selector) do
|
41
|
+
fill_in(field, :with => value)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
When /^(?:|I )fill in "([^"]*)" for "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector|
|
46
|
+
with_scope(selector) do
|
47
|
+
fill_in(field, :with => value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Use this to fill in an entire form with data from a table. Example:
|
52
|
+
#
|
53
|
+
# When I fill in the following:
|
54
|
+
# | Account Number | 5002 |
|
55
|
+
# | Expiry date | 2009-11-01 |
|
56
|
+
# | Note | Nice guy |
|
57
|
+
# | Wants Email? | |
|
58
|
+
#
|
59
|
+
# TODO: Add support for checkbox, select og option
|
60
|
+
# based on naming conventions.
|
61
|
+
#
|
62
|
+
When /^(?:|I )fill in the following(?: within "([^"]*)")?:$/ do |selector, fields|
|
63
|
+
with_scope(selector) do
|
64
|
+
fields.rows_hash.each do |name, value|
|
65
|
+
When %{I fill in "#{name}" with "#{value}"}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
When /^(?:|I )select "([^"]*)" from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector|
|
71
|
+
with_scope(selector) do
|
72
|
+
select(value, :from => field)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
When /^(?:|I )check "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
|
77
|
+
with_scope(selector) do
|
78
|
+
check(field)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
When /^(?:|I )uncheck "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
|
83
|
+
with_scope(selector) do
|
84
|
+
uncheck(field)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
When /^(?:|I )choose "([^"]*)"(?: within "([^"]*)")?$/ do |field, selector|
|
89
|
+
with_scope(selector) do
|
90
|
+
choose(field)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"(?: within "([^"]*)")?$/ do |path, field, selector|
|
95
|
+
with_scope(selector) do
|
96
|
+
attach_file(field, path)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
Then /^(?:|I )should see JSON:$/ do |expected_json|
|
101
|
+
require 'json'
|
102
|
+
expected = JSON.pretty_generate(JSON.parse(expected_json))
|
103
|
+
actual = JSON.pretty_generate(JSON.parse(response.body))
|
104
|
+
expected.should == actual
|
105
|
+
end
|
106
|
+
|
107
|
+
Then /^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector|
|
108
|
+
with_scope(selector) do
|
109
|
+
if page.respond_to? :should
|
110
|
+
page.should have_content(text)
|
111
|
+
else
|
112
|
+
assert page.has_content?(text)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
Then /^(?:|I )should see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector|
|
118
|
+
regexp = Regexp.new(regexp)
|
119
|
+
with_scope(selector) do
|
120
|
+
if page.respond_to? :should
|
121
|
+
page.should have_xpath('//*', :text => regexp)
|
122
|
+
else
|
123
|
+
assert page.has_xpath?('//*', :text => regexp)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
Then /^(?:|I )should not see "([^"]*)"(?: within "([^"]*)")?$/ do |text, selector|
|
129
|
+
with_scope(selector) do
|
130
|
+
if page.respond_to? :should
|
131
|
+
page.should have_no_content(text)
|
132
|
+
else
|
133
|
+
assert page.has_no_content?(text)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
Then /^(?:|I )should not see \/([^\/]*)\/(?: within "([^"]*)")?$/ do |regexp, selector|
|
139
|
+
regexp = Regexp.new(regexp)
|
140
|
+
with_scope(selector) do
|
141
|
+
if page.respond_to? :should
|
142
|
+
page.should have_no_xpath('//*', :text => regexp)
|
143
|
+
else
|
144
|
+
assert page.has_no_xpath?('//*', :text => regexp)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
Then /^the "([^"]*)" field(?: within "([^"]*)")? should contain "([^"]*)"$/ do |field, selector, value|
|
150
|
+
with_scope(selector) do
|
151
|
+
field = find_field(field)
|
152
|
+
field_value = (field.tag_name == 'textarea') ? field.text : field.value
|
153
|
+
if field_value.respond_to? :should
|
154
|
+
field_value.should =~ /#{value}/
|
155
|
+
else
|
156
|
+
assert_match(/#{value}/, field_value)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
Then /^the "([^"]*)" field(?: within "([^"]*)")? should not contain "([^"]*)"$/ do |field, selector, value|
|
162
|
+
with_scope(selector) do
|
163
|
+
field = find_field(field)
|
164
|
+
field_value = (field.tag_name == 'textarea') ? field.text : field.value
|
165
|
+
if field_value.respond_to? :should_not
|
166
|
+
field_value.should_not =~ /#{value}/
|
167
|
+
else
|
168
|
+
assert_no_match(/#{value}/, field_value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |label, selector|
|
174
|
+
with_scope(selector) do
|
175
|
+
field_checked = find_field(label)['checked']
|
176
|
+
if field_checked.respond_to? :should
|
177
|
+
field_checked.should be_true
|
178
|
+
else
|
179
|
+
assert field_checked
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
|
185
|
+
with_scope(selector) do
|
186
|
+
field_checked = find_field(label)['checked']
|
187
|
+
if field_checked.respond_to? :should
|
188
|
+
field_checked.should be_false
|
189
|
+
else
|
190
|
+
assert !field_checked
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
Then /^(?:|I )should be on (.+)$/ do |page_name|
|
196
|
+
current_path = URI.parse(current_url).path
|
197
|
+
if current_path.respond_to? :should
|
198
|
+
current_path.should == path_to(page_name)
|
199
|
+
else
|
200
|
+
assert_equal path_to(page_name), current_path
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
|
205
|
+
query = URI.parse(current_url).query
|
206
|
+
actual_params = query ? CGI.parse(query) : {}
|
207
|
+
expected_params = {}
|
208
|
+
expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
|
209
|
+
|
210
|
+
if actual_params.respond_to? :should
|
211
|
+
actual_params.should == expected_params
|
212
|
+
else
|
213
|
+
assert_equal expected_params, actual_params
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
Then /^show me the page$/ do
|
218
|
+
save_and_open_page
|
219
|
+
end
|