#29: removed hack for encoding

This commit is contained in:
Vokhmin Alexey V 2013-03-18 15:36:16 +04:00
parent dbea9152b8
commit e055d0080b
384 changed files with 3 additions and 388 deletions

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ActivityFeedsController < ApplicationController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Admin::BaseController < ApplicationController
before_filter :authenticate_user!
load_and_authorize_resource

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Admin::EventLogsController < Admin::BaseController
def index
@event_logs = EventLog.default_order.eager_loading.paginate :page => params[:page]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Admin::RegisterRequestsController < Admin::BaseController
def index
@register_requests = @register_requests.send((params[:scope] || 'unprocessed').to_sym).paginate(:page => params[:page])

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Admin::UsersController < Admin::BaseController
include AvatarHelper
prepend_before_filter :find_user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class AdvisoriesController < ApplicationController
before_filter :authenticate_user!
skip_before_filter :authenticate_user! if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::AdvisoriesController < Api::V1::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::ArchesController < Api::V1::BaseController
before_filter :authenticate_user! unless APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::BaseController < ApplicationController
#respond_to :json

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::BuildListsController < Api::V1::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::GroupsController < Api::V1::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::PlatformsController < Api::V1::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:show, :platforms_for_build, :members] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::ProductBuildListsController < Api::V1::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::ProductsController < Api::V1::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::ProjectsController < Api::V1::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::RepositoriesController < Api::V1::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::SearchController < Api::V1::BaseController
before_filter :authenticate_user! unless APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Api::V1::UsersController < Api::V1::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ApplicationController < ActionController::Base
AIRBRAKE_IGNORE = [ActionController::InvalidAuthenticityToken,
AbstractController::ActionNotFound]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class AutocompletesController < ApplicationController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ContactsController < ApplicationController
def new

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Groups::BaseController < ApplicationController
before_filter :authenticate_user!
before_filter :find_group

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Groups::MembersController < Groups::BaseController
is_related_controller!
belongs_to :group, :finder => 'find_by_insensitive_uname!', :optional => true

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Groups::ProfileController < Groups::BaseController
include AvatarHelper
load_and_authorize_resource :class => Group, :instance_name => 'group'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class PagesController < ApplicationController
# before_filter :authenticate_user!, :except => [:show, :main, :forbidden]
# load_and_authorize_resource

View File

@ -1,3 +1,2 @@
# -*- encoding : utf-8 -*-
class Platforms::BaseController < ApplicationController
end

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::MaintainersController < ApplicationController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::PlatformsController < Platforms::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::PrivateUsersController < Platforms::BaseController
before_filter :authenticate_user!
before_filter :find_platform_and_private_users

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::PrivatesController < Platforms::BaseController
require 'digest/sha2'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::ProductBuildListsController < Platforms::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show, :log] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::ProductsController < Platforms::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platforms::RepositoriesController < Platforms::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show, :projects_list] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::BaseController < ApplicationController
prepend_before_filter :find_project
before_filter :init_statistics

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::BuildListsController < Projects::BaseController
NESTED_ACTIONS = [:search, :index, :new, :create]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::CollaboratorsController < Projects::BaseController
respond_to :html, :json

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::CommentsController < Projects::BaseController
before_filter :authenticate_user!
load_and_authorize_resource :project

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::CommitSubscribesController < Projects::BaseController
before_filter :authenticate_user!
load_and_authorize_resource :project

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::Git::BaseController < Projects::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:show, :index, :blame, :raw, :archive, :diff, :tags, :branches] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::Git::BlobsController < Projects::Git::BaseController
before_filter :set_blob
before_filter lambda {authorize! :write, @project}, :only => [:edit, :update]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::Git::CommitsController < Projects::Git::BaseController
def index
if @path.present?

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::Git::TreesController < Projects::Git::BaseController
before_filter lambda{redirect_to @project if params[:treeish] == @project.default_branch and params[:path].blank?}, :only => :show
skip_before_filter :set_branch_and_tree, :set_treeish_and_path, :only => :archive

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::IssuesController < Projects::BaseController
NON_RESTFUL_ACTION = [:create_label, :update_label, :destroy_label]
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::ProjectsController < Projects::BaseController
include ProjectsHelper
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::PullRequestsController < Projects::BaseController
before_filter :authenticate_user!
skip_before_filter :authenticate_user!, :only => [:index, :show] if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Projects::SubscribesController < Projects::BaseController
before_filter :authenticate_user!

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
#require 'lib/gollum'
require 'cgi'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class SearchController < ApplicationController
before_filter :authenticate_user! unless APP_CONFIG['anonymous_access']
# load_and_authorize_resource

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::BaseController < ApplicationController
before_filter :authenticate_user!
before_filter :find_user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def open_id
# raise env['omniauth.auth'].inspect

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::ProfileController < Users::BaseController
skip_before_filter :authenticate_user!, :only => :show if APP_CONFIG['anonymous_access']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::RegisterRequestsController < ApplicationController
before_filter :user_choose_locale
layout 'invite'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::SettingsController < Users::BaseController
include AvatarHelper
before_filter :set_current_user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::SshKeysController < Users::BaseController
skip_before_filter :find_user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Users::UsersController < Users::BaseController
skip_before_filter :authenticate_user!
before_filter :find_user_by_key, :only => [:allowed, :discover]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module ActivityFeedsHelper
def render_activity_feed(activity_feed)
render activity_feed.partial, activity_feed.data.merge(:activity_feed => activity_feed)

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module AdvisoriesHelper
def advisories_select_options(advisories, opts = {:class => 'popoverable'})
def_values = [[t("layout.advisories.no_"), 'no'], [t("layout.advisories.new"), 'new'], [t("layout.advisories.existing"), 'existing', {:class => 'advisory_id'}]]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module ApplicationHelper
def layout_class
case

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module BuildListsHelper
def build_list_status_color(status)
case status

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module CommentsHelper
def project_commentable_comment_path(project, commentable, comment)
if Comment.issue_comment?(commentable.class)

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module CommitHelper
def render_commit_stats(stats)

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module DeviseHelper
def getDeviseErrors(*name)
res = Array.new(name.count)

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module DiffHelper
def render_diff_stats(stats)
path = @pull.try(:id) ? polymorphic_path([@project, @pull]) : ''

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module GitHelper
def render_path

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module IssuesHelper
def tracker_search_field(name, txt)
str = "<input name='#{name}' id='#{name}' type='text' value='#{txt}'"

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module MassBuildHelper
def link_to_list platform, mass_build, which
link_to t("layout.mass_builds.#{which}"),

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module PlatformsHelper
def repository_name_postfix(platform)
return "" unless platform

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module ProjectsHelper
def options_for_filters(all_projects, groups, owners)
projects_count_by_groups = all_projects.where(:owner_id => groups, :owner_type => 'Group').

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module PullRequestHelper
def merge_activity comments, commits
common_comments, pull_comments = comments.partition {|c| c.data.blank?}

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module UsersHelper
def avatar_url_by_email(email, size = :small)

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
module WikiHelper
def revert_path(project, first, second, name)

View File

@ -1,5 +1,3 @@
# -*- encoding : utf-8 -*-
class UserMailer < ActionMailer::Base
default :from => "\"#{APP_CONFIG['project_name']}\" <#{APP_CONFIG['do-not-reply-email']}>"
default_url_options.merge!(:protocol => 'https') if APP_CONFIG['mailer_https_url']

View File

@ -1,4 +1,3 @@
# -*- 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:

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ActivityFeed < ActiveRecord::Base
CODE = ['git_delete_branch_notification', 'git_new_push_notification', 'new_comment_commit_notification']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ActivityFeedObserver < ActiveRecord::Observer
observe :issue, :comment, :user, :build_list

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Arch < ActiveRecord::Base
has_many :build_lists, :dependent => :destroy

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Authentication < ActiveRecord::Base
belongs_to :user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Avatar < ActiveRecord::Base
self.abstract_class = true

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class BuildList < ActiveRecord::Base
include Modules::Models::CommitAndVersion
include Modules::Models::FileStoreClean

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class BuildList::Filter
PER_PAGE = [25, 50, 100]

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class BuildList::Item < ActiveRecord::Base
belongs_to :build_list, :touch => true

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Collaborator
include ActiveModel::Conversion
include ActiveModel::Validations

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Comment < ActiveRecord::Base
belongs_to :commentable, :polymorphic => true
belongs_to :user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class EventLog < ActiveRecord::Base
belongs_to :user
belongs_to :eventable, :polymorphic => true

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class EventLogObserver < ActiveRecord::Observer
observe :user, :private_user, :platform, :repository, :project, :product, :build_list, :product_build_list

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class GitHook
ZERO = '0000000000000000000000000000000000000000'
@queue = :hook

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Group < Avatar
belongs_to :owner, :class_name => 'User'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Issue < ActiveRecord::Base
STATUSES = ['open', 'closed']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class KeyPair < ActiveRecord::Base
belongs_to :repository
belongs_to :user

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Label < ActiveRecord::Base
has_many :labelings, :dependent => :destroy
has_many :issues, :through => :labelings

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Labeling < ActiveRecord::Base
belongs_to :issue
belongs_to :label

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Platform < ActiveRecord::Base
VISIBILITIES = ['open', 'hidden']

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class PrivateUser < ActiveRecord::Base
require 'digest/sha2'

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Product < ActiveRecord::Base
include Modules::Models::TimeLiving

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ProductBuildList < ActiveRecord::Base
include Modules::Models::CommitAndVersion
include Modules::Models::TimeLiving

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class Project < ActiveRecord::Base
VISIBILITIES = ['open', 'hidden']
MAX_OWN_PROJECTS = 32000

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ProjectImport < ActiveRecord::Base
belongs_to :project
belongs_to :platform

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ProjectTag < ActiveRecord::Base
include Modules::Models::FileStoreClean

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class ProjectToRepository < ActiveRecord::Base
belongs_to :project
belongs_to :repository

View File

@ -1,4 +1,3 @@
# -*- encoding : utf-8 -*-
class RegisterRequest < ActiveRecord::Base
default_scope order('created_at ASC')

Some files were not shown because too many files have changed in this diff Show More