Add magic encodings. Refs #95

This commit is contained in:
Pavel Chipiga 2012-01-30 22:39:34 +02:00
parent 33dce21312
commit 13780a1b53
289 changed files with 318 additions and 41 deletions

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
protect_from_forgery protect_from_forgery

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class AutoBuildListsController < ApplicationController class AutoBuildListsController < ApplicationController
before_filter :authenticate_user!, :except => :auto_build before_filter :authenticate_user!, :except => :auto_build
before_filter :find_auto_build_list, :only => :destroy before_filter :find_auto_build_list, :only => :destroy

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class BuildListsController < ApplicationController class BuildListsController < ApplicationController
CALLBACK_ACTIONS = [:publish_build, :status_build, :pre_build, :post_build, :circle_build, :new_bbdt] CALLBACK_ACTIONS = [:publish_build, :status_build, :pre_build, :post_build, :circle_build, :new_bbdt]
NESTED_ACTIONS = [:index, :new, :create] NESTED_ACTIONS = [:index, :new, :create]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CategoriesController < ApplicationController class CategoriesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_category, :only => [:show, :edit, :update, :destroy] before_filter :find_category, :only => [:show, :edit, :update, :destroy]

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CommentsController < ApplicationController class CommentsController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :set_commentable, :only => [:index, :edit, :create, :update, :destroy] before_filter :set_commentable, :only => [:index, :edit, :create, :update, :destroy]

View File

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

View File

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

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class EventLogsController < ApplicationController class EventLogsController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
load_and_authorize_resource load_and_authorize_resource

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::BaseController < ApplicationController class Git::BaseController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
@ -39,4 +40,4 @@ class Git::BaseController < ApplicationController
def set_current_branch def set_current_branch
@current_branch = @branches.select{|b| b.name == @treeish }.first @current_branch = @branches.select{|b| b.name == @treeish }.first
end end
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::BlobsController < Git::BaseController class Git::BlobsController < Git::BaseController
before_filter :set_path before_filter :set_path
before_filter :set_commit_hash before_filter :set_commit_hash

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::CommitsController < Git::BaseController class Git::CommitsController < Git::BaseController
def index def index

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::RepositoriesController < Git::BaseController class Git::RepositoriesController < Git::BaseController
def show def show
@ -7,4 +8,4 @@ class Git::RepositoriesController < Git::BaseController
render :template => "git/repositories/empty" unless @tree render :template => "git/repositories/empty" unless @tree
end end
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::TreesController < Git::BaseController class Git::TreesController < Git::BaseController
def show def show
@ -13,4 +14,4 @@ class Git::TreesController < Git::BaseController
render :template => "git/repositories/show" render :template => "git/repositories/show"
end end
end end

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class GroupsController < ApplicationController class GroupsController < ApplicationController
is_related_controller! is_related_controller!

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class PersonalRepositoriesController < ApplicationController class PersonalRepositoriesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_repository#, :only => [:show, :destroy, :add_project, :remove_project, :make_private, :settings] before_filter :find_repository#, :only => [:show, :destroy, :add_project, :remove_project, :make_private, :settings]

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class PlatformsController < ApplicationController class PlatformsController < ApplicationController
before_filter :authenticate_user!, :except => :easy_urpmi before_filter :authenticate_user!, :except => :easy_urpmi
before_filter :find_platform, :only => [:freeze, :unfreeze, :clone, :edit, :destroy] before_filter :find_platform, :only => [:freeze, :unfreeze, :clone, :edit, :destroy]

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class ProductBuildListsController < ApplicationController class ProductBuildListsController < ApplicationController
before_filter :authenticate_user!, :except => [:status_build] before_filter :authenticate_user!, :except => [:status_build]
load_and_authorize_resource :platform, :only => [:create] load_and_authorize_resource :platform, :only => [:create]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class ProductsController < ApplicationController class ProductsController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_product, :only => [:show, :edit, :update, :destroy] before_filter :find_product, :only => [:show, :edit, :update, :destroy]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
is_related_controller! is_related_controller!

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class RepositoriesController < ApplicationController class RepositoriesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_repository, :except => [:index, :new, :create] before_filter :find_repository, :except => [:index, :new, :create]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class RpcController < ApplicationController class RpcController < ApplicationController
exposes_xmlrpc_methods exposes_xmlrpc_methods

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Settings::NotifiersController < ApplicationController class Settings::NotifiersController < ApplicationController
layout "sessions" layout "sessions"

View File

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

View File

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

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class UsersController < ApplicationController class UsersController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :find_user, :only => [:show, :edit, :update, :destroy] before_filter :find_user, :only => [:show, :edit, :update, :destroy]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
module ApplicationHelper module ApplicationHelper
def choose_title def choose_title
title = if ['categories', 'personal_repositories', 'downloads'].include?(controller.controller_name) title = if ['categories', 'personal_repositories', 'downloads'].include?(controller.controller_name)

View File

@ -1,2 +1,3 @@
# -*- encoding : utf-8 -*-
module CommentsHelper module CommentsHelper
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
module CommitHelper module CommitHelper
def render_commit_stats(stats) def render_commit_stats(stats)
@ -36,4 +37,4 @@ module CommitHelper
truncate(message, :length => 42, :omission => "...") truncate(message, :length => 42, :omission => "...")
end end
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
module DiffHelper module DiffHelper
def render_diff(diff) def render_diff(diff)
@ -14,4 +15,4 @@ module DiffHelper
res.html_safe res.html_safe
end end
end end

View File

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

View File

@ -1,2 +1,3 @@
# -*- encoding : utf-8 -*-
module IssuesHelper module IssuesHelper
end end

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
module ProjectsHelper module ProjectsHelper
def git_repo_url(name) def git_repo_url(name)
if current_user if current_user

View File

@ -1,2 +1,3 @@
# -*- encoding : utf-8 -*-
module Settings::NotifiersHelper module Settings::NotifiersHelper
end end

View File

@ -1,2 +1,3 @@
# -*- encoding : utf-8 -*-
module SubscribesHelper module SubscribesHelper
end end

View File

@ -1,4 +1,4 @@
# coding: UTF-8 # -*- encoding : utf-8 -*-
class UserMailer < ActionMailer::Base class UserMailer < ActionMailer::Base
default :from => APP_CONFIG['do-not-reply-email'] default :from => APP_CONFIG['do-not-reply-email']

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# If rules goes one by one CanCan joins them by 'OR' sql operator # 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 # If rule has multiple conditions CanCan joins them by 'AND' sql operator
# WARNING: # WARNING:

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class BuildList::Filter class BuildList::Filter
def initialize(project, options = {}) def initialize(project, options = {})
@project = project @project = project
@ -73,4 +74,4 @@ class BuildList::Filter
nil nil
end end
end end
end end

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Category < ActiveRecord::Base class Category < ActiveRecord::Base
has_many :projects, :dependent => :nullify has_many :projects, :dependent => :nullify

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Container < ActiveRecord::Base class Container < ActiveRecord::Base
belongs_to :project belongs_to :project
belongs_to :owner, :class_name => 'User', :foreign_key => 'owner_id' belongs_to :owner, :class_name => 'User', :foreign_key => 'owner_id'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Download < ActiveRecord::Base class Download < ActiveRecord::Base
PREV_LOG_FILE = "#{ APP_CONFIG['nginx_log'] }.0" PREV_LOG_FILE = "#{ APP_CONFIG['nginx_log'] }.0"

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Git::Repository class Git::Repository
delegate :commits, :commit, :tree, :tags, :heads, :commit_count, :log, :branches, :to => :repo 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] [commits(treeish, options[:per_page], skip), options[:page], last_page]
end end
end end

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Product < ActiveRecord::Base class Product < ActiveRecord::Base
ATTRS_TO_CLONE = [ 'build_path', 'build_script', 'counter', 'ks', 'menu', 'tar', 'use_cron', 'cron_tab' ] ATTRS_TO_CLONE = [ 'build_path', 'build_script', 'counter', 'ks', 'menu', 'tar', 'use_cron', 'cron_tab' ]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class ProductBuildList < ActiveRecord::Base class ProductBuildList < ActiveRecord::Base
BUILD_STARTED = 2 BUILD_STARTED = 2
BUILD_COMPLETED = 0 BUILD_COMPLETED = 0

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Relation < ActiveRecord::Base class Relation < ActiveRecord::Base
belongs_to :target, :polymorphic => true belongs_to :target, :polymorphic => true
belongs_to :object, :polymorphic => true belongs_to :object, :polymorphic => true

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class Repository < ActiveRecord::Base class Repository < ActiveRecord::Base
belongs_to :platform belongs_to :platform
belongs_to :owner, :polymorphic => true belongs_to :owner, :polymorphic => true

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
module Settings module Settings
def self.table_name_prefix def self.table_name_prefix
'settings_' 'settings_'

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class User < ActiveRecord::Base class User < ActiveRecord::Base
ROLES = ['admin'] ROLES = ['admin']
LANGUAGES_FOR_SELECT = [['Russian', 'ru'], ['English', 'en']] LANGUAGES_FOR_SELECT = [['Russian', 'ru'], ['English', 'en']]

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'rubygems' require 'rubygems'
@ -34,4 +35,4 @@ project_id = 1 # FIXME
repo_id = 1 # FIXME repo_id = 1 # FIXME
pp client.call("build_packet", project_id, repo_id) pp client.call("build_packet", project_id, repo_id)
puts 'DONE' puts 'DONE'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
require File.expand_path('../boot', __FILE__) require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
require 'rubygems' require 'rubygems'
# Set up gems listed in the Gemfile. # Set up gems listed in the Gemfile.

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# This configuration file works with both the Compass command line tool and within Rails. # This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here. # Require any additional compass plugins here.
@ -12,4 +13,4 @@ sass_dir = "app/stylesheets"
javascripts_dir = "public/javascripts" javascripts_dir = "public/javascripts"
http_stylesheets_path = "/stylesheets" http_stylesheets_path = "/stylesheets"
http_javascripts_path = "/javascripts" http_javascripts_path = "/javascripts"

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) $:.unshift(File.expand_path('./lib', ENV['rvm_path']))
set :rvm_type, :user set :rvm_type, :user

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
set :branch, "pingwinsoft" set :branch, "pingwinsoft"
set :domain, "b.pingwinsoft.ru" # "195.19.76.12" set :domain, "b.pingwinsoft.ru" # "195.19.76.12"

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# Load the rails application # Load the rails application
require File.expand_path('../application', __FILE__) require File.expand_path('../application', __FILE__)

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Rosa::Application.configure do Rosa::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Rosa::Application.configure do Rosa::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Rosa::Application.configure do Rosa::Application.configure do
# Settings specified here will take precedence over those in config/application.rb # Settings specified here will take precedence over those in config/application.rb

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file. # 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. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
DEFAULT_KS = <<-eos DEFAULT_KS = <<-eos
timezone Europe/Moscow timezone Europe/Moscow
auth --useshadow --enablemd5 auth --useshadow --enablemd5

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Rails.application.config.generators do |g| Rails.application.config.generators do |g|
g.test_framework = :rspec g.test_framework = :rspec
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format # Add new inflection rules using the following format

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env] APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env]
require 'modules' require 'modules'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks: # Add new mime types for use in respond_to blocks:
@ -5,4 +6,4 @@
# Mime::Type.register_alias "text/html", :iphone # Mime::Type.register_alias "text/html", :iphone
Mime::Type.register "text/plain", :diff Mime::Type.register "text/plain", :diff
Mime::Type.register "text/plain", :patch Mime::Type.register "text/plain", :patch

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Warden::Manager.after_authentication do |user,auth,opts| # after_set_user, :except => fetch Warden::Manager.after_authentication do |user,auth,opts| # after_set_user, :except => fetch
ActiveSupport::Notifications.instrument("event_log.observer", :object => user) ActiveSupport::Notifications.instrument("event_log.observer", :object => user)
end end

View File

@ -1,7 +1,8 @@
# -*- encoding : utf-8 -*-
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if html_tag =~ /<label/ if html_tag =~ /<label/
%|<div class="fieldWithErrors">#{html_tag} <span class="error">#{[instance.error_message].join(', ')}</span></div>|.html_safe %|<div class="fieldWithErrors">#{html_tag} <span class="error">#{[instance.error_message].join(', ')}</span></div>|.html_safe
else else
html_tag html_tag
end end
end end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Rosa::Application.config.session_store :cookie_store, :key => '_rosa_session' Rosa::Application.config.session_store :cookie_store, :key => '_rosa_session'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
Rosa::Application.routes.draw do Rosa::Application.routes.draw do
# XML RPC # XML RPC
match 'api/xmlrpc' => 'rpc#xe_index' match 'api/xmlrpc' => 'rpc#xe_index'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
#every 1.day, :at => '0:05 am' do #every 1.day, :at => '0:05 am' do
# runner "Download.rotate_nginx_log" # runner "Download.rotate_nginx_log"
#end #end

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
base_path = File.expand_path(File.join File.dirname(__FILE__), '..') base_path = File.expand_path(File.join File.dirname(__FILE__), '..')
rails_env = ENV['RAILS_ENV'] || 'production' rails_env = ENV['RAILS_ENV'] || 'production'

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class DeviseCreateUsers < ActiveRecord::Migration class DeviseCreateUsers < ActiveRecord::Migration
def self.up def self.up
create_table(:users) do |t| create_table(:users) do |t|

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CreatePlatforms < ActiveRecord::Migration class CreatePlatforms < ActiveRecord::Migration
def self.up def self.up
create_table :platforms do |t| create_table :platforms do |t|

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CreateProjects < ActiveRecord::Migration class CreateProjects < ActiveRecord::Migration
def self.up def self.up
create_table :projects do |t| create_table :projects do |t|

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class CreateRepositories < ActiveRecord::Migration class CreateRepositories < ActiveRecord::Migration
def self.up def self.up
create_table :repositories do |t| create_table :repositories do |t|

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class RemovePlatformIdFromProjects < ActiveRecord::Migration class RemovePlatformIdFromProjects < ActiveRecord::Migration
def self.up def self.up
remove_column :projects, :platform_id remove_column :projects, :platform_id

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class AddRepositoryIdToProjects < ActiveRecord::Migration class AddRepositoryIdToProjects < ActiveRecord::Migration
def self.up def self.up
add_column :projects, :repository_id, :integer, :null => false add_column :projects, :repository_id, :integer, :null => false

View File

@ -1,3 +1,4 @@
# -*- encoding : utf-8 -*-
class AddUnixnameToRepositories < ActiveRecord::Migration class AddUnixnameToRepositories < ActiveRecord::Migration
def self.up def self.up
add_column :repositories, :unixname, :string, :null => false add_column :repositories, :unixname, :string, :null => false

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