Merge pull request #356 from warpc/263-remove_unused_code
[Refs #263] remove unused code
This commit is contained in:
commit
9ba43bbf3a
1
Gemfile
1
Gemfile
|
@ -17,7 +17,6 @@ gem 'paperclip', '~> 2.7.0'
|
||||||
gem 'delayed_job_active_record', '~> 0.3.2'
|
gem 'delayed_job_active_record', '~> 0.3.2'
|
||||||
gem 'russian', '~> 0.6.0'
|
gem 'russian', '~> 0.6.0'
|
||||||
gem 'highline', '~> 1.6.11'
|
gem 'highline', '~> 1.6.11'
|
||||||
gem 'rails-xmlrpc', '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git'
|
|
||||||
|
|
||||||
gem 'jbuilder'
|
gem 'jbuilder'
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,6 @@ GEM
|
||||||
activesupport (= 3.2.2)
|
activesupport (= 3.2.2)
|
||||||
bundler (~> 1.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.2.2)
|
railties (= 3.2.2)
|
||||||
rails-xmlrpc (0.3.6)
|
|
||||||
rails3-generators (0.17.4)
|
rails3-generators (0.17.4)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
rails3-jquery-autocomplete (1.0.6)
|
rails3-jquery-autocomplete (1.0.6)
|
||||||
|
@ -350,7 +349,6 @@ DEPENDENCIES
|
||||||
paperclip (~> 2.7.0)
|
paperclip (~> 2.7.0)
|
||||||
pg (~> 0.13.2)
|
pg (~> 0.13.2)
|
||||||
rails (= 3.2.2)
|
rails (= 3.2.2)
|
||||||
rails-xmlrpc (~> 0.3.6)
|
|
||||||
rails3-generators
|
rails3-generators
|
||||||
rails3-jquery-autocomplete (~> 1.0.6)
|
rails3-jquery-autocomplete (~> 1.0.6)
|
||||||
rdiscount
|
rdiscount
|
||||||
|
|
|
@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
before_filter :set_locale
|
before_filter :set_locale
|
||||||
before_filter lambda { EventLog.current_controller = self },
|
before_filter lambda { EventLog.current_controller = self },
|
||||||
:only => [:create, :destroy, :open_id, :auto_build, :cancel, :publish, :change_visibility] # :update
|
:only => [:create, :destroy, :open_id, :cancel, :publish, :change_visibility] # :update
|
||||||
after_filter lambda { EventLog.current_controller = nil }
|
after_filter lambda { EventLog.current_controller = nil }
|
||||||
|
|
||||||
helper_method :get_owner
|
helper_method :get_owner
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
class AutoBuildListsController < ApplicationController
|
|
||||||
before_filter :authenticate_user!, :except => :auto_build
|
|
||||||
before_filter :find_auto_build_list, :only => :destroy
|
|
||||||
|
|
||||||
load_and_authorize_resource
|
|
||||||
|
|
||||||
def index
|
|
||||||
projects = Project.where(:owner_id => current_user.id, :owner_type => 'User').order('name ASC')
|
|
||||||
@projects_not_automated = projects.automateable.paginate(:page => params[:not_automated_page])
|
|
||||||
@projects_not_automated = @projects_not_automated.where(:name => params[:name]) unless params[:name].blank?
|
|
||||||
|
|
||||||
@projects_already_automated = projects.select('projects.*, auto_build_lists.id auto_build_lists_id').
|
|
||||||
joins(:auto_build_lists).paginate(:page => params[:already_automated_page])
|
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
|
||||||
@auto_build_list = AutoBuildList.new(
|
|
||||||
:bpl_id => Platform.find_by_name('mandriva2011').try(:id),
|
|
||||||
:pl_id => current_user.personal_platform.id,
|
|
||||||
:arch_id => Arch.find_by_name('i586').id,
|
|
||||||
:project_id => params[:project_id])
|
|
||||||
|
|
||||||
if @auto_build_list.save
|
|
||||||
redirect_to auto_build_lists_path, :notice => t('flash.auto_build_list.success')
|
|
||||||
else
|
|
||||||
redirect_to auto_build_lists_path, :notice => t('flash.auto_build_list.failed')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
if @auto_build_list.destroy
|
|
||||||
flash[:notice] = t('flash.auto_build_list.cancel')
|
|
||||||
else
|
|
||||||
flash[:notice] = t('flash.auto_build_list.cancel_failed')
|
|
||||||
end
|
|
||||||
redirect_to auto_build_lists_path
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def find_auto_build_list
|
|
||||||
@auto_build_list = AutoBuildList.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,78 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
class CategoriesController < ApplicationController
|
|
||||||
before_filter :authenticate_user!
|
|
||||||
before_filter :find_category, :only => [:show, :edit, :update, :destroy]
|
|
||||||
before_filter :find_platform, :only => [:show, :index]
|
|
||||||
|
|
||||||
load_and_authorize_resource
|
|
||||||
|
|
||||||
def platforms
|
|
||||||
@all_platforms = Platform.all
|
|
||||||
@all_platforms_count = Platform.joins(:repositories => :projects).group('platforms.id').count
|
|
||||||
@personal_platforms = Platform.personal
|
|
||||||
@personal_platforms_count = Platform.personal.joins(:repositories => :projects).group('platforms.id').count
|
|
||||||
@main_platforms = Platform.main
|
|
||||||
@main_platforms_count = Platform.main.joins(:repositories => :projects).group('platforms.id').count
|
|
||||||
end
|
|
||||||
|
|
||||||
def index
|
|
||||||
if @platform
|
|
||||||
@categories = Category.select('categories.id, categories.name, categories.ancestry, count(projects.id) projects_count').
|
|
||||||
joins(:projects => :repositories).where('repositories.platform_id = ?', @platform.id).
|
|
||||||
having('count(projects.id) > 0').group('categories.id, categories.name, categories.ancestry, projects_count')
|
|
||||||
render 'index2'
|
|
||||||
else
|
|
||||||
@categories = Category.paginate(:page => params[:page])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
@projects = @category.projects
|
|
||||||
@projects = @projects.joins(:repositories).where("repositories.platform_id = ?", @platform.id) if @platform
|
|
||||||
@projects = @projects.paginate :page => params[:page]
|
|
||||||
end
|
|
||||||
|
|
||||||
def new
|
|
||||||
@category = Category.new
|
|
||||||
end
|
|
||||||
|
|
||||||
def edit
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
@category.destroy
|
|
||||||
flash[:notice] = t("flash.category.destroyed")
|
|
||||||
redirect_to categories_path
|
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
|
||||||
@category = Category.new params[:category]
|
|
||||||
if @category.save
|
|
||||||
flash[:notice] = t('flash.category.saved')
|
|
||||||
redirect_to categories_path
|
|
||||||
else
|
|
||||||
flash[:error] = t('flash.category.save_error')
|
|
||||||
render :action => :new
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
|
||||||
if @category.update_attributes(params[:category])
|
|
||||||
flash[:notice] = t('flash.category.saved')
|
|
||||||
redirect_to categories_path
|
|
||||||
else
|
|
||||||
flash[:error] = t('flash.category.save_error')
|
|
||||||
render :action => :edit
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def find_category
|
|
||||||
@category = Category.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_platform
|
|
||||||
@platform = Platform.find(params[:platform_id]) if params[:platform_id]
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
class PlatformsController < ApplicationController
|
class PlatformsController < ApplicationController
|
||||||
before_filter :authenticate_user!, :except => :easy_urpmi
|
before_filter :authenticate_user!
|
||||||
before_filter :find_platform, :only => [:clone, :edit, :destroy, :members]
|
before_filter :find_platform, :only => [:clone, :edit, :destroy, :members]
|
||||||
before_filter :get_paths, :only => [:new, :create, :clone]
|
before_filter :get_paths, :only => [:new, :create, :clone]
|
||||||
|
|
||||||
|
@ -17,22 +17,6 @@ class PlatformsController < ApplicationController
|
||||||
@platforms = @platforms.accessible_by(current_ability, :related).paginate(:page => params[:page], :per_page => 20)
|
@platforms = @platforms.accessible_by(current_ability, :related).paginate(:page => params[:page], :per_page => 20)
|
||||||
end
|
end
|
||||||
|
|
||||||
def easy_urpmi
|
|
||||||
@platforms = Platform.where(:distrib_type => APP_CONFIG['distr_types'].first, :visibility => 'open', :platform_type => 'main')
|
|
||||||
respond_to do |format|
|
|
||||||
format.json do
|
|
||||||
render :json => {
|
|
||||||
:platforms => @platforms.map do |p|
|
|
||||||
{:name => p.name,
|
|
||||||
:architectures => ['i586', 'x86_64'],
|
|
||||||
:repositories => p.repositories.map(&:name),
|
|
||||||
:url => p.public_downloads_url(request.host_with_port)}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@platform = Platform.find params[:id], :include => :repositories
|
@platform = Platform.find params[:id], :include => :repositories
|
||||||
#@repositories = @platform.repositories
|
#@repositories = @platform.repositories
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
class RpcController < ApplicationController
|
|
||||||
exposes_xmlrpc_methods
|
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
|
||||||
before_filter lambda { EventLog.current_controller = self }, :only => :xe_index # should be after auth callback
|
|
||||||
|
|
||||||
## Usage example:
|
|
||||||
#
|
|
||||||
# require 'xmlrpc/client'
|
|
||||||
# client = XMLRPC::Client.new("127.0.0.1", '/api/xmlrpc', 3000, nil, nil, 'user@email', 'password', false, 900)
|
|
||||||
# client.call("project_versions", 1)
|
|
||||||
|
|
||||||
def platforms
|
|
||||||
ActiveSupport::Notifications.instrument "event_log.observer", :message => I18n.t('event_log.notices.platforms_list')
|
|
||||||
Platform.select('name').where("platform_type = ?", 'main').map(&:name)
|
|
||||||
end
|
|
||||||
|
|
||||||
def user_projects
|
|
||||||
ActiveSupport::Notifications.instrument "event_log.observer", :message => I18n.t('event_log.notices.users_list')
|
|
||||||
current_user.projects.map{|p| { :id => p.id, :name => p.name } }
|
|
||||||
end
|
|
||||||
|
|
||||||
def project_versions id
|
|
||||||
p = Project.find_by_id(id)
|
|
||||||
ActiveSupport::Notifications.instrument "event_log.observer", :object => p, :message => I18n.t('event_log.notices.versions_list')
|
|
||||||
p.tags.map(&:name) rescue 'not found'
|
|
||||||
end
|
|
||||||
|
|
||||||
def build_status id
|
|
||||||
bl = BuildList.find_by_id(id)
|
|
||||||
ActiveSupport::Notifications.instrument "event_log.observer", :object => bl, :message => I18n.t('event_log.notices.status')
|
|
||||||
bl.try(:status) || 'not found'
|
|
||||||
end
|
|
||||||
|
|
||||||
def build_packet project_id, repo_id
|
|
||||||
# p = Project.find_by_id(project_id); r = Repository.find_by_id(repo_id)
|
|
||||||
ActiveSupport::Notifications.instrument "event_log.observer", :message => I18n.t('event_log.notices.project_build')
|
|
||||||
'unknown' # TODO: build packet
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- 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 ['personal_repositories', 'downloads'].include?(controller.controller_name)
|
||||||
APP_CONFIG['repo_project_name']
|
APP_CONFIG['repo_project_name']
|
||||||
else
|
else
|
||||||
APP_CONFIG['project_name']
|
APP_CONFIG['project_name']
|
||||||
|
|
|
@ -55,10 +55,6 @@ class Ability
|
||||||
can(:destroy, Project) {|project| owner? project}
|
can(:destroy, Project) {|project| owner? project}
|
||||||
can :remove_user, Project
|
can :remove_user, Project
|
||||||
|
|
||||||
# TODO: Turn on AAA when it will be updated
|
|
||||||
#can :create, AutoBuildList
|
|
||||||
#can [:index, :destroy], AutoBuildList, :project_id => user.own_project_ids
|
|
||||||
|
|
||||||
can :search, BuildList
|
can :search, BuildList
|
||||||
can [:read, :owned], BuildList, :user_id => user.id
|
can [:read, :owned], BuildList, :user_id => user.id
|
||||||
can :read, BuildList, :project => {:visibility => 'open'}
|
can :read, BuildList, :project => {:visibility => 'open'}
|
||||||
|
@ -93,8 +89,6 @@ class Ability
|
||||||
can(:create, ProductBuildList) {|pbl| can?(:update, pbl.product)}
|
can(:create, ProductBuildList) {|pbl| can?(:update, pbl.product)}
|
||||||
can(:destroy, ProductBuildList) {|pbl| can?(:destroy, pbl.product)}
|
can(:destroy, ProductBuildList) {|pbl| can?(:destroy, pbl.product)}
|
||||||
|
|
||||||
can [:read, :platforms], Category
|
|
||||||
|
|
||||||
can [:read, :create], PrivateUser, :platform => {:owner_type => 'User', :owner_id => user.id}
|
can [:read, :create], PrivateUser, :platform => {:owner_type => 'User', :owner_id => user.id}
|
||||||
can [:read, :create], PrivateUser, :platform => {:owner_type => 'Group', :owner_id => user.group_ids}
|
can [:read, :create], PrivateUser, :platform => {:owner_type => 'Group', :owner_id => user.group_ids}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
class AutoBuildList < ActiveRecord::Base
|
|
||||||
belongs_to :project
|
|
||||||
belongs_to :arch
|
|
||||||
belongs_to :pl, :class_name => 'Platform'
|
|
||||||
belongs_to :bpl, :class_name => 'Platform'
|
|
||||||
|
|
||||||
def event_log_message
|
|
||||||
{:project => project.name}.inspect
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,10 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
class Category < ActiveRecord::Base
|
|
||||||
has_many :projects, :dependent => :nullify
|
|
||||||
|
|
||||||
validates :name, :presence => true
|
|
||||||
|
|
||||||
default_scope order('categories.name')
|
|
||||||
|
|
||||||
has_ancestry
|
|
||||||
end
|
|
|
@ -21,7 +21,7 @@ class EventLog < ActiveRecord::Base
|
||||||
el.ip = current_controller.request.remote_ip
|
el.ip = current_controller.request.remote_ip
|
||||||
el.controller = current_controller.class.to_s
|
el.controller = current_controller.class.to_s
|
||||||
el.action = current_controller.action_name
|
el.action = current_controller.action_name
|
||||||
el.protocol = (el.controller == 'RpcController' ? 'api' : 'web')
|
el.protocol = 'web'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- 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, :product_build_list
|
||||||
|
|
||||||
def after_create(record)
|
def after_create(record)
|
||||||
ActiveSupport::Notifications.instrument("event_log.observer", :object => record)
|
ActiveSupport::Notifications.instrument("event_log.observer", :object => record)
|
||||||
|
|
|
@ -3,12 +3,10 @@ class Project < ActiveRecord::Base
|
||||||
VISIBILITIES = ['open', 'hidden']
|
VISIBILITIES = ['open', 'hidden']
|
||||||
MAX_OWN_PROJECTS = 32000
|
MAX_OWN_PROJECTS = 32000
|
||||||
|
|
||||||
belongs_to :category, :counter_cache => true
|
|
||||||
belongs_to :owner, :polymorphic => true, :counter_cache => :own_projects_count
|
belongs_to :owner, :polymorphic => true, :counter_cache => :own_projects_count
|
||||||
|
|
||||||
has_many :issues, :dependent => :destroy
|
has_many :issues, :dependent => :destroy
|
||||||
has_many :build_lists, :dependent => :destroy
|
has_many :build_lists, :dependent => :destroy
|
||||||
has_many :auto_build_lists, :dependent => :destroy
|
|
||||||
|
|
||||||
has_many :project_imports, :dependent => :destroy
|
has_many :project_imports, :dependent => :destroy
|
||||||
has_many :project_to_repositories, :dependent => :destroy
|
has_many :project_to_repositories, :dependent => :destroy
|
||||||
|
@ -22,7 +20,7 @@ class Project < ActiveRecord::Base
|
||||||
validates :name, :uniqueness => {:scope => [:owner_id, :owner_type], :case_sensitive => false}, :presence => true, :format => {:with => /^[a-zA-Z0-9_\-\+\.]+$/}
|
validates :name, :uniqueness => {:scope => [:owner_id, :owner_type], :case_sensitive => false}, :presence => true, :format => {:with => /^[a-zA-Z0-9_\-\+\.]+$/}
|
||||||
validates :owner, :presence => true
|
validates :owner, :presence => true
|
||||||
validate { errors.add(:base, :can_have_less_or_equal, :count => MAX_OWN_PROJECTS) if owner.projects.size >= MAX_OWN_PROJECTS }
|
validate { errors.add(:base, :can_have_less_or_equal, :count => MAX_OWN_PROJECTS) if owner.projects.size >= MAX_OWN_PROJECTS }
|
||||||
# validate {errors.add(:base, I18n.t('flash.project.save_warning_ssh_key')) if owner.ssh_key.blank?}
|
|
||||||
validates_attachment_size :srpm, :less_than => 500.megabytes
|
validates_attachment_size :srpm, :less_than => 500.megabytes
|
||||||
validates_attachment_content_type :srpm, :content_type => ['application/octet-stream', "application/x-rpm", "application/x-redhat-package-manager"], :message => I18n.t('layout.invalid_content_type')
|
validates_attachment_content_type :srpm, :content_type => ['application/octet-stream', "application/x-rpm", "application/x-redhat-package-manager"], :message => I18n.t('layout.invalid_content_type')
|
||||||
|
|
||||||
|
@ -36,7 +34,6 @@ class Project < ActiveRecord::Base
|
||||||
scope :by_visibilities, lambda {|v| where(:visibility => v)}
|
scope :by_visibilities, lambda {|v| where(:visibility => v)}
|
||||||
scope :opened, where(:visibility => 'open')
|
scope :opened, where(:visibility => 'open')
|
||||||
scope :addable_to_repository, lambda { |repository_id| where("projects.id NOT IN (SELECT project_to_repositories.project_id FROM project_to_repositories WHERE (project_to_repositories.repository_id = #{ repository_id }))") }
|
scope :addable_to_repository, lambda { |repository_id| where("projects.id NOT IN (SELECT project_to_repositories.project_id FROM project_to_repositories WHERE (project_to_repositories.repository_id = #{ repository_id }))") }
|
||||||
scope :automateable, where("projects.id NOT IN (SELECT auto_build_lists.project_id FROM auto_build_lists)")
|
|
||||||
|
|
||||||
after_create :attach_to_personal_repository
|
after_create :attach_to_personal_repository
|
||||||
after_create :create_git_repo
|
after_create :create_git_repo
|
||||||
|
@ -53,18 +50,6 @@ class Project < ActiveRecord::Base
|
||||||
|
|
||||||
include Modules::Models::Owner
|
include Modules::Models::Owner
|
||||||
|
|
||||||
def auto_build
|
|
||||||
auto_build_lists.each do |auto_build_list|
|
|
||||||
build_lists.create(
|
|
||||||
:pl => auto_build_list.pl,
|
|
||||||
:bpl => auto_build_list.bpl,
|
|
||||||
:arch => auto_build_list.arch,
|
|
||||||
:project_version => versions.last,
|
|
||||||
:build_requires => true,
|
|
||||||
:update_type => 'bugfix') unless build_lists.for_creation_date_period(Time.current - 15.seconds, Time.current).present?
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def build_for(platform, user, arch = 'i586') # Return i586 after mass rebuild
|
def build_for(platform, user, arch = 'i586') # Return i586 after mass rebuild
|
||||||
arch = Arch.find_by_name(arch) if arch.acts_like?(:string)
|
arch = Arch.find_by_name(arch) if arch.acts_like?(:string)
|
||||||
build_lists.create do |bl|
|
build_lists.create do |bl|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
%h1= t("layout.auto_build_lists.already_automated")
|
|
||||||
|
|
||||||
%table.table
|
|
||||||
%tr
|
|
||||||
%th= t("activerecord.attributes.auto_build_list.project")
|
|
||||||
%th.last= t("layout.auto_build_lists.action")
|
|
||||||
|
|
||||||
- @projects_already_automated.each do |project|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to project.name, project_path(project)
|
|
||||||
%td= link_to t("layout.auto_build_lists.cancel_btn"), auto_build_list_path(project.auto_build_lists_id), :method => :delete, :confirm => t("layout.confirm")
|
|
||||||
|
|
||||||
= will_paginate @projects_already_automated, :param_name => 'already_automated_page'
|
|
|
@ -1,13 +0,0 @@
|
||||||
%h1= t("layout.auto_build_lists.not_automated")
|
|
||||||
|
|
||||||
%table.table
|
|
||||||
%tr
|
|
||||||
%th= t("activerecord.attributes.auto_build_list.project")
|
|
||||||
%th.last= t("layout.auto_build_lists.action")
|
|
||||||
|
|
||||||
- @projects_not_automated.each do |project|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to project.name, project_path(project)
|
|
||||||
%td= link_to t("layout.auto_build_lists.automate_btn"), auto_build_lists_path(:project_id => project.id), :method => :post, :confirm => t("layout.confirm")
|
|
||||||
|
|
||||||
= will_paginate @projects_not_automated, :param_name => 'not_automated_page'
|
|
|
@ -1,19 +0,0 @@
|
||||||
.block
|
|
||||||
.content
|
|
||||||
.inner
|
|
||||||
%h2= t('layout.auto_build_lists.header')
|
|
||||||
%h3= t('layout.auto_build_lists.message')
|
|
||||||
|
|
||||||
.inner
|
|
||||||
= render :partial => "auto_build_lists/not_automated"
|
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
.inner
|
|
||||||
= render :partial => "auto_build_lists/already_automated"
|
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
|
@ -1,9 +0,0 @@
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td
|
|
||||||
= link_to category.name, category
|
|
||||||
(#{category.projects_count})
|
|
||||||
%td= category.parent.try(:name)
|
|
||||||
%td.last
|
|
||||||
= link_to t("layout.edit"), edit_category_path(category)
|
|
||||||
|
|
|
||||||
= link_to t("layout.delete"), category_path(category), :method => :delete, :confirm => t("layout.categories.confirm_delete")
|
|
|
@ -1,15 +0,0 @@
|
||||||
= form_for @category, :html => { :class => :form } do |f|
|
|
||||||
.group
|
|
||||||
= f.label :parent_id, :class => :label
|
|
||||||
= f.collection_select :parent_id, Category.roots, :id, :name, :include_blank => true
|
|
||||||
|
|
||||||
.group
|
|
||||||
= f.label :name, :class => :label
|
|
||||||
= f.text_field :name, :class => 'text_field'
|
|
||||||
|
|
||||||
.group.navform.wat-cf
|
|
||||||
%button.button{:type => "submit"}
|
|
||||||
= image_tag("choose.png", :alt => t("layout.save"))
|
|
||||||
= t("layout.save")
|
|
||||||
%span.text_button_padding= t("layout.or")
|
|
||||||
= link_to t("layout.cancel"), categories_path, :class => "text_button_padding link_button"
|
|
|
@ -1,11 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first= link_to t("layout.categories.list"), categories_path
|
|
||||||
%li= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
%li= link_to t("layout.categories.new"), new_category_path
|
|
||||||
%li.active= link_to t("layout.categories.edit"), edit_category_path
|
|
||||||
.content
|
|
||||||
%h2.title= t("layout.categories.edit_header")
|
|
||||||
.inner= render "form"
|
|
||||||
- content_for :sidebar, render('sidebar')
|
|
|
@ -1,17 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first.active= link_to t("layout.categories.list"), categories_path
|
|
||||||
%li= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
%li= link_to t("layout.categories.new"), new_category_path
|
|
||||||
.content
|
|
||||||
%h2.title= t("layout.categories.list_header")
|
|
||||||
.inner
|
|
||||||
%table.table
|
|
||||||
%tr
|
|
||||||
%th= t("activerecord.attributes.category.name")
|
|
||||||
%th= t("activerecord.attributes.category.parent_id")
|
|
||||||
%th.last
|
|
||||||
= render @categories
|
|
||||||
.actions-bar.wat-cf
|
|
||||||
.actions= will_paginate @categories
|
|
|
@ -1,14 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first= link_to t("layout.categories.list"), categories_path
|
|
||||||
%li.active= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
.content
|
|
||||||
%h2.title= @platform.name
|
|
||||||
.inner
|
|
||||||
%table.table
|
|
||||||
- @categories.each do |category|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to category.name, [@platform, category]
|
|
||||||
%td= category.parent.name
|
|
||||||
%td.last= category.projects_count
|
|
|
@ -1,9 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first= link_to "#{t("layout.categories.list")}", @categories_path
|
|
||||||
%li= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
%li.active= link_to "#{t("layout.categories.new")}", @new_category_path
|
|
||||||
.content
|
|
||||||
%h2.title= t("layout.categories.new_header")
|
|
||||||
.inner= render "form"
|
|
|
@ -1,31 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first= link_to t("layout.categories.list"), categories_path
|
|
||||||
%li.active= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
.content
|
|
||||||
%h2.title= t("layout.platforms.list_header")
|
|
||||||
%br
|
|
||||||
.inner
|
|
||||||
%h3.title= t("layout.platforms.list_header_main")
|
|
||||||
%table.table
|
|
||||||
- @main_platforms.each do |platform|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to platform.name, platform_categories_path(platform)
|
|
||||||
%td.last= @main_platforms_count[platform.id].to_i
|
|
||||||
%br
|
|
||||||
.inner
|
|
||||||
%h3.title= t("layout.platforms.list_header_personal")
|
|
||||||
%table.table
|
|
||||||
- @personal_platforms.each do |platform|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to platform.name, platform_categories_path(platform)
|
|
||||||
%td.last= @personal_platforms_count[platform.id].to_i
|
|
||||||
%br
|
|
||||||
.inner
|
|
||||||
%h3.title= t("layout.platforms.list_header_all")
|
|
||||||
%table.table
|
|
||||||
- @all_platforms.each do |platform|
|
|
||||||
%tr{:class => cycle("odd", "even")}
|
|
||||||
%td= link_to platform.name, platform_categories_path(platform)
|
|
||||||
%td.last= @all_platforms_count[platform.id].to_i
|
|
|
@ -1,15 +0,0 @@
|
||||||
.block
|
|
||||||
.secondary-navigation
|
|
||||||
%ul.wat-cf
|
|
||||||
%li.first= link_to t("layout.categories.list"), categories_path
|
|
||||||
%li= link_to t("layout.categories.platforms"), platforms_categories_path
|
|
||||||
- if @platform
|
|
||||||
%li.active= link_to @platform.name, platform_categories_path(@platform)
|
|
||||||
.content
|
|
||||||
%h2.title
|
|
||||||
= @category.name
|
|
||||||
(#{@category.parent.name})
|
|
||||||
.inner
|
|
||||||
%table.table= render @projects
|
|
||||||
.actions-bar.wat-cf
|
|
||||||
.actions= will_paginate @projects
|
|
|
@ -21,10 +21,7 @@
|
||||||
- else
|
- else
|
||||||
= hidden_field_tag :who_owns, :me
|
= hidden_field_tag :who_owns, :me
|
||||||
.both
|
.both
|
||||||
-#- if [:new, :create].include? act
|
|
||||||
-# .leftlist= f.label :category_id, t("activerecord.attributes.project.category_id"), :class => :label
|
|
||||||
-# .rightlist= f.grouped_collection_select :category_id, Category.roots, :children, :name, :id, :name, :include_blank => true
|
|
||||||
-# .both
|
|
||||||
.leftlist= f.label :visibility, t("activerecord.attributes.project.visibility"), :class => :label
|
.leftlist= f.label :visibility, t("activerecord.attributes.project.visibility"), :class => :label
|
||||||
.rightlist
|
.rightlist
|
||||||
=# f.select :visibility, Project::VISIBILITIES
|
=# f.select :visibility, Project::VISIBILITIES
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require 'rubygems'
|
|
||||||
require 'xmlrpc/client'
|
|
||||||
require 'pp'
|
|
||||||
|
|
||||||
# Please correctly fill following vars
|
|
||||||
@host = 'npp-build.rosalab.ru'
|
|
||||||
@port = 80
|
|
||||||
@user = 'pchipiga@ya.ru'
|
|
||||||
@password = '123456'
|
|
||||||
|
|
||||||
puts 'PLATFORMS'
|
|
||||||
client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900)
|
|
||||||
pp client.call("platforms")
|
|
||||||
|
|
||||||
puts 'USER PROJECTS'
|
|
||||||
client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900)
|
|
||||||
pp client.call("user_projects")
|
|
||||||
|
|
||||||
puts 'PROJECT VERSIONS'
|
|
||||||
client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900)
|
|
||||||
project_id = 1 # FIXME!
|
|
||||||
pp client.call("project_versions", project_id)
|
|
||||||
|
|
||||||
puts 'BUILD STATUS'
|
|
||||||
client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900)
|
|
||||||
build_list_id = 1 # FIXME
|
|
||||||
pp client.call("build_status", build_list_id)
|
|
||||||
|
|
||||||
puts 'BUILD PACKET'
|
|
||||||
client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900)
|
|
||||||
project_id = 1 # FIXME
|
|
||||||
repo_id = 1 # FIXME
|
|
||||||
pp client.call("build_packet", project_id, repo_id)
|
|
||||||
|
|
||||||
puts 'DONE'
|
|
|
@ -69,16 +69,6 @@ en:
|
||||||
message: Automatically updated every 24 hours
|
message: Automatically updated every 24 hours
|
||||||
refresh_btn: Refresh
|
refresh_btn: Refresh
|
||||||
|
|
||||||
auto_build_lists:
|
|
||||||
header: Automated build projects
|
|
||||||
message: All projects build under user repository and architecture i586
|
|
||||||
project: Project
|
|
||||||
action: Action
|
|
||||||
automate_btn: Automate
|
|
||||||
cancel_btn: Cancel
|
|
||||||
not_automated: Not automated
|
|
||||||
already_automated: Automated
|
|
||||||
|
|
||||||
weekdays:
|
weekdays:
|
||||||
Monday: Monday
|
Monday: Monday
|
||||||
Tuesday: Tuesday
|
Tuesday: Tuesday
|
||||||
|
@ -103,16 +93,6 @@ en:
|
||||||
regenerate_btn: Regenerate
|
regenerate_btn: Regenerate
|
||||||
warning_message: Warning - Old data set as invalid when new data obtaining
|
warning_message: Warning - Old data set as invalid when new data obtaining
|
||||||
|
|
||||||
categories:
|
|
||||||
list: List
|
|
||||||
new: Create
|
|
||||||
edit: Edit
|
|
||||||
platforms: By platform
|
|
||||||
list_header: Catalogue
|
|
||||||
new_header: New category
|
|
||||||
edit_header: Edit category
|
|
||||||
confirm_delete: Are you sure to delete this category?
|
|
||||||
|
|
||||||
collaborators:
|
collaborators:
|
||||||
back_to_proj: Back to project
|
back_to_proj: Back to project
|
||||||
edit: Edit list
|
edit: Edit list
|
||||||
|
@ -176,17 +156,6 @@ en:
|
||||||
successfully_added: Member %s successfully added
|
successfully_added: Member %s successfully added
|
||||||
error_in_adding: Member %s adding error
|
error_in_adding: Member %s adding error
|
||||||
|
|
||||||
auto_build_list:
|
|
||||||
success: Automated build success!
|
|
||||||
failed: Automated build failed!
|
|
||||||
cancel: Automated build canceled!
|
|
||||||
cancel_failed: Automated build canceling failed!
|
|
||||||
|
|
||||||
category:
|
|
||||||
saved: Category saved
|
|
||||||
save_error: Category saves error
|
|
||||||
destroyed: Category deleted
|
|
||||||
|
|
||||||
blob:
|
blob:
|
||||||
successfully_updated: File '%{name}' successfully updated
|
successfully_updated: File '%{name}' successfully updated
|
||||||
updating_error: Error updating file '%{name}'
|
updating_error: Error updating file '%{name}'
|
||||||
|
@ -208,14 +177,12 @@ en:
|
||||||
can_have_less_or_equal: You cannot have more than %{count} projects.
|
can_have_less_or_equal: You cannot have more than %{count} projects.
|
||||||
|
|
||||||
models:
|
models:
|
||||||
category: Category
|
|
||||||
arch: Arch
|
arch: Arch
|
||||||
container: Container
|
container: Container
|
||||||
rpm: RPM
|
rpm: RPM
|
||||||
private_user: Private user
|
private_user: Private user
|
||||||
product_build_list: Product build list
|
product_build_list: Product build list
|
||||||
download: Statistics
|
download: Statistics
|
||||||
auto_build_list: Auto rebuild list
|
|
||||||
|
|
||||||
attributes:
|
attributes:
|
||||||
settings:
|
settings:
|
||||||
|
@ -229,24 +196,10 @@ en:
|
||||||
new_comment_commit_repo_owner: Notify about comments to my repository commits
|
new_comment_commit_repo_owner: Notify about comments to my repository commits
|
||||||
new_comment_commit_commentor: Notify about comments after my commit
|
new_comment_commit_commentor: Notify about comments after my commit
|
||||||
|
|
||||||
auto_build_list:
|
|
||||||
project_id: Project
|
|
||||||
project: Project
|
|
||||||
bpl_id: Repository for saving
|
|
||||||
bpl: Repository for saving
|
|
||||||
pl_id: Platform
|
|
||||||
pl: Platform
|
|
||||||
arch_id: Architecture
|
|
||||||
arch: Architecture
|
|
||||||
|
|
||||||
private_user:
|
private_user:
|
||||||
login: Login
|
login: Login
|
||||||
password: Password
|
password: Password
|
||||||
|
|
||||||
category:
|
|
||||||
parent_id: Parent
|
|
||||||
name: Name
|
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
name: Name
|
name: Name
|
||||||
created_at: Created
|
created_at: Created
|
||||||
|
|
|
@ -3,8 +3,6 @@ en:
|
||||||
repositories: Repositories
|
repositories: Repositories
|
||||||
personal_repository: My repository
|
personal_repository: My repository
|
||||||
products: Products
|
products: Products
|
||||||
categories: Catalogue
|
|
||||||
auto_build_lists: Automated builds
|
|
||||||
downloads: Statistics
|
downloads: Statistics
|
||||||
top_menu:
|
top_menu:
|
||||||
platforms: Platforms
|
platforms: Platforms
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
ru:
|
ru:
|
||||||
menu:
|
menu:
|
||||||
categories: Каталог
|
|
||||||
products: Продукты
|
products: Продукты
|
||||||
repositories: Репозитории
|
repositories: Репозитории
|
||||||
personal_repository: Мой репозиторий
|
personal_repository: Мой репозиторий
|
||||||
auto_build_lists: Авто. сборки
|
|
||||||
downloads: Статистика
|
downloads: Статистика
|
||||||
top_menu:
|
top_menu:
|
||||||
platforms: Платформы
|
platforms: Платформы
|
||||||
|
|
|
@ -6,7 +6,6 @@ en:
|
||||||
repositories_controller: 'Repositories Management'
|
repositories_controller: 'Repositories Management'
|
||||||
projects_controller: 'Projects Management'
|
projects_controller: 'Projects Management'
|
||||||
build_lists_controller: 'Build lists management'
|
build_lists_controller: 'Build lists management'
|
||||||
auto_build_lists_controller: 'Automatic builds management'
|
|
||||||
product_build_lists_controller: 'Products build management'
|
product_build_lists_controller: 'Products build management'
|
||||||
'devise/registrations_controller': 'User Registration'
|
'devise/registrations_controller': 'User Registration'
|
||||||
'devise/sessions_controller': 'User Authentication'
|
'devise/sessions_controller': 'User Authentication'
|
||||||
|
@ -21,15 +20,10 @@ en:
|
||||||
destroy: 'exit'
|
destroy: 'exit'
|
||||||
'users/omniauth_callbacks_controller':
|
'users/omniauth_callbacks_controller':
|
||||||
open_id: 'login via OpenID'
|
open_id: 'login via OpenID'
|
||||||
projects_controller:
|
|
||||||
auto_build: 'sent to automatic build'
|
|
||||||
build_lists_controller:
|
build_lists_controller:
|
||||||
create: 'sent to build'
|
create: 'sent to build'
|
||||||
cancel: 'build abolished'
|
cancel: 'build abolished'
|
||||||
publish: 'build published'
|
publish: 'build published'
|
||||||
auto_build_lists_controller:
|
|
||||||
create: 'assigned'
|
|
||||||
destroy: 'canceled'
|
|
||||||
product_build_lists_controller:
|
product_build_lists_controller:
|
||||||
create: 'sent to build'
|
create: 'sent to build'
|
||||||
rpc_controller:
|
rpc_controller:
|
||||||
|
|
|
@ -6,7 +6,6 @@ ru:
|
||||||
repositories_controller: 'Управление репозиториями'
|
repositories_controller: 'Управление репозиториями'
|
||||||
projects_controller: 'Управление проектами'
|
projects_controller: 'Управление проектами'
|
||||||
build_lists_controller: 'Управление сборочными листами'
|
build_lists_controller: 'Управление сборочными листами'
|
||||||
auto_build_lists_controller: 'Управление автоматической сборкой'
|
|
||||||
product_build_lists_controller: 'Управление сборкой продуктов'
|
product_build_lists_controller: 'Управление сборкой продуктов'
|
||||||
'devise/registrations_controller': 'Регистрация пользователей'
|
'devise/registrations_controller': 'Регистрация пользователей'
|
||||||
'devise/sessions_controller': 'Аутентификация пользователей'
|
'devise/sessions_controller': 'Аутентификация пользователей'
|
||||||
|
@ -21,15 +20,10 @@ ru:
|
||||||
destroy: 'выход'
|
destroy: 'выход'
|
||||||
'users/omniauth_callbacks_controller':
|
'users/omniauth_callbacks_controller':
|
||||||
open_id: 'вход через OpenID'
|
open_id: 'вход через OpenID'
|
||||||
projects_controller:
|
|
||||||
auto_build: 'отправлен на автоматическую сборку'
|
|
||||||
build_lists_controller:
|
build_lists_controller:
|
||||||
create: 'отправлен на сборку'
|
create: 'отправлен на сборку'
|
||||||
cancel: 'сборка отменена'
|
cancel: 'сборка отменена'
|
||||||
publish: 'сборка опубликована'
|
publish: 'сборка опубликована'
|
||||||
auto_build_lists_controller:
|
|
||||||
create: 'назначена'
|
|
||||||
destroy: 'отменена'
|
|
||||||
product_build_lists_controller:
|
product_build_lists_controller:
|
||||||
create: 'отправлен на сборку'
|
create: 'отправлен на сборку'
|
||||||
rpc_controller:
|
rpc_controller:
|
||||||
|
|
|
@ -60,7 +60,6 @@ en:
|
||||||
project: Project
|
project: Project
|
||||||
attributes:
|
attributes:
|
||||||
project:
|
project:
|
||||||
category_id: Category
|
|
||||||
name: Name
|
name: Name
|
||||||
description: Descripton
|
description: Descripton
|
||||||
owner: Owner
|
owner: Owner
|
||||||
|
|
|
@ -60,7 +60,6 @@ ru:
|
||||||
project: Проект
|
project: Проект
|
||||||
attributes:
|
attributes:
|
||||||
project:
|
project:
|
||||||
category_id: Категория
|
|
||||||
name: Название
|
name: Название
|
||||||
description: Описание
|
description: Описание
|
||||||
owner: Владелец
|
owner: Владелец
|
||||||
|
|
|
@ -69,16 +69,6 @@ ru:
|
||||||
message: Обновляется автоматически каждые 24 часа
|
message: Обновляется автоматически каждые 24 часа
|
||||||
refresh_btn: Обновить
|
refresh_btn: Обновить
|
||||||
|
|
||||||
auto_build_lists:
|
|
||||||
header: Проекты с автоматической сборкой
|
|
||||||
message: Все проекты собираются под пользовательский репозиторий и архитектуру i586
|
|
||||||
project: Проект
|
|
||||||
action: Действие
|
|
||||||
automate_btn: Автоматизировать
|
|
||||||
cancel_btn: Отменить
|
|
||||||
not_automated: Не автоматизированы
|
|
||||||
already_automated: Автоматизированы
|
|
||||||
|
|
||||||
weekdays:
|
weekdays:
|
||||||
Monday: Понедельник
|
Monday: Понедельник
|
||||||
Tuesday: Вторник
|
Tuesday: Вторник
|
||||||
|
@ -103,16 +93,6 @@ ru:
|
||||||
regenerate_btn: Перегенерировать
|
regenerate_btn: Перегенерировать
|
||||||
warning_message: Примечание - При получении новых данных старые становятся недействительными
|
warning_message: Примечание - При получении новых данных старые становятся недействительными
|
||||||
|
|
||||||
categories:
|
|
||||||
list: Список
|
|
||||||
new: Создать
|
|
||||||
edit: Редактировать
|
|
||||||
platforms: По платформам
|
|
||||||
list_header: Каталог
|
|
||||||
new_header: Новая категория
|
|
||||||
edit_header: Редактировать категорию
|
|
||||||
confirm_delete: Вы уверены, что хотите удалить эту категорию?
|
|
||||||
|
|
||||||
collaborators:
|
collaborators:
|
||||||
back_to_proj: Вернуться к проекту
|
back_to_proj: Вернуться к проекту
|
||||||
edit: Редактировать список
|
edit: Редактировать список
|
||||||
|
@ -176,17 +156,6 @@ ru:
|
||||||
successfully_added: Участник %s успешно добавлен
|
successfully_added: Участник %s успешно добавлен
|
||||||
error_in_adding: Ошибка при добавлении участника %s
|
error_in_adding: Ошибка при добавлении участника %s
|
||||||
|
|
||||||
auto_build_list:
|
|
||||||
success: Сборка проекта автоматизорована!
|
|
||||||
failed: Не удалось автоматизировать сборку!
|
|
||||||
cancel: Автоматическая сборка проекта отменена!
|
|
||||||
cancel_failed: Не удалось отменить автоматическую сборку проекта!
|
|
||||||
|
|
||||||
category:
|
|
||||||
saved: Категория успешно сохранена
|
|
||||||
save_error: Не удалось сохранить категорию
|
|
||||||
destroyed: Категория успешно удалена
|
|
||||||
|
|
||||||
blob:
|
blob:
|
||||||
successfully_updated: Файл '%{name}' успешно обновлен
|
successfully_updated: Файл '%{name}' успешно обновлен
|
||||||
updating_error: Ошибка обновления файла '%{name}'
|
updating_error: Ошибка обновления файла '%{name}'
|
||||||
|
@ -208,7 +177,6 @@ ru:
|
||||||
can_have_less_or_equal: Нельзя иметь больше, чем %{count} проектов.
|
can_have_less_or_equal: Нельзя иметь больше, чем %{count} проектов.
|
||||||
|
|
||||||
models:
|
models:
|
||||||
category: Категория
|
|
||||||
arch: Arch
|
arch: Arch
|
||||||
container: Container
|
container: Container
|
||||||
rpm: RPM
|
rpm: RPM
|
||||||
|
@ -229,24 +197,10 @@ ru:
|
||||||
new_comment_commit_repo_owner: Оповещать о комментариях к коммитам в моем репозитории
|
new_comment_commit_repo_owner: Оповещать о комментариях к коммитам в моем репозитории
|
||||||
new_comment_commit_commentor: Оповещать о комментариях к коммиту после моего
|
new_comment_commit_commentor: Оповещать о комментариях к коммиту после моего
|
||||||
|
|
||||||
auto_build_list:
|
|
||||||
project_id: Проект
|
|
||||||
project: Проект
|
|
||||||
bpl_id: Репозиторий для сохранения
|
|
||||||
bpl: Репозиторий для сохранения
|
|
||||||
pl_id: Платформа
|
|
||||||
pl: Платформа
|
|
||||||
arch_id: Архитектура
|
|
||||||
arch: Архитектура
|
|
||||||
|
|
||||||
private_user:
|
private_user:
|
||||||
login: Логин
|
login: Логин
|
||||||
password: Пароль
|
password: Пароль
|
||||||
|
|
||||||
category:
|
|
||||||
parent_id: Родитель
|
|
||||||
name: Название
|
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
name: Название
|
name: Название
|
||||||
created_at: Создана
|
created_at: Создана
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# -*- encoding : utf-8 -*-
|
# -*- encoding : utf-8 -*-
|
||||||
Rosa::Application.routes.draw do
|
Rosa::Application.routes.draw do
|
||||||
# XML RPC
|
|
||||||
match 'api/xmlrpc' => 'rpc#xe_index'
|
|
||||||
|
|
||||||
devise_scope :user do
|
devise_scope :user do
|
||||||
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
||||||
|
@ -44,10 +42,6 @@ Rosa::Application.routes.draw do
|
||||||
match 'statistics/refresh' => 'downloads#refresh', :as => :downloads_refresh
|
match 'statistics/refresh' => 'downloads#refresh', :as => :downloads_refresh
|
||||||
match 'statistics/test_sudo' => 'downloads#test_sudo', :as => :test_sudo_downloads
|
match 'statistics/test_sudo' => 'downloads#test_sudo', :as => :test_sudo_downloads
|
||||||
|
|
||||||
resources :categories do
|
|
||||||
get :platforms, :on => :collection
|
|
||||||
end
|
|
||||||
|
|
||||||
match '/private/:platform_name/*file_path' => 'privates#show'
|
match '/private/:platform_name/*file_path' => 'privates#show'
|
||||||
|
|
||||||
match 'build_lists/publish_build', :to => "build_lists#publish_build"
|
match 'build_lists/publish_build', :to => "build_lists#publish_build"
|
||||||
|
@ -65,8 +59,6 @@ Rosa::Application.routes.draw do
|
||||||
collection { post :search }
|
collection { post :search }
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :auto_build_lists, :only => [:index, :create, :destroy]
|
|
||||||
|
|
||||||
resources :personal_repositories, :only => [:show] do
|
resources :personal_repositories, :only => [:show] do
|
||||||
member do
|
member do
|
||||||
get :settings
|
get :settings
|
||||||
|
@ -90,7 +82,6 @@ Rosa::Application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
collection do
|
collection do
|
||||||
get :easy_urpmi
|
|
||||||
get :autocomplete_user_uname
|
get :autocomplete_user_uname
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -103,8 +94,6 @@ Rosa::Application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :repositories
|
resources :repositories
|
||||||
|
|
||||||
resources :categories, :only => [:index, :show]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :projects, :except => [:show] do
|
resources :projects, :except => [:show] do
|
||||||
|
@ -200,8 +189,6 @@ Rosa::Application.routes.draw do
|
||||||
|
|
||||||
resources :search, :only => [:index]
|
resources :search, :only => [:index]
|
||||||
|
|
||||||
match '/catalogs', :to => 'categories#platforms', :as => :catalogs
|
|
||||||
|
|
||||||
match 'product_status', :to => 'product_build_lists#status_build'
|
match 'product_status', :to => 'product_build_lists#status_build'
|
||||||
|
|
||||||
# Tree
|
# Tree
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
class RemoveAutoBuildList < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
drop_table :auto_build_lists
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
create_table :auto_build_lists, :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "arch_id"
|
||||||
|
t.integer "pl_id"
|
||||||
|
t.integer "bpl_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,17 @@
|
||||||
|
class DeleteCategories < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
remove_column :projects, :category_id
|
||||||
|
drop_table :categories
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
create_table :categories, :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.string "ancestry"
|
||||||
|
t.integer "projects_count", :default => 0, :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
add_column :projects, :category_id, :integer
|
||||||
|
end
|
||||||
|
end
|
34
db/schema.rb
34
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20120326142636) do
|
ActiveRecord::Schema.define(:version => 20120329182602) do
|
||||||
|
|
||||||
create_table "activity_feeds", :force => true do |t|
|
create_table "activity_feeds", :force => true do |t|
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
|
@ -40,15 +40,6 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
|
||||||
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
|
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
|
||||||
add_index "authentications", ["user_id"], :name => "index_authentications_on_user_id"
|
add_index "authentications", ["user_id"], :name => "index_authentications_on_user_id"
|
||||||
|
|
||||||
create_table "auto_build_lists", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "arch_id"
|
|
||||||
t.integer "pl_id"
|
|
||||||
t.integer "bpl_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "build_list_items", :force => true do |t|
|
create_table "build_list_items", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "level"
|
t.integer "level"
|
||||||
|
@ -90,14 +81,6 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
|
||||||
add_index "build_lists", ["bs_id"], :name => "index_build_lists_on_bs_id", :unique => true
|
add_index "build_lists", ["bs_id"], :name => "index_build_lists_on_bs_id", :unique => true
|
||||||
add_index "build_lists", ["project_id"], :name => "index_build_lists_on_project_id"
|
add_index "build_lists", ["project_id"], :name => "index_build_lists_on_project_id"
|
||||||
|
|
||||||
create_table "categories", :force => true do |t|
|
|
||||||
t.string "name"
|
|
||||||
t.string "ancestry"
|
|
||||||
t.integer "projects_count", :default => 0, :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "comments", :force => true do |t|
|
create_table "comments", :force => true do |t|
|
||||||
t.string "commentable_type"
|
t.string "commentable_type"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -282,27 +265,28 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
|
||||||
t.integer "owner_id"
|
t.integer "owner_id"
|
||||||
t.string "owner_type"
|
t.string "owner_type"
|
||||||
t.string "visibility", :default => "open"
|
t.string "visibility", :default => "open"
|
||||||
t.integer "category_id"
|
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.string "ancestry"
|
t.string "ancestry"
|
||||||
t.boolean "has_issues", :default => true
|
t.boolean "has_issues", :default => true
|
||||||
t.boolean "has_wiki", :default => false
|
|
||||||
t.string "srpm_file_name"
|
t.string "srpm_file_name"
|
||||||
t.string "srpm_content_type"
|
t.string "srpm_content_type"
|
||||||
t.integer "srpm_file_size"
|
t.integer "srpm_file_size"
|
||||||
t.datetime "srpm_updated_at"
|
t.datetime "srpm_updated_at"
|
||||||
|
t.boolean "has_wiki", :default => false
|
||||||
t.string "default_branch", :default => "master"
|
t.string "default_branch", :default => "master"
|
||||||
t.boolean "is_rpm", :default => true
|
t.boolean "is_rpm", :default => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true, :case_sensitive => false
|
||||||
|
|
||||||
create_table "register_requests", :force => true do |t|
|
create_table "register_requests", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "token"
|
t.string "token"
|
||||||
t.boolean "approved", :default => false
|
t.boolean "approved", :default => false
|
||||||
t.boolean "rejected", :default => false
|
t.boolean "rejected", :default => false
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at"
|
||||||
t.string "interest"
|
t.string "interest"
|
||||||
t.text "more"
|
t.text "more"
|
||||||
end
|
end
|
||||||
|
@ -375,9 +359,6 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
|
||||||
t.string "uname"
|
t.string "uname"
|
||||||
t.string "role"
|
t.string "role"
|
||||||
t.string "language", :default => "en"
|
t.string "language", :default => "en"
|
||||||
t.string "confirmation_token"
|
|
||||||
t.datetime "confirmed_at"
|
|
||||||
t.datetime "confirmation_sent_at"
|
|
||||||
t.integer "own_projects_count", :default => 0, :null => false
|
t.integer "own_projects_count", :default => 0, :null => false
|
||||||
t.datetime "reset_password_sent_at"
|
t.datetime "reset_password_sent_at"
|
||||||
t.text "professional_experience"
|
t.text "professional_experience"
|
||||||
|
@ -391,6 +372,9 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
|
||||||
t.integer "failed_attempts", :default => 0
|
t.integer "failed_attempts", :default => 0
|
||||||
t.string "unlock_token"
|
t.string "unlock_token"
|
||||||
t.datetime "locked_at"
|
t.datetime "locked_at"
|
||||||
|
t.string "confirmation_token"
|
||||||
|
t.datetime "confirmed_at"
|
||||||
|
t.datetime "confirmation_sent_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
|
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
|
||||||
|
|
134
db/seeds.rb
134
db/seeds.rb
|
@ -3,137 +3,3 @@ ARCHES = %w(i386 i586 x86_64)
|
||||||
ARCHES.each do |arch|
|
ARCHES.each do |arch|
|
||||||
Arch.find_or_create_by_name arch
|
Arch.find_or_create_by_name arch
|
||||||
end
|
end
|
||||||
|
|
||||||
CATEGORIES = {
|
|
||||||
:mandriva =>
|
|
||||||
%(Accessibility
|
|
||||||
Archiving/Backup
|
|
||||||
Archiving/Cd burning
|
|
||||||
Archiving/Compression
|
|
||||||
Archiving/Other
|
|
||||||
Books/Computer books
|
|
||||||
Books/Faqs
|
|
||||||
Books/Howtos
|
|
||||||
Books/Literature
|
|
||||||
Books/Other
|
|
||||||
Communications
|
|
||||||
Databases
|
|
||||||
Development/C
|
|
||||||
Development/C++
|
|
||||||
Development/Databases
|
|
||||||
Development/GNOME and GTK+
|
|
||||||
Development/Java
|
|
||||||
Development/KDE and Qt
|
|
||||||
Development/Kernel
|
|
||||||
Development/Other
|
|
||||||
Development/Perl
|
|
||||||
Development/PHP
|
|
||||||
Development/Python
|
|
||||||
Development/Ruby
|
|
||||||
Development/X11
|
|
||||||
Editors
|
|
||||||
Education
|
|
||||||
Emulators
|
|
||||||
File tools
|
|
||||||
Games/Adventure
|
|
||||||
Games/Arcade
|
|
||||||
Games/Boards
|
|
||||||
Games/Cards
|
|
||||||
Games/Other
|
|
||||||
Games/Puzzles
|
|
||||||
Games/Sports
|
|
||||||
Games/Strategy
|
|
||||||
Graphical desktop/Enlightenment
|
|
||||||
Graphical desktop/FVWM based
|
|
||||||
Graphical desktop/GNOME
|
|
||||||
Graphical desktop/Icewm
|
|
||||||
Graphical desktop/KDE
|
|
||||||
Graphical desktop/Other
|
|
||||||
Graphical desktop/Sawfish
|
|
||||||
Graphical desktop/WindowMaker
|
|
||||||
Graphical desktop/Xfce
|
|
||||||
Graphics
|
|
||||||
Monitoring
|
|
||||||
Networking/Chat
|
|
||||||
Networking/File transfer
|
|
||||||
Networking/Instant messaging
|
|
||||||
Networking/IRC
|
|
||||||
Networking/Mail
|
|
||||||
Networking/News
|
|
||||||
Networking/Other
|
|
||||||
Networking/Remote access
|
|
||||||
Networking/WWW
|
|
||||||
Office
|
|
||||||
Publishing
|
|
||||||
Sciences/Astronomy
|
|
||||||
Sciences/Biology
|
|
||||||
Sciences/Chemistry
|
|
||||||
Sciences/Computer science
|
|
||||||
Sciences/Geosciences
|
|
||||||
Sciences/Mathematics
|
|
||||||
Sciences/Other
|
|
||||||
Sciences/Physics
|
|
||||||
Shells
|
|
||||||
Sound
|
|
||||||
System/Base
|
|
||||||
System/Cluster
|
|
||||||
System/Configuration/Boot and Init
|
|
||||||
System/Configuration/Hardware
|
|
||||||
System/Configuration/Networking
|
|
||||||
System/Configuration/Other
|
|
||||||
System/Configuration/Packaging
|
|
||||||
System/Configuration/Printing
|
|
||||||
System/Fonts/Console
|
|
||||||
System/Fonts/True type
|
|
||||||
System/Fonts/Type1
|
|
||||||
System/Fonts/X11 bitmap
|
|
||||||
System/Internationalization
|
|
||||||
System/Kernel and hardware
|
|
||||||
System/Libraries
|
|
||||||
System/Printing
|
|
||||||
System/Servers
|
|
||||||
System/X11
|
|
||||||
Terminals
|
|
||||||
Text tools
|
|
||||||
Toys
|
|
||||||
Video),
|
|
||||||
:naulinux =>
|
|
||||||
%(Amusements/Games
|
|
||||||
Amusements/Graphics
|
|
||||||
Applications/Archiving
|
|
||||||
Applications/Communications
|
|
||||||
Applications/Databases
|
|
||||||
Applications/Editors
|
|
||||||
Applications/Emulators
|
|
||||||
Applications/Engineering
|
|
||||||
Applications/File
|
|
||||||
Applications/Internet
|
|
||||||
Applications/Multimedia
|
|
||||||
Applications/Productivity
|
|
||||||
Applications/Publishing
|
|
||||||
Applications/System
|
|
||||||
Applications/Text
|
|
||||||
Development/Debuggers
|
|
||||||
Development/Languages
|
|
||||||
Development/Libraries
|
|
||||||
Development/System
|
|
||||||
Development/Tools
|
|
||||||
Documentation
|
|
||||||
System Environment/Base
|
|
||||||
System Environment/Daemons
|
|
||||||
System Environment/Kernel
|
|
||||||
System Environment/Libraries
|
|
||||||
System Environment/Shells
|
|
||||||
User Interface/Desktops
|
|
||||||
User Interface/X
|
|
||||||
User Interface/X Hardware Support)
|
|
||||||
}
|
|
||||||
|
|
||||||
CATEGORIES.each do |platform_type, categories|
|
|
||||||
parent = Category.roots.find_or_create_by_name(platform_type)
|
|
||||||
categories.split("\n").each do |category|
|
|
||||||
Category.find_or_create_by_name(category) do |c|
|
|
||||||
c.parent = parent
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
@ -9,8 +9,6 @@ module Grack
|
||||||
def call(env)
|
def call(env)
|
||||||
super
|
super
|
||||||
if git?
|
if git?
|
||||||
# TODO event_log?
|
|
||||||
project.delay.auto_build if write? # hook
|
|
||||||
::GitHttp::App.new(@config).call(env)
|
::GitHttp::App.new(@config).call(env)
|
||||||
else
|
else
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe AutoBuildListsController do
|
|
||||||
|
|
||||||
end
|
|
|
@ -49,10 +49,6 @@ describe PlatformsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'for guest' do
|
context 'for guest' do
|
||||||
it "should not be able to perform easy_urpmi action" do
|
|
||||||
get :easy_urpmi
|
|
||||||
response.should redirect_to(forbidden_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
[:index, :create].each do |action|
|
[:index, :create].each do |action|
|
||||||
it "should not be able to perform #{ action } action" do
|
it "should not be able to perform #{ action } action" do
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe AutoBuildList do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
|
@ -1,6 +0,0 @@
|
||||||
# -*- encoding : utf-8 -*-
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe Category do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
Loading…
Reference in New Issue