From 13780a1b53297c632298179431890820d654fe72 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Mon, 30 Jan 2012 22:39:34 +0200 Subject: [PATCH] Add magic encodings. Refs #95 --- app/controllers/application_controller.rb | 2 +- app/controllers/auto_build_lists_controller.rb | 1 + app/controllers/build_lists_controller.rb | 1 + app/controllers/categories_controller.rb | 1 + app/controllers/collaborators_controller.rb | 1 + app/controllers/comments_controller.rb | 1 + app/controllers/containers_controller.rb | 1 + app/controllers/downloads_controller.rb | 1 + app/controllers/event_logs_controller.rb | 2 +- app/controllers/git/base_controller.rb | 3 ++- app/controllers/git/blobs_controller.rb | 1 + app/controllers/git/commits_controller.rb | 1 + app/controllers/git/repositories_controller.rb | 3 ++- app/controllers/git/trees_controller.rb | 3 ++- app/controllers/groups_controller.rb | 2 +- app/controllers/issues_controller.rb | 1 + app/controllers/members_controller.rb | 1 + app/controllers/personal_repositories_controller.rb | 1 + app/controllers/platforms_controller.rb | 2 +- app/controllers/private_users_controller.rb | 1 + app/controllers/privates_controller.rb | 1 + app/controllers/product_build_lists_controller.rb | 1 + app/controllers/products_controller.rb | 1 + app/controllers/projects_controller.rb | 1 + app/controllers/repositories_controller.rb | 1 + app/controllers/rpc_controller.rb | 1 + app/controllers/settings/notifiers_controller.rb | 1 + app/controllers/subscribes_controller.rb | 1 + app/controllers/users/omniauth_callbacks_controller.rb | 1 + app/controllers/users_controller.rb | 2 +- app/helpers/application_helper.rb | 1 + app/helpers/comments_helper.rb | 1 + app/helpers/commit_helper.rb | 3 ++- app/helpers/diff_helper.rb | 3 ++- app/helpers/git_helper.rb | 1 + app/helpers/issues_helper.rb | 1 + app/helpers/platforms_helper.rb | 1 + app/helpers/projects_helper.rb | 1 + app/helpers/settings/notifiers_helper.rb | 1 + app/helpers/subscribes_helper.rb | 1 + app/mailers/user_mailer.rb | 2 +- app/models/ability.rb | 1 + app/models/arch.rb | 1 + app/models/authentication.rb | 1 + app/models/auto_build_list.rb | 1 + app/models/build_list.rb | 1 + app/models/build_list/filter.rb | 3 ++- app/models/build_list/item.rb | 1 + app/models/category.rb | 1 + app/models/comment.rb | 1 + app/models/container.rb | 1 + app/models/download.rb | 1 + app/models/event_log.rb | 1 + app/models/event_log_observer.rb | 1 + app/models/git/repository.rb | 3 ++- app/models/group.rb | 1 + app/models/issue.rb | 1 + app/models/platform.rb | 1 + app/models/private_user.rb | 1 + app/models/product.rb | 1 + app/models/product_build_list.rb | 1 + app/models/project.rb | 1 + app/models/project_import.rb | 1 + app/models/project_to_repository.rb | 1 + app/models/relation.rb | 1 + app/models/repository.rb | 1 + app/models/rpm.rb | 1 + app/models/settings.rb | 1 + app/models/settings/notifier.rb | 1 + app/models/subscribe.rb | 1 + app/models/user.rb | 1 + bin/xml-client-demo.rb | 3 ++- config/application.rb | 1 + config/boot.rb | 1 + config/compass.rb | 3 ++- config/deploy.rb | 1 + config/deploy/pingwinsoft.rb | 1 + config/environment.rb | 1 + config/environments/development.rb | 1 + config/environments/production.rb | 1 + config/environments/test.rb | 1 + config/initializers/backtrace_silencers.rb | 1 + config/initializers/default_product_files.rb | 1 + config/initializers/generators.rb | 1 + config/initializers/inflections.rb | 1 + config/initializers/load_config.rb | 1 + config/initializers/mime_types.rb | 3 ++- config/initializers/notifications.rb | 1 + config/initializers/render_errors_in_forms.rb | 3 ++- config/initializers/session_store.rb | 1 + config/routes.rb | 1 + config/schedule.rb | 1 + config/unicorn.rb | 1 + db/migrate/20110309144736_devise_create_users.rb | 1 + db/migrate/20110309173339_create_platforms.rb | 1 + db/migrate/20110309173421_create_projects.rb | 1 + db/migrate/20110311154011_create_repositories.rb | 1 + db/migrate/20110311154044_remove_platform_id_from_projects.rb | 1 + db/migrate/20110311154136_add_repository_id_to_projects.rb | 1 + db/migrate/20110311154929_add_unixname_to_repositories.rb | 1 + db/migrate/20110312133121_create_containers.rb | 1 + db/migrate/20110312133559_create_arches.rb | 1 + db/migrate/20110312133948_create_rpms.rb | 1 + db/migrate/20110317130503_add_released_to_platforms.rb | 1 + db/migrate/20110405161609_create_build_lists.rb | 3 ++- db/migrate/20110407144147_add_is_circle_to_build_lists.rb | 1 + db/migrate/20110408123808_create_build_list_items.rb | 1 + .../20110408132541_add_additional_repos_to_build_lists.rb | 1 + db/migrate/20110408134718_add_name_to_build_lists.rb | 1 + db/migrate/20110411082826_create_products.rb | 1 + db/migrate/20110411125015_add_fields_to_products.rb | 1 + db/migrate/20110411160955_create_delayed_jobs.rb | 3 ++- db/migrate/20110412074038_add_attachment_tar_to_product.rb | 1 + db/migrate/20110414145300_add_template_columns_to_products.rb | 1 + db/migrate/20110428132112_add_cron_tab_to_products.rb | 1 + db/migrate/20110428140753_add_use_cron_to_products.rb | 1 + db/migrate/20111011182847_add_extra_fields_to_users.rb | 1 + db/migrate/20111011200645_create_authentications.rb | 1 + db/migrate/20111012065448_create_downloads.rb | 1 + db/migrate/20111012133633_create_event_logs.rb | 1 + db/migrate/20111012223006_create_permissions.rb | 1 + db/migrate/20111012223306_create_roles.rb | 1 + db/migrate/20111012223521_create_relations.rb | 1 + db/migrate/20111012223944_create_groups.rb | 1 + db/migrate/20111013150125_create_project_to_repositories.rb | 1 + .../20111014150436_remove_repository_id_from_project.rb | 1 + db/migrate/20111016130557_add_uname_to_groups.rb | 1 + db/migrate/20111016220428_platform_restruct.rb | 1 + db/migrate/20111016224709_project_restruct.rb | 1 + db/migrate/20111016225240_repositories_restruct.rb | 1 + db/migrate/20111017112255_create_private_users.rb | 1 + db/migrate/20111017152936_create_categories.rb | 1 + ...11017172701_add_category_id_and_description_to_projects.rb | 1 + db/migrate/20111018102655_add_uname_to_users.rb | 1 + db/migrate/20111019173246_create_role_lines.rb | 1 + db/migrate/20111020160644_add_new_fields_to_build_lists.rb | 3 ++- db/migrate/20111021164945_delete_nickname_init_uname.rb | 1 + db/migrate/20111022170400_create_rights.rb | 1 + db/migrate/20111023154034_add_global_role_to_users.rb | 1 + db/migrate/20111023154130_add_global_role_to_groups.rb | 1 + db/migrate/20111023195205_add_can_see_to_roles.rb | 1 + db/migrate/20111026135125_add_on_and_to_to_roles.rb | 1 + db/migrate/20111026152530_add_user_id_to_private_users.rb | 3 ++- db/migrate/20111026200223_add_default_to_roles.rb | 1 + db/migrate/20111027230610_change_roles_on_and_to.rb | 1 + .../20111028070604_remove_visibility_from_repositories.rb | 1 + db/migrate/20111029135514_add_version_to_build_list_items.rb | 3 ++- db/migrate/20111029150934_create_auto_build_lists.rb | 1 + db/migrate/20111107211538_create_product_build_lists.rb | 1 + .../20111111184657_rename_products_build_to_build_script.rb | 1 + db/migrate/20111116140040_add_roles_to_relations.rb | 3 ++- db/migrate/20111122232244_add_ancestry_to_projects.rb | 1 + db/migrate/20111123160010_drop_acl_tables.rb | 1 + db/migrate/20111128140341_rename_name_and_unixname.rb | 1 + ...0181101_change_build_lists_build_requires_default_value.rb | 1 + db/migrate/20111216134039_create_issues.rb | 1 + db/migrate/20111216140849_create_comments.rb | 1 + db/migrate/20111219073859_add_has_issues_to_projects.rb | 1 + db/migrate/20111220152347_add_include_repos_to_build_lists.rb | 1 + db/migrate/20111221194422_add_user_id_to_build_lists.rb | 1 + db/migrate/20111226141947_create_subscribes.rb | 1 + db/migrate/20111228182425_add_auto_publish_to_build_lists.rb | 1 + db/migrate/20120111072106_create_settings_notifiers.rb | 1 + db/migrate/20120111080234_change_commentable_id.rb | 1 + .../20120111135443_add_settings_notifier_to_all_users.rb | 1 + db/migrate/20120113121748_add_issue_status_default_value.rb | 1 + .../20120113151305_add_package_version_to_build_lists.rb | 1 + db/migrate/20120113212924_add_commit_hash_to_build_lists.rb | 1 + db/migrate/20120117110723_add_language_to_users.rb | 1 + db/migrate/20120117210132_create_project_imports.rb | 1 + db/migrate/20120124101727_add_srpm_columns_to_projects.rb | 1 + db/migrate/20120127234602_add_index_for_projects_name.rb | 1 + db/schema.rb | 2 +- db/seeds.rb | 1 + lib/build_server.rb | 1 + lib/ext/paperclip.rb | 1 + lib/git/diff/inline_callback.rb | 1 + lib/grack.rb | 1 + lib/grack/auth.rb | 1 + lib/grack/base.rb | 1 + lib/grack/handler.rb | 1 + lib/modules.rb | 1 + lib/modules/models/owner.rb | 1 + lib/modules/models/personal_repository.rb | 1 + lib/modules/models/rsync_stub.rb | 1 + lib/product_builder.rb | 1 + lib/recipes/bluepill.rb | 1 + lib/recipes/nginx.rb | 1 + lib/recipes/unicorn.rb | 1 + lib/stub_xml_rpc.rb | 1 + spec/controllers/auto_build_lists_controller_spec.rb | 1 + spec/controllers/build_lists_controller_spec.rb | 1 + spec/controllers/collaborators_controller_spec.rb | 1 + spec/controllers/comments_controller_for_commit_spec.rb | 1 + spec/controllers/comments_controller_spec.rb | 1 + spec/controllers/containers_controller_spec.rb | 1 + spec/controllers/downloads_controller_spec.rb | 1 + spec/controllers/groups_controller_spec.rb | 1 + spec/controllers/issues_controller_spec.rb | 1 + spec/controllers/members_controller_spec.rb | 1 + spec/controllers/personal_repositories_controller_spec.rb | 1 + spec/controllers/platforms_controller_spec.rb | 1 + spec/controllers/private_users_controller_spec.rb | 1 + spec/controllers/privates_controller_spec.rb | 1 + spec/controllers/product_build_lists_controller_spec.rb | 1 + spec/controllers/products_controller_spec.rb | 1 + spec/controllers/projects_controller_spec.rb | 1 + spec/controllers/repositories_controller_spec.rb | 1 + spec/controllers/settings/notifiers_controller_spec.rb | 1 + spec/controllers/subscribes_controller_spec.rb | 1 + spec/controllers/users_controller_spec.rb | 1 + spec/factories/_sequences.rb | 3 ++- spec/factories/arch_factory.rb | 3 ++- spec/factories/build_list_factory.rb | 1 + spec/factories/comments.rb | 1 + spec/factories/group_factory.rb | 1 + spec/factories/issues.rb | 1 + spec/factories/platform_factory.rb | 3 ++- spec/factories/private_user_factory.rb | 3 ++- spec/factories/product_build_list_factory.rb | 1 + spec/factories/product_factory.rb | 1 + spec/factories/project_factory.rb | 1 + spec/factories/project_imports.rb | 3 ++- spec/factories/repository_factory.rb | 1 + spec/factories/settings_notifiers.rb | 3 ++- spec/factories/subscribes.rb | 1 + spec/factories/user_factory.rb | 3 ++- spec/helpers/settings/notifiers_helper_spec.rb | 1 + spec/mailers/user_mailer_spec.rb | 1 + spec/models/arch_spec.rb | 1 + spec/models/auto_build_list_spec.rb | 1 + spec/models/cancan_spec.rb | 1 + spec/models/category_spec.rb | 1 + spec/models/comment_for_commit_spec.rb | 1 + spec/models/comment_spec.rb | 1 + spec/models/containter_spec.rb | 1 + spec/models/download_spec.rb | 1 + spec/models/event_log_spec.rb | 1 + spec/models/group_spec.rb | 1 + spec/models/issue_spec.rb | 1 + spec/models/platform_spec.rb | 1 + spec/models/private_user_spec.rb | 1 + spec/models/product_build_list_spec.rb | 1 + spec/models/product_spec.rb | 1 + spec/models/project_import_spec.rb | 1 + spec/models/project_spec.rb | 1 + spec/models/project_to_repository_spec.rb | 1 + spec/models/relation_spec.rb | 1 + spec/models/repository_spec.rb | 1 + spec/models/rpm_spec.rb | 1 + spec/models/settings/notifier_spec.rb | 1 + spec/models/subscribe_spec.rb | 1 + spec/models/user_spec.rb | 1 + spec/routing/product_build_lists_routing_spec.rb | 1 + spec/spec_helper.rb | 1 + spec/support/devise.rb | 1 + spec/support/shared_examples/members_controller.rb | 1 + .../shared_examples/personal_repositories_controller.rb | 1 + spec/support/shared_examples/projects_controller.rb | 1 + spec/support/shared_examples/repositories_controller.rb | 1 + vendor/plugins/diff-display/lib/diff-display.rb | 3 ++- vendor/plugins/diff-display/lib/diff/display/unified.rb | 1 + .../diff-display/lib/diff/display/unified/generator.rb | 1 + vendor/plugins/diff-display/lib/diff/display/version.rb | 1 + vendor/plugins/diff-display/lib/diff/renderer/base.rb | 3 ++- vendor/plugins/diff-display/lib/diff/renderer/diff.rb | 3 ++- vendor/plugins/diff-display/setup.rb | 1 + vendor/plugins/diff-display/test/test_api.rb | 4 ++-- vendor/plugins/diff-display/test/test_base_renderer.rb | 2 +- vendor/plugins/diff-display/test/test_datastructure.rb | 2 +- vendor/plugins/diff-display/test/test_diff_renderer.rb | 2 +- vendor/plugins/diff-display/test/test_generator.rb | 2 +- vendor/plugins/diff-display/test/test_helper.rb | 1 + vendor/plugins/diff-display/test/test_unified.rb | 1 + vendor/plugins/rails_datatables/init.rb | 3 ++- vendor/plugins/rails_datatables/install.rb | 1 + vendor/plugins/rails_datatables/lib/rails_datatables.rb | 1 + vendor/plugins/rails_datatables/uninstall.rb | 1 + .../related_models/app/controllers/related_models/base.rb | 1 + vendor/plugins/related_models/init.rb | 1 + vendor/plugins/related_models/install.rb | 1 + vendor/plugins/related_models/lib/related_models.rb | 1 + .../related_models/lib/related_models/belongs_to_helpers.rb | 1 + .../related_models/lib/related_models/class_methods.rb | 1 + .../related_models/lib/related_models/polymorphic_helpers.rb | 1 + .../plugins/related_models/lib/related_models/url_helpers.rb | 1 + vendor/plugins/related_models/test/related_models_test.rb | 1 + vendor/plugins/related_models/test/test_helper.rb | 1 + vendor/plugins/related_models/uninstall.rb | 1 + 289 files changed, 318 insertions(+), 41 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 494f54ae1..ce09242b6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class ApplicationController < ActionController::Base protect_from_forgery diff --git a/app/controllers/auto_build_lists_controller.rb b/app/controllers/auto_build_lists_controller.rb index 4354b91d8..e69f6ecc1 100644 --- a/app/controllers/auto_build_lists_controller.rb +++ b/app/controllers/auto_build_lists_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class AutoBuildListsController < ApplicationController before_filter :authenticate_user!, :except => :auto_build before_filter :find_auto_build_list, :only => :destroy diff --git a/app/controllers/build_lists_controller.rb b/app/controllers/build_lists_controller.rb index a80420f09..9fb1cbcfb 100644 --- a/app/controllers/build_lists_controller.rb +++ b/app/controllers/build_lists_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class BuildListsController < ApplicationController CALLBACK_ACTIONS = [:publish_build, :status_build, :pre_build, :post_build, :circle_build, :new_bbdt] NESTED_ACTIONS = [:index, :new, :create] diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index df0944d58..3dae0ee00 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class CategoriesController < ApplicationController before_filter :authenticate_user! before_filter :find_category, :only => [:show, :edit, :update, :destroy] diff --git a/app/controllers/collaborators_controller.rb b/app/controllers/collaborators_controller.rb index 2c11b6172..f05ab25ac 100644 --- a/app/controllers/collaborators_controller.rb +++ b/app/controllers/collaborators_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class CollaboratorsController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 6f699a602..704f598b1 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class CommentsController < ApplicationController before_filter :authenticate_user! before_filter :set_commentable, :only => [:index, :edit, :create, :update, :destroy] diff --git a/app/controllers/containers_controller.rb b/app/controllers/containers_controller.rb index 57c27003c..1475672a2 100644 --- a/app/controllers/containers_controller.rb +++ b/app/controllers/containers_controller.rb @@ -1,2 +1,3 @@ +# -*- encoding : utf-8 -*- class ContainersController < ApplicationController end diff --git a/app/controllers/downloads_controller.rb b/app/controllers/downloads_controller.rb index 41d3072f0..8c10a3940 100644 --- a/app/controllers/downloads_controller.rb +++ b/app/controllers/downloads_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class DownloadsController < ApplicationController before_filter :authenticate_user! load_and_authorize_resource diff --git a/app/controllers/event_logs_controller.rb b/app/controllers/event_logs_controller.rb index 91b16e482..1b491ba0a 100644 --- a/app/controllers/event_logs_controller.rb +++ b/app/controllers/event_logs_controller.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class EventLogsController < ApplicationController before_filter :authenticate_user! load_and_authorize_resource diff --git a/app/controllers/git/base_controller.rb b/app/controllers/git/base_controller.rb index 90ed02ecf..6fd5a43c7 100644 --- a/app/controllers/git/base_controller.rb +++ b/app/controllers/git/base_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::BaseController < ApplicationController before_filter :authenticate_user! @@ -39,4 +40,4 @@ class Git::BaseController < ApplicationController def set_current_branch @current_branch = @branches.select{|b| b.name == @treeish }.first end -end \ No newline at end of file +end diff --git a/app/controllers/git/blobs_controller.rb b/app/controllers/git/blobs_controller.rb index eb788d211..75663689e 100644 --- a/app/controllers/git/blobs_controller.rb +++ b/app/controllers/git/blobs_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::BlobsController < Git::BaseController before_filter :set_path before_filter :set_commit_hash diff --git a/app/controllers/git/commits_controller.rb b/app/controllers/git/commits_controller.rb index 021d60cee..45e4c50d5 100644 --- a/app/controllers/git/commits_controller.rb +++ b/app/controllers/git/commits_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::CommitsController < Git::BaseController def index diff --git a/app/controllers/git/repositories_controller.rb b/app/controllers/git/repositories_controller.rb index 5aea592cd..7b5420c80 100644 --- a/app/controllers/git/repositories_controller.rb +++ b/app/controllers/git/repositories_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::RepositoriesController < Git::BaseController def show @@ -7,4 +8,4 @@ class Git::RepositoriesController < Git::BaseController render :template => "git/repositories/empty" unless @tree end -end \ No newline at end of file +end diff --git a/app/controllers/git/trees_controller.rb b/app/controllers/git/trees_controller.rb index 0ee9ed4f0..081fa7e8b 100644 --- a/app/controllers/git/trees_controller.rb +++ b/app/controllers/git/trees_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::TreesController < Git::BaseController def show @@ -13,4 +14,4 @@ class Git::TreesController < Git::BaseController render :template => "git/repositories/show" end -end \ No newline at end of file +end diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 37b95ac33..0ff9ec811 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class GroupsController < ApplicationController is_related_controller! diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 99f13be95..466e574db 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class IssuesController < ApplicationController before_filter :authenticate_user! before_filter :find_project diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index e139e2234..8d22c69f3 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class MembersController < ApplicationController before_filter :authenticate_user! is_related_controller! diff --git a/app/controllers/personal_repositories_controller.rb b/app/controllers/personal_repositories_controller.rb index e5fadb31d..c76c21623 100644 --- a/app/controllers/personal_repositories_controller.rb +++ b/app/controllers/personal_repositories_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class PersonalRepositoriesController < ApplicationController before_filter :authenticate_user! before_filter :find_repository#, :only => [:show, :destroy, :add_project, :remove_project, :make_private, :settings] diff --git a/app/controllers/platforms_controller.rb b/app/controllers/platforms_controller.rb index 9c9563e02..060fe99e0 100644 --- a/app/controllers/platforms_controller.rb +++ b/app/controllers/platforms_controller.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class PlatformsController < ApplicationController before_filter :authenticate_user!, :except => :easy_urpmi before_filter :find_platform, :only => [:freeze, :unfreeze, :clone, :edit, :destroy] diff --git a/app/controllers/private_users_controller.rb b/app/controllers/private_users_controller.rb index 2611047cf..0b25d1202 100644 --- a/app/controllers/private_users_controller.rb +++ b/app/controllers/private_users_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class PrivateUsersController < ApplicationController before_filter :authenticate_user! before_filter :find_platform_and_private_users diff --git a/app/controllers/privates_controller.rb b/app/controllers/privates_controller.rb index a722eaa5c..a375d9ce9 100644 --- a/app/controllers/privates_controller.rb +++ b/app/controllers/privates_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class PrivatesController < ApplicationController require 'digest/sha2' diff --git a/app/controllers/product_build_lists_controller.rb b/app/controllers/product_build_lists_controller.rb index 9af5761aa..fac839015 100644 --- a/app/controllers/product_build_lists_controller.rb +++ b/app/controllers/product_build_lists_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProductBuildListsController < ApplicationController before_filter :authenticate_user!, :except => [:status_build] load_and_authorize_resource :platform, :only => [:create] diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index 4ba424475..66beed7b7 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProductsController < ApplicationController before_filter :authenticate_user! before_filter :find_product, :only => [:show, :edit, :update, :destroy] diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 094268d4e..54c5d5496 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProjectsController < ApplicationController is_related_controller! diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 47217859f..317683699 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class RepositoriesController < ApplicationController before_filter :authenticate_user! before_filter :find_repository, :except => [:index, :new, :create] diff --git a/app/controllers/rpc_controller.rb b/app/controllers/rpc_controller.rb index f5c2cf064..e9e5ba78a 100644 --- a/app/controllers/rpc_controller.rb +++ b/app/controllers/rpc_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class RpcController < ApplicationController exposes_xmlrpc_methods diff --git a/app/controllers/settings/notifiers_controller.rb b/app/controllers/settings/notifiers_controller.rb index 03df52237..78d16a671 100644 --- a/app/controllers/settings/notifiers_controller.rb +++ b/app/controllers/settings/notifiers_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Settings::NotifiersController < ApplicationController layout "sessions" diff --git a/app/controllers/subscribes_controller.rb b/app/controllers/subscribes_controller.rb index e9ff43abf..ddf208c64 100644 --- a/app/controllers/subscribes_controller.rb +++ b/app/controllers/subscribes_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class SubscribesController < ApplicationController before_filter :authenticate_user! diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 55665e78d..a23a8c7e1 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController def open_id # raise env['omniauth.auth'].inspect diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 79a088b01..fcb1079d4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class UsersController < ApplicationController before_filter :authenticate_user! before_filter :find_user, :only => [:show, :edit, :update, :destroy] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2a0a40d45..05055fa4f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module ApplicationHelper def choose_title title = if ['categories', 'personal_repositories', 'downloads'].include?(controller.controller_name) diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb index 0ec9ca5f2..cb5f47b33 100644 --- a/app/helpers/comments_helper.rb +++ b/app/helpers/comments_helper.rb @@ -1,2 +1,3 @@ +# -*- encoding : utf-8 -*- module CommentsHelper end diff --git a/app/helpers/commit_helper.rb b/app/helpers/commit_helper.rb index 58f1bcd57..8093043b3 100644 --- a/app/helpers/commit_helper.rb +++ b/app/helpers/commit_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module CommitHelper def render_commit_stats(stats) @@ -36,4 +37,4 @@ module CommitHelper truncate(message, :length => 42, :omission => "...") end -end \ No newline at end of file +end diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index e130c38b0..c3b12cb4e 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module DiffHelper def render_diff(diff) @@ -14,4 +15,4 @@ module DiffHelper res.html_safe end -end \ No newline at end of file +end diff --git a/app/helpers/git_helper.rb b/app/helpers/git_helper.rb index 286fba6f2..619376dd2 100644 --- a/app/helpers/git_helper.rb +++ b/app/helpers/git_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module GitHelper def render_path diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index bfb9d25e5..07236a9d0 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -1,2 +1,3 @@ +# -*- encoding : utf-8 -*- module IssuesHelper end diff --git a/app/helpers/platforms_helper.rb b/app/helpers/platforms_helper.rb index c27de0604..deebfa87e 100644 --- a/app/helpers/platforms_helper.rb +++ b/app/helpers/platforms_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module PlatformsHelper def repository_name_postfix(platform) return "" unless platform diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 363bde95d..06c4de5b0 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module ProjectsHelper def git_repo_url(name) if current_user diff --git a/app/helpers/settings/notifiers_helper.rb b/app/helpers/settings/notifiers_helper.rb index 295af1e51..218ea67f6 100644 --- a/app/helpers/settings/notifiers_helper.rb +++ b/app/helpers/settings/notifiers_helper.rb @@ -1,2 +1,3 @@ +# -*- encoding : utf-8 -*- module Settings::NotifiersHelper end diff --git a/app/helpers/subscribes_helper.rb b/app/helpers/subscribes_helper.rb index dc1b490ec..dbf4053de 100644 --- a/app/helpers/subscribes_helper.rb +++ b/app/helpers/subscribes_helper.rb @@ -1,2 +1,3 @@ +# -*- encoding : utf-8 -*- module SubscribesHelper end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 39ceffa17..cbdc97486 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,4 +1,4 @@ -# coding: UTF-8 +# -*- encoding : utf-8 -*- class UserMailer < ActionMailer::Base default :from => APP_CONFIG['do-not-reply-email'] diff --git a/app/models/ability.rb b/app/models/ability.rb index 7709990ee..f2412a566 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # If rules goes one by one CanCan joins them by 'OR' sql operator # If rule has multiple conditions CanCan joins them by 'AND' sql operator # WARNING: diff --git a/app/models/arch.rb b/app/models/arch.rb index 90258febf..7a65eb3fe 100644 --- a/app/models/arch.rb +++ b/app/models/arch.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Arch < ActiveRecord::Base has_many :build_lists, :dependent => :destroy diff --git a/app/models/authentication.rb b/app/models/authentication.rb index 26ba03317..0f29e3da9 100644 --- a/app/models/authentication.rb +++ b/app/models/authentication.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Authentication < ActiveRecord::Base belongs_to :user diff --git a/app/models/auto_build_list.rb b/app/models/auto_build_list.rb index 9f607121d..ce88aa10a 100644 --- a/app/models/auto_build_list.rb +++ b/app/models/auto_build_list.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class AutoBuildList < ActiveRecord::Base belongs_to :project belongs_to :arch diff --git a/app/models/build_list.rb b/app/models/build_list.rb index 91534a5a5..4da5118a8 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class BuildList < ActiveRecord::Base belongs_to :project belongs_to :arch diff --git a/app/models/build_list/filter.rb b/app/models/build_list/filter.rb index 6340dc1b7..8ffb725c6 100644 --- a/app/models/build_list/filter.rb +++ b/app/models/build_list/filter.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class BuildList::Filter def initialize(project, options = {}) @project = project @@ -73,4 +74,4 @@ class BuildList::Filter nil end end -end \ No newline at end of file +end diff --git a/app/models/build_list/item.rb b/app/models/build_list/item.rb index ec49f740c..e419526a9 100644 --- a/app/models/build_list/item.rb +++ b/app/models/build_list/item.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class BuildList::Item < ActiveRecord::Base belongs_to :build_list diff --git a/app/models/category.rb b/app/models/category.rb index 31e8001df..d84e8c70a 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Category < ActiveRecord::Base has_many :projects, :dependent => :nullify diff --git a/app/models/comment.rb b/app/models/comment.rb index 8ba9c05d0..4d0c5d020 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true belongs_to :user diff --git a/app/models/container.rb b/app/models/container.rb index 7008fa54d..f2564b763 100644 --- a/app/models/container.rb +++ b/app/models/container.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Container < ActiveRecord::Base belongs_to :project belongs_to :owner, :class_name => 'User', :foreign_key => 'owner_id' diff --git a/app/models/download.rb b/app/models/download.rb index 6d0630bbf..bbdcbfa6e 100644 --- a/app/models/download.rb +++ b/app/models/download.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Download < ActiveRecord::Base PREV_LOG_FILE = "#{ APP_CONFIG['nginx_log'] }.0" diff --git a/app/models/event_log.rb b/app/models/event_log.rb index e69226f6c..ba1e2343e 100644 --- a/app/models/event_log.rb +++ b/app/models/event_log.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class EventLog < ActiveRecord::Base belongs_to :user belongs_to :object, :polymorphic => true diff --git a/app/models/event_log_observer.rb b/app/models/event_log_observer.rb index 4d1163327..7adbeb446 100644 --- a/app/models/event_log_observer.rb +++ b/app/models/event_log_observer.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class EventLogObserver < ActiveRecord::Observer observe :user, :private_user, :platform, :repository, :project, :product, :build_list, :auto_build_list, :product_build_list diff --git a/app/models/git/repository.rb b/app/models/git/repository.rb index 12bec4ee3..4ed82b210 100644 --- a/app/models/git/repository.rb +++ b/app/models/git/repository.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Git::Repository delegate :commits, :commit, :tree, :tags, :heads, :commit_count, :log, :branches, :to => :repo @@ -37,4 +38,4 @@ class Git::Repository [commits(treeish, options[:per_page], skip), options[:page], last_page] end -end \ No newline at end of file +end diff --git a/app/models/group.rb b/app/models/group.rb index 335804b76..999c4a626 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Group < ActiveRecord::Base belongs_to :owner, :class_name => 'User' diff --git a/app/models/issue.rb b/app/models/issue.rb index efeffbf13..7f6bfaae6 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Issue < ActiveRecord::Base STATUSES = ['open', 'closed'] diff --git a/app/models/platform.rb b/app/models/platform.rb index afbb31da3..e7b552ba2 100644 --- a/app/models/platform.rb +++ b/app/models/platform.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- #require 'lib/build_server.rb' class Platform < ActiveRecord::Base VISIBILITIES = ['open', 'hidden'] diff --git a/app/models/private_user.rb b/app/models/private_user.rb index 48afa84f9..c21e6f97d 100644 --- a/app/models/private_user.rb +++ b/app/models/private_user.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class PrivateUser < ActiveRecord::Base require 'digest/sha2' require 'active_support/secure_random' diff --git a/app/models/product.rb b/app/models/product.rb index 84afdfb35..94248612c 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Product < ActiveRecord::Base ATTRS_TO_CLONE = [ 'build_path', 'build_script', 'counter', 'ks', 'menu', 'tar', 'use_cron', 'cron_tab' ] diff --git a/app/models/product_build_list.rb b/app/models/product_build_list.rb index 09d936ea2..b01ee85e4 100644 --- a/app/models/product_build_list.rb +++ b/app/models/product_build_list.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProductBuildList < ActiveRecord::Base BUILD_STARTED = 2 BUILD_COMPLETED = 0 diff --git a/app/models/project.rb b/app/models/project.rb index fd0e43da7..ad364f41e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Project < ActiveRecord::Base VISIBILITIES = ['open', 'hidden'] diff --git a/app/models/project_import.rb b/app/models/project_import.rb index b50ca7761..05544ba16 100644 --- a/app/models/project_import.rb +++ b/app/models/project_import.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProjectImport < ActiveRecord::Base belongs_to :project diff --git a/app/models/project_to_repository.rb b/app/models/project_to_repository.rb index 0679957eb..7bf5adba5 100644 --- a/app/models/project_to_repository.rb +++ b/app/models/project_to_repository.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class ProjectToRepository < ActiveRecord::Base belongs_to :project belongs_to :repository diff --git a/app/models/relation.rb b/app/models/relation.rb index a08ddf6a9..59c31d29d 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Relation < ActiveRecord::Base belongs_to :target, :polymorphic => true belongs_to :object, :polymorphic => true diff --git a/app/models/repository.rb b/app/models/repository.rb index 188b13e27..29cb61fff 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Repository < ActiveRecord::Base belongs_to :platform belongs_to :owner, :polymorphic => true diff --git a/app/models/rpm.rb b/app/models/rpm.rb index e954c8247..577028102 100644 --- a/app/models/rpm.rb +++ b/app/models/rpm.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Rpm < ActiveRecord::Base belongs_to :arch belongs_to :project diff --git a/app/models/settings.rb b/app/models/settings.rb index f6af89076..fee53706e 100644 --- a/app/models/settings.rb +++ b/app/models/settings.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module Settings def self.table_name_prefix 'settings_' diff --git a/app/models/settings/notifier.rb b/app/models/settings/notifier.rb index af21fd811..034117b26 100644 --- a/app/models/settings/notifier.rb +++ b/app/models/settings/notifier.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Settings::Notifier < ActiveRecord::Base belongs_to :user diff --git a/app/models/subscribe.rb b/app/models/subscribe.rb index 0c3a52698..cd7352038 100644 --- a/app/models/subscribe.rb +++ b/app/models/subscribe.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class Subscribe < ActiveRecord::Base belongs_to :subscribeable, :polymorphic => true belongs_to :user diff --git a/app/models/user.rb b/app/models/user.rb index 16a399caa..476e026ca 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- class User < ActiveRecord::Base ROLES = ['admin'] LANGUAGES_FOR_SELECT = [['Russian', 'ru'], ['English', 'en']] diff --git a/bin/xml-client-demo.rb b/bin/xml-client-demo.rb index baa02045b..af73ea16c 100755 --- a/bin/xml-client-demo.rb +++ b/bin/xml-client-demo.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- #!/usr/bin/env ruby require 'rubygems' @@ -34,4 +35,4 @@ project_id = 1 # FIXME repo_id = 1 # FIXME pp client.call("build_packet", project_id, repo_id) -puts 'DONE' \ No newline at end of file +puts 'DONE' diff --git a/config/application.rb b/config/application.rb index 901d86784..22fd70342 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 4489e5868..f488c9a44 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/compass.rb b/config/compass.rb index 07bb179f2..d3fe0bb92 100644 --- a/config/compass.rb +++ b/config/compass.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # This configuration file works with both the Compass command line tool and within Rails. # Require any additional compass plugins here. @@ -12,4 +13,4 @@ sass_dir = "app/stylesheets" javascripts_dir = "public/javascripts" http_stylesheets_path = "/stylesheets" -http_javascripts_path = "/javascripts" \ No newline at end of file +http_javascripts_path = "/javascripts" diff --git a/config/deploy.rb b/config/deploy.rb index 8b3babcb3..c67c374a3 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) set :rvm_type, :user diff --git a/config/deploy/pingwinsoft.rb b/config/deploy/pingwinsoft.rb index a15b8c22a..088b5b27d 100644 --- a/config/deploy/pingwinsoft.rb +++ b/config/deploy/pingwinsoft.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- set :branch, "pingwinsoft" set :domain, "b.pingwinsoft.ru" # "195.19.76.12" diff --git a/config/environment.rb b/config/environment.rb index b35a7204e..0a6cad37f 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 6a687d647..3e4c691ae 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- Rosa::Application.configure do # Settings specified here will take precedence over those in config/application.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index 0d9247b3a..fe08b9089 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- Rosa::Application.configure do # Settings specified here will take precedence over those in config/application.rb diff --git a/config/environments/test.rb b/config/environments/test.rb index 8bff1dc49..44f17a243 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- Rosa::Application.configure do # Settings specified here will take precedence over those in config/application.rb 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/default_product_files.rb b/config/initializers/default_product_files.rb index 6222e022c..2551ce137 100644 --- a/config/initializers/default_product_files.rb +++ b/config/initializers/default_product_files.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- DEFAULT_KS = <<-eos timezone Europe/Moscow auth --useshadow --enablemd5 diff --git a/config/initializers/generators.rb b/config/initializers/generators.rb index 2c07eb336..47fae7cb8 100644 --- a/config/initializers/generators.rb +++ b/config/initializers/generators.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- Rails.application.config.generators do |g| g.test_framework = :rspec end 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/load_config.rb b/config/initializers/load_config.rb index 70d1244b6..7dfd2abbd 100644 --- a/config/initializers/load_config.rb +++ b/config/initializers/load_config.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env] require 'modules' diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index e9307179b..a68a2d48e 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: @@ -5,4 +6,4 @@ # Mime::Type.register_alias "text/html", :iphone Mime::Type.register "text/plain", :diff -Mime::Type.register "text/plain", :patch \ No newline at end of file +Mime::Type.register "text/plain", :patch diff --git a/config/initializers/notifications.rb b/config/initializers/notifications.rb index 965ce9dc0..75d0ebba1 100644 --- a/config/initializers/notifications.rb +++ b/config/initializers/notifications.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- Warden::Manager.after_authentication do |user,auth,opts| # after_set_user, :except => fetch ActiveSupport::Notifications.instrument("event_log.observer", :object => user) end diff --git a/config/initializers/render_errors_in_forms.rb b/config/initializers/render_errors_in_forms.rb index e1ec4a433..fb36c59ed 100644 --- a/config/initializers/render_errors_in_forms.rb +++ b/config/initializers/render_errors_in_forms.rb @@ -1,7 +1,8 @@ +# -*- encoding : utf-8 -*- ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| if html_tag =~ /