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 =~ /