aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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
45 files changed, 48 insertions, 5 deletions
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