aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_censor_rule_controller.rb1
-rw-r--r--app/controllers/admin_comment_controller.rb1
-rw-r--r--app/controllers/admin_controller.rb1
-rw-r--r--app/controllers/admin_general_controller.rb1
-rw-r--r--app/controllers/admin_holiday_imports_controller.rb1
-rw-r--r--app/controllers/admin_holidays_controller.rb1
-rw-r--r--app/controllers/admin_incoming_message_controller.rb1
-rw-r--r--app/controllers/admin_info_request_event_controller.rb1
-rw-r--r--app/controllers/admin_outgoing_message_controller.rb1
-rw-r--r--app/controllers/admin_public_body_categories_controller.rb1
-rw-r--r--app/controllers/admin_public_body_change_requests_controller.rb1
-rw-r--r--app/controllers/admin_public_body_controller.rb1
-rw-r--r--app/controllers/admin_public_body_headings_controller.rb1
-rw-r--r--app/controllers/admin_raw_email_controller.rb1
-rw-r--r--app/controllers/admin_request_controller.rb1
-rw-r--r--app/controllers/admin_spam_addresses_controller.rb1
-rw-r--r--app/controllers/admin_track_controller.rb1
-rw-r--r--app/controllers/admin_user_controller.rb1
-rw-r--r--app/controllers/api_controller.rb1
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/controllers/comment_controller.rb1
-rw-r--r--app/controllers/general_controller.rb1
-rw-r--r--app/controllers/health_checks_controller.rb1
-rw-r--r--app/controllers/help_controller.rb1
-rw-r--r--app/controllers/holiday_controller.rb1
-rw-r--r--app/controllers/info_request_batch_controller.rb1
-rw-r--r--app/controllers/public_body_change_requests_controller.rb1
-rw-r--r--app/controllers/public_body_controller.rb2
-rw-r--r--app/controllers/reports_controller.rb1
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--app/controllers/request_game_controller.rb1
-rw-r--r--app/controllers/services_controller.rb1
-rw-r--r--app/controllers/track_controller.rb1
-rw-r--r--app/controllers/user_controller.rb1
-rw-r--r--app/controllers/widgets_controller.rb1
-rw-r--r--app/helpers/admin_helper.rb1
-rw-r--r--app/helpers/admin_public_body_category_helper.rb1
-rw-r--r--app/helpers/application_helper.rb1
-rw-r--r--app/helpers/config_helper.rb1
-rw-r--r--app/helpers/date_time_helper.rb1
-rw-r--r--app/helpers/health_checks_helper.rb1
-rw-r--r--app/helpers/highlight_helper.rb1
-rwxr-xr-xapp/helpers/link_to_helper.rb1
-rw-r--r--app/helpers/mailer_helper.rb1
-rw-r--r--app/helpers/public_body_helper.rb1
-rw-r--r--app/helpers/track_helper.rb1
-rw-r--r--app/helpers/widget_helper.rb3
-rw-r--r--app/mailers/application_mailer.rb1
-rw-r--r--app/mailers/contact_mailer.rb1
-rw-r--r--app/mailers/info_request_batch_mailer.rb1
-rw-r--r--app/mailers/outgoing_mailer.rb1
-rw-r--r--app/mailers/request_mailer.rb1
-rw-r--r--app/mailers/track_mailer.rb1
-rw-r--r--app/mailers/user_mailer.rb1
-rw-r--r--app/models/about_me_validator.rb1
-rw-r--r--app/models/censor_rule.rb1
-rw-r--r--app/models/change_email_validator.rb1
-rw-r--r--app/models/comment.rb1
-rw-r--r--app/models/contact_validator.rb1
-rw-r--r--app/models/foi_attachment.rb2
-rw-r--r--app/models/holiday.rb1
-rw-r--r--app/models/holiday_import.rb1
-rw-r--r--app/models/incoming_message.rb2
-rw-r--r--app/models/info_request.rb2
-rw-r--r--app/models/info_request_batch.rb1
-rw-r--r--app/models/info_request_event.rb1
-rw-r--r--app/models/mail_server_log.rb1
-rw-r--r--app/models/mail_server_log_done.rb1
-rw-r--r--app/models/outgoing_message.rb1
-rw-r--r--app/models/post_redirect.rb1
-rw-r--r--app/models/profile_photo.rb1
-rw-r--r--app/models/public_body.rb2
-rw-r--r--app/models/public_body_category.rb1
-rw-r--r--app/models/public_body_category/category_collection.rb1
-rw-r--r--app/models/public_body_category_link.rb1
-rw-r--r--app/models/public_body_change_request.rb1
-rw-r--r--app/models/public_body_heading.rb1
-rw-r--r--app/models/purge_request.rb1
-rw-r--r--app/models/raw_email.rb1
-rw-r--r--app/models/request_classification.rb1
-rw-r--r--app/models/spam_address.rb1
-rw-r--r--app/models/track_thing.rb1
-rw-r--r--app/models/track_things_sent_email.rb1
-rw-r--r--app/models/user.rb1
-rw-r--r--app/models/user_info_request_sent_alert.rb1
-rw-r--r--app/models/widget_vote.rb1
-rw-r--r--config/application.rb1
-rw-r--r--config/boot.rb1
-rw-r--r--config/deploy.rb1
-rw-r--r--config/environment.rb1
-rw-r--r--config/environments/development.rb1
-rw-r--r--config/environments/production.rb1
-rw-r--r--config/environments/staging.rb1
-rw-r--r--config/environments/test.rb1
-rw-r--r--config/initializers/acts_as_xapian.rb1
-rw-r--r--config/initializers/alaveteli.rb1
-rw-r--r--config/initializers/backtrace_silencers.rb1
-rw-r--r--config/initializers/fast_gettext.rb1
-rw-r--r--config/initializers/gettext_i18n_rails.rb1
-rw-r--r--config/initializers/has_tag_string.rb1
-rw-r--r--config/initializers/health_checks.rb1
-rw-r--r--config/initializers/inflections.rb1
-rw-r--r--config/initializers/mime_types.rb1
-rw-r--r--config/initializers/secret_token.rb1
-rw-r--r--config/initializers/secure_headers.rb1
-rw-r--r--config/initializers/session_store.rb1
-rw-r--r--config/initializers/strip_attributes.rb1
-rw-r--r--config/initializers/theme_loader.rb1
-rw-r--r--config/preinitializer.rb1
-rw-r--r--config/routes.rb2
-rw-r--r--db/migrate/001_create_users.rb1
-rw-r--r--db/migrate/002_add_sessions.rb1
-rw-r--r--db/migrate/004_create_info_requests.rb1
-rw-r--r--db/migrate/005_create_public_bodies.rb1
-rw-r--r--db/migrate/006_version_public_body.rb1
-rw-r--r--db/migrate/007_add_public_body_editor_notes.rb1
-rw-r--r--db/migrate/008_request_has_public_body.rb1
-rw-r--r--db/migrate/009_create_outgoing_messages.rb1
-rw-r--r--db/migrate/010_remove_public_body_id_from_outgoing_messages.rb1
-rw-r--r--db/migrate/011_add_created_updated_fields.rb1
-rw-r--r--db/migrate/012_add_sent_outgoing_message.rb1
-rw-r--r--db/migrate/013_create_incoming_messages.rb1
-rw-r--r--db/migrate/014_create_post_redirects.rb1
-rw-r--r--db/migrate/015_add_email_token_to_post_redirects.rb1
-rw-r--r--db/migrate/016_add_reasons_to_post_redirects.rb1
-rw-r--r--db/migrate/017_add_email_confirmed_to_users.rb1
-rw-r--r--db/migrate/018_add_response_type_to_incoming_message.rb1
-rw-r--r--db/migrate/021_remove_contains_information_default.rb1
-rw-r--r--db/migrate/022_create_info_request_events.rb1
-rw-r--r--db/migrate/023_outgoing_message_last_sent_at.rb1
-rw-r--r--db/migrate/024_add_is_bounce_to_incoming_messages.rb1
-rw-r--r--db/migrate/025_add_followup_to_outgoing_message.rb1
-rw-r--r--db/migrate/026_add_many_null_constraints.rb1
-rw-r--r--db/migrate/027_change_classification_system.rb1
-rw-r--r--db/migrate/028_give_incoming_messages_events.rb1
-rw-r--r--db/migrate/029_add_describe_status_history.rb1
-rw-r--r--db/migrate/030_add_some_indices.rb1
-rw-r--r--db/migrate/031_add_indices_for_session_deletion.rb1
-rw-r--r--db/migrate/032_addforeignkeys.rb1
-rw-r--r--db/migrate/033_add_prominence.rb1
-rw-r--r--db/migrate/034_run_solr_indexing.rb1
-rw-r--r--db/migrate/035_track_overdue_alerts.rb1
-rw-r--r--db/migrate/036_add_public_body_tags.rb1
-rw-r--r--db/migrate/037_add_url_name.rb1
-rw-r--r--db/migrate/038_add_more_url_names.rb1
-rw-r--r--db/migrate/039_request_url_names.rb1
-rw-r--r--db/migrate/040_email_is_unique.rb1
-rw-r--r--db/migrate/041_index_requests_with_solr.rb1
-rw-r--r--db/migrate/042_unique_user_urls.rb1
-rw-r--r--db/migrate/043_remove_complaint_email.rb1
-rw-r--r--db/migrate/044_remove_is_bounce.rb1
-rw-r--r--db/migrate/045_add_circumstance_to_post_redirect.rb1
-rw-r--r--db/migrate/046_add_last_event_id_to_alert_table.rb1
-rw-r--r--db/migrate/047_add_calculated_state.rb1
-rw-r--r--db/migrate/048_add_calculated_state_at.rb1
-rw-r--r--db/migrate/049_track_things.rb1
-rw-r--r--db/migrate/050_improve_track_things.rb1
-rw-r--r--db/migrate/051_add_track_things_unique_indices.rb1
-rw-r--r--db/migrate/052_include_event_foreign_references.rb1
-rw-r--r--db/migrate/053_acts_as_xapian_migration.rb1
-rw-r--r--db/migrate/054_allow_longer_comments.rb1
-rw-r--r--db/migrate/055_stop_new_responses.rb1
-rw-r--r--db/migrate/056_add_attachment_text.rb1
-rw-r--r--db/migrate/057_add_law_used.rb1
-rw-r--r--db/migrate/058_remove_sessions.rb1
-rw-r--r--db/migrate/059_add_url_notes.rb1
-rw-r--r--db/migrate/060_add_cached_main_text.rb1
-rw-r--r--db/migrate/061_include_responses_in_tracks.rb1
-rw-r--r--db/migrate/062_add_comments.rb1
-rw-r--r--db/migrate/063_add_admin_users.rb1
-rw-r--r--db/migrate/064_indices_for_annotations.rb1
-rw-r--r--db/migrate/065_add_comments_to_user_track.rb1
-rw-r--r--db/migrate/066_add_first_letter.rb1
-rw-r--r--db/migrate/067_factor_out_raw_email.rb1
-rw-r--r--db/migrate/068_add_censor_table.rb1
-rw-r--r--db/migrate/069_add_what_doing.rb1
-rw-r--r--db/migrate/070_sent_are_waiting_response.rb1
-rw-r--r--db/migrate/071_add_exim_log.rb1
-rw-r--r--db/migrate/072_add_publication_scheme.rb1
-rw-r--r--db/migrate/073_add_ban_user.rb1
-rw-r--r--db/migrate/074_create_holidays.rb1
-rw-r--r--db/migrate/075_add_charity_number.rb1
-rw-r--r--db/migrate/076_add_indices.rb1
-rw-r--r--db/migrate/077_add_exim_log_index.rb1
-rw-r--r--db/migrate/078_expand_stop_new_responses.rb1
-rw-r--r--db/migrate/079_add_profile_photo.rb1
-rw-r--r--db/migrate/080_cache_only_clipped_attachment_text.rb1
-rw-r--r--db/migrate/081_add_event_prominence.rb1
-rw-r--r--db/migrate/082_change_raw_email_to_binary.rb1
-rw-r--r--db/migrate/083_add_indices_track_sent.rb1
-rw-r--r--db/migrate/084_alter_profile_photo.rb1
-rw-r--r--db/migrate/085_draft_profile_photo.rb1
-rw-r--r--db/migrate/086_allow_null_profile_photo_user.rb1
-rw-r--r--db/migrate/087_add_about_me.rb1
-rw-r--r--db/migrate/088_public_body_machine_tags.rb1
-rw-r--r--db/migrate/089_remove_charity_number.rb1
-rw-r--r--db/migrate/090_remove_tag_uniqueness.rb1
-rw-r--r--db/migrate/091_add_censor_rules_indices.rb1
-rw-r--r--db/migrate/092_cache_only_marked_body_text.rb1
-rw-r--r--db/migrate/093_move_to_has_tag_string.rb1
-rw-r--r--db/migrate/094_remove_old_tags_foreign_key.rb1
-rw-r--r--db/migrate/095_add_post_redirect_user_index.rb1
-rw-r--r--db/migrate/096_create_translation_tables.rb1
-rw-r--r--db/migrate/097_add_comment_locale.rb1
-rw-r--r--db/migrate/098_fix_public_body_translations.rb1
-rw-r--r--db/migrate/099_move_raw_email_to_filesystem.rb1
-rw-r--r--db/migrate/100_remove_redundant_raw_email_columns.rb1
-rw-r--r--db/migrate/101_add_hash_to_info_request.rb1
-rw-r--r--db/migrate/102_add_locale_to_users.rb1
-rw-r--r--db/migrate/103_add_user_bounce_columns.rb1
-rw-r--r--db/migrate/104_create_foi_attachments.rb1
-rw-r--r--db/migrate/105_extend_incoming_message.rb1
-rw-r--r--db/migrate/106_add_hex_digest_to_foi_attachment.rb1
-rw-r--r--db/migrate/107_add_date_parsed_field_to_incoming_message.rb1
-rw-r--r--db/migrate/108_change_safe_mail_from_to_mail_from.rb1
-rw-r--r--db/migrate/109_change_sent_at_to_datetime.rb1
-rw-r--r--db/migrate/110_add_user_no_limit.rb1
-rw-r--r--db/migrate/111_create_purge_requests.rb1
-rw-r--r--db/migrate/112_add_api_key_to_public_bodies.rb1
-rw-r--r--db/migrate/113_add_external_fields_to_info_requests.rb1
-rw-r--r--db/migrate/114_add_attention_requested_flag_to_info_requests.rb1
-rw-r--r--db/migrate/115_add_receive_email_alerts_to_user.rb1
-rw-r--r--db/migrate/116_add_censor_rule_regexp.rb1
-rw-r--r--db/migrate/117_create_sessions.rb1
-rw-r--r--db/migrate/118_remove_sessions_again.rb1
-rw-r--r--db/migrate/20120822145640_correct_external_request_constraint.rb1
-rw-r--r--db/migrate/20120910153022_create_request_classifications.rb1
-rw-r--r--db/migrate/20120912111713_add_raw_email_index_to_incoming_messages.rb1
-rw-r--r--db/migrate/20120912112036_add_info_request_id_index_to_exim_logs.rb1
-rw-r--r--db/migrate/20120912112312_add_info_request_id_index_to_incoming_and_outgoing_messages.rb1
-rw-r--r--db/migrate/20120912112655_add_incoming_message_id_index_to_foi_attachments.rb1
-rw-r--r--db/migrate/20120912113004_add_indexes_to_info_request_events.rb1
-rw-r--r--db/migrate/20120912113720_add_public_body_index_to_info_requests.rb1
-rw-r--r--db/migrate/20120912114022_add_user_index_to_info_requests.rb1
-rw-r--r--db/migrate/20120912170035_add_info_requests_count_to_public_bodies.rb1
-rw-r--r--db/migrate/20120913074940_add_incoming_message_index_to_outgoing_messages.rb1
-rw-r--r--db/migrate/20120913080807_add_info_request_event_index_to_track_things_sent_emails.rb1
-rw-r--r--db/migrate/20120913081136_add_info_request_event_index_to_user_info_request_sent_alerts.rb1
-rw-r--r--db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb1
-rw-r--r--db/migrate/20120919140404_add_comments_allowed_to_info_request.rb1
-rw-r--r--db/migrate/20121010214348_rename_exim_log_tables.rb1
-rw-r--r--db/migrate/20121022031914_add_disclosure_log.rb1
-rw-r--r--db/migrate/20130731142632_remove_prominence_from_info_request_event.rb1
-rw-r--r--db/migrate/20130731145325_add_prominence_to_incoming_message.rb1
-rw-r--r--db/migrate/20130801154033_add_prominence_reason_to_incoming_message.rb1
-rw-r--r--db/migrate/20130816150110_add_statistics_to_public_body.rb1
-rw-r--r--db/migrate/20130822161803_add_prominence_fields_to_outgoing_message.rb1
-rw-r--r--db/migrate/20130919151140_add_can_make_batch_requests_to_user.rb1
-rw-r--r--db/migrate/20131024114346_create_info_request_batches.rb1
-rw-r--r--db/migrate/20131024152540_add_body_to_info_request_batches.rb1
-rw-r--r--db/migrate/20131101155844_add_stats_denominator.rb1
-rw-r--r--db/migrate/20131127105438_create_info_request_batch_public_bodies_join_table.rb1
-rw-r--r--db/migrate/20131127135622_add_sent_at_to_info_request_batch.rb1
-rw-r--r--db/migrate/20131211152641_create_public_body_change_requests.rb1
-rw-r--r--db/migrate/20140325120619_create_spam_addresses.rb1
-rw-r--r--db/migrate/20140408145616_add_default_short_name_to_public_bodies.rb1
-rw-r--r--db/migrate/20140528110536_update_track_things_index.rb1
-rw-r--r--db/migrate/20140710094405_create_public_body_headings_and_categories.rb3
-rw-r--r--db/migrate/20140716131107_create_category_translation_tables.rb1
-rw-r--r--db/migrate/20140801132719_add_index_to_info_request_events.rb1
-rw-r--r--db/migrate/20140804120601_add_display_order_to_categories_and_headings.rb1
-rw-r--r--db/migrate/20140824191444_create_widget_votes.rb1
-rw-r--r--db/seeds.rb1
-rw-r--r--lib/ability.rb1
-rw-r--r--lib/activerecord_errors_extensions.rb1
-rw-r--r--lib/activesupport_cache_extensions.rb1
-rw-r--r--lib/acts_as_xapian/acts_as_xapian.rb2
-rw-r--r--lib/alaveteli_external_command.rb1
-rw-r--r--lib/alaveteli_file_types.rb3
-rw-r--r--lib/alaveteli_localization.rb1
-rw-r--r--lib/alaveteli_text_masker.rb1
-rw-r--r--lib/attachment_to_html/adapters/could_not_convert.rb3
-rw-r--r--lib/attachment_to_html/adapters/google_docs_viewer.rb1
-rw-r--r--lib/attachment_to_html/adapters/pdf.rb1
-rw-r--r--lib/attachment_to_html/adapters/rtf.rb1
-rw-r--r--lib/attachment_to_html/adapters/text.rb1
-rw-r--r--lib/attachment_to_html/attachment_to_html.rb1
-rw-r--r--lib/attachment_to_html/view.rb1
-rw-r--r--lib/confidence_intervals.rb1
-rw-r--r--lib/configuration.rb1
-rw-r--r--lib/date_quarter.rb1
-rw-r--r--lib/generators/acts_as_xapian/acts_as_xapian_generator.rb1
-rw-r--r--lib/generators/acts_as_xapian/templates/migration.rb1
-rw-r--r--lib/has_tag_string/has_tag_string.rb1
-rw-r--r--lib/health_checks/checks/days_ago_check.rb1
-rw-r--r--lib/health_checks/health_checkable.rb1
-rw-r--r--lib/health_checks/health_checks.rb1
-rw-r--r--lib/i18n_fixes.rb1
-rw-r--r--lib/languages.rb2
-rw-r--r--lib/mail_handler/backends/mail_backend.rb1
-rw-r--r--lib/mail_handler/backends/mail_extensions.rb1
-rw-r--r--lib/mail_handler/mail_handler.rb1
-rw-r--r--lib/memory_profiler.rb1
-rw-r--r--lib/message_prominence.rb1
-rw-r--r--lib/no_constraint_disabling.rb1
-rw-r--r--lib/normalize_string.rb1
-rw-r--r--lib/public_body_csv.rb1
-rw-r--r--lib/quiet_opener.rb1
-rw-r--r--lib/routing_filters.rb1
-rw-r--r--lib/strip_attributes/strip_attributes.rb1
-rw-r--r--lib/strip_attributes/test/strip_attributes_test.rb1
-rw-r--r--lib/strip_attributes/test/test_helper.rb1
-rw-r--r--lib/tasks/usage.rb3
-rw-r--r--lib/theme.rb1
-rw-r--r--lib/use_spans_for_errors.rb1
-rw-r--r--lib/whatdotheyknow/strip_empty_sessions.rb1
-rw-r--r--lib/world_foi_websites.rb1
-rw-r--r--lib/xapian_queries.rb1
-rw-r--r--locale/model_attributes.rb1
-rwxr-xr-xscript/handle-mail-replies.rb2
-rwxr-xr-xscript/switch-theme.rb2
-rw-r--r--spec/controllers/admin_censor_rule_controller_spec.rb1
-rw-r--r--spec/controllers/admin_comment_controller_spec.rb1
-rw-r--r--spec/controllers/admin_general_controller_spec.rb1
-rw-r--r--spec/controllers/admin_holiday_imports_controller_spec.rb1
-rw-r--r--spec/controllers/admin_holidays_controller_spec.rb1
-rw-r--r--spec/controllers/admin_incoming_message_controller_spec.rb1
-rw-r--r--spec/controllers/admin_info_request_event_controller_spec.rb2
-rw-r--r--spec/controllers/admin_outgoing_message_controller_spec.rb1
-rw-r--r--spec/controllers/admin_public_body_categories_controller_spec.rb1
-rw-r--r--spec/controllers/admin_public_body_change_requests_controller_spec.rb2
-rw-r--r--spec/controllers/admin_public_body_controller_spec.rb1
-rw-r--r--spec/controllers/admin_public_body_headings_controller_spec.rb1
-rw-r--r--spec/controllers/admin_raw_email_controller_spec.rb1
-rw-r--r--spec/controllers/admin_request_controller_spec.rb1
-rw-r--r--spec/controllers/admin_spam_addresses_controller_spec.rb1
-rw-r--r--spec/controllers/admin_track_controller_spec.rb1
-rw-r--r--spec/controllers/admin_user_controller_spec.rb1
-rw-r--r--spec/controllers/api_controller_spec.rb2
-rw-r--r--spec/controllers/comment_controller_spec.rb1
-rw-r--r--spec/controllers/general_controller_spec.rb1
-rw-r--r--spec/controllers/health_checks_controller_spec.rb1
-rw-r--r--spec/controllers/help_controller_spec.rb2
-rw-r--r--spec/controllers/info_request_batch_controller_spec.rb2
-rw-r--r--spec/controllers/public_body_change_requests_controller_spec.rb2
-rw-r--r--spec/controllers/public_body_controller_spec.rb2
-rw-r--r--spec/controllers/reports_controller_spec.rb1
-rw-r--r--spec/controllers/request_controller_spec.rb2
-rw-r--r--spec/controllers/request_game_controller_spec.rb1
-rw-r--r--spec/controllers/services_controller_spec.rb2
-rw-r--r--spec/controllers/track_controller_spec.rb1
-rw-r--r--spec/controllers/user_controller_spec.rb2
-rw-r--r--spec/controllers/widgets_controller_spec.rb2
-rw-r--r--spec/factories/censor_rules.rb1
-rw-r--r--spec/factories/comments.rb1
-rw-r--r--spec/factories/foi_attchments.rb1
-rw-r--r--spec/factories/holidays.rb1
-rw-r--r--spec/factories/incoming_messages.rb1
-rw-r--r--spec/factories/info_request_batches.rb1
-rw-r--r--spec/factories/info_request_events.rb1
-rw-r--r--spec/factories/info_requests.rb1
-rw-r--r--spec/factories/outgoing_messages.rb1
-rw-r--r--spec/factories/public_bodies.rb1
-rw-r--r--spec/factories/public_body_categories.rb1
-rw-r--r--spec/factories/public_body_category_links.rb1
-rw-r--r--spec/factories/public_body_change_requests.rb1
-rw-r--r--spec/factories/public_body_headings.rb1
-rw-r--r--spec/factories/raw_emails.rb1
-rw-r--r--spec/factories/spam_addresses.rb1
-rw-r--r--spec/factories/track_things.rb1
-rw-r--r--spec/factories/users.rb1
-rw-r--r--spec/factories/widget_votes.rb3
-rw-r--r--spec/helpers/admin_helper_spec.rb1
-rw-r--r--spec/helpers/application_helper_spec.rb1
-rw-r--r--spec/helpers/date_time_helper_spec.rb1
-rw-r--r--spec/helpers/health_checks_helper_spec.rb1
-rw-r--r--spec/helpers/highlight_helper_spec.rb1
-rw-r--r--spec/helpers/link_to_helper_spec.rb1
-rw-r--r--spec/helpers/public_body_helper_spec.rb2
-rw-r--r--spec/helpers/track_helper_spec.rb1
-rw-r--r--spec/helpers/widget_helper_spec.rb3
-rw-r--r--spec/integration/admin_public_body_category_edit_spec.rb1
-rw-r--r--spec/integration/admin_public_body_edit_spec.rb1
-rw-r--r--spec/integration/admin_public_body_heading_edit_spec.rb1
-rw-r--r--spec/integration/admin_spec.rb1
-rw-r--r--spec/integration/alaveteli_dsl.rb1
-rw-r--r--spec/integration/cookie_stripping_spec.rb1
-rw-r--r--spec/integration/create_request_spec.rb1
-rw-r--r--spec/integration/download_request_spec.rb1
-rw-r--r--spec/integration/errors_spec.rb2
-rw-r--r--spec/integration/ip_spoofing_spec.rb1
-rw-r--r--spec/integration/localisation_spec.rb1
-rw-r--r--spec/integration/request_controller_spec.rb2
-rw-r--r--spec/integration/search_request_spec.rb1
-rw-r--r--spec/integration/view_request_spec.rb1
-rw-r--r--spec/integration/xapian_search_highlighting_spec.rb2
-rw-r--r--spec/lib/ability_spec.rb1
-rw-r--r--spec/lib/alaveteli_external_command_spec.rb1
-rw-r--r--spec/lib/alaveteli_text_masker_spec.rb2
-rw-r--r--spec/lib/attachment_to_html/adapters/could_not_convert_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/adapters/google_docs_viewer_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/adapters/pdf_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/adapters/rtf_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/adapters/text_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/attachment_to_html_spec.rb1
-rw-r--r--spec/lib/attachment_to_html/view_spec.rb1
-rw-r--r--spec/lib/basic_encoding_spec.rb2
-rw-r--r--spec/lib/confidence_intervals_spec.rb1
-rw-r--r--spec/lib/date_quarter_spec.rb1
-rw-r--r--spec/lib/health_checks/checks/days_ago_check_spec.rb1
-rw-r--r--spec/lib/health_checks/health_checkable_spec.rb1
-rw-r--r--spec/lib/health_checks/health_checks_spec.rb1
-rw-r--r--spec/lib/i18n_interpolation_spec.rb6
-rw-r--r--spec/lib/mail_handler/backends/mail_backend_spec.rb2
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb2
-rw-r--r--spec/lib/public_body_csv_spec.rb1
-rw-r--r--spec/lib/theme_spec.rb1
-rw-r--r--spec/lib/timezone_fixes_spec.rb1
-rw-r--r--spec/lib/whatdotheyknow/strip_empty_sessions_spec.rb1
-rw-r--r--spec/mailers/application_mailer_spec.rb1
-rw-r--r--spec/mailers/info_request_batch_mailer_spec.rb1
-rw-r--r--spec/mailers/outgoing_mailer_spec.rb1
-rw-r--r--spec/mailers/request_mailer_spec.rb2
-rw-r--r--spec/mailers/track_mailer_spec.rb1
-rw-r--r--spec/models/about_me_validator_spec.rb1
-rw-r--r--spec/models/censor_rule_spec.rb1
-rw-r--r--spec/models/change_email_validator_spec.rb1
-rw-r--r--spec/models/contact_validator_spec.rb1
-rw-r--r--spec/models/customstates.rb1
-rw-r--r--spec/models/foi_attachment_spec.rb1
-rw-r--r--spec/models/has_tag_string_tag_spec.rb1
-rw-r--r--spec/models/holiday_import_spec.rb1
-rw-r--r--spec/models/holiday_spec.rb1
-rw-r--r--spec/models/incoming_message_spec.rb2
-rw-r--r--spec/models/info_request_batch_spec.rb1
-rw-r--r--spec/models/info_request_event_spec.rb2
-rw-r--r--spec/models/info_request_spec.rb2
-rw-r--r--spec/models/mail_server_log_spec.rb1
-rw-r--r--spec/models/outgoing_message_spec.rb1
-rw-r--r--spec/models/post_redirect_spec.rb1
-rw-r--r--spec/models/profile_photo_spec.rb1
-rw-r--r--spec/models/public_body_category/category_collection_spec.rb1
-rw-r--r--spec/models/public_body_category_link_spec.rb1
-rw-r--r--spec/models/public_body_category_spec.rb1
-rw-r--r--spec/models/public_body_change_request_spec.rb1
-rw-r--r--spec/models/public_body_heading_spec.rb1
-rw-r--r--spec/models/public_body_spec.rb2
-rw-r--r--spec/models/purge_request_spec.rb1
-rw-r--r--spec/models/raw_email_spec.rb1
-rw-r--r--spec/models/spam_address_spec.rb1
-rw-r--r--spec/models/track_thing_spec.rb1
-rw-r--r--spec/models/track_things_sent_email_spec.rb1
-rw-r--r--spec/models/user_info_request_sent_alert_spec.rb1
-rw-r--r--spec/models/user_spec.rb1
-rw-r--r--spec/models/widget_vote_spec.rb1
-rw-r--r--spec/models/xapian_spec.rb2
-rw-r--r--spec/script/handle-mail-replies_spec.rb1
-rw-r--r--spec/script/mailin_spec.rb1
-rw-r--r--spec/spec_helper.rb1
-rw-r--r--spec/support/email_helpers.rb1
-rw-r--r--spec/support/load_file_fixtures.rb1
-rw-r--r--spec/support/xapian_index.rb1
-rw-r--r--spec/views/public_body/show.html.erb_spec.rb1
-rw-r--r--spec/views/reports/new.erb_spec.rb1
-rw-r--r--spec/views/request/_after_actions.html.erb_spec.rb1
-rw-r--r--spec/views/request/_describe_state.html.erb_spec.rb1
-rw-r--r--spec/views/request/show.html.erb_spec.rb1
-rw-r--r--spec/views/request_game/play.html.erb_spec.rb1
458 files changed, 467 insertions, 47 deletions
diff --git a/app/controllers/admin_censor_rule_controller.rb b/app/controllers/admin_censor_rule_controller.rb
index 3387fd832..6c060a610 100644
--- a/app/controllers/admin_censor_rule_controller.rb
+++ b/app/controllers/admin_censor_rule_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_censor_rule_controller.rb:
# For modifying requests.
#
diff --git a/app/controllers/admin_comment_controller.rb b/app/controllers/admin_comment_controller.rb
index 0aafb122a..dc505be9f 100644
--- a/app/controllers/admin_comment_controller.rb
+++ b/app/controllers/admin_comment_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_comment_controller.rb:
# Controller for editing comments from the admin interface.
#
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 7760c372b..400047215 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# controllers/admin.rb:
# All admin controllers are dervied from this.
#
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index 13edec37d..17c54476e 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_controller.rb:
# Controller for main admin pages.
#
diff --git a/app/controllers/admin_holiday_imports_controller.rb b/app/controllers/admin_holiday_imports_controller.rb
index 8596936f0..a740caa2b 100644
--- a/app/controllers/admin_holiday_imports_controller.rb
+++ b/app/controllers/admin_holiday_imports_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminHolidayImportsController < AdminController
def new
diff --git a/app/controllers/admin_holidays_controller.rb b/app/controllers/admin_holidays_controller.rb
index 9177ebd44..cd93a21b6 100644
--- a/app/controllers/admin_holidays_controller.rb
+++ b/app/controllers/admin_holidays_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminHolidaysController < AdminController
def index
diff --git a/app/controllers/admin_incoming_message_controller.rb b/app/controllers/admin_incoming_message_controller.rb
index bc653bf53..8dfd53662 100644
--- a/app/controllers/admin_incoming_message_controller.rb
+++ b/app/controllers/admin_incoming_message_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminIncomingMessageController < AdminController
def edit
diff --git a/app/controllers/admin_info_request_event_controller.rb b/app/controllers/admin_info_request_event_controller.rb
index 17d147582..6862ff116 100644
--- a/app/controllers/admin_info_request_event_controller.rb
+++ b/app/controllers/admin_info_request_event_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_info_request_event_controller.rb:
# Controller for FOI request event manipulation from the admin interface.
#
diff --git a/app/controllers/admin_outgoing_message_controller.rb b/app/controllers/admin_outgoing_message_controller.rb
index 2ee811dc0..6c0b23ceb 100644
--- a/app/controllers/admin_outgoing_message_controller.rb
+++ b/app/controllers/admin_outgoing_message_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminOutgoingMessageController < AdminController
def edit
diff --git a/app/controllers/admin_public_body_categories_controller.rb b/app/controllers/admin_public_body_categories_controller.rb
index a86171c76..e365255f8 100644
--- a/app/controllers/admin_public_body_categories_controller.rb
+++ b/app/controllers/admin_public_body_categories_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminPublicBodyCategoriesController < AdminController
def index
@locale = self.locale_from_params
diff --git a/app/controllers/admin_public_body_change_requests_controller.rb b/app/controllers/admin_public_body_change_requests_controller.rb
index 6ff03a2bd..be632b6cd 100644
--- a/app/controllers/admin_public_body_change_requests_controller.rb
+++ b/app/controllers/admin_public_body_change_requests_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminPublicBodyChangeRequestsController < AdminController
def edit
diff --git a/app/controllers/admin_public_body_controller.rb b/app/controllers/admin_public_body_controller.rb
index 7de27121a..efd90f4ca 100644
--- a/app/controllers/admin_public_body_controller.rb
+++ b/app/controllers/admin_public_body_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_public_body_controller.rb:
# Controller for editing public bodies from the admin interface.
#
diff --git a/app/controllers/admin_public_body_headings_controller.rb b/app/controllers/admin_public_body_headings_controller.rb
index a7fe27390..237cfcf4b 100644
--- a/app/controllers/admin_public_body_headings_controller.rb
+++ b/app/controllers/admin_public_body_headings_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminPublicBodyHeadingsController < AdminController
def new
diff --git a/app/controllers/admin_raw_email_controller.rb b/app/controllers/admin_raw_email_controller.rb
index 1b3ee2871..7a802d914 100644
--- a/app/controllers/admin_raw_email_controller.rb
+++ b/app/controllers/admin_raw_email_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_raw_email_controller.rb:
# Controller for managing raw emails from the admin interface.
#
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb
index db20e8dcc..4dcb0681f 100644
--- a/app/controllers/admin_request_controller.rb
+++ b/app/controllers/admin_request_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_request_controller.rb:
# Controller for viewing FOI requests from the admin interface.
#
diff --git a/app/controllers/admin_spam_addresses_controller.rb b/app/controllers/admin_spam_addresses_controller.rb
index fff7e2a4a..d8be52bc7 100644
--- a/app/controllers/admin_spam_addresses_controller.rb
+++ b/app/controllers/admin_spam_addresses_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AdminSpamAddressesController < AdminController
def index
diff --git a/app/controllers/admin_track_controller.rb b/app/controllers/admin_track_controller.rb
index 63ee5c12e..e6e5835e6 100644
--- a/app/controllers/admin_track_controller.rb
+++ b/app/controllers/admin_track_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_track_controller.rb:
# Show email alerts / RSS feeds from admin interface.
#
diff --git a/app/controllers/admin_user_controller.rb b/app/controllers/admin_user_controller.rb
index 7ef461594..56c4c81e9 100644
--- a/app/controllers/admin_user_controller.rb
+++ b/app/controllers/admin_user_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/admin_user_controller.rb:
# Controller for viewing user accounts from the admin interface.
#
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index 6f83d89d6..779ae04a6 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ApiController < ApplicationController
before_filter :check_api_key
before_filter :check_external_request,
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e80c6a823..07956d370 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
# controllers/application.rb:
# Parent class of all controllers in FOI site. Filters added to this controller
# apply to all controllers in the application. Likewise, all the methods added
diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb
index 890e9faaa..b5c438c95 100644
--- a/app/controllers/comment_controller.rb
+++ b/app/controllers/comment_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/comment_controller.rb:
# Show annotations upon a request or other object.
#
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index 380da285e..324f5f2e4 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/general_controller.rb:
# For pages like front page, general search, that aren't specific to a
# particular model.
diff --git a/app/controllers/health_checks_controller.rb b/app/controllers/health_checks_controller.rb
index 473a1aacc..122a02193 100644
--- a/app/controllers/health_checks_controller.rb
+++ b/app/controllers/health_checks_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class HealthChecksController < ApplicationController
def index
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index 93215ccad..cfe1b6ad5 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/help_controller.rb:
# Show information about one particular request.
#
diff --git a/app/controllers/holiday_controller.rb b/app/controllers/holiday_controller.rb
index efc20701d..422612fc7 100644
--- a/app/controllers/holiday_controller.rb
+++ b/app/controllers/holiday_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/holiday_controller.rb:
# Calculate dates
#
diff --git a/app/controllers/info_request_batch_controller.rb b/app/controllers/info_request_batch_controller.rb
index b66658757..e1b684f30 100644
--- a/app/controllers/info_request_batch_controller.rb
+++ b/app/controllers/info_request_batch_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class InfoRequestBatchController < ApplicationController
def show
diff --git a/app/controllers/public_body_change_requests_controller.rb b/app/controllers/public_body_change_requests_controller.rb
index 773308546..d43f9398a 100644
--- a/app/controllers/public_body_change_requests_controller.rb
+++ b/app/controllers/public_body_change_requests_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class PublicBodyChangeRequestsController < ApplicationController
before_filter :catch_spam, :only => [:create]
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 854e79a19..b34c929f5 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
# app/controllers/public_body_controller.rb:
# Show information about a public body.
#
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb
index a1dd53125..83474ad65 100644
--- a/app/controllers/reports_controller.rb
+++ b/app/controllers/reports_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ReportsController < ApplicationController
def create
@info_request = InfoRequest.find_by_url_title!(params[:request_id])
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index e847cae1e..aa88aeeeb 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# -*- encoding : utf-8 -*-
# app/controllers/request_controller.rb:
# Show information about one particular request.
#
diff --git a/app/controllers/request_game_controller.rb b/app/controllers/request_game_controller.rb
index 7eadc1204..cb3ba1f3a 100644
--- a/app/controllers/request_game_controller.rb
+++ b/app/controllers/request_game_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/request_game_controller.rb:
# The 'categorise old requests' game
#
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb
index 9b3a3396f..4d06072df 100644
--- a/app/controllers/services_controller.rb
+++ b/app/controllers/services_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# controllers/services_controller.rb:
require 'open-uri'
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb
index 8b8055b55..cbefb6291 100644
--- a/app/controllers/track_controller.rb
+++ b/app/controllers/track_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/track_controller.rb:
# Publically visible email alerts and RSS - think an alert system crossed with
# social bookmarking.
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index d66b4aa8e..91eb7baf4 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/user_controller.rb:
# Show information about a user.
#
diff --git a/app/controllers/widgets_controller.rb b/app/controllers/widgets_controller.rb
index 0cc1008a1..333a38e86 100644
--- a/app/controllers/widgets_controller.rb
+++ b/app/controllers/widgets_controller.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/controllers/widget_controller.rb:
# Handle widgets, if enabled
#
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
index d13fea79b..9d63b1cad 100644
--- a/app/helpers/admin_helper.rb
+++ b/app/helpers/admin_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AdminHelper
def icon(name)
content_tag(:i, "", :class => "icon-#{name}")
diff --git a/app/helpers/admin_public_body_category_helper.rb b/app/helpers/admin_public_body_category_helper.rb
index 9c5e5cc5e..2d8842562 100644
--- a/app/helpers/admin_public_body_category_helper.rb
+++ b/app/helpers/admin_public_body_category_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AdminPublicBodyCategoryHelper
def heading_is_selected?(heading)
if params[:headings]
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 49ce94951..2f51f5684 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/helpers/application_helper.rb:
# Methods added to this helper will be available to all views (i.e. templates)
# in the application.
diff --git a/app/helpers/config_helper.rb b/app/helpers/config_helper.rb
index 026600ff1..9953c4fe0 100644
--- a/app/helpers/config_helper.rb
+++ b/app/helpers/config_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module ConfigHelper
def site_name
AlaveteliConfiguration::site_name
diff --git a/app/helpers/date_time_helper.rb b/app/helpers/date_time_helper.rb
index 5f129e590..09b5b2a76 100644
--- a/app/helpers/date_time_helper.rb
+++ b/app/helpers/date_time_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module DateTimeHelper
# Public: Usually-correct format for a DateTime-ish object
# To define a new new format define the `simple_date_{FORMAT}` method
diff --git a/app/helpers/health_checks_helper.rb b/app/helpers/health_checks_helper.rb
index f9e4d42df..b2f1f9de5 100644
--- a/app/helpers/health_checks_helper.rb
+++ b/app/helpers/health_checks_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module HealthChecksHelper
def check_status(check)
diff --git a/app/helpers/highlight_helper.rb b/app/helpers/highlight_helper.rb
index a98f6f320..c72d5a64b 100644
--- a/app/helpers/highlight_helper.rb
+++ b/app/helpers/highlight_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module HighlightHelper
include ERB::Util
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 44d6c6f5f..21eb39c0e 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# app/helpers/link_to_helper.rb:
# This module is included into all controllers via controllers/application.rb
# -
diff --git a/app/helpers/mailer_helper.rb b/app/helpers/mailer_helper.rb
index 3d4bbac71..573f7d8a8 100644
--- a/app/helpers/mailer_helper.rb
+++ b/app/helpers/mailer_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module MailerHelper
def contact_from_name_and_email
"#{AlaveteliConfiguration::contact_name} <#{AlaveteliConfiguration::contact_email}>"
diff --git a/app/helpers/public_body_helper.rb b/app/helpers/public_body_helper.rb
index 57c90a9ba..3fb04d45a 100644
--- a/app/helpers/public_body_helper.rb
+++ b/app/helpers/public_body_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module PublicBodyHelper
# Public: The reasons a request can't be made to a PublicBody
diff --git a/app/helpers/track_helper.rb b/app/helpers/track_helper.rb
index ca698926c..75ff784f3 100644
--- a/app/helpers/track_helper.rb
+++ b/app/helpers/track_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module TrackHelper
def already_subscribed_notice(track_thing)
diff --git a/app/helpers/widget_helper.rb b/app/helpers/widget_helper.rb
index e604954fe..70353ea7c 100644
--- a/app/helpers/widget_helper.rb
+++ b/app/helpers/widget_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module WidgetHelper
def status_description(info_request, status)
case status
@@ -43,4 +44,4 @@ module WidgetHelper
end
end
end
-end \ No newline at end of file
+end
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb
index d2230bb82..cfa5603fe 100644
--- a/app/mailers/application_mailer.rb
+++ b/app/mailers/application_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/application_mailer.rb:
# Shared code between different mailers.
#
diff --git a/app/mailers/contact_mailer.rb b/app/mailers/contact_mailer.rb
index 27e04ca4b..7c48bfd4b 100644
--- a/app/mailers/contact_mailer.rb
+++ b/app/mailers/contact_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/contact_mailer.rb:
# Sends contact form mails.
#
diff --git a/app/mailers/info_request_batch_mailer.rb b/app/mailers/info_request_batch_mailer.rb
index a2becfb24..ba853db95 100644
--- a/app/mailers/info_request_batch_mailer.rb
+++ b/app/mailers/info_request_batch_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/info_request_batch_mailer.rb:
# Emails relating to user accounts. e.g. Confirming a new account
#
diff --git a/app/mailers/outgoing_mailer.rb b/app/mailers/outgoing_mailer.rb
index 19054b4e2..0a1b0aee3 100644
--- a/app/mailers/outgoing_mailer.rb
+++ b/app/mailers/outgoing_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/outgoing_mailer.rb:
# Emails which go to public bodies on behalf of users.
#
diff --git a/app/mailers/request_mailer.rb b/app/mailers/request_mailer.rb
index bf04b1ab9..fc824ebe3 100644
--- a/app/mailers/request_mailer.rb
+++ b/app/mailers/request_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/request_mailer.rb:
# Alerts relating to requests.
#
diff --git a/app/mailers/track_mailer.rb b/app/mailers/track_mailer.rb
index 8e9beded6..fc7895203 100644
--- a/app/mailers/track_mailer.rb
+++ b/app/mailers/track_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/track_mailer.rb:
# Emails which go to users who are tracking things.
#
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index a351147f9..a6fed693e 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/user_mailer.rb:
# Emails relating to user accounts. e.g. Confirming a new account
#
diff --git a/app/models/about_me_validator.rb b/app/models/about_me_validator.rb
index 8c24cfd67..ecca5d07d 100644
--- a/app/models/about_me_validator.rb
+++ b/app/models/about_me_validator.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/about_me_validator.rb:
# Validates editing about me text on user profile pages.
#
diff --git a/app/models/censor_rule.rb b/app/models/censor_rule.rb
index 3b5c2d805..3b7aaf7fa 100644
--- a/app/models/censor_rule.rb
+++ b/app/models/censor_rule.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: censor_rules
diff --git a/app/models/change_email_validator.rb b/app/models/change_email_validator.rb
index 65f2fd81c..f5b31f038 100644
--- a/app/models/change_email_validator.rb
+++ b/app/models/change_email_validator.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/changeemail_validator.rb:
# Validates email change form submissions.
#
diff --git a/app/models/comment.rb b/app/models/comment.rb
index cc8d0e94b..ab4acfe56 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: comments
diff --git a/app/models/contact_validator.rb b/app/models/contact_validator.rb
index 8d7e4ff08..1d50bf603 100644
--- a/app/models/contact_validator.rb
+++ b/app/models/contact_validator.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# models/contact_validator.rb:
# Validates contact form submissions.
#
diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb
index a8d105f52..d1c30672f 100644
--- a/app/models/foi_attachment.rb
+++ b/app/models/foi_attachment.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: foi_attachments
diff --git a/app/models/holiday.rb b/app/models/holiday.rb
index 34044683a..538e77051 100644
--- a/app/models/holiday.rb
+++ b/app/models/holiday.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: holidays
diff --git a/app/models/holiday_import.rb b/app/models/holiday_import.rb
index 98a9b96fc..58ea0b1f7 100644
--- a/app/models/holiday_import.rb
+++ b/app/models/holiday_import.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class HolidayImport
include ActiveModel::Validations
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 658ee969a..cc8088352 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: incoming_messages
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 0ca3a1279..275c39746 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
# == Schema Information
# Schema version: 20131024114346
#
diff --git a/app/models/info_request_batch.rb b/app/models/info_request_batch.rb
index 8a5ebeaba..5a20edce8 100644
--- a/app/models/info_request_batch.rb
+++ b/app/models/info_request_batch.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: info_request_batches
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 0ee82d30c..75978fdc5 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: info_request_events
diff --git a/app/models/mail_server_log.rb b/app/models/mail_server_log.rb
index 07d2fdac0..1c69635f3 100644
--- a/app/models/mail_server_log.rb
+++ b/app/models/mail_server_log.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: mail_server_logs
diff --git a/app/models/mail_server_log_done.rb b/app/models/mail_server_log_done.rb
index 1bbb23ac4..542c3db3a 100644
--- a/app/models/mail_server_log_done.rb
+++ b/app/models/mail_server_log_done.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: mail_server_log_dones
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index c2c8ef4f2..ab26fb89a 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
# Schema version: 20131024114346
#
diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb
index 59160381c..3cdc69995 100644
--- a/app/models/post_redirect.rb
+++ b/app/models/post_redirect.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: post_redirects
diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb
index 61f88faf3..94edc2967 100644
--- a/app/models/profile_photo.rb
+++ b/app/models/profile_photo.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: profile_photos
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index dac77d4c5..fc93d2348 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
# == Schema Information
# Schema version: 20131024114346
#
diff --git a/app/models/public_body_category.rb b/app/models/public_body_category.rb
index b88c683de..af7711c3a 100644
--- a/app/models/public_body_category.rb
+++ b/app/models/public_body_category.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_categories
diff --git a/app/models/public_body_category/category_collection.rb b/app/models/public_body_category/category_collection.rb
index 8286e2710..3938722c0 100644
--- a/app/models/public_body_category/category_collection.rb
+++ b/app/models/public_body_category/category_collection.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# replicate original file-based PublicBodyCategories functionality
class PublicBodyCategory::CategoryCollection
include Enumerable
diff --git a/app/models/public_body_category_link.rb b/app/models/public_body_category_link.rb
index 8c3eb8060..be73a9afa 100644
--- a/app/models/public_body_category_link.rb
+++ b/app/models/public_body_category_link.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_category_links
diff --git a/app/models/public_body_change_request.rb b/app/models/public_body_change_request.rb
index 0e59cbecc..88a24dbd9 100644
--- a/app/models/public_body_change_request.rb
+++ b/app/models/public_body_change_request.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_change_requests
diff --git a/app/models/public_body_heading.rb b/app/models/public_body_heading.rb
index 8c160ba8b..514821e2c 100644
--- a/app/models/public_body_heading.rb
+++ b/app/models/public_body_heading.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_headings
diff --git a/app/models/purge_request.rb b/app/models/purge_request.rb
index 81980188d..39dae6a74 100644
--- a/app/models/purge_request.rb
+++ b/app/models/purge_request.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: purge_requests
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb
index 3b466cb81..2a52921f0 100644
--- a/app/models/raw_email.rb
+++ b/app/models/raw_email.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: raw_emails
diff --git a/app/models/request_classification.rb b/app/models/request_classification.rb
index 478a543d3..eccf610d7 100644
--- a/app/models/request_classification.rb
+++ b/app/models/request_classification.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: request_classifications
diff --git a/app/models/spam_address.rb b/app/models/spam_address.rb
index 2c84beaa0..893826a96 100644
--- a/app/models/spam_address.rb
+++ b/app/models/spam_address.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: spam_addresses
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb
index cd90c4a9e..aad7cc51b 100644
--- a/app/models/track_thing.rb
+++ b/app/models/track_thing.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: track_things
diff --git a/app/models/track_things_sent_email.rb b/app/models/track_things_sent_email.rb
index 072d3bdea..d4f3f3f04 100644
--- a/app/models/track_things_sent_email.rb
+++ b/app/models/track_things_sent_email.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: track_things_sent_emails
diff --git a/app/models/user.rb b/app/models/user.rb
index 1fb5d9139..bb40dbc26 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: users
diff --git a/app/models/user_info_request_sent_alert.rb b/app/models/user_info_request_sent_alert.rb
index cd163d14b..e6a6405ef 100644
--- a/app/models/user_info_request_sent_alert.rb
+++ b/app/models/user_info_request_sent_alert.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: user_info_request_sent_alerts
diff --git a/app/models/widget_vote.rb b/app/models/widget_vote.rb
index 021c38b30..dda77007f 100644
--- a/app/models/widget_vote.rb
+++ b/app/models/widget_vote.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: widget_votes
diff --git a/config/application.rb b/config/application.rb
index 46c4eb93b..08f852089 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path('../boot', __FILE__)
require 'rails/all'
diff --git a/config/boot.rb b/config/boot.rb
index a810be358..25da6546e 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'rubygems'
# Set up gems listed in the Gemfile.
diff --git a/config/deploy.rb b/config/deploy.rb
index d02488bfa..6998b3ed7 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'bundler/capistrano'
set :stage, 'staging' unless exists? :stage
diff --git a/config/environment.rb b/config/environment.rb
index 196680b23..ca436cc29 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Load the rails application
require File.expand_path('../application', __FILE__)
diff --git a/config/environments/development.rb b/config/environments/development.rb
index b334a1e19..39bd98da1 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
diff --git a/config/environments/production.rb b/config/environments/production.rb
index af2ca15b9..bc5b724d0 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
diff --git a/config/environments/staging.rb b/config/environments/staging.rb
index 0bb0db71a..0d791e03e 100644
--- a/config/environments/staging.rb
+++ b/config/environments/staging.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 97c2d4f7c..483a4874f 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
diff --git a/config/initializers/acts_as_xapian.rb b/config/initializers/acts_as_xapian.rb
index f82193c85..56eb75ed3 100644
--- a/config/initializers/acts_as_xapian.rb
+++ b/config/initializers/acts_as_xapian.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# acts_as_xapian/init.rb:
#
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index 53a9456d2..4facd1fd2 100644
--- a/config/initializers/alaveteli.rb
+++ b/config/initializers/alaveteli.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# MySociety specific helper functions
$:.push(File.join(File.dirname(__FILE__), '../../commonlib/rblib'))
# ... if these fail to include, you need the commonlib submodule from git
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb
index 59385cdf3..b5e9a55a2 100644
--- a/config/initializers/backtrace_silencers.rb
+++ b/config/initializers/backtrace_silencers.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index b00524993..c7fcc480b 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
AlaveteliLocalization.set_default_text_domain('app', File.join(Rails.root, 'locale'))
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
diff --git a/config/initializers/gettext_i18n_rails.rb b/config/initializers/gettext_i18n_rails.rb
index ef306682b..3beb2e58b 100644
--- a/config/initializers/gettext_i18n_rails.rb
+++ b/config/initializers/gettext_i18n_rails.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# FIXME: Audit the translations for XSS opportunities. Ultimately it would be
# good to get rid of this and explicitly mark strings as html_safe
GettextI18nRails.translations_are_html_safe = true
diff --git a/config/initializers/has_tag_string.rb b/config/initializers/has_tag_string.rb
index 5fa33cc70..c9f66414f 100644
--- a/config/initializers/has_tag_string.rb
+++ b/config/initializers/has_tag_string.rb
@@ -1,2 +1,3 @@
+# -*- encoding : utf-8 -*-
require 'has_tag_string/has_tag_string'
diff --git a/config/initializers/health_checks.rb b/config/initializers/health_checks.rb
index 7fd1d3dda..f85b7b272 100644
--- a/config/initializers/health_checks.rb
+++ b/config/initializers/health_checks.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Rails.application.config.after_initialize do
user_last_created = HealthChecks::Checks::DaysAgoCheck.new(
:failure_message => _('The last user was created over a day ago'),
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index 9e8b0131f..e3c680d36 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
index 72aca7e44..9070e0caa 100644
--- a/config/initializers/mime_types.rb
+++ b/config/initializers/mime_types.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index d120b94ae..78b86f92c 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb
index 99730e6b2..af476c78c 100644
--- a/config/initializers/secure_headers.rb
+++ b/config/initializers/secure_headers.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
::SecureHeaders::Configuration.configure do |config|
# https://tools.ietf.org/html/rfc6797
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index ca283d4e0..c582ebc87 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,2 +1,3 @@
+# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, :key => '_wdtk_cookie_session'
diff --git a/config/initializers/strip_attributes.rb b/config/initializers/strip_attributes.rb
index 25f70b2f3..2bdc17f21 100644
--- a/config/initializers/strip_attributes.rb
+++ b/config/initializers/strip_attributes.rb
@@ -1,2 +1,3 @@
+# -*- encoding : utf-8 -*-
require 'strip_attributes/strip_attributes'
ActiveRecord::Base.extend(StripAttributes)
diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb
index 9c79e513c..cdc34fe31 100644
--- a/config/initializers/theme_loader.rb
+++ b/config/initializers/theme_loader.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# This is a global array of route extensions. Alaveteli modules may add to it.
# It is used by our config/routes.rb to decide which route extension files to load.
$alaveteli_route_extensions = []
diff --git a/config/preinitializer.rb b/config/preinitializer.rb
index 3ad02415d..71112a28e 100644
--- a/config/preinitializer.rb
+++ b/config/preinitializer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
begin
require "rubygems"
require "bundler"
diff --git a/config/routes.rb b/config/routes.rb
index 7319f92fc..ba378119e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# -*- encoding : utf-8 -*-
# config/routes.rb:
# Mapping URLs to controllers for FOIFA.
#
diff --git a/db/migrate/001_create_users.rb b/db/migrate/001_create_users.rb
index ba528c038..4181a37d4 100644
--- a/db/migrate/001_create_users.rb
+++ b/db/migrate/001_create_users.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
diff --git a/db/migrate/002_add_sessions.rb b/db/migrate/002_add_sessions.rb
index 22b4a0065..571321683 100644
--- a/db/migrate/002_add_sessions.rb
+++ b/db/migrate/002_add_sessions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
diff --git a/db/migrate/004_create_info_requests.rb b/db/migrate/004_create_info_requests.rb
index 29a3a9f22..7de918c3f 100644
--- a/db/migrate/004_create_info_requests.rb
+++ b/db/migrate/004_create_info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateInfoRequests < ActiveRecord::Migration
def self.up
create_table :info_requests do |t|
diff --git a/db/migrate/005_create_public_bodies.rb b/db/migrate/005_create_public_bodies.rb
index d37def301..9d51e4942 100644
--- a/db/migrate/005_create_public_bodies.rb
+++ b/db/migrate/005_create_public_bodies.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreatePublicBodies < ActiveRecord::Migration
def self.up
create_table :public_bodies do |t|
diff --git a/db/migrate/006_version_public_body.rb b/db/migrate/006_version_public_body.rb
index 0e4527133..3656f738f 100644
--- a/db/migrate/006_version_public_body.rb
+++ b/db/migrate/006_version_public_body.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class VersionPublicBody < ActiveRecord::Migration
def self.up
PublicBody.create_versioned_table
diff --git a/db/migrate/007_add_public_body_editor_notes.rb b/db/migrate/007_add_public_body_editor_notes.rb
index 7500ee649..d07e02b2e 100644
--- a/db/migrate/007_add_public_body_editor_notes.rb
+++ b/db/migrate/007_add_public_body_editor_notes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddPublicBodyEditorNotes < ActiveRecord::Migration
def self.up
add_column :public_bodies, :last_edit_editor, :string
diff --git a/db/migrate/008_request_has_public_body.rb b/db/migrate/008_request_has_public_body.rb
index c7a2e9f34..95fa2731a 100644
--- a/db/migrate/008_request_has_public_body.rb
+++ b/db/migrate/008_request_has_public_body.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RequestHasPublicBody < ActiveRecord::Migration
def self.up
add_column :info_requests, :public_body_id, :integer
diff --git a/db/migrate/009_create_outgoing_messages.rb b/db/migrate/009_create_outgoing_messages.rb
index 62bf25392..a36d37cf2 100644
--- a/db/migrate/009_create_outgoing_messages.rb
+++ b/db/migrate/009_create_outgoing_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateOutgoingMessages < ActiveRecord::Migration
def self.up
create_table :outgoing_messages do |t|
diff --git a/db/migrate/010_remove_public_body_id_from_outgoing_messages.rb b/db/migrate/010_remove_public_body_id_from_outgoing_messages.rb
index da5ffc87e..5599d6131 100644
--- a/db/migrate/010_remove_public_body_id_from_outgoing_messages.rb
+++ b/db/migrate/010_remove_public_body_id_from_outgoing_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemovePublicBodyIdFromOutgoingMessages < ActiveRecord::Migration
def self.up
remove_column :outgoing_messages, :public_body_id
diff --git a/db/migrate/011_add_created_updated_fields.rb b/db/migrate/011_add_created_updated_fields.rb
index 47bb27b78..0152ec842 100644
--- a/db/migrate/011_add_created_updated_fields.rb
+++ b/db/migrate/011_add_created_updated_fields.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCreatedUpdatedFields < ActiveRecord::Migration
def self.up
# InfoRequest
diff --git a/db/migrate/012_add_sent_outgoing_message.rb b/db/migrate/012_add_sent_outgoing_message.rb
index 8b3059347..c7b42951c 100644
--- a/db/migrate/012_add_sent_outgoing_message.rb
+++ b/db/migrate/012_add_sent_outgoing_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddSentOutgoingMessage < ActiveRecord::Migration
def self.up
add_column :outgoing_messages, :sent_at, :datetime
diff --git a/db/migrate/013_create_incoming_messages.rb b/db/migrate/013_create_incoming_messages.rb
index c747fcb8c..bd7dc20cd 100644
--- a/db/migrate/013_create_incoming_messages.rb
+++ b/db/migrate/013_create_incoming_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateIncomingMessages < ActiveRecord::Migration
def self.up
create_table :incoming_messages do |t|
diff --git a/db/migrate/014_create_post_redirects.rb b/db/migrate/014_create_post_redirects.rb
index 26c561dac..1f5c8f146 100644
--- a/db/migrate/014_create_post_redirects.rb
+++ b/db/migrate/014_create_post_redirects.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreatePostRedirects < ActiveRecord::Migration
def self.up
create_table :post_redirects do |t|
diff --git a/db/migrate/015_add_email_token_to_post_redirects.rb b/db/migrate/015_add_email_token_to_post_redirects.rb
index 47d070533..991df8cfd 100644
--- a/db/migrate/015_add_email_token_to_post_redirects.rb
+++ b/db/migrate/015_add_email_token_to_post_redirects.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddEmailTokenToPostRedirects < ActiveRecord::Migration
def self.up
add_column :post_redirects, :email_token, :text
diff --git a/db/migrate/016_add_reasons_to_post_redirects.rb b/db/migrate/016_add_reasons_to_post_redirects.rb
index 622e1173b..e0d4af5e3 100644
--- a/db/migrate/016_add_reasons_to_post_redirects.rb
+++ b/db/migrate/016_add_reasons_to_post_redirects.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddReasonsToPostRedirects < ActiveRecord::Migration
def self.up
add_column :post_redirects, :reason_params_yaml, :text
diff --git a/db/migrate/017_add_email_confirmed_to_users.rb b/db/migrate/017_add_email_confirmed_to_users.rb
index b552e853e..56b3dacb4 100644
--- a/db/migrate/017_add_email_confirmed_to_users.rb
+++ b/db/migrate/017_add_email_confirmed_to_users.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddEmailConfirmedToUsers < ActiveRecord::Migration
def self.up
add_column :users, :email_confirmed, :boolean, :default => false
diff --git a/db/migrate/018_add_response_type_to_incoming_message.rb b/db/migrate/018_add_response_type_to_incoming_message.rb
index c841b599a..8ef2c7dd4 100644
--- a/db/migrate/018_add_response_type_to_incoming_message.rb
+++ b/db/migrate/018_add_response_type_to_incoming_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddResponseTypeToIncomingMessage < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :user_classified, :boolean, :default => false
diff --git a/db/migrate/021_remove_contains_information_default.rb b/db/migrate/021_remove_contains_information_default.rb
index 9969cbc2c..a50e06299 100644
--- a/db/migrate/021_remove_contains_information_default.rb
+++ b/db/migrate/021_remove_contains_information_default.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveContainsInformationDefault < ActiveRecord::Migration
def self.up
change_column :incoming_messages, :contains_information, :boolean, :default => nil
diff --git a/db/migrate/022_create_info_request_events.rb b/db/migrate/022_create_info_request_events.rb
index 858444298..3efc69ccf 100644
--- a/db/migrate/022_create_info_request_events.rb
+++ b/db/migrate/022_create_info_request_events.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateInfoRequestEvents < ActiveRecord::Migration
def self.up
create_table :info_request_events do |t|
diff --git a/db/migrate/023_outgoing_message_last_sent_at.rb b/db/migrate/023_outgoing_message_last_sent_at.rb
index 24cb55257..2a2fd4eac 100644
--- a/db/migrate/023_outgoing_message_last_sent_at.rb
+++ b/db/migrate/023_outgoing_message_last_sent_at.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class OutgoingMessageLastSentAt < ActiveRecord::Migration
def self.up
rename_column(:outgoing_messages, :sent_at, :last_sent_at)
diff --git a/db/migrate/024_add_is_bounce_to_incoming_messages.rb b/db/migrate/024_add_is_bounce_to_incoming_messages.rb
index f81ff4401..54ac6d334 100644
--- a/db/migrate/024_add_is_bounce_to_incoming_messages.rb
+++ b/db/migrate/024_add_is_bounce_to_incoming_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIsBounceToIncomingMessages < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :is_bounce, :boolean, :default => false
diff --git a/db/migrate/025_add_followup_to_outgoing_message.rb b/db/migrate/025_add_followup_to_outgoing_message.rb
index d3bd7444c..2e50ced27 100644
--- a/db/migrate/025_add_followup_to_outgoing_message.rb
+++ b/db/migrate/025_add_followup_to_outgoing_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddFollowupToOutgoingMessage < ActiveRecord::Migration
def self.up
add_column :outgoing_messages, :incoming_message_followup_id, :integer
diff --git a/db/migrate/026_add_many_null_constraints.rb b/db/migrate/026_add_many_null_constraints.rb
index 7abd2e8f2..8ff01fe1f 100644
--- a/db/migrate/026_add_many_null_constraints.rb
+++ b/db/migrate/026_add_many_null_constraints.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddManyNullConstraints < ActiveRecord::Migration
def self.up
change_column :users, :email, :string, :null => false
diff --git a/db/migrate/027_change_classification_system.rb b/db/migrate/027_change_classification_system.rb
index d9e6ad844..d1f68500a 100644
--- a/db/migrate/027_change_classification_system.rb
+++ b/db/migrate/027_change_classification_system.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ChangeClassificationSystem < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :contains_information
diff --git a/db/migrate/028_give_incoming_messages_events.rb b/db/migrate/028_give_incoming_messages_events.rb
index 46acd831e..f2f5e7706 100644
--- a/db/migrate/028_give_incoming_messages_events.rb
+++ b/db/migrate/028_give_incoming_messages_events.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# TODO: If this one fails with errors about described_state on save, then you need
# to temporarily modify the model for InfoRequestEvents to remove this part:
# validates_inclusion_of :described_state, :in => [
diff --git a/db/migrate/029_add_describe_status_history.rb b/db/migrate/029_add_describe_status_history.rb
index 0c6095d69..8b448284c 100644
--- a/db/migrate/029_add_describe_status_history.rb
+++ b/db/migrate/029_add_describe_status_history.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddDescribeStatusHistory < ActiveRecord::Migration
def self.up
add_column :info_request_events, :described_state, :string
diff --git a/db/migrate/030_add_some_indices.rb b/db/migrate/030_add_some_indices.rb
index 066fc29cb..0c58617e9 100644
--- a/db/migrate/030_add_some_indices.rb
+++ b/db/migrate/030_add_some_indices.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddSomeIndices < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
diff --git a/db/migrate/031_add_indices_for_session_deletion.rb b/db/migrate/031_add_indices_for_session_deletion.rb
index 9a6f6b326..2a263fece 100644
--- a/db/migrate/031_add_indices_for_session_deletion.rb
+++ b/db/migrate/031_add_indices_for_session_deletion.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIndicesForSessionDeletion < ActiveRecord::Migration
def self.up
add_index :post_redirects, :updated_at
diff --git a/db/migrate/032_addforeignkeys.rb b/db/migrate/032_addforeignkeys.rb
index f8d8f8b0d..5cff3b9d0 100644
--- a/db/migrate/032_addforeignkeys.rb
+++ b/db/migrate/032_addforeignkeys.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class Addforeignkeys < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
diff --git a/db/migrate/033_add_prominence.rb b/db/migrate/033_add_prominence.rb
index 15d548f37..e192044b2 100644
--- a/db/migrate/033_add_prominence.rb
+++ b/db/migrate/033_add_prominence.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddProminence < ActiveRecord::Migration
def self.up
add_column :info_requests, :prominence, :string, :null => false, :default => 'normal'
diff --git a/db/migrate/034_run_solr_indexing.rb b/db/migrate/034_run_solr_indexing.rb
index 3cdfdbde9..c48fd4702 100644
--- a/db/migrate/034_run_solr_indexing.rb
+++ b/db/migrate/034_run_solr_indexing.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RunSolrIndexing < ActiveRecord::Migration
def self.up
# Not using SOLR yet after all
diff --git a/db/migrate/035_track_overdue_alerts.rb b/db/migrate/035_track_overdue_alerts.rb
index 7ef164271..48dc23e7d 100644
--- a/db/migrate/035_track_overdue_alerts.rb
+++ b/db/migrate/035_track_overdue_alerts.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class TrackOverdueAlerts < ActiveRecord::Migration
def self.up
create_table :user_info_request_sent_alerts do |t|
diff --git a/db/migrate/036_add_public_body_tags.rb b/db/migrate/036_add_public_body_tags.rb
index f7fefdf48..523b7a05b 100644
--- a/db/migrate/036_add_public_body_tags.rb
+++ b/db/migrate/036_add_public_body_tags.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddPublicBodyTags < ActiveRecord::Migration
def self.up
create_table :public_body_tags do |t|
diff --git a/db/migrate/037_add_url_name.rb b/db/migrate/037_add_url_name.rb
index 84aad9cc8..b1141e176 100644
--- a/db/migrate/037_add_url_name.rb
+++ b/db/migrate/037_add_url_name.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddUrlName < ActiveRecord::Migration
def self.up
add_column :public_bodies, :url_name, :text
diff --git a/db/migrate/038_add_more_url_names.rb b/db/migrate/038_add_more_url_names.rb
index 9798f4b4b..568610417 100644
--- a/db/migrate/038_add_more_url_names.rb
+++ b/db/migrate/038_add_more_url_names.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddMoreUrlNames < ActiveRecord::Migration
def self.up
add_column :users, :url_name, :text
diff --git a/db/migrate/039_request_url_names.rb b/db/migrate/039_request_url_names.rb
index 5227b887a..999e7c290 100644
--- a/db/migrate/039_request_url_names.rb
+++ b/db/migrate/039_request_url_names.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RequestUrlNames < ActiveRecord::Migration
def self.up
add_column :info_requests, :url_title, :text
diff --git a/db/migrate/040_email_is_unique.rb b/db/migrate/040_email_is_unique.rb
index c61362de2..aba1ef28d 100644
--- a/db/migrate/040_email_is_unique.rb
+++ b/db/migrate/040_email_is_unique.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class EmailIsUnique < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
diff --git a/db/migrate/041_index_requests_with_solr.rb b/db/migrate/041_index_requests_with_solr.rb
index f18b947a6..8b95e6604 100644
--- a/db/migrate/041_index_requests_with_solr.rb
+++ b/db/migrate/041_index_requests_with_solr.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
diff --git a/db/migrate/042_unique_user_urls.rb b/db/migrate/042_unique_user_urls.rb
index 45e4fd11d..39a7a4849 100644
--- a/db/migrate/042_unique_user_urls.rb
+++ b/db/migrate/042_unique_user_urls.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class UniqueUserUrls < ActiveRecord::Migration
def self.up
# do last registered ones first, so the last ones get rubbish URLs
diff --git a/db/migrate/043_remove_complaint_email.rb b/db/migrate/043_remove_complaint_email.rb
index cc03f6507..7c57ce2fc 100644
--- a/db/migrate/043_remove_complaint_email.rb
+++ b/db/migrate/043_remove_complaint_email.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveComplaintEmail < ActiveRecord::Migration
def self.up
remove_column :public_body_versions, :complaint_email
diff --git a/db/migrate/044_remove_is_bounce.rb b/db/migrate/044_remove_is_bounce.rb
index 8e2307060..6656a237c 100644
--- a/db/migrate/044_remove_is_bounce.rb
+++ b/db/migrate/044_remove_is_bounce.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveIsBounce < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :is_bounce
diff --git a/db/migrate/045_add_circumstance_to_post_redirect.rb b/db/migrate/045_add_circumstance_to_post_redirect.rb
index e6e7ca513..bddd5b24a 100644
--- a/db/migrate/045_add_circumstance_to_post_redirect.rb
+++ b/db/migrate/045_add_circumstance_to_post_redirect.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCircumstanceToPostRedirect < ActiveRecord::Migration
def self.up
add_column :post_redirects, :circumstance, :text, :default => "normal"
diff --git a/db/migrate/046_add_last_event_id_to_alert_table.rb b/db/migrate/046_add_last_event_id_to_alert_table.rb
index 361bd0af4..aab547a63 100644
--- a/db/migrate/046_add_last_event_id_to_alert_table.rb
+++ b/db/migrate/046_add_last_event_id_to_alert_table.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddLastEventIdToAlertTable < ActiveRecord::Migration
def self.up
add_column :user_info_request_sent_alerts, :info_request_event_id, :integer, :default => nil
diff --git a/db/migrate/047_add_calculated_state.rb b/db/migrate/047_add_calculated_state.rb
index 5e5b93512..ad77b366d 100644
--- a/db/migrate/047_add_calculated_state.rb
+++ b/db/migrate/047_add_calculated_state.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCalculatedState < ActiveRecord::Migration
def self.up
add_column :info_request_events, :calculated_state, :string, :default => nil
diff --git a/db/migrate/048_add_calculated_state_at.rb b/db/migrate/048_add_calculated_state_at.rb
index 63f7e996d..8a4ffa4ef 100644
--- a/db/migrate/048_add_calculated_state_at.rb
+++ b/db/migrate/048_add_calculated_state_at.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCalculatedStateAt < ActiveRecord::Migration
def self.up
# This is for use in RSS feeds
diff --git a/db/migrate/049_track_things.rb b/db/migrate/049_track_things.rb
index aad50a69e..8d94602b9 100644
--- a/db/migrate/049_track_things.rb
+++ b/db/migrate/049_track_things.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class TrackThings < ActiveRecord::Migration
def self.up
create_table :track_things do |t|
diff --git a/db/migrate/050_improve_track_things.rb b/db/migrate/050_improve_track_things.rb
index 430dd5946..5d621ad36 100644
--- a/db/migrate/050_improve_track_things.rb
+++ b/db/migrate/050_improve_track_things.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ImproveTrackThings < ActiveRecord::Migration
def self.up
# SQLite at least needs a default for this
diff --git a/db/migrate/051_add_track_things_unique_indices.rb b/db/migrate/051_add_track_things_unique_indices.rb
index 27d901734..3ff90d79e 100644
--- a/db/migrate/051_add_track_things_unique_indices.rb
+++ b/db/migrate/051_add_track_things_unique_indices.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddTrackThingsUniqueIndices < ActiveRecord::Migration
def self.up
add_index :track_things, [:tracking_user_id, :track_query], :unique => true
diff --git a/db/migrate/052_include_event_foreign_references.rb b/db/migrate/052_include_event_foreign_references.rb
index 5dfcce4a7..c48a65a6f 100644
--- a/db/migrate/052_include_event_foreign_references.rb
+++ b/db/migrate/052_include_event_foreign_references.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class IncludeEventForeignReferences < ActiveRecord::Migration
def self.up
add_column :info_request_events, :incoming_message_id, :integer
diff --git a/db/migrate/053_acts_as_xapian_migration.rb b/db/migrate/053_acts_as_xapian_migration.rb
index cc2680533..291e0bb4e 100644
--- a/db/migrate/053_acts_as_xapian_migration.rb
+++ b/db/migrate/053_acts_as_xapian_migration.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ActsAsXapianMigration < ActiveRecord::Migration
def self.up
create_table :acts_as_xapian_jobs do |t|
diff --git a/db/migrate/054_allow_longer_comments.rb b/db/migrate/054_allow_longer_comments.rb
index 35f2bee9c..fb19a1045 100644
--- a/db/migrate/054_allow_longer_comments.rb
+++ b/db/migrate/054_allow_longer_comments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AllowLongerComments < ActiveRecord::Migration
def self.up
change_column :public_body_versions, :last_edit_comment, :text
diff --git a/db/migrate/055_stop_new_responses.rb b/db/migrate/055_stop_new_responses.rb
index 1ebe2142a..dce034b95 100644
--- a/db/migrate/055_stop_new_responses.rb
+++ b/db/migrate/055_stop_new_responses.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class StopNewResponses < ActiveRecord::Migration
def self.up
add_column :info_requests, :stop_new_responses, :boolean, :default => false, :null => false
diff --git a/db/migrate/056_add_attachment_text.rb b/db/migrate/056_add_attachment_text.rb
index adcb97d5f..f9c0801cf 100644
--- a/db/migrate/056_add_attachment_text.rb
+++ b/db/migrate/056_add_attachment_text.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddAttachmentText < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :cached_attachment_text, :text
diff --git a/db/migrate/057_add_law_used.rb b/db/migrate/057_add_law_used.rb
index ec4efd0bc..1ed73bee0 100644
--- a/db/migrate/057_add_law_used.rb
+++ b/db/migrate/057_add_law_used.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddLawUsed < ActiveRecord::Migration
def self.up
add_column :info_requests, :law_used, :string, :null => false, :default => 'foi'
diff --git a/db/migrate/058_remove_sessions.rb b/db/migrate/058_remove_sessions.rb
index 316fcfdda..d94865eb7 100644
--- a/db/migrate/058_remove_sessions.rb
+++ b/db/migrate/058_remove_sessions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveSessions < ActiveRecord::Migration
def self.up
drop_table :sessions
diff --git a/db/migrate/059_add_url_notes.rb b/db/migrate/059_add_url_notes.rb
index ae6a998aa..c0e708e12 100644
--- a/db/migrate/059_add_url_notes.rb
+++ b/db/migrate/059_add_url_notes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddUrlNotes < ActiveRecord::Migration
def self.up
add_column :public_bodies, :home_page, :text, :null => false, :default => ""
diff --git a/db/migrate/060_add_cached_main_text.rb b/db/migrate/060_add_cached_main_text.rb
index c372b471c..2317de1ad 100644
--- a/db/migrate/060_add_cached_main_text.rb
+++ b/db/migrate/060_add_cached_main_text.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCachedMainText < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :cached_main_body_text, :text
diff --git a/db/migrate/061_include_responses_in_tracks.rb b/db/migrate/061_include_responses_in_tracks.rb
index c7a3b26cf..8ebee5a1f 100644
--- a/db/migrate/061_include_responses_in_tracks.rb
+++ b/db/migrate/061_include_responses_in_tracks.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class IncludeResponsesInTracks < ActiveRecord::Migration
def self.up
TrackThing.update_all "track_query = replace(track_query, 'variety:sent ', '') where track_type in ('public_body_updates', 'user_updates')"
diff --git a/db/migrate/062_add_comments.rb b/db/migrate/062_add_comments.rb
index d523dd808..da42786d8 100644
--- a/db/migrate/062_add_comments.rb
+++ b/db/migrate/062_add_comments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddComments < ActiveRecord::Migration
def self.up
create_table :comments do |t|
diff --git a/db/migrate/063_add_admin_users.rb b/db/migrate/063_add_admin_users.rb
index 9daa64a35..ca6acc679 100644
--- a/db/migrate/063_add_admin_users.rb
+++ b/db/migrate/063_add_admin_users.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddAdminUsers < ActiveRecord::Migration
def self.up
add_column :users, :admin_level, :string, :null => false, :default => 'none'
diff --git a/db/migrate/064_indices_for_annotations.rb b/db/migrate/064_indices_for_annotations.rb
index 5b89271fe..88e267c64 100644
--- a/db/migrate/064_indices_for_annotations.rb
+++ b/db/migrate/064_indices_for_annotations.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class IndicesForAnnotations < ActiveRecord::Migration
def self.up
add_index :info_request_events, :created_at
diff --git a/db/migrate/065_add_comments_to_user_track.rb b/db/migrate/065_add_comments_to_user_track.rb
index 50d1f9d5d..9b2ef8747 100644
--- a/db/migrate/065_add_comments_to_user_track.rb
+++ b/db/migrate/065_add_comments_to_user_track.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCommentsToUserTrack < ActiveRecord::Migration
def self.up
TrackThing.update_all "track_query = replace(track_query, 'variety:sent ', '') where track_type in ('public_body_updates', 'user_updates')"
diff --git a/db/migrate/066_add_first_letter.rb b/db/migrate/066_add_first_letter.rb
index 7878098e0..e29dfef37 100644
--- a/db/migrate/066_add_first_letter.rb
+++ b/db/migrate/066_add_first_letter.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddFirstLetter < ActiveRecord::Migration
def self.up
add_column :public_bodies, :first_letter, :string
diff --git a/db/migrate/067_factor_out_raw_email.rb b/db/migrate/067_factor_out_raw_email.rb
index be4153938..869430e05 100644
--- a/db/migrate/067_factor_out_raw_email.rb
+++ b/db/migrate/067_factor_out_raw_email.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class FactorOutRawEmail < ActiveRecord::Migration
def self.up
create_table :raw_emails do |t|
diff --git a/db/migrate/068_add_censor_table.rb b/db/migrate/068_add_censor_table.rb
index 92a17d2bc..8bfc4fbd6 100644
--- a/db/migrate/068_add_censor_table.rb
+++ b/db/migrate/068_add_censor_table.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCensorTable < ActiveRecord::Migration
def self.up
create_table :censor_rules do |t|
diff --git a/db/migrate/069_add_what_doing.rb b/db/migrate/069_add_what_doing.rb
index be8039fec..2ede40603 100644
--- a/db/migrate/069_add_what_doing.rb
+++ b/db/migrate/069_add_what_doing.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddWhatDoing < ActiveRecord::Migration
def self.up
add_column :outgoing_messages, :what_doing, :string
diff --git a/db/migrate/070_sent_are_waiting_response.rb b/db/migrate/070_sent_are_waiting_response.rb
index af66705b5..a2c2278ee 100644
--- a/db/migrate/070_sent_are_waiting_response.rb
+++ b/db/migrate/070_sent_are_waiting_response.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class SentAreWaitingResponse < ActiveRecord::Migration
def self.up
InfoRequestEvent.update_all "described_state = 'waiting_response', calculated_state = 'waiting_response', last_described_at = created_at where event_type = 'sent'"
diff --git a/db/migrate/071_add_exim_log.rb b/db/migrate/071_add_exim_log.rb
index d3780affa..94924569c 100644
--- a/db/migrate/071_add_exim_log.rb
+++ b/db/migrate/071_add_exim_log.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddEximLog < ActiveRecord::Migration
def self.up
create_table :exim_logs do |t|
diff --git a/db/migrate/072_add_publication_scheme.rb b/db/migrate/072_add_publication_scheme.rb
index 5040d1709..16507411d 100644
--- a/db/migrate/072_add_publication_scheme.rb
+++ b/db/migrate/072_add_publication_scheme.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddPublicationScheme < ActiveRecord::Migration
def self.up
add_column :public_bodies, :publication_scheme, :text, :null => false, :default => ""
diff --git a/db/migrate/073_add_ban_user.rb b/db/migrate/073_add_ban_user.rb
index 15a1ea121..045c65fcd 100644
--- a/db/migrate/073_add_ban_user.rb
+++ b/db/migrate/073_add_ban_user.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddBanUser < ActiveRecord::Migration
def self.up
add_column :users, :ban_text, :text, :null => false, :default => ""
diff --git a/db/migrate/074_create_holidays.rb b/db/migrate/074_create_holidays.rb
index f2197e89e..406b9c44e 100644
--- a/db/migrate/074_create_holidays.rb
+++ b/db/migrate/074_create_holidays.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateHolidays < ActiveRecord::Migration
def self.up
create_table :holidays do |t|
diff --git a/db/migrate/075_add_charity_number.rb b/db/migrate/075_add_charity_number.rb
index 41743a922..af0208b44 100644
--- a/db/migrate/075_add_charity_number.rb
+++ b/db/migrate/075_add_charity_number.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCharityNumber < ActiveRecord::Migration
def self.up
add_column :public_bodies, :charity_number, :text, :null => false, :default => ""
diff --git a/db/migrate/076_add_indices.rb b/db/migrate/076_add_indices.rb
index fd102caba..50fc1e3ea 100644
--- a/db/migrate/076_add_indices.rb
+++ b/db/migrate/076_add_indices.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIndices < ActiveRecord::Migration
def self.up
add_index :track_things_sent_emails, :track_thing_id
diff --git a/db/migrate/077_add_exim_log_index.rb b/db/migrate/077_add_exim_log_index.rb
index c2d04d7ca..c7526c252 100644
--- a/db/migrate/077_add_exim_log_index.rb
+++ b/db/migrate/077_add_exim_log_index.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddEximLogIndex < ActiveRecord::Migration
def self.up
add_index :exim_logs, :exim_log_done_id
diff --git a/db/migrate/078_expand_stop_new_responses.rb b/db/migrate/078_expand_stop_new_responses.rb
index ae0d4db91..24b384ea1 100644
--- a/db/migrate/078_expand_stop_new_responses.rb
+++ b/db/migrate/078_expand_stop_new_responses.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ExpandStopNewResponses < ActiveRecord::Migration
def self.up
add_column :info_requests, :allow_new_responses_from, :string
diff --git a/db/migrate/079_add_profile_photo.rb b/db/migrate/079_add_profile_photo.rb
index a6c031d89..9777b1948 100644
--- a/db/migrate/079_add_profile_photo.rb
+++ b/db/migrate/079_add_profile_photo.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddProfilePhoto < ActiveRecord::Migration
def self.up
create_table :profile_photos do |t|
diff --git a/db/migrate/080_cache_only_clipped_attachment_text.rb b/db/migrate/080_cache_only_clipped_attachment_text.rb
index 0cd835e49..71b801e53 100644
--- a/db/migrate/080_cache_only_clipped_attachment_text.rb
+++ b/db/migrate/080_cache_only_clipped_attachment_text.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CacheOnlyClippedAttachmentText < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :cached_attachment_text
diff --git a/db/migrate/081_add_event_prominence.rb b/db/migrate/081_add_event_prominence.rb
index 184e1a267..2b0d3a8ea 100644
--- a/db/migrate/081_add_event_prominence.rb
+++ b/db/migrate/081_add_event_prominence.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddEventProminence < ActiveRecord::Migration
def self.up
add_column :info_request_events, :prominence, :string, :null => false, :default => 'normal'
diff --git a/db/migrate/082_change_raw_email_to_binary.rb b/db/migrate/082_change_raw_email_to_binary.rb
index ec16d54a0..5123f2825 100644
--- a/db/migrate/082_change_raw_email_to_binary.rb
+++ b/db/migrate/082_change_raw_email_to_binary.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ChangeRawEmailToBinary < ActiveRecord::Migration
def self.up
change_column :raw_emails, :data, :text, :null => true # allow null
diff --git a/db/migrate/083_add_indices_track_sent.rb b/db/migrate/083_add_indices_track_sent.rb
index 2b0908af8..f292b02ab 100644
--- a/db/migrate/083_add_indices_track_sent.rb
+++ b/db/migrate/083_add_indices_track_sent.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIndicesTrackSent < ActiveRecord::Migration
def self.up
add_index :track_things_sent_emails, :created_at
diff --git a/db/migrate/084_alter_profile_photo.rb b/db/migrate/084_alter_profile_photo.rb
index d2717b047..14c84ac99 100644
--- a/db/migrate/084_alter_profile_photo.rb
+++ b/db/migrate/084_alter_profile_photo.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AlterProfilePhoto < ActiveRecord::Migration
def self.up
remove_column :users, :profile_photo_id
diff --git a/db/migrate/085_draft_profile_photo.rb b/db/migrate/085_draft_profile_photo.rb
index c0b507485..98c08a35e 100644
--- a/db/migrate/085_draft_profile_photo.rb
+++ b/db/migrate/085_draft_profile_photo.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class DraftProfilePhoto < ActiveRecord::Migration
def self.up
add_column :profile_photos, :draft, :boolean, :default => false, :null => false
diff --git a/db/migrate/086_allow_null_profile_photo_user.rb b/db/migrate/086_allow_null_profile_photo_user.rb
index f4e107848..a070df560 100644
--- a/db/migrate/086_allow_null_profile_photo_user.rb
+++ b/db/migrate/086_allow_null_profile_photo_user.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AllowNullProfilePhotoUser < ActiveRecord::Migration
def self.up
change_column :profile_photos, :user_id, :integer, :null => true
diff --git a/db/migrate/087_add_about_me.rb b/db/migrate/087_add_about_me.rb
index 9916454f3..907cd472b 100644
--- a/db/migrate/087_add_about_me.rb
+++ b/db/migrate/087_add_about_me.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddAboutMe < ActiveRecord::Migration
def self.up
add_column :users, :about_me, :text, :null => false, :default => ""
diff --git a/db/migrate/088_public_body_machine_tags.rb b/db/migrate/088_public_body_machine_tags.rb
index 6a0815568..33f035a8e 100644
--- a/db/migrate/088_public_body_machine_tags.rb
+++ b/db/migrate/088_public_body_machine_tags.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class PublicBodyMachineTags < ActiveRecord::Migration
def self.up
add_column :public_body_tags, :value, :text
diff --git a/db/migrate/089_remove_charity_number.rb b/db/migrate/089_remove_charity_number.rb
index 9b7d0935b..0d67bef04 100644
--- a/db/migrate/089_remove_charity_number.rb
+++ b/db/migrate/089_remove_charity_number.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveCharityNumber < ActiveRecord::Migration
def self.up
remove_column :public_bodies, :charity_number
diff --git a/db/migrate/090_remove_tag_uniqueness.rb b/db/migrate/090_remove_tag_uniqueness.rb
index d1affade3..37b9a39b4 100644
--- a/db/migrate/090_remove_tag_uniqueness.rb
+++ b/db/migrate/090_remove_tag_uniqueness.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveTagUniqueness < ActiveRecord::Migration
def self.up
# MySQL cannot index text blobs like this
diff --git a/db/migrate/091_add_censor_rules_indices.rb b/db/migrate/091_add_censor_rules_indices.rb
index 59f5db6cc..88869be1c 100644
--- a/db/migrate/091_add_censor_rules_indices.rb
+++ b/db/migrate/091_add_censor_rules_indices.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCensorRulesIndices < ActiveRecord::Migration
def self.up
add_index :censor_rules, :info_request_id
diff --git a/db/migrate/092_cache_only_marked_body_text.rb b/db/migrate/092_cache_only_marked_body_text.rb
index e05e23e74..5ce26f1c1 100644
--- a/db/migrate/092_cache_only_marked_body_text.rb
+++ b/db/migrate/092_cache_only_marked_body_text.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CacheOnlyMarkedBodyText < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :cached_main_body_text
diff --git a/db/migrate/093_move_to_has_tag_string.rb b/db/migrate/093_move_to_has_tag_string.rb
index 58f36c224..f819045a9 100644
--- a/db/migrate/093_move_to_has_tag_string.rb
+++ b/db/migrate/093_move_to_has_tag_string.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class MoveToHasTagString < ActiveRecord::Migration
def self.up
rename_table :public_body_tags, :has_tag_string_tags
diff --git a/db/migrate/094_remove_old_tags_foreign_key.rb b/db/migrate/094_remove_old_tags_foreign_key.rb
index 5a6a00acc..1e9abaff6 100644
--- a/db/migrate/094_remove_old_tags_foreign_key.rb
+++ b/db/migrate/094_remove_old_tags_foreign_key.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveOldTagsForeignKey < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
diff --git a/db/migrate/095_add_post_redirect_user_index.rb b/db/migrate/095_add_post_redirect_user_index.rb
index 05d5f7a35..d6e9162d1 100644
--- a/db/migrate/095_add_post_redirect_user_index.rb
+++ b/db/migrate/095_add_post_redirect_user_index.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddPostRedirectUserIndex < ActiveRecord::Migration
# This index is for admin interface
diff --git a/db/migrate/096_create_translation_tables.rb b/db/migrate/096_create_translation_tables.rb
index 4b47c11f7..fe076cbfd 100644
--- a/db/migrate/096_create_translation_tables.rb
+++ b/db/migrate/096_create_translation_tables.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateTranslationTables < ActiveRecord::Migration
def self.up
fields = {:name => :text,
diff --git a/db/migrate/097_add_comment_locale.rb b/db/migrate/097_add_comment_locale.rb
index 92ac7c4a5..8a47351a6 100644
--- a/db/migrate/097_add_comment_locale.rb
+++ b/db/migrate/097_add_comment_locale.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCommentLocale < ActiveRecord::Migration
def self.up
add_column :comments, :locale, :text, :null => false, :default => ""
diff --git a/db/migrate/098_fix_public_body_translations.rb b/db/migrate/098_fix_public_body_translations.rb
index 25f36336f..53d62ab7e 100644
--- a/db/migrate/098_fix_public_body_translations.rb
+++ b/db/migrate/098_fix_public_body_translations.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# The PublicBody model class had a bug that meant the
# translations for first_letter and publication_scheme
# were not being correctly populated.
diff --git a/db/migrate/099_move_raw_email_to_filesystem.rb b/db/migrate/099_move_raw_email_to_filesystem.rb
index ea77580e1..bd9e8efb4 100644
--- a/db/migrate/099_move_raw_email_to_filesystem.rb
+++ b/db/migrate/099_move_raw_email_to_filesystem.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class MoveRawEmailToFilesystem < ActiveRecord::Migration
def self.up
batch_size = 10
diff --git a/db/migrate/100_remove_redundant_raw_email_columns.rb b/db/migrate/100_remove_redundant_raw_email_columns.rb
index edf6006d7..d974e78df 100644
--- a/db/migrate/100_remove_redundant_raw_email_columns.rb
+++ b/db/migrate/100_remove_redundant_raw_email_columns.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveRedundantRawEmailColumns < ActiveRecord::Migration
def self.up
remove_column :raw_emails, :data_text
diff --git a/db/migrate/101_add_hash_to_info_request.rb b/db/migrate/101_add_hash_to_info_request.rb
index e38384cd6..564067438 100644
--- a/db/migrate/101_add_hash_to_info_request.rb
+++ b/db/migrate/101_add_hash_to_info_request.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'digest/sha1'
class AddHashToInfoRequest < ActiveRecord::Migration
diff --git a/db/migrate/102_add_locale_to_users.rb b/db/migrate/102_add_locale_to_users.rb
index a299a8561..eff9f60da 100644
--- a/db/migrate/102_add_locale_to_users.rb
+++ b/db/migrate/102_add_locale_to_users.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddLocaleToUsers < ActiveRecord::Migration
def self.up
add_column :users, :locale, :string
diff --git a/db/migrate/103_add_user_bounce_columns.rb b/db/migrate/103_add_user_bounce_columns.rb
index a16ecde75..81daf3ed5 100644
--- a/db/migrate/103_add_user_bounce_columns.rb
+++ b/db/migrate/103_add_user_bounce_columns.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'digest/sha1'
class AddUserBounceColumns < ActiveRecord::Migration
diff --git a/db/migrate/104_create_foi_attachments.rb b/db/migrate/104_create_foi_attachments.rb
index c53cd4f64..bcef00985 100644
--- a/db/migrate/104_create_foi_attachments.rb
+++ b/db/migrate/104_create_foi_attachments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateFoiAttachments < ActiveRecord::Migration
def self.up
diff --git a/db/migrate/105_extend_incoming_message.rb b/db/migrate/105_extend_incoming_message.rb
index 9db8649a0..bb244e777 100644
--- a/db/migrate/105_extend_incoming_message.rb
+++ b/db/migrate/105_extend_incoming_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ExtendIncomingMessage < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :sent_at, :time
diff --git a/db/migrate/106_add_hex_digest_to_foi_attachment.rb b/db/migrate/106_add_hex_digest_to_foi_attachment.rb
index d9520a934..20a9d5fb2 100644
--- a/db/migrate/106_add_hex_digest_to_foi_attachment.rb
+++ b/db/migrate/106_add_hex_digest_to_foi_attachment.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddHexDigestToFoiAttachment < ActiveRecord::Migration
def self.up
add_column :foi_attachments, :hexdigest, :string, :limit => 32
diff --git a/db/migrate/107_add_date_parsed_field_to_incoming_message.rb b/db/migrate/107_add_date_parsed_field_to_incoming_message.rb
index fbc017134..e13f7b776 100644
--- a/db/migrate/107_add_date_parsed_field_to_incoming_message.rb
+++ b/db/migrate/107_add_date_parsed_field_to_incoming_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddDateParsedFieldToIncomingMessage < ActiveRecord::Migration
def self.up
add_column :incoming_messages, :last_parsed, :datetime
diff --git a/db/migrate/108_change_safe_mail_from_to_mail_from.rb b/db/migrate/108_change_safe_mail_from_to_mail_from.rb
index 57997f674..7bc5e47b6 100644
--- a/db/migrate/108_change_safe_mail_from_to_mail_from.rb
+++ b/db/migrate/108_change_safe_mail_from_to_mail_from.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ChangeSafeMailFromToMailFrom < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :safe_mail_from
diff --git a/db/migrate/109_change_sent_at_to_datetime.rb b/db/migrate/109_change_sent_at_to_datetime.rb
index 5fc9b29ae..4ce1831c0 100644
--- a/db/migrate/109_change_sent_at_to_datetime.rb
+++ b/db/migrate/109_change_sent_at_to_datetime.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class ChangeSentAtToDatetime < ActiveRecord::Migration
def self.up
remove_column :incoming_messages, :sent_at
diff --git a/db/migrate/110_add_user_no_limit.rb b/db/migrate/110_add_user_no_limit.rb
index d78a05f75..4d8274fbf 100644
--- a/db/migrate/110_add_user_no_limit.rb
+++ b/db/migrate/110_add_user_no_limit.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'digest/sha1'
class AddUserNoLimit < ActiveRecord::Migration
diff --git a/db/migrate/111_create_purge_requests.rb b/db/migrate/111_create_purge_requests.rb
index 0b4fd1d1d..c5ddaf4a2 100644
--- a/db/migrate/111_create_purge_requests.rb
+++ b/db/migrate/111_create_purge_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreatePurgeRequests < ActiveRecord::Migration
def self.up
create_table :purge_requests do |t|
diff --git a/db/migrate/112_add_api_key_to_public_bodies.rb b/db/migrate/112_add_api_key_to_public_bodies.rb
index 43dccb198..a7b3903f1 100644
--- a/db/migrate/112_add_api_key_to_public_bodies.rb
+++ b/db/migrate/112_add_api_key_to_public_bodies.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require "securerandom"
class AddApiKeyToPublicBodies < ActiveRecord::Migration
diff --git a/db/migrate/113_add_external_fields_to_info_requests.rb b/db/migrate/113_add_external_fields_to_info_requests.rb
index 1ad7634ff..c350f432b 100644
--- a/db/migrate/113_add_external_fields_to_info_requests.rb
+++ b/db/migrate/113_add_external_fields_to_info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddExternalFieldsToInfoRequests < ActiveRecord::Migration
def self.up
change_column_null :info_requests, :user_id, true
diff --git a/db/migrate/114_add_attention_requested_flag_to_info_requests.rb b/db/migrate/114_add_attention_requested_flag_to_info_requests.rb
index 48c98e5a9..61a3b5e5e 100644
--- a/db/migrate/114_add_attention_requested_flag_to_info_requests.rb
+++ b/db/migrate/114_add_attention_requested_flag_to_info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'digest/sha1'
class AddAttentionRequestedFlagToInfoRequests < ActiveRecord::Migration
diff --git a/db/migrate/115_add_receive_email_alerts_to_user.rb b/db/migrate/115_add_receive_email_alerts_to_user.rb
index 7e06dd275..0f3747294 100644
--- a/db/migrate/115_add_receive_email_alerts_to_user.rb
+++ b/db/migrate/115_add_receive_email_alerts_to_user.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddReceiveEmailAlertsToUser < ActiveRecord::Migration
def self.up
add_column :users, :receive_email_alerts, :boolean, :default => true, :null => false
diff --git a/db/migrate/116_add_censor_rule_regexp.rb b/db/migrate/116_add_censor_rule_regexp.rb
index d9c4664cd..235a3a0cc 100644
--- a/db/migrate/116_add_censor_rule_regexp.rb
+++ b/db/migrate/116_add_censor_rule_regexp.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCensorRuleRegexp < ActiveRecord::Migration
def self.up
add_column :censor_rules, :regexp, :boolean
diff --git a/db/migrate/117_create_sessions.rb b/db/migrate/117_create_sessions.rb
index 4ccc353b1..7d95f8935 100644
--- a/db/migrate/117_create_sessions.rb
+++ b/db/migrate/117_create_sessions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateSessions < ActiveRecord::Migration
def self.up
create_table :sessions do |t|
diff --git a/db/migrate/118_remove_sessions_again.rb b/db/migrate/118_remove_sessions_again.rb
index dc5a63df7..88e896c08 100644
--- a/db/migrate/118_remove_sessions_again.rb
+++ b/db/migrate/118_remove_sessions_again.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveSessionsAgain < ActiveRecord::Migration
def self.up
drop_table :sessions
diff --git a/db/migrate/20120822145640_correct_external_request_constraint.rb b/db/migrate/20120822145640_correct_external_request_constraint.rb
index 6902f3cb2..6d6b58f28 100644
--- a/db/migrate/20120822145640_correct_external_request_constraint.rb
+++ b/db/migrate/20120822145640_correct_external_request_constraint.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CorrectExternalRequestConstraint < ActiveRecord::Migration
def self.up
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
diff --git a/db/migrate/20120910153022_create_request_classifications.rb b/db/migrate/20120910153022_create_request_classifications.rb
index 7c6270c9e..253e45909 100644
--- a/db/migrate/20120910153022_create_request_classifications.rb
+++ b/db/migrate/20120910153022_create_request_classifications.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateRequestClassifications < ActiveRecord::Migration
def self.up
create_table :request_classifications do |t|
diff --git a/db/migrate/20120912111713_add_raw_email_index_to_incoming_messages.rb b/db/migrate/20120912111713_add_raw_email_index_to_incoming_messages.rb
index 14174935e..b69006e88 100644
--- a/db/migrate/20120912111713_add_raw_email_index_to_incoming_messages.rb
+++ b/db/migrate/20120912111713_add_raw_email_index_to_incoming_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddRawEmailIndexToIncomingMessages < ActiveRecord::Migration
def self.up
add_index :incoming_messages, :raw_email_id
diff --git a/db/migrate/20120912112036_add_info_request_id_index_to_exim_logs.rb b/db/migrate/20120912112036_add_info_request_id_index_to_exim_logs.rb
index 81e2a7946..e926b110e 100644
--- a/db/migrate/20120912112036_add_info_request_id_index_to_exim_logs.rb
+++ b/db/migrate/20120912112036_add_info_request_id_index_to_exim_logs.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddInfoRequestIdIndexToEximLogs < ActiveRecord::Migration
def self.up
add_index :exim_logs, :info_request_id
diff --git a/db/migrate/20120912112312_add_info_request_id_index_to_incoming_and_outgoing_messages.rb b/db/migrate/20120912112312_add_info_request_id_index_to_incoming_and_outgoing_messages.rb
index 814fa7540..d77196062 100644
--- a/db/migrate/20120912112312_add_info_request_id_index_to_incoming_and_outgoing_messages.rb
+++ b/db/migrate/20120912112312_add_info_request_id_index_to_incoming_and_outgoing_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddInfoRequestIdIndexToIncomingAndOutgoingMessages < ActiveRecord::Migration
def self.up
add_index :incoming_messages, :info_request_id
diff --git a/db/migrate/20120912112655_add_incoming_message_id_index_to_foi_attachments.rb b/db/migrate/20120912112655_add_incoming_message_id_index_to_foi_attachments.rb
index be0bf76c3..c6d8008cf 100644
--- a/db/migrate/20120912112655_add_incoming_message_id_index_to_foi_attachments.rb
+++ b/db/migrate/20120912112655_add_incoming_message_id_index_to_foi_attachments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIncomingMessageIdIndexToFoiAttachments < ActiveRecord::Migration
def self.up
add_index :foi_attachments, :incoming_message_id
diff --git a/db/migrate/20120912113004_add_indexes_to_info_request_events.rb b/db/migrate/20120912113004_add_indexes_to_info_request_events.rb
index b3780322f..49178e4ce 100644
--- a/db/migrate/20120912113004_add_indexes_to_info_request_events.rb
+++ b/db/migrate/20120912113004_add_indexes_to_info_request_events.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIndexesToInfoRequestEvents < ActiveRecord::Migration
def self.up
add_index :info_request_events, :incoming_message_id
diff --git a/db/migrate/20120912113720_add_public_body_index_to_info_requests.rb b/db/migrate/20120912113720_add_public_body_index_to_info_requests.rb
index a56cad1f9..a105fbc6d 100644
--- a/db/migrate/20120912113720_add_public_body_index_to_info_requests.rb
+++ b/db/migrate/20120912113720_add_public_body_index_to_info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddPublicBodyIndexToInfoRequests < ActiveRecord::Migration
def self.up
add_index :info_requests, :public_body_id
diff --git a/db/migrate/20120912114022_add_user_index_to_info_requests.rb b/db/migrate/20120912114022_add_user_index_to_info_requests.rb
index 8be51c0c8..b44934feb 100644
--- a/db/migrate/20120912114022_add_user_index_to_info_requests.rb
+++ b/db/migrate/20120912114022_add_user_index_to_info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddUserIndexToInfoRequests < ActiveRecord::Migration
def self.up
add_index :info_requests, :user_id
diff --git a/db/migrate/20120912170035_add_info_requests_count_to_public_bodies.rb b/db/migrate/20120912170035_add_info_requests_count_to_public_bodies.rb
index d187dcfa5..5cc82106f 100644
--- a/db/migrate/20120912170035_add_info_requests_count_to_public_bodies.rb
+++ b/db/migrate/20120912170035_add_info_requests_count_to_public_bodies.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddInfoRequestsCountToPublicBodies < ActiveRecord::Migration
def self.up
add_column :public_bodies, :info_requests_count, :integer, :null => false, :default => 0
diff --git a/db/migrate/20120913074940_add_incoming_message_index_to_outgoing_messages.rb b/db/migrate/20120913074940_add_incoming_message_index_to_outgoing_messages.rb
index 893395f41..a2a855d9d 100644
--- a/db/migrate/20120913074940_add_incoming_message_index_to_outgoing_messages.rb
+++ b/db/migrate/20120913074940_add_incoming_message_index_to_outgoing_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIncomingMessageIndexToOutgoingMessages < ActiveRecord::Migration
def self.up
add_index :outgoing_messages, :incoming_message_followup_id
diff --git a/db/migrate/20120913080807_add_info_request_event_index_to_track_things_sent_emails.rb b/db/migrate/20120913080807_add_info_request_event_index_to_track_things_sent_emails.rb
index d119f55b3..0270c3e1e 100644
--- a/db/migrate/20120913080807_add_info_request_event_index_to_track_things_sent_emails.rb
+++ b/db/migrate/20120913080807_add_info_request_event_index_to_track_things_sent_emails.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddInfoRequestEventIndexToTrackThingsSentEmails < ActiveRecord::Migration
def self.up
add_index :track_things_sent_emails, :info_request_event_id
diff --git a/db/migrate/20120913081136_add_info_request_event_index_to_user_info_request_sent_alerts.rb b/db/migrate/20120913081136_add_info_request_event_index_to_user_info_request_sent_alerts.rb
index aa9f404f7..1b789c4e9 100644
--- a/db/migrate/20120913081136_add_info_request_event_index_to_user_info_request_sent_alerts.rb
+++ b/db/migrate/20120913081136_add_info_request_event_index_to_user_info_request_sent_alerts.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddInfoRequestEventIndexToUserInfoRequestSentAlerts < ActiveRecord::Migration
def self.up
add_index :user_info_request_sent_alerts, :info_request_event_id
diff --git a/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb b/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb
index 6ae58c884..ceeee6efd 100644
--- a/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb
+++ b/db/migrate/20120913135745_add_updated_at_index_to_public_body_versions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddUpdatedAtIndexToPublicBodyVersions < ActiveRecord::Migration
def self.up
add_index :public_body_versions, :updated_at
diff --git a/db/migrate/20120919140404_add_comments_allowed_to_info_request.rb b/db/migrate/20120919140404_add_comments_allowed_to_info_request.rb
index 4ae0bce18..a7671507f 100644
--- a/db/migrate/20120919140404_add_comments_allowed_to_info_request.rb
+++ b/db/migrate/20120919140404_add_comments_allowed_to_info_request.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCommentsAllowedToInfoRequest < ActiveRecord::Migration
def self.up
add_column :info_requests, :comments_allowed, :boolean, :null => false, :default => true
diff --git a/db/migrate/20121010214348_rename_exim_log_tables.rb b/db/migrate/20121010214348_rename_exim_log_tables.rb
index 75fcff065..5c8ee8297 100644
--- a/db/migrate/20121010214348_rename_exim_log_tables.rb
+++ b/db/migrate/20121010214348_rename_exim_log_tables.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RenameEximLogTables < ActiveRecord::Migration
def self.up
rename_table :exim_logs, :mail_server_logs
diff --git a/db/migrate/20121022031914_add_disclosure_log.rb b/db/migrate/20121022031914_add_disclosure_log.rb
index 82ea7dbcd..65ab7162d 100644
--- a/db/migrate/20121022031914_add_disclosure_log.rb
+++ b/db/migrate/20121022031914_add_disclosure_log.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddDisclosureLog < ActiveRecord::Migration
def self.up
add_column :public_bodies, :disclosure_log, :text, :null => false, :default => ""
diff --git a/db/migrate/20130731142632_remove_prominence_from_info_request_event.rb b/db/migrate/20130731142632_remove_prominence_from_info_request_event.rb
index df0278c20..c0509e2e4 100644
--- a/db/migrate/20130731142632_remove_prominence_from_info_request_event.rb
+++ b/db/migrate/20130731142632_remove_prominence_from_info_request_event.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class RemoveProminenceFromInfoRequestEvent < ActiveRecord::Migration
def up
remove_column :info_request_events, :prominence
diff --git a/db/migrate/20130731145325_add_prominence_to_incoming_message.rb b/db/migrate/20130731145325_add_prominence_to_incoming_message.rb
index 01c4906a7..89d2eb26c 100644
--- a/db/migrate/20130731145325_add_prominence_to_incoming_message.rb
+++ b/db/migrate/20130731145325_add_prominence_to_incoming_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddProminenceToIncomingMessage < ActiveRecord::Migration
def change
add_column :incoming_messages, :prominence, :string, :null => false, :default => 'normal'
diff --git a/db/migrate/20130801154033_add_prominence_reason_to_incoming_message.rb b/db/migrate/20130801154033_add_prominence_reason_to_incoming_message.rb
index 2d189f658..9f6ecac27 100644
--- a/db/migrate/20130801154033_add_prominence_reason_to_incoming_message.rb
+++ b/db/migrate/20130801154033_add_prominence_reason_to_incoming_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddProminenceReasonToIncomingMessage < ActiveRecord::Migration
def change
add_column :incoming_messages, :prominence_reason, :text
diff --git a/db/migrate/20130816150110_add_statistics_to_public_body.rb b/db/migrate/20130816150110_add_statistics_to_public_body.rb
index fb3a67e83..aaa7b0f27 100644
--- a/db/migrate/20130816150110_add_statistics_to_public_body.rb
+++ b/db/migrate/20130816150110_add_statistics_to_public_body.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddStatisticsToPublicBody < ActiveRecord::Migration
def self.up
add_column :public_bodies, :info_requests_successful_count, :integer
diff --git a/db/migrate/20130822161803_add_prominence_fields_to_outgoing_message.rb b/db/migrate/20130822161803_add_prominence_fields_to_outgoing_message.rb
index a75e0d426..fc4c5540f 100644
--- a/db/migrate/20130822161803_add_prominence_fields_to_outgoing_message.rb
+++ b/db/migrate/20130822161803_add_prominence_fields_to_outgoing_message.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddProminenceFieldsToOutgoingMessage < ActiveRecord::Migration
def change
add_column :outgoing_messages, :prominence, :string, :null => false, :default => 'normal'
diff --git a/db/migrate/20130919151140_add_can_make_batch_requests_to_user.rb b/db/migrate/20130919151140_add_can_make_batch_requests_to_user.rb
index cc9d8e76f..5bf1db6de 100644
--- a/db/migrate/20130919151140_add_can_make_batch_requests_to_user.rb
+++ b/db/migrate/20130919151140_add_can_make_batch_requests_to_user.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddCanMakeBatchRequestsToUser < ActiveRecord::Migration
def change
add_column :users, :can_make_batch_requests, :boolean, :default => false, :null => false
diff --git a/db/migrate/20131024114346_create_info_request_batches.rb b/db/migrate/20131024114346_create_info_request_batches.rb
index 09c6f467b..bb56be6d2 100644
--- a/db/migrate/20131024114346_create_info_request_batches.rb
+++ b/db/migrate/20131024114346_create_info_request_batches.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateInfoRequestBatches < ActiveRecord::Migration
def up
create_table :info_request_batches do |t|
diff --git a/db/migrate/20131024152540_add_body_to_info_request_batches.rb b/db/migrate/20131024152540_add_body_to_info_request_batches.rb
index 5f9b3af10..ad547c467 100644
--- a/db/migrate/20131024152540_add_body_to_info_request_batches.rb
+++ b/db/migrate/20131024152540_add_body_to_info_request_batches.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddBodyToInfoRequestBatches < ActiveRecord::Migration
def up
add_column :info_request_batches, :body, :text
diff --git a/db/migrate/20131101155844_add_stats_denominator.rb b/db/migrate/20131101155844_add_stats_denominator.rb
index 7df4c8200..05920084b 100644
--- a/db/migrate/20131101155844_add_stats_denominator.rb
+++ b/db/migrate/20131101155844_add_stats_denominator.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddStatsDenominator < ActiveRecord::Migration
def up
add_column :public_bodies, :info_requests_visible_classified_count, :integer
diff --git a/db/migrate/20131127105438_create_info_request_batch_public_bodies_join_table.rb b/db/migrate/20131127105438_create_info_request_batch_public_bodies_join_table.rb
index 11a9c7066..8e75eb9bf 100644
--- a/db/migrate/20131127105438_create_info_request_batch_public_bodies_join_table.rb
+++ b/db/migrate/20131127105438_create_info_request_batch_public_bodies_join_table.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateInfoRequestBatchPublicBodiesJoinTable < ActiveRecord::Migration
def change
create_table :info_request_batches_public_bodies, :id => false do |t|
diff --git a/db/migrate/20131127135622_add_sent_at_to_info_request_batch.rb b/db/migrate/20131127135622_add_sent_at_to_info_request_batch.rb
index 27d4aecee..2d485a065 100644
--- a/db/migrate/20131127135622_add_sent_at_to_info_request_batch.rb
+++ b/db/migrate/20131127135622_add_sent_at_to_info_request_batch.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddSentAtToInfoRequestBatch < ActiveRecord::Migration
def change
add_column :info_request_batches, :sent_at, :datetime
diff --git a/db/migrate/20131211152641_create_public_body_change_requests.rb b/db/migrate/20131211152641_create_public_body_change_requests.rb
index e3fb560a6..76e24d589 100644
--- a/db/migrate/20131211152641_create_public_body_change_requests.rb
+++ b/db/migrate/20131211152641_create_public_body_change_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreatePublicBodyChangeRequests < ActiveRecord::Migration
def up
create_table :public_body_change_requests do |t|
diff --git a/db/migrate/20140325120619_create_spam_addresses.rb b/db/migrate/20140325120619_create_spam_addresses.rb
index 7c730a5c7..0258e01b9 100644
--- a/db/migrate/20140325120619_create_spam_addresses.rb
+++ b/db/migrate/20140325120619_create_spam_addresses.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateSpamAddresses < ActiveRecord::Migration
def change
create_table :spam_addresses do |t|
diff --git a/db/migrate/20140408145616_add_default_short_name_to_public_bodies.rb b/db/migrate/20140408145616_add_default_short_name_to_public_bodies.rb
index 5fb239ebd..0a4ce19b3 100644
--- a/db/migrate/20140408145616_add_default_short_name_to_public_bodies.rb
+++ b/db/migrate/20140408145616_add_default_short_name_to_public_bodies.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddDefaultShortNameToPublicBodies < ActiveRecord::Migration
def up
diff --git a/db/migrate/20140528110536_update_track_things_index.rb b/db/migrate/20140528110536_update_track_things_index.rb
index 55ee0b70b..209beecce 100644
--- a/db/migrate/20140528110536_update_track_things_index.rb
+++ b/db/migrate/20140528110536_update_track_things_index.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class UpdateTrackThingsIndex < ActiveRecord::Migration
def up
diff --git a/db/migrate/20140710094405_create_public_body_headings_and_categories.rb b/db/migrate/20140710094405_create_public_body_headings_and_categories.rb
index 0ba7f64a0..b65d2078b 100644
--- a/db/migrate/20140710094405_create_public_body_headings_and_categories.rb
+++ b/db/migrate/20140710094405_create_public_body_headings_and_categories.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreatePublicBodyHeadingsAndCategories < ActiveRecord::Migration
def up
create_table :public_body_headings, :force => true do |t|
@@ -24,4 +25,4 @@ class CreatePublicBodyHeadingsAndCategories < ActiveRecord::Migration
drop_table :public_body_headings
drop_table :public_body_categories_public_body_headings
end
-end \ No newline at end of file
+end
diff --git a/db/migrate/20140716131107_create_category_translation_tables.rb b/db/migrate/20140716131107_create_category_translation_tables.rb
index f4b90b330..95591caf2 100644
--- a/db/migrate/20140716131107_create_category_translation_tables.rb
+++ b/db/migrate/20140716131107_create_category_translation_tables.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateCategoryTranslationTables < ActiveRecord::Migration
class PublicBodyCategory < ActiveRecord::Base
translates :title, :description
diff --git a/db/migrate/20140801132719_add_index_to_info_request_events.rb b/db/migrate/20140801132719_add_index_to_info_request_events.rb
index 5f0a77eac..48c36f2b4 100644
--- a/db/migrate/20140801132719_add_index_to_info_request_events.rb
+++ b/db/migrate/20140801132719_add_index_to_info_request_events.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddIndexToInfoRequestEvents < ActiveRecord::Migration
def change
add_index :info_request_events, :event_type
diff --git a/db/migrate/20140804120601_add_display_order_to_categories_and_headings.rb b/db/migrate/20140804120601_add_display_order_to_categories_and_headings.rb
index c2e7e2ac3..a7160995d 100644
--- a/db/migrate/20140804120601_add_display_order_to_categories_and_headings.rb
+++ b/db/migrate/20140804120601_add_display_order_to_categories_and_headings.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AddDisplayOrderToCategoriesAndHeadings < ActiveRecord::Migration
def up
add_column :public_body_categories_public_body_headings, :category_display_order, :integer
diff --git a/db/migrate/20140824191444_create_widget_votes.rb b/db/migrate/20140824191444_create_widget_votes.rb
index 0a7b4856a..467f937e2 100644
--- a/db/migrate/20140824191444_create_widget_votes.rb
+++ b/db/migrate/20140824191444_create_widget_votes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateWidgetVotes < ActiveRecord::Migration
def change
create_table :widget_votes do |t|
diff --git a/db/seeds.rb b/db/seeds.rb
index 664d8c74c..d12490d17 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
diff --git a/lib/ability.rb b/lib/ability.rb
index f63845e84..607f55286 100644
--- a/lib/ability.rb
+++ b/lib/ability.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module Ability
def self.can_update_request_state?(user, request)
(user && request.is_old_unclassified?) || request.is_owning_user?(user)
diff --git a/lib/activerecord_errors_extensions.rb b/lib/activerecord_errors_extensions.rb
index 8135d34f7..19bede539 100644
--- a/lib/activerecord_errors_extensions.rb
+++ b/lib/activerecord_errors_extensions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Monkeypatch! activerecord/lib/active_record/validations.rb
# Method to remove individual error messages from an ActiveRecord.
module ActiveRecord
diff --git a/lib/activesupport_cache_extensions.rb b/lib/activesupport_cache_extensions.rb
index 2791d5996..4e9a6a69c 100644
--- a/lib/activesupport_cache_extensions.rb
+++ b/lib/activesupport_cache_extensions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# lib/activesupport_cache_extensions.rb:
# Extensions / fixes to ActiveSupport::Cache
#
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb
index 0cd6d74d5..7076fc586 100644
--- a/lib/acts_as_xapian/acts_as_xapian.rb
+++ b/lib/acts_as_xapian/acts_as_xapian.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
# acts_as_xapian/lib/acts_as_xapian.rb:
# Xapian full text search in Ruby on Rails.
#
diff --git a/lib/alaveteli_external_command.rb b/lib/alaveteli_external_command.rb
index ddf968f90..36a709c16 100644
--- a/lib/alaveteli_external_command.rb
+++ b/lib/alaveteli_external_command.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'external_command'
module AlaveteliExternalCommand
diff --git a/lib/alaveteli_file_types.rb b/lib/alaveteli_file_types.rb
index 617048c05..2b5aa3efb 100644
--- a/lib/alaveteli_file_types.rb
+++ b/lib/alaveteli_file_types.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AlaveteliFileTypes
# To add an image, create a file with appropriate name corresponding to the
# mime type in public/images e.g. icon_image_tiff_large.png
@@ -87,4 +88,4 @@ class AlaveteliFileTypes
return nil
end
end
-end \ No newline at end of file
+end
diff --git a/lib/alaveteli_localization.rb b/lib/alaveteli_localization.rb
index 2b6978c92..6e9dbeac3 100644
--- a/lib/alaveteli_localization.rb
+++ b/lib/alaveteli_localization.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class AlaveteliLocalization
class << self
def set_locales(available_locales, default_locale)
diff --git a/lib/alaveteli_text_masker.rb b/lib/alaveteli_text_masker.rb
index 5d836f66c..3c2bcf825 100644
--- a/lib/alaveteli_text_masker.rb
+++ b/lib/alaveteli_text_masker.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AlaveteliTextMasker
extend self
DoNotBinaryMask = [ 'image/tiff',
diff --git a/lib/attachment_to_html/adapters/could_not_convert.rb b/lib/attachment_to_html/adapters/could_not_convert.rb
index 8e4bf39dc..f23583590 100644
--- a/lib/attachment_to_html/adapters/could_not_convert.rb
+++ b/lib/attachment_to_html/adapters/could_not_convert.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
module Adapters
class CouldNotConvert
@@ -46,4 +47,4 @@ module AttachmentToHTML
end
end
-end \ No newline at end of file
+end
diff --git a/lib/attachment_to_html/adapters/google_docs_viewer.rb b/lib/attachment_to_html/adapters/google_docs_viewer.rb
index 991fbb757..343a89791 100644
--- a/lib/attachment_to_html/adapters/google_docs_viewer.rb
+++ b/lib/attachment_to_html/adapters/google_docs_viewer.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
module Adapters
# Renders the attachment in a Google Docs Viewer
diff --git a/lib/attachment_to_html/adapters/pdf.rb b/lib/attachment_to_html/adapters/pdf.rb
index a010b0342..f99bdc78b 100644
--- a/lib/attachment_to_html/adapters/pdf.rb
+++ b/lib/attachment_to_html/adapters/pdf.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
module Adapters
# Convert application/pdf documents in to HTML
diff --git a/lib/attachment_to_html/adapters/rtf.rb b/lib/attachment_to_html/adapters/rtf.rb
index 95f499689..90478d9ca 100644
--- a/lib/attachment_to_html/adapters/rtf.rb
+++ b/lib/attachment_to_html/adapters/rtf.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
module Adapters
# Convert application/rtf documents in to HTML
diff --git a/lib/attachment_to_html/adapters/text.rb b/lib/attachment_to_html/adapters/text.rb
index e99183f0e..7e22422e2 100644
--- a/lib/attachment_to_html/adapters/text.rb
+++ b/lib/attachment_to_html/adapters/text.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
module Adapters
# Convert text/plain documents in to HTML
diff --git a/lib/attachment_to_html/attachment_to_html.rb b/lib/attachment_to_html/attachment_to_html.rb
index 2f7c08264..e95f67262 100644
--- a/lib/attachment_to_html/attachment_to_html.rb
+++ b/lib/attachment_to_html/attachment_to_html.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'view'
Dir[File.dirname(__FILE__) + '/adapters/*.rb'].each do |file|
diff --git a/lib/attachment_to_html/view.rb b/lib/attachment_to_html/view.rb
index e6991d44e..0d5b205b7 100644
--- a/lib/attachment_to_html/view.rb
+++ b/lib/attachment_to_html/view.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AttachmentToHTML
class View < ERB
diff --git a/lib/confidence_intervals.rb b/lib/confidence_intervals.rb
index 9fe38045a..83f736c63 100644
--- a/lib/confidence_intervals.rb
+++ b/lib/confidence_intervals.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Calculate the confidence interval for a samples from a binonial
# distribution using Wilson's score interval. For more theoretical
# details, please see:
diff --git a/lib/configuration.rb b/lib/configuration.rb
index b60cc102b..30c1286da 100644
--- a/lib/configuration.rb
+++ b/lib/configuration.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.dirname(__FILE__) + '/../commonlib/rblib/config'
# Load intial mySociety config
diff --git a/lib/date_quarter.rb b/lib/date_quarter.rb
index ac159b420..b8cb03593 100644
--- a/lib/date_quarter.rb
+++ b/lib/date_quarter.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module DateQuarter
extend self
diff --git a/lib/generators/acts_as_xapian/acts_as_xapian_generator.rb b/lib/generators/acts_as_xapian/acts_as_xapian_generator.rb
index 434c02cb5..0e525d868 100644
--- a/lib/generators/acts_as_xapian/acts_as_xapian_generator.rb
+++ b/lib/generators/acts_as_xapian/acts_as_xapian_generator.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'rails/generators/active_record/migration'
class ActsAsXapianGenerator < Rails::Generators::Base
diff --git a/lib/generators/acts_as_xapian/templates/migration.rb b/lib/generators/acts_as_xapian/templates/migration.rb
index 84a9dd766..b390cd933 100644
--- a/lib/generators/acts_as_xapian/templates/migration.rb
+++ b/lib/generators/acts_as_xapian/templates/migration.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
class CreateActsAsXapian < ActiveRecord::Migration
def self.up
create_table :acts_as_xapian_jobs do |t|
diff --git a/lib/has_tag_string/has_tag_string.rb b/lib/has_tag_string/has_tag_string.rb
index c28720f04..a1af8c597 100644
--- a/lib/has_tag_string/has_tag_string.rb
+++ b/lib/has_tag_string/has_tag_string.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# lib/has_tag_string.rb:
# Lets a model have tags, represented as space separate strings in a public
# interface, but stored in the database as keys. Each tag can have a value
diff --git a/lib/health_checks/checks/days_ago_check.rb b/lib/health_checks/checks/days_ago_check.rb
index 793fff586..9e574fe95 100644
--- a/lib/health_checks/checks/days_ago_check.rb
+++ b/lib/health_checks/checks/days_ago_check.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module HealthChecks
module Checks
class DaysAgoCheck
diff --git a/lib/health_checks/health_checkable.rb b/lib/health_checks/health_checkable.rb
index 5d674ca32..f71ca36ca 100644
--- a/lib/health_checks/health_checkable.rb
+++ b/lib/health_checks/health_checkable.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module HealthChecks
module HealthCheckable
diff --git a/lib/health_checks/health_checks.rb b/lib/health_checks/health_checks.rb
index 6f0c9de8e..54cb0d96b 100644
--- a/lib/health_checks/health_checks.rb
+++ b/lib/health_checks/health_checks.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'health_checkable'
Dir[File.dirname(__FILE__) + '/checks/*.rb'].each do |file|
diff --git a/lib/i18n_fixes.rb b/lib/i18n_fixes.rb
index 64c370477..6c7cb8877 100644
--- a/lib/i18n_fixes.rb
+++ b/lib/i18n_fixes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Some of the monkeypatches in this file should possibly be submitted
# as patches, but most are here because they should go away when we
# upgrade to Rails 3.x
diff --git a/lib/languages.rb b/lib/languages.rb
index a45071a67..7d03bc60a 100644
--- a/lib/languages.rb
+++ b/lib/languages.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
class LanguageNames
def self.get_language_name(locale)
language_names = {
diff --git a/lib/mail_handler/backends/mail_backend.rb b/lib/mail_handler/backends/mail_backend.rb
index ae3077a72..89fc24bb9 100644
--- a/lib/mail_handler/backends/mail_backend.rb
+++ b/lib/mail_handler/backends/mail_backend.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'mail'
require 'mapi/msg'
require 'mapi/convert'
diff --git a/lib/mail_handler/backends/mail_extensions.rb b/lib/mail_handler/backends/mail_extensions.rb
index f778cbc14..38997861c 100644
--- a/lib/mail_handler/backends/mail_extensions.rb
+++ b/lib/mail_handler/backends/mail_extensions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'mail/message'
require 'mail/part'
require 'mail/fields/common/parameter_hash'
diff --git a/lib/mail_handler/mail_handler.rb b/lib/mail_handler/mail_handler.rb
index 33d939e22..0c60fd3f5 100644
--- a/lib/mail_handler/mail_handler.rb
+++ b/lib/mail_handler/mail_handler.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Handles the parsing of email
require 'tmpdir'
diff --git a/lib/memory_profiler.rb b/lib/memory_profiler.rb
index 15e8457ee..fd056dc0d 100644
--- a/lib/memory_profiler.rb
+++ b/lib/memory_profiler.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Taken from
# http://scottstuff.net/blog/2006/08/17/memory-leak-profiling-with-rails
diff --git a/lib/message_prominence.rb b/lib/message_prominence.rb
index 8f54fcc95..8f8008784 100644
--- a/lib/message_prominence.rb
+++ b/lib/message_prominence.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module MessageProminence
def has_prominence
diff --git a/lib/no_constraint_disabling.rb b/lib/no_constraint_disabling.rb
index 32a4a6bfe..539b491b3 100644
--- a/lib/no_constraint_disabling.rb
+++ b/lib/no_constraint_disabling.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# In order to work around the problem of the database use not having
# the permission to disable referential integrity when loading fixtures,
# we redefine disable_referential_integrity so that it doesn't try to
diff --git a/lib/normalize_string.rb b/lib/normalize_string.rb
index 3b6116970..409262b8e 100644
--- a/lib/normalize_string.rb
+++ b/lib/normalize_string.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'iconv' unless String.method_defined?(:encode)
require 'charlock_holmes'
diff --git a/lib/public_body_csv.rb b/lib/public_body_csv.rb
index afb5d9043..3dab7b805 100644
--- a/lib/public_body_csv.rb
+++ b/lib/public_body_csv.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'csv'
# Public: Generate a CSV representation of PublicBody instances
diff --git a/lib/quiet_opener.rb b/lib/quiet_opener.rb
index c6e259b93..9745e22a4 100644
--- a/lib/quiet_opener.rb
+++ b/lib/quiet_opener.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'open-uri'
require 'net-purge'
if RUBY_VERSION.to_f < 2.0
diff --git a/lib/routing_filters.rb b/lib/routing_filters.rb
index 5b5da6870..2aad6f437 100644
--- a/lib/routing_filters.rb
+++ b/lib/routing_filters.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module RoutingFilter
class Conditionallyprependlocale < RoutingFilter::Locale
# Override core Locale filter not to prepend locale path segment
diff --git a/lib/strip_attributes/strip_attributes.rb b/lib/strip_attributes/strip_attributes.rb
index 12350277d..2e4383194 100644
--- a/lib/strip_attributes/strip_attributes.rb
+++ b/lib/strip_attributes/strip_attributes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module StripAttributes
# Strips whitespace from model fields and leaves nil values as nil.
# TODO: this differs from official StripAttributes, as it doesn't make blank cells null.
diff --git a/lib/strip_attributes/test/strip_attributes_test.rb b/lib/strip_attributes/test/strip_attributes_test.rb
index 8158dc664..d06ef0671 100644
--- a/lib/strip_attributes/test/strip_attributes_test.rb
+++ b/lib/strip_attributes/test/strip_attributes_test.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require "#{File.dirname(__FILE__)}/test_helper"
module MockAttributes
diff --git a/lib/strip_attributes/test/test_helper.rb b/lib/strip_attributes/test/test_helper.rb
index 7d06c40db..b69440715 100644
--- a/lib/strip_attributes/test/test_helper.rb
+++ b/lib/strip_attributes/test/test_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'test/unit'
require 'rubygems'
require 'active_record'
diff --git a/lib/tasks/usage.rb b/lib/tasks/usage.rb
index d6aac454d..350a6b07e 100644
--- a/lib/tasks/usage.rb
+++ b/lib/tasks/usage.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module Usage
def usage_message message
@@ -23,4 +24,4 @@ module Usage
end
end
-end \ No newline at end of file
+end
diff --git a/lib/theme.rb b/lib/theme.rb
index 4f03b5d99..f2d4ba8b3 100644
--- a/lib/theme.rb
+++ b/lib/theme.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
def theme_url_to_theme_name(theme_url)
File.basename theme_url, '.git'
end
diff --git a/lib/use_spans_for_errors.rb b/lib/use_spans_for_errors.rb
index 135453f78..ecc117964 100644
--- a/lib/use_spans_for_errors.rb
+++ b/lib/use_spans_for_errors.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Monkeypatch! Use SPAN instead of DIV.
#
# Rails core refuse to fix this properly, by making it an official option.
diff --git a/lib/whatdotheyknow/strip_empty_sessions.rb b/lib/whatdotheyknow/strip_empty_sessions.rb
index 6d175ca98..1e5078172 100644
--- a/lib/whatdotheyknow/strip_empty_sessions.rb
+++ b/lib/whatdotheyknow/strip_empty_sessions.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module WhatDoTheyKnow
class StripEmptySessions
diff --git a/lib/world_foi_websites.rb b/lib/world_foi_websites.rb
index fc2395986..b63d0860d 100644
--- a/lib/world_foi_websites.rb
+++ b/lib/world_foi_websites.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# -*- coding: utf-8 -*-
class WorldFOIWebsites
def self.world_foi_websites
diff --git a/lib/xapian_queries.rb b/lib/xapian_queries.rb
index b3599740a..5c02ba788 100644
--- a/lib/xapian_queries.rb
+++ b/lib/xapian_queries.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module XapianQueries
# These methods take some filter criteria expressed in a hash and convert them
diff --git a/locale/model_attributes.rb b/locale/model_attributes.rb
index 89a85aac3..332b67ede 100644
--- a/locale/model_attributes.rb
+++ b/locale/model_attributes.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
#DO NOT MODIFY! AUTOMATICALLY GENERATED FILE!
_('Acts as xapian/acts as xapian job')
_('ActsAsXapian::ActsAsXapianJob|Action')
diff --git a/script/handle-mail-replies.rb b/script/handle-mail-replies.rb
index cbff03acb..5cd6d4576 100755
--- a/script/handle-mail-replies.rb
+++ b/script/handle-mail-replies.rb
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
# Handle email responses sent to us.
#
diff --git a/script/switch-theme.rb b/script/switch-theme.rb
index 146d1bf0c..47b3991c1 100755
--- a/script/switch-theme.rb
+++ b/script/switch-theme.rb
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
# A simple script to swap around your Alaveteli themes when you're
# hacking on Alaveteli. By default this assumes that you have an
diff --git a/spec/controllers/admin_censor_rule_controller_spec.rb b/spec/controllers/admin_censor_rule_controller_spec.rb
index 68eaecd6a..a2014808c 100644
--- a/spec/controllers/admin_censor_rule_controller_spec.rb
+++ b/spec/controllers/admin_censor_rule_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminCensorRuleController do
diff --git a/spec/controllers/admin_comment_controller_spec.rb b/spec/controllers/admin_comment_controller_spec.rb
index f87231e3b..00b6e6cc9 100644
--- a/spec/controllers/admin_comment_controller_spec.rb
+++ b/spec/controllers/admin_comment_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminCommentController do
diff --git a/spec/controllers/admin_general_controller_spec.rb b/spec/controllers/admin_general_controller_spec.rb
index cc2ec41b4..b2e8b233f 100644
--- a/spec/controllers/admin_general_controller_spec.rb
+++ b/spec/controllers/admin_general_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminGeneralController do
diff --git a/spec/controllers/admin_holiday_imports_controller_spec.rb b/spec/controllers/admin_holiday_imports_controller_spec.rb
index dd23a022f..42dfadd47 100644
--- a/spec/controllers/admin_holiday_imports_controller_spec.rb
+++ b/spec/controllers/admin_holiday_imports_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdminHolidayImportsController do
diff --git a/spec/controllers/admin_holidays_controller_spec.rb b/spec/controllers/admin_holidays_controller_spec.rb
index 21cb51d29..93f51707b 100644
--- a/spec/controllers/admin_holidays_controller_spec.rb
+++ b/spec/controllers/admin_holidays_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdminHolidaysController do
diff --git a/spec/controllers/admin_incoming_message_controller_spec.rb b/spec/controllers/admin_incoming_message_controller_spec.rb
index 24a526ca4..39355c054 100644
--- a/spec/controllers/admin_incoming_message_controller_spec.rb
+++ b/spec/controllers/admin_incoming_message_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminIncomingMessageController, "when administering incoming messages" do
diff --git a/spec/controllers/admin_info_request_event_controller_spec.rb b/spec/controllers/admin_info_request_event_controller_spec.rb
index 23300a0b8..dfa425374 100644
--- a/spec/controllers/admin_info_request_event_controller_spec.rb
+++ b/spec/controllers/admin_info_request_event_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminInfoRequestEventController do
diff --git a/spec/controllers/admin_outgoing_message_controller_spec.rb b/spec/controllers/admin_outgoing_message_controller_spec.rb
index a46a077da..f231311ae 100644
--- a/spec/controllers/admin_outgoing_message_controller_spec.rb
+++ b/spec/controllers/admin_outgoing_message_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminOutgoingMessageController do
diff --git a/spec/controllers/admin_public_body_categories_controller_spec.rb b/spec/controllers/admin_public_body_categories_controller_spec.rb
index c15ee77f1..1aa8a145e 100644
--- a/spec/controllers/admin_public_body_categories_controller_spec.rb
+++ b/spec/controllers/admin_public_body_categories_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdminPublicBodyCategoriesController do
diff --git a/spec/controllers/admin_public_body_change_requests_controller_spec.rb b/spec/controllers/admin_public_body_change_requests_controller_spec.rb
index 003510e60..b0a9ebd79 100644
--- a/spec/controllers/admin_public_body_change_requests_controller_spec.rb
+++ b/spec/controllers/admin_public_body_change_requests_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminPublicBodyChangeRequestsController, "editing a change request" do
diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb
index 50a373d9d..035c478bf 100644
--- a/spec/controllers/admin_public_body_controller_spec.rb
+++ b/spec/controllers/admin_public_body_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminPublicBodyController, "when showing the index of public bodies" do
diff --git a/spec/controllers/admin_public_body_headings_controller_spec.rb b/spec/controllers/admin_public_body_headings_controller_spec.rb
index ccdfdecfb..0e0337e3e 100644
--- a/spec/controllers/admin_public_body_headings_controller_spec.rb
+++ b/spec/controllers/admin_public_body_headings_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdminPublicBodyHeadingsController do
diff --git a/spec/controllers/admin_raw_email_controller_spec.rb b/spec/controllers/admin_raw_email_controller_spec.rb
index 77c57c38b..9039286bc 100644
--- a/spec/controllers/admin_raw_email_controller_spec.rb
+++ b/spec/controllers/admin_raw_email_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminRawEmailController do
diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb
index 4eb463963..61827bfd1 100644
--- a/spec/controllers/admin_request_controller_spec.rb
+++ b/spec/controllers/admin_request_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminRequestController, "when administering requests" do
diff --git a/spec/controllers/admin_spam_addresses_controller_spec.rb b/spec/controllers/admin_spam_addresses_controller_spec.rb
index a1e434159..8f6d57b01 100644
--- a/spec/controllers/admin_spam_addresses_controller_spec.rb
+++ b/spec/controllers/admin_spam_addresses_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdminSpamAddressesController do
diff --git a/spec/controllers/admin_track_controller_spec.rb b/spec/controllers/admin_track_controller_spec.rb
index d29db4966..b77570a27 100644
--- a/spec/controllers/admin_track_controller_spec.rb
+++ b/spec/controllers/admin_track_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminTrackController, "when administering tracks" do
diff --git a/spec/controllers/admin_user_controller_spec.rb b/spec/controllers/admin_user_controller_spec.rb
index e979355cf..9341feec6 100644
--- a/spec/controllers/admin_user_controller_spec.rb
+++ b/spec/controllers/admin_user_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminUserController, "when administering users" do
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb
index 323ef4cd4..d8af59ad8 100644
--- a/spec/controllers/api_controller_spec.rb
+++ b/spec/controllers/api_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe ApiController, "when using the API" do
diff --git a/spec/controllers/comment_controller_spec.rb b/spec/controllers/comment_controller_spec.rb
index 480c85ad7..cfd7166f4 100644
--- a/spec/controllers/comment_controller_spec.rb
+++ b/spec/controllers/comment_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe CommentController, "when commenting on a request" do
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 844fcd4e6..d466625b7 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'fakeweb'
diff --git a/spec/controllers/health_checks_controller_spec.rb b/spec/controllers/health_checks_controller_spec.rb
index f7ad6d6a4..2403fb3c8 100644
--- a/spec/controllers/health_checks_controller_spec.rb
+++ b/spec/controllers/health_checks_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HealthChecksController do
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
index 9453c9461..338a86380 100644
--- a/spec/controllers/help_controller_spec.rb
+++ b/spec/controllers/help_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HelpController do
diff --git a/spec/controllers/info_request_batch_controller_spec.rb b/spec/controllers/info_request_batch_controller_spec.rb
index d08f02e10..866a1d0dc 100644
--- a/spec/controllers/info_request_batch_controller_spec.rb
+++ b/spec/controllers/info_request_batch_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe InfoRequestBatchController, "when showing a request" do
diff --git a/spec/controllers/public_body_change_requests_controller_spec.rb b/spec/controllers/public_body_change_requests_controller_spec.rb
index 4053b2f40..a8f149cc6 100644
--- a/spec/controllers/public_body_change_requests_controller_spec.rb
+++ b/spec/controllers/public_body_change_requests_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe PublicBodyChangeRequestsController, "making a new change request" do
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb
index ff0a70a6f..02e37684c 100644
--- a/spec/controllers/public_body_controller_spec.rb
+++ b/spec/controllers/public_body_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'nokogiri'
diff --git a/spec/controllers/reports_controller_spec.rb b/spec/controllers/reports_controller_spec.rb
index fa8c72eaa..91be67fd8 100644
--- a/spec/controllers/reports_controller_spec.rb
+++ b/spec/controllers/reports_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'spec_helper'
describe ReportsController, "when reporting a request when not logged in" do
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index c4f3c847e..eb4ea5e7d 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe RequestController, "when listing recent requests" do
diff --git a/spec/controllers/request_game_controller_spec.rb b/spec/controllers/request_game_controller_spec.rb
index 7247cd388..c3f00d58d 100644
--- a/spec/controllers/request_game_controller_spec.rb
+++ b/spec/controllers/request_game_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe RequestGameController, "when playing the game" do
diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb
index 621dbaaac..d4a3e5939 100644
--- a/spec/controllers/services_controller_spec.rb
+++ b/spec/controllers/services_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'fakeweb'
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 29f5c7fe1..b453fde8c 100644
--- a/spec/controllers/track_controller_spec.rb
+++ b/spec/controllers/track_controller_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe TrackController, "when making a new track on a request" do
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 443856cf3..2d3b36f70 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe UserController do
diff --git a/spec/controllers/widgets_controller_spec.rb b/spec/controllers/widgets_controller_spec.rb
index 6a58c7c5c..95396671b 100644
--- a/spec/controllers/widgets_controller_spec.rb
+++ b/spec/controllers/widgets_controller_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe WidgetsController do
diff --git a/spec/factories/censor_rules.rb b/spec/factories/censor_rules.rb
index 2c0b2c822..5ae60b1f1 100644
--- a/spec/factories/censor_rules.rb
+++ b/spec/factories/censor_rules.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :censor_rule do
diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb
index 1e0861dad..905d7580f 100644
--- a/spec/factories/comments.rb
+++ b/spec/factories/comments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :comment do
diff --git a/spec/factories/foi_attchments.rb b/spec/factories/foi_attchments.rb
index a1d04ccf0..64486dcda 100644
--- a/spec/factories/foi_attchments.rb
+++ b/spec/factories/foi_attchments.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :foi_attachment do
diff --git a/spec/factories/holidays.rb b/spec/factories/holidays.rb
index 531130c8a..28bbe6c52 100644
--- a/spec/factories/holidays.rb
+++ b/spec/factories/holidays.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :holiday do
diff --git a/spec/factories/incoming_messages.rb b/spec/factories/incoming_messages.rb
index b29fe8ce9..127e0f94e 100644
--- a/spec/factories/incoming_messages.rb
+++ b/spec/factories/incoming_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :incoming_message do
diff --git a/spec/factories/info_request_batches.rb b/spec/factories/info_request_batches.rb
index 960db6ec5..c92aa76cc 100644
--- a/spec/factories/info_request_batches.rb
+++ b/spec/factories/info_request_batches.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :info_request_batch do
diff --git a/spec/factories/info_request_events.rb b/spec/factories/info_request_events.rb
index cdd303ad6..d585049e7 100644
--- a/spec/factories/info_request_events.rb
+++ b/spec/factories/info_request_events.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :info_request_event do
diff --git a/spec/factories/info_requests.rb b/spec/factories/info_requests.rb
index 8052625cd..45485c435 100644
--- a/spec/factories/info_requests.rb
+++ b/spec/factories/info_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :info_request do
diff --git a/spec/factories/outgoing_messages.rb b/spec/factories/outgoing_messages.rb
index e11cbdfb9..6e88085b4 100644
--- a/spec/factories/outgoing_messages.rb
+++ b/spec/factories/outgoing_messages.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :outgoing_message do
diff --git a/spec/factories/public_bodies.rb b/spec/factories/public_bodies.rb
index 44769f7c2..a823d536a 100644
--- a/spec/factories/public_bodies.rb
+++ b/spec/factories/public_bodies.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :public_body do
diff --git a/spec/factories/public_body_categories.rb b/spec/factories/public_body_categories.rb
index baa474c6b..da7dec65c 100644
--- a/spec/factories/public_body_categories.rb
+++ b/spec/factories/public_body_categories.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :public_body_category do
diff --git a/spec/factories/public_body_category_links.rb b/spec/factories/public_body_category_links.rb
index 7663b1f52..7e796a08d 100644
--- a/spec/factories/public_body_category_links.rb
+++ b/spec/factories/public_body_category_links.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :public_body_category_link do
association :public_body_category
diff --git a/spec/factories/public_body_change_requests.rb b/spec/factories/public_body_change_requests.rb
index 2bacb9b9b..a074c6feb 100644
--- a/spec/factories/public_body_change_requests.rb
+++ b/spec/factories/public_body_change_requests.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :public_body_change_request do
diff --git a/spec/factories/public_body_headings.rb b/spec/factories/public_body_headings.rb
index ed54ddada..b7f83ffda 100644
--- a/spec/factories/public_body_headings.rb
+++ b/spec/factories/public_body_headings.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :public_body_heading do
sequence(:name) { |n| "Example Public Body Heading #{n}" }
diff --git a/spec/factories/raw_emails.rb b/spec/factories/raw_emails.rb
index 30fb24c37..a2b6496e8 100644
--- a/spec/factories/raw_emails.rb
+++ b/spec/factories/raw_emails.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :raw_email
diff --git a/spec/factories/spam_addresses.rb b/spec/factories/spam_addresses.rb
index bafb7cd50..6853c7f2e 100644
--- a/spec/factories/spam_addresses.rb
+++ b/spec/factories/spam_addresses.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :spam_address do
sequence(:email) { |n| "spam-#{ n }@example.org" }
diff --git a/spec/factories/track_things.rb b/spec/factories/track_things.rb
index cf76b00b3..f8e4dce69 100644
--- a/spec/factories/track_things.rb
+++ b/spec/factories/track_things.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :track_thing do
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index ab782fbf7..1f7eba530 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :user do
diff --git a/spec/factories/widget_votes.rb b/spec/factories/widget_votes.rb
index 964bbb20d..7ceb4f7e9 100644
--- a/spec/factories/widget_votes.rb
+++ b/spec/factories/widget_votes.rb
@@ -1,7 +1,8 @@
+# -*- encoding : utf-8 -*-
require 'securerandom'
FactoryGirl.define do
factory :widget_vote do
info_request
cookie { SecureRandom.hex(10) }
end
-end \ No newline at end of file
+end
diff --git a/spec/helpers/admin_helper_spec.rb b/spec/helpers/admin_helper_spec.rb
index 804fcc7fd..1f0155c98 100644
--- a/spec/helpers/admin_helper_spec.rb
+++ b/spec/helpers/admin_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AdminHelper do
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 6407eaf3a..2035c343a 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe ApplicationHelper do
diff --git a/spec/helpers/date_time_helper_spec.rb b/spec/helpers/date_time_helper_spec.rb
index c4fdee1d1..f69a0ef80 100644
--- a/spec/helpers/date_time_helper_spec.rb
+++ b/spec/helpers/date_time_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe DateTimeHelper do
diff --git a/spec/helpers/health_checks_helper_spec.rb b/spec/helpers/health_checks_helper_spec.rb
index 7dbfaf06e..9418864b5 100644
--- a/spec/helpers/health_checks_helper_spec.rb
+++ b/spec/helpers/health_checks_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HealthChecksHelper do
diff --git a/spec/helpers/highlight_helper_spec.rb b/spec/helpers/highlight_helper_spec.rb
index e1be7e153..2641a4400 100644
--- a/spec/helpers/highlight_helper_spec.rb
+++ b/spec/helpers/highlight_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HighlightHelper do
diff --git a/spec/helpers/link_to_helper_spec.rb b/spec/helpers/link_to_helper_spec.rb
index 261e1ef3e..fbb0c2313 100644
--- a/spec/helpers/link_to_helper_spec.rb
+++ b/spec/helpers/link_to_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe LinkToHelper do
diff --git a/spec/helpers/public_body_helper_spec.rb b/spec/helpers/public_body_helper_spec.rb
index d4f3acf78..8db07b979 100644
--- a/spec/helpers/public_body_helper_spec.rb
+++ b/spec/helpers/public_body_helper_spec.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe PublicBodyHelper do
diff --git a/spec/helpers/track_helper_spec.rb b/spec/helpers/track_helper_spec.rb
index b6252ab39..bc1266338 100644
--- a/spec/helpers/track_helper_spec.rb
+++ b/spec/helpers/track_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe TrackHelper do
diff --git a/spec/helpers/widget_helper_spec.rb b/spec/helpers/widget_helper_spec.rb
index c8c41b14f..614ed92ad 100644
--- a/spec/helpers/widget_helper_spec.rb
+++ b/spec/helpers/widget_helper_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe WidgetHelper do
@@ -25,4 +26,4 @@ describe WidgetHelper do
end
-end \ No newline at end of file
+end
diff --git a/spec/integration/admin_public_body_category_edit_spec.rb b/spec/integration/admin_public_body_category_edit_spec.rb
index 043524189..4e210de82 100644
--- a/spec/integration/admin_public_body_category_edit_spec.rb
+++ b/spec/integration/admin_public_body_category_edit_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/admin_public_body_edit_spec.rb b/spec/integration/admin_public_body_edit_spec.rb
index 21011b172..ed51f414b 100644
--- a/spec/integration/admin_public_body_edit_spec.rb
+++ b/spec/integration/admin_public_body_edit_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/admin_public_body_heading_edit_spec.rb b/spec/integration/admin_public_body_heading_edit_spec.rb
index 6c7a5a74b..f37d033f3 100644
--- a/spec/integration/admin_public_body_heading_edit_spec.rb
+++ b/spec/integration/admin_public_body_heading_edit_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/admin_spec.rb b/spec/integration/admin_spec.rb
index bdd6e9d8c..552b465bd 100644
--- a/spec/integration/admin_spec.rb
+++ b/spec/integration/admin_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/alaveteli_dsl.rb b/spec/integration/alaveteli_dsl.rb
index d7485a094..1ff60664c 100644
--- a/spec/integration/alaveteli_dsl.rb
+++ b/spec/integration/alaveteli_dsl.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module AlaveteliDsl
def browses_request(url_title)
diff --git a/spec/integration/cookie_stripping_spec.rb b/spec/integration/cookie_stripping_spec.rb
index 897899fd5..e28e7b8e4 100644
--- a/spec/integration/cookie_stripping_spec.rb
+++ b/spec/integration/cookie_stripping_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/create_request_spec.rb b/spec/integration/create_request_spec.rb
index 84fad12f9..9b579c448 100644
--- a/spec/integration/create_request_spec.rb
+++ b/spec/integration/create_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/download_request_spec.rb b/spec/integration/download_request_spec.rb
index 48b42b11d..4b3d11d13 100644
--- a/spec/integration/download_request_spec.rb
+++ b/spec/integration/download_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb
index 39f1279ce..64145cce0 100644
--- a/spec/integration/errors_spec.rb
+++ b/spec/integration/errors_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "When errors occur" do
diff --git a/spec/integration/ip_spoofing_spec.rb b/spec/integration/ip_spoofing_spec.rb
index 073f71ad6..ce11bcf0b 100644
--- a/spec/integration/ip_spoofing_spec.rb
+++ b/spec/integration/ip_spoofing_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe 'when getting a country message' do
diff --git a/spec/integration/localisation_spec.rb b/spec/integration/localisation_spec.rb
index 037603ad5..f96cd4c3a 100644
--- a/spec/integration/localisation_spec.rb
+++ b/spec/integration/localisation_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "when generating urls" do
diff --git a/spec/integration/request_controller_spec.rb b/spec/integration/request_controller_spec.rb
index f5de692b8..1ef6814f9 100644
--- a/spec/integration/request_controller_spec.rb
+++ b/spec/integration/request_controller_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/search_request_spec.rb b/spec/integration/search_request_spec.rb
index 699eb2c6c..7a09c78fb 100644
--- a/spec/integration/search_request_spec.rb
+++ b/spec/integration/search_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/view_request_spec.rb b/spec/integration/view_request_spec.rb
index 4d04c97d7..ed84ec2e2 100644
--- a/spec/integration/view_request_spec.rb
+++ b/spec/integration/view_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/alaveteli_dsl')
diff --git a/spec/integration/xapian_search_highlighting_spec.rb b/spec/integration/xapian_search_highlighting_spec.rb
index a91df341f..eea9893a8 100644
--- a/spec/integration/xapian_search_highlighting_spec.rb
+++ b/spec/integration/xapian_search_highlighting_spec.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
diff --git a/spec/lib/ability_spec.rb b/spec/lib/ability_spec.rb
index f075d0f32..4c5d50990 100644
--- a/spec/lib/ability_spec.rb
+++ b/spec/lib/ability_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Ability do
diff --git a/spec/lib/alaveteli_external_command_spec.rb b/spec/lib/alaveteli_external_command_spec.rb
index 18afeda33..f76e26152 100644
--- a/spec/lib/alaveteli_external_command_spec.rb
+++ b/spec/lib/alaveteli_external_command_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'alaveteli_external_command'
diff --git a/spec/lib/alaveteli_text_masker_spec.rb b/spec/lib/alaveteli_text_masker_spec.rb
index 102d2582e..8f7c530b3 100644
--- a/spec/lib/alaveteli_text_masker_spec.rb
+++ b/spec/lib/alaveteli_text_masker_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AlaveteliTextMasker do
diff --git a/spec/lib/attachment_to_html/adapters/could_not_convert_spec.rb b/spec/lib/attachment_to_html/adapters/could_not_convert_spec.rb
index afdc5c552..040f02bae 100644
--- a/spec/lib/attachment_to_html/adapters/could_not_convert_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/could_not_convert_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe AttachmentToHTML::Adapters::CouldNotConvert do
diff --git a/spec/lib/attachment_to_html/adapters/google_docs_viewer_spec.rb b/spec/lib/attachment_to_html/adapters/google_docs_viewer_spec.rb
index e7aafb40d..b1a97ea9b 100644
--- a/spec/lib/attachment_to_html/adapters/google_docs_viewer_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/google_docs_viewer_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe AttachmentToHTML::Adapters::GoogleDocsViewer do
diff --git a/spec/lib/attachment_to_html/adapters/pdf_spec.rb b/spec/lib/attachment_to_html/adapters/pdf_spec.rb
index ceb438be8..f4b60fb93 100644
--- a/spec/lib/attachment_to_html/adapters/pdf_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/pdf_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe AttachmentToHTML::Adapters::PDF do
diff --git a/spec/lib/attachment_to_html/adapters/rtf_spec.rb b/spec/lib/attachment_to_html/adapters/rtf_spec.rb
index 2c53b5272..59aef69d1 100644
--- a/spec/lib/attachment_to_html/adapters/rtf_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/rtf_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe AttachmentToHTML::Adapters::RTF do
diff --git a/spec/lib/attachment_to_html/adapters/text_spec.rb b/spec/lib/attachment_to_html/adapters/text_spec.rb
index b2e8141e0..0eddacb05 100644
--- a/spec/lib/attachment_to_html/adapters/text_spec.rb
+++ b/spec/lib/attachment_to_html/adapters/text_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe AttachmentToHTML::Adapters::Text do
diff --git a/spec/lib/attachment_to_html/attachment_to_html_spec.rb b/spec/lib/attachment_to_html/attachment_to_html_spec.rb
index 1cf7debb7..59c13f501 100644
--- a/spec/lib/attachment_to_html/attachment_to_html_spec.rb
+++ b/spec/lib/attachment_to_html/attachment_to_html_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe AttachmentToHTML do
diff --git a/spec/lib/attachment_to_html/view_spec.rb b/spec/lib/attachment_to_html/view_spec.rb
index 50179b0f7..ffe2c0d2d 100644
--- a/spec/lib/attachment_to_html/view_spec.rb
+++ b/spec/lib/attachment_to_html/view_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe AttachmentToHTML::View do
diff --git a/spec/lib/basic_encoding_spec.rb b/spec/lib/basic_encoding_spec.rb
index 43a65eab9..1b3d9cd1c 100644
--- a/spec/lib/basic_encoding_spec.rb
+++ b/spec/lib/basic_encoding_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
def bytes_to_binary_string( bytes, claimed_encoding = nil )
diff --git a/spec/lib/confidence_intervals_spec.rb b/spec/lib/confidence_intervals_spec.rb
index cb8717f3d..58f1f3d79 100644
--- a/spec/lib/confidence_intervals_spec.rb
+++ b/spec/lib/confidence_intervals_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'confidence_intervals'
describe "ci_bounds" do
diff --git a/spec/lib/date_quarter_spec.rb b/spec/lib/date_quarter_spec.rb
index 5af6fa334..02d2c2551 100644
--- a/spec/lib/date_quarter_spec.rb
+++ b/spec/lib/date_quarter_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe DateQuarter do
diff --git a/spec/lib/health_checks/checks/days_ago_check_spec.rb b/spec/lib/health_checks/checks/days_ago_check_spec.rb
index 33b4642cd..829b8e71e 100644
--- a/spec/lib/health_checks/checks/days_ago_check_spec.rb
+++ b/spec/lib/health_checks/checks/days_ago_check_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
describe HealthChecks::Checks::DaysAgoCheck do
diff --git a/spec/lib/health_checks/health_checkable_spec.rb b/spec/lib/health_checks/health_checkable_spec.rb
index abfeb5c21..301585bbd 100644
--- a/spec/lib/health_checks/health_checkable_spec.rb
+++ b/spec/lib/health_checks/health_checkable_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe HealthChecks::HealthCheckable do
diff --git a/spec/lib/health_checks/health_checks_spec.rb b/spec/lib/health_checks/health_checks_spec.rb
index c7037b813..335e10b3a 100644
--- a/spec/lib/health_checks/health_checks_spec.rb
+++ b/spec/lib/health_checks/health_checks_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe HealthChecks do
diff --git a/spec/lib/i18n_interpolation_spec.rb b/spec/lib/i18n_interpolation_spec.rb
index 47037ecdb..8c5b8d1b5 100644
--- a/spec/lib/i18n_interpolation_spec.rb
+++ b/spec/lib/i18n_interpolation_spec.rb
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "when using i18n" do
@@ -58,7 +58,7 @@ describe "gettext_interpolate" do
result = gettext_interpolate(string, :a => "foo".html_safe)
result.should == "Hello foo"
result.should_not be_html_safe
- end
+ end
end
context "html safe string" do
@@ -74,6 +74,6 @@ describe "gettext_interpolate" do
result = gettext_interpolate(string, :a => "foo&".html_safe)
result.should == "Hello foo&"
result.should be_html_safe
- end
+ end
end
end
diff --git a/spec/lib/mail_handler/backends/mail_backend_spec.rb b/spec/lib/mail_handler/backends/mail_backend_spec.rb
index 588033faf..dfd6dd1fe 100644
--- a/spec/lib/mail_handler/backends/mail_backend_spec.rb
+++ b/spec/lib/mail_handler/backends/mail_backend_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '../../../../spec_helper')
describe MailHandler::Backends::MailBackend do
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index ea7a99b05..7f0070a8a 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
def create_message_from(from_field)
diff --git a/spec/lib/public_body_csv_spec.rb b/spec/lib/public_body_csv_spec.rb
index e3cc4be6e..5c57c9533 100644
--- a/spec/lib/public_body_csv_spec.rb
+++ b/spec/lib/public_body_csv_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe PublicBodyCSV do
diff --git a/spec/lib/theme_spec.rb b/spec/lib/theme_spec.rb
index 829c1a269..b7259078f 100644
--- a/spec/lib/theme_spec.rb
+++ b/spec/lib/theme_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "theme_url_to_theme_name" do
diff --git a/spec/lib/timezone_fixes_spec.rb b/spec/lib/timezone_fixes_spec.rb
index 8a9a3bf31..c44479fd7 100644
--- a/spec/lib/timezone_fixes_spec.rb
+++ b/spec/lib/timezone_fixes_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# This is a test of the monkey patches in timezone_fixes.rb
# We use MailServerLogDone here just as a totally random model that has a datetime type.
diff --git a/spec/lib/whatdotheyknow/strip_empty_sessions_spec.rb b/spec/lib/whatdotheyknow/strip_empty_sessions_spec.rb
index fcd729b48..d4f668671 100644
--- a/spec/lib/whatdotheyknow/strip_empty_sessions_spec.rb
+++ b/spec/lib/whatdotheyknow/strip_empty_sessions_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe WhatDoTheyKnow::StripEmptySessions do
diff --git a/spec/mailers/application_mailer_spec.rb b/spec/mailers/application_mailer_spec.rb
index 718ac47fb..a5c5a5cf2 100644
--- a/spec/mailers/application_mailer_spec.rb
+++ b/spec/mailers/application_mailer_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
diff --git a/spec/mailers/info_request_batch_mailer_spec.rb b/spec/mailers/info_request_batch_mailer_spec.rb
index 19791e163..146735e73 100644
--- a/spec/mailers/info_request_batch_mailer_spec.rb
+++ b/spec/mailers/info_request_batch_mailer_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe InfoRequestBatchMailer do
diff --git a/spec/mailers/outgoing_mailer_spec.rb b/spec/mailers/outgoing_mailer_spec.rb
index 3df5018fe..d2bdc49dd 100644
--- a/spec/mailers/outgoing_mailer_spec.rb
+++ b/spec/mailers/outgoing_mailer_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe OutgoingMailer, " when working out follow up names and addresses" do
diff --git a/spec/mailers/request_mailer_spec.rb b/spec/mailers/request_mailer_spec.rb
index 6b54c25d2..7dcb47b50 100644
--- a/spec/mailers/request_mailer_spec.rb
+++ b/spec/mailers/request_mailer_spec.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
# TODO: Combine all these separate "describe" blocks to tidy things up
diff --git a/spec/mailers/track_mailer_spec.rb b/spec/mailers/track_mailer_spec.rb
index e8094b692..56e0c18f6 100644
--- a/spec/mailers/track_mailer_spec.rb
+++ b/spec/mailers/track_mailer_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe TrackMailer do
diff --git a/spec/models/about_me_validator_spec.rb b/spec/models/about_me_validator_spec.rb
index 5610cead8..c8078f44a 100644
--- a/spec/models/about_me_validator_spec.rb
+++ b/spec/models/about_me_validator_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe AboutMeValidator do
diff --git a/spec/models/censor_rule_spec.rb b/spec/models/censor_rule_spec.rb
index 4ecd2d3e1..888650a3a 100644
--- a/spec/models/censor_rule_spec.rb
+++ b/spec/models/censor_rule_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: censor_rules
diff --git a/spec/models/change_email_validator_spec.rb b/spec/models/change_email_validator_spec.rb
index b667a23d1..efa8ca819 100644
--- a/spec/models/change_email_validator_spec.rb
+++ b/spec/models/change_email_validator_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
def validator_with_user_and_params(user, params = {})
diff --git a/spec/models/contact_validator_spec.rb b/spec/models/contact_validator_spec.rb
index 0f5403967..9d7c192a3 100644
--- a/spec/models/contact_validator_spec.rb
+++ b/spec/models/contact_validator_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe ContactValidator do
diff --git a/spec/models/customstates.rb b/spec/models/customstates.rb
index 942e1fcde..453453f20 100644
--- a/spec/models/customstates.rb
+++ b/spec/models/customstates.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
module InfoRequestCustomStates
def self.included(base)
diff --git a/spec/models/foi_attachment_spec.rb b/spec/models/foi_attachment_spec.rb
index 882723d1e..88afc24a4 100644
--- a/spec/models/foi_attachment_spec.rb
+++ b/spec/models/foi_attachment_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: foi_attachments
diff --git a/spec/models/has_tag_string_tag_spec.rb b/spec/models/has_tag_string_tag_spec.rb
index 759b3396f..bbcb00ca2 100644
--- a/spec/models/has_tag_string_tag_spec.rb
+++ b/spec/models/has_tag_string_tag_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HasTagString::HasTagStringTag, " when fiddling with tag strings" do
diff --git a/spec/models/holiday_import_spec.rb b/spec/models/holiday_import_spec.rb
index 7ec5c04d5..eb0b33e0e 100644
--- a/spec/models/holiday_import_spec.rb
+++ b/spec/models/holiday_import_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe HolidayImport do
diff --git a/spec/models/holiday_spec.rb b/spec/models/holiday_spec.rb
index 2f8eeabd9..bd73e672b 100644
--- a/spec/models/holiday_spec.rb
+++ b/spec/models/holiday_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: holidays
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb
index f6e524de3..6651deb61 100644
--- a/spec/models/incoming_message_spec.rb
+++ b/spec/models/incoming_message_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: incoming_messages
diff --git a/spec/models/info_request_batch_spec.rb b/spec/models/info_request_batch_spec.rb
index 701422037..a8572e7ba 100644
--- a/spec/models/info_request_batch_spec.rb
+++ b/spec/models/info_request_batch_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: info_request_batches
diff --git a/spec/models/info_request_event_spec.rb b/spec/models/info_request_event_spec.rb
index 1299dfb63..401a5f712 100644
--- a/spec/models/info_request_event_spec.rb
+++ b/spec/models/info_request_event_spec.rb
@@ -1,4 +1,4 @@
-# coding: utf-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: info_request_events
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index 1ead1e0bf..075bc2607 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: info_requests
diff --git a/spec/models/mail_server_log_spec.rb b/spec/models/mail_server_log_spec.rb
index 67709b130..6b38e1270 100644
--- a/spec/models/mail_server_log_spec.rb
+++ b/spec/models/mail_server_log_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: mail_server_logs
diff --git a/spec/models/outgoing_message_spec.rb b/spec/models/outgoing_message_spec.rb
index a3e2d1c68..44644c9d8 100644
--- a/spec/models/outgoing_message_spec.rb
+++ b/spec/models/outgoing_message_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: outgoing_messages
diff --git a/spec/models/post_redirect_spec.rb b/spec/models/post_redirect_spec.rb
index 750e47cc3..7d0dfe395 100644
--- a/spec/models/post_redirect_spec.rb
+++ b/spec/models/post_redirect_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: post_redirects
diff --git a/spec/models/profile_photo_spec.rb b/spec/models/profile_photo_spec.rb
index e70f474a0..199c87500 100644
--- a/spec/models/profile_photo_spec.rb
+++ b/spec/models/profile_photo_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: profile_photos
diff --git a/spec/models/public_body_category/category_collection_spec.rb b/spec/models/public_body_category/category_collection_spec.rb
index 1fbcbe739..29fa6a699 100644
--- a/spec/models/public_body_category/category_collection_spec.rb
+++ b/spec/models/public_body_category/category_collection_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe PublicBodyCategory::CategoryCollection do
diff --git a/spec/models/public_body_category_link_spec.rb b/spec/models/public_body_category_link_spec.rb
index fd5608480..564f4126f 100644
--- a/spec/models/public_body_category_link_spec.rb
+++ b/spec/models/public_body_category_link_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_category_links
diff --git a/spec/models/public_body_category_spec.rb b/spec/models/public_body_category_spec.rb
index 297bd096a..c6b2a8fde 100644
--- a/spec/models/public_body_category_spec.rb
+++ b/spec/models/public_body_category_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_categories
diff --git a/spec/models/public_body_change_request_spec.rb b/spec/models/public_body_change_request_spec.rb
index 0c4cea67b..90abf0b6b 100644
--- a/spec/models/public_body_change_request_spec.rb
+++ b/spec/models/public_body_change_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_change_requests
diff --git a/spec/models/public_body_heading_spec.rb b/spec/models/public_body_heading_spec.rb
index be3e7c7d2..8b46181b6 100644
--- a/spec/models/public_body_heading_spec.rb
+++ b/spec/models/public_body_heading_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_body_headings
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb
index cce017424..d6abf7b5f 100644
--- a/spec/models/public_body_spec.rb
+++ b/spec/models/public_body_spec.rb
@@ -1,4 +1,4 @@
-# encoding: UTF-8
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: public_bodies
diff --git a/spec/models/purge_request_spec.rb b/spec/models/purge_request_spec.rb
index 02b3d685d..617e082a8 100644
--- a/spec/models/purge_request_spec.rb
+++ b/spec/models/purge_request_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: purge_requests
diff --git a/spec/models/raw_email_spec.rb b/spec/models/raw_email_spec.rb
index aa82b0bc3..044c89d3f 100644
--- a/spec/models/raw_email_spec.rb
+++ b/spec/models/raw_email_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: raw_emails
diff --git a/spec/models/spam_address_spec.rb b/spec/models/spam_address_spec.rb
index f28440121..edef79bed 100644
--- a/spec/models/spam_address_spec.rb
+++ b/spec/models/spam_address_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: spam_addresses
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb
index 3edf2d1ad..251a50803 100644
--- a/spec/models/track_thing_spec.rb
+++ b/spec/models/track_thing_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: track_things
diff --git a/spec/models/track_things_sent_email_spec.rb b/spec/models/track_things_sent_email_spec.rb
index 4675d0847..b31a989db 100644
--- a/spec/models/track_things_sent_email_spec.rb
+++ b/spec/models/track_things_sent_email_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: track_things_sent_emails
diff --git a/spec/models/user_info_request_sent_alert_spec.rb b/spec/models/user_info_request_sent_alert_spec.rb
index 69be1092b..6b4efa575 100644
--- a/spec/models/user_info_request_sent_alert_spec.rb
+++ b/spec/models/user_info_request_sent_alert_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: user_info_request_sent_alerts
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 2245a024f..009045bdf 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: users
diff --git a/spec/models/widget_vote_spec.rb b/spec/models/widget_vote_spec.rb
index b9f990eac..1a6d3833c 100644
--- a/spec/models/widget_vote_spec.rb
+++ b/spec/models/widget_vote_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# == Schema Information
#
# Table name: widget_votes
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb
index 678e3a2dc..b8ef341bd 100644
--- a/spec/models/xapian_spec.rb
+++ b/spec/models/xapian_spec.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe User, " when indexing users with Xapian" do
diff --git a/spec/script/handle-mail-replies_spec.rb b/spec/script/handle-mail-replies_spec.rb
index 62d5c1dab..399d0d51d 100644
--- a/spec/script/handle-mail-replies_spec.rb
+++ b/spec/script/handle-mail-replies_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "external_command"
diff --git a/spec/script/mailin_spec.rb b/spec/script/mailin_spec.rb
index 0ff094c2b..6cdc1308e 100644
--- a/spec/script/mailin_spec.rb
+++ b/spec/script/mailin_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "external_command"
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4df1b5649..d9feba6cd 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require 'rubygems'
require 'spork'
diff --git a/spec/support/email_helpers.rb b/spec/support/email_helpers.rb
index 252b1f137..8f2abdbfa 100644
--- a/spec/support/email_helpers.rb
+++ b/spec/support/email_helpers.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
def load_raw_emails_data
raw_emails_yml = File.join(RSpec.configuration.fixture_path, "raw_emails.yml")
for raw_email_id in YAML::load_file(raw_emails_yml).map{|k,v| v["id"]} do
diff --git a/spec/support/load_file_fixtures.rb b/spec/support/load_file_fixtures.rb
index a54505e99..4370a1b3d 100644
--- a/spec/support/load_file_fixtures.rb
+++ b/spec/support/load_file_fixtures.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
def file_fixture_name(file_name)
return File.join(RSpec.configuration.fixture_path, "files", file_name)
end
diff --git a/spec/support/xapian_index.rb b/spec/support/xapian_index.rb
index 344c28ebb..bfdffd281 100644
--- a/spec/support/xapian_index.rb
+++ b/spec/support/xapian_index.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
# Rebuild the current xapian index
def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = true)
if dropfirst
diff --git a/spec/views/public_body/show.html.erb_spec.rb b/spec/views/public_body/show.html.erb_spec.rb
index 2a4c21d04..adf78d307 100644
--- a/spec/views/public_body/show.html.erb_spec.rb
+++ b/spec/views/public_body/show.html.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe "public_body/show" do
diff --git a/spec/views/reports/new.erb_spec.rb b/spec/views/reports/new.erb_spec.rb
index 66b738261..d599100b9 100644
--- a/spec/views/reports/new.erb_spec.rb
+++ b/spec/views/reports/new.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'reports/new.html.erb' do
diff --git a/spec/views/request/_after_actions.html.erb_spec.rb b/spec/views/request/_after_actions.html.erb_spec.rb
index 833323d68..7a58731ce 100644
--- a/spec/views/request/_after_actions.html.erb_spec.rb
+++ b/spec/views/request/_after_actions.html.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'when displaying actions that can be taken with regard to a request' do
diff --git a/spec/views/request/_describe_state.html.erb_spec.rb b/spec/views/request/_describe_state.html.erb_spec.rb
index 88dea53c5..1026ad2f3 100644
--- a/spec/views/request/_describe_state.html.erb_spec.rb
+++ b/spec/views/request/_describe_state.html.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'when showing the form for describing the state of a request' do
diff --git a/spec/views/request/show.html.erb_spec.rb b/spec/views/request/show.html.erb_spec.rb
index 6e63b9b43..71057f028 100644
--- a/spec/views/request/show.html.erb_spec.rb
+++ b/spec/views/request/show.html.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'request/show' do
diff --git a/spec/views/request_game/play.html.erb_spec.rb b/spec/views/request_game/play.html.erb_spec.rb
index b5cf57c23..37a84b211 100644
--- a/spec/views/request_game/play.html.erb_spec.rb
+++ b/spec/views/request_game/play.html.erb_spec.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
describe 'request_game/play' do