Merge branch 'master' into 344-fix_products_monitoring

Conflicts:
	db/schema.rb
This commit is contained in:
Vladimir Sharshov 2012-03-30 20:30:06 +04:00
commit 3cedef5f07
213 changed files with 882 additions and 5587 deletions

14
Gemfile
View File

@ -17,14 +17,14 @@ gem 'paperclip', '~> 2.7.0'
gem 'delayed_job_active_record', '~> 0.3.2'
gem 'russian', '~> 0.6.0'
gem 'highline', '~> 1.6.11'
gem 'rails-xmlrpc', '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git'
gem 'jbuilder'
# gem 'rugged', '~> 0.16.0'
gem 'grack', :git => 'git://github.com/rdblue/grack.git', :require => 'git_http'
gem "grit", :git => 'git://github.com/chipiga/grit.git' #, :path => '~/Sites/code/grit'
gem "grit", :git => 'git://github.com/warpc/grit.git' #, :path => '~/Sites/code/grit'
gem 'charlock_holmes', '~> 0.6.8' #, :git => 'git://github.com/brianmario/charlock_holmes.git', :branch => 'bundle-icu'
gem 'diff-display', '~> 0.0.1'
# Wiki
gem "gollum", "1.3.1"
@ -35,7 +35,7 @@ gem 'rdiscount'
gem 'RedCloth'
gem 'wikicloth'
gem 'unicorn', '~> 4.2.0', :platforms => [:mri, :rbx]
gem 'unicorn', '~> 4.2.1', :platforms => [:mri, :rbx]
gem 'trinidad', '~> 1.0.2', :platforms => :jruby
gem 'newrelic_rpm', '~> 3.3.2', :platforms => [:mri, :rbx]
gem 'whenever', '~> 0.7.3', :require => false
@ -50,8 +50,8 @@ group :assets do
gem 'sass-rails', '~> 3.2.5'
gem 'coffee-rails', '~> 3.2.2'
gem 'compass-rails', '~> 1.0.1'
gem 'uglifier', '~> 1.2.1'
gem 'therubyracer', '~> 0.9.10', :platforms => [:mri, :rbx]
gem 'uglifier', '~> 1.2.4'
gem 'therubyracer', '~> 0.10.0', :platforms => [:mri, :rbx]
gem 'therubyrhino', '~> 1.73.1', :platforms => :jruby
end
@ -73,8 +73,8 @@ group :development do
end
group :test do
gem 'rspec-rails', '~> 2.8.1'
gem 'factory_girl_rails', '~> 1.7.0'
gem 'rspec-rails', '~> 2.9.0', :group => 'development'
gem 'factory_girl_rails', '~> 3.0.0'
gem 'rr', '~> 1.0.4'
gem 'shoulda'
end

View File

@ -1,12 +1,3 @@
GIT
remote: git://github.com/chipiga/grit.git
revision: 696b0967cb7e6bac044569d898e5acef431d4f97
specs:
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
GIT
remote: git://github.com/chipiga/redhillonrails_core.git
revision: 5f58167c41882890c223168b0a5521d99e8d92aa
@ -21,6 +12,15 @@ GIT
specs:
grack (0.2.0)
GIT
remote: git://github.com/warpc/grit.git
revision: 696b0967cb7e6bac044569d898e5acef431d4f97
specs:
grit (2.4.1)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
GEM
remote: http://rubygems.org/
specs:
@ -108,6 +108,7 @@ GEM
orm_adapter (~> 0.0.3)
railties (~> 3.1)
warden (~> 1.1.1)
diff-display (0.0.1)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (0.12.10)
@ -115,10 +116,10 @@ GEM
execjs (1.3.0)
multi_json (~> 1.0)
expression_parser (0.9.0)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
factory_girl (3.0.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.0.0)
factory_girl (~> 3.0.0)
railties (>= 3.0.0)
fssm (0.2.8.1)
github-markup (0.7.1)
@ -150,15 +151,15 @@ GEM
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
jruby-rack (1.1.4)
json (1.6.5)
json (1.6.5-java)
kgio (2.7.3)
json (1.6.6)
json (1.6.6-java)
kgio (2.7.4)
libv8 (3.3.10.4)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mailcatcher (0.5.5)
mailcatcher (0.5.6)
activesupport (~> 3.0)
eventmachine (~> 0.12)
haml (~> 3.1)
@ -170,7 +171,7 @@ GEM
meta-tags (1.2.6)
actionpack
mime-types (1.18)
multi_json (1.1.0)
multi_json (1.2.0)
mustache (0.99.4)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
@ -188,7 +189,7 @@ GEM
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
orm_adapter (0.0.6)
orm_adapter (0.0.7)
paperclip (2.7.0)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
@ -217,7 +218,6 @@ GEM
activesupport (= 3.2.2)
bundler (~> 1.0)
railties (= 3.2.2)
rails-xmlrpc (0.3.6)
rails3-generators (0.17.4)
railties (>= 3.0.0)
rails3-jquery-autocomplete (1.0.6)
@ -236,19 +236,19 @@ GEM
json (~> 1.4)
redcarpet (1.17.2)
rr (1.0.4)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
rspec-rails (2.8.1)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.8.0)
rspec (~> 2.9.0)
ruby-openid (2.1.8)
russian (0.6.0)
i18n (>= 0.5.0)
@ -279,7 +279,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
state_machine (1.1.2)
therubyracer (0.9.10)
therubyracer (0.10.0)
libv8 (~> 3.3.10)
therubyrhino (1.73.1)
thin (1.3.1)
@ -296,10 +296,10 @@ GEM
trinidad_jars (>= 0.3.0)
trinidad_jars (1.0.2)
tzinfo (0.3.32)
uglifier (1.2.3)
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.2.0)
unicorn (4.2.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
@ -333,7 +333,8 @@ DEPENDENCIES
daemons (= 1.1.6)
delayed_job_active_record (~> 0.3.2)
devise (~> 2.0.4)
factory_girl_rails (~> 1.7.0)
diff-display (~> 0.0.1)
factory_girl_rails (~> 3.0.0)
gollum (= 1.3.1)
grack!
grit!
@ -350,23 +351,22 @@ DEPENDENCIES
paperclip (~> 2.7.0)
pg (~> 0.13.2)
rails (= 3.2.2)
rails-xmlrpc (~> 0.3.6)
rails3-generators
rails3-jquery-autocomplete (~> 1.0.6)
rdiscount
redcarpet (= 1.17.2)
redhillonrails_core!
rr (~> 1.0.4)
rspec-rails (~> 2.8.1)
rspec-rails (~> 2.9.0)
russian (~> 0.6.0)
sass-rails (~> 3.2.5)
shotgun
shoulda
therubyracer (~> 0.9.10)
therubyracer (~> 0.10.0)
therubyrhino (~> 1.73.1)
trinidad (~> 1.0.2)
uglifier (~> 1.2.1)
unicorn (~> 4.2.0)
uglifier (~> 1.2.4)
unicorn (~> 4.2.1)
whenever (~> 0.7.3)
wikicloth
will_paginate (~> 3.0.3)

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

View File

@ -670,3 +670,54 @@ table.tablesorter tr.search th input[type="text"] {
width: 830px;
margin-top: 2px;
}
div.toolbar {
}
div.toolbar a.button {
float: left;
}
div.toolbar div.legend {
float: left;
margin-left: 50px;
padding: 4px 0 6px;
}
table.dataTable tr td.rights span.group,
div.toolbar div.legend.rights span.group {
background: image-url('group16.png') no-repeat 0 0 transparent;
}
table.dataTable tr td.rights span.user,
div.toolbar div.legend.rights span.user {
background: image-url('user16.png') no-repeat 0 0 transparent;
}
table.dataTable tr td.rights span.group_owner,
div.toolbar div.legend.rights span.group_owner {
background: image-url('group16g.png') no-repeat 0 0 transparent;
}
table.dataTable tr td.rights span.user_owner,
div.toolbar div.legend.rights span.user_owner {
background: image-url('user16g.png') no-repeat 0 0 transparent;
}
table.dataTable tr td.rights span.group_owner,
div.toolbar div.legend.rights span.group_owner,
table.dataTable tr td.rights span.user_owner,
div.toolbar div.legend.rights span.user_owner,
table.dataTable tr td.rights span.group,
div.toolbar div.legend.rights span.group,
table.dataTable tr td.rights span.user,
div.toolbar div.legend.rights span.user {
padding-left: 20px;
}
div.toolbar div.legend.rights span.group_owner,
div.toolbar div.legend.rights span.user_owner,
div.toolbar div.legend.rights span.group,
div.toolbar div.legend.rights span.user {
margin: 0 10px;
}

View File

@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
before_filter :set_locale
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 }
helper_method :get_owner

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
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 :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)
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
@platform = Platform.find params[:id], :include => :repositories
#@repositories = @platform.repositories

View File

@ -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

View File

@ -16,11 +16,16 @@ class UsersController < ApplicationController
end
def update
send_confirmation = params[:user][:email] != @user.email
if @user.update_without_password(params[:user])
if @user.avatar && params[:delete_avatar] == '1'
@user.avatar = nil
@user.save
end
if send_confirmation
@user.confirmed_at, @user.confirmation_sent_at = nil
@user.send_confirmation_instructions
end
flash[:notice] = t('flash.user.saved')
redirect_to edit_profile_path
else

View File

@ -1,7 +1,7 @@
# -*- encoding : utf-8 -*-
module ApplicationHelper
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']
else
APP_CONFIG['project_name']

View File

@ -19,4 +19,15 @@ module ProjectsHelper
def visibility_icon(visibility)
visibility == 'open' ? 'unlock.png' : 'lock.png'
end
def participant_class(alone_member, project)
c = alone_member ? 'user' : 'group'
c = 'user_owner' if project.owner == current_user
c = 'group_owner' if project.owner.in? current_user.groups
return c
end
def alone_member?(project)
Relation.by_target(project).by_object(current_user).size > 0
end
end

View File

@ -55,10 +55,6 @@ class Ability
can(:destroy, Project) {|project| owner? 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 [:read, :owned], BuildList, :user_id => user.id
can :read, BuildList, :project => {:visibility => 'open'}
@ -93,8 +89,6 @@ class Ability
can(:create, ProductBuildList) {|pbl| can?(:update, 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 => 'Group', :owner_id => user.group_ids}

View File

@ -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

View File

@ -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

View File

@ -21,7 +21,7 @@ class EventLog < ActiveRecord::Base
el.ip = current_controller.request.remote_ip
el.controller = current_controller.class.to_s
el.action = current_controller.action_name
el.protocol = (el.controller == 'RpcController' ? 'api' : 'web')
el.protocol = 'web'
end
end

View File

@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
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)
ActiveSupport::Notifications.instrument("event_log.observer", :object => record)

View File

@ -3,12 +3,10 @@ class Project < ActiveRecord::Base
VISIBILITIES = ['open', 'hidden']
MAX_OWN_PROJECTS = 32000
belongs_to :category, :counter_cache => true
belongs_to :owner, :polymorphic => true, :counter_cache => :own_projects_count
has_many :issues, :dependent => :destroy
has_many :build_lists, :dependent => :destroy
has_many :auto_build_lists, :dependent => :destroy
has_many :project_imports, :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 :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, I18n.t('flash.project.save_warning_ssh_key')) if owner.ssh_key.blank?}
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')
@ -36,7 +34,6 @@ class Project < ActiveRecord::Base
scope :by_visibilities, lambda {|v| where(:visibility => v)}
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 :automateable, where("projects.id NOT IN (SELECT auto_build_lists.project_id FROM auto_build_lists)")
after_create :attach_to_personal_repository
after_create :create_git_repo
@ -53,18 +50,6 @@ class Project < ActiveRecord::Base
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
arch = Arch.find_by_name(arch) if arch.acts_like?(:string)
build_lists.create do |bl|

View File

@ -5,6 +5,8 @@ class User < ActiveRecord::Base
LANGUAGES = LANGUAGES_FOR_SELECT.map(&:last)
MAX_AVATAR_SIZE = 5.megabyte
devise :database_authenticatable, :registerable, :omniauthable, # :token_authenticatable, :encryptable, :timeoutable
:recoverable, :rememberable, :validatable, :lockable, :confirmable#, :reconfirmable, :trackable
has_attached_file :avatar, :styles =>
{ :micro => { :geometry => "16x16#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'},
:small => { :geometry => "30x30#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'},
@ -13,9 +15,6 @@ class User < ActiveRecord::Base
}
validates_inclusion_of :avatar_file_size, :in => (0..MAX_AVATAR_SIZE), :allow_nil => true
devise :database_authenticatable, :registerable, #:omniauthable, # :token_authenticatable, :encryptable, :timeoutable
:recoverable, :rememberable, :validatable, :lockable #, :trackable, :confirmable
has_one :notifier, :class_name => 'Settings::Notifier', :dependent => :destroy #:notifier
has_many :activity_feeds, :dependent => :destroy

View File

@ -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'

View File

@ -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'

View File

@ -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

View File

@ -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")

View File

@ -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"

View File

@ -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')

View File

@ -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 &nbsp;
= render @categories
.actions-bar.wat-cf
.actions= will_paginate @categories

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -2,3 +2,5 @@
Welcome #{@resource.email}!
%p You can confirm your account through the link below:
%p= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
%br
%p== Support team «ROSA ABF»

View File

@ -0,0 +1,6 @@
%p
Здравствуйте, #{@resource.email}!
%p Вы можете подтвердить свой аккаунт, перейдя по ссылке снизу:
%p= link_to 'Подтвердить мой аккаунт', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
%br
%p== Команда поддержки «ROSA ABF»

View File

@ -4,3 +4,5 @@
%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
%p If you didn't request this, please ignore this email.
%p Your password won't change until you access the link above and create a new one.
%br
%p== Support team «ROSA ABF»

View File

@ -0,0 +1,8 @@
%p
Здравствуйте, #{@resource.email}!
%p Кто-то запросил смену Вашего пароля. Чтобы сменить пароль, перейдите по ссылке снизу.
%p= link_to 'Сменить пароль', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
%p Пожалуйста, проигнорируйте это письмо, если оно попало к Вам по ошибке.
%p Ваш пароль не поменяется, пока вы не перейдете по ссылке и не создадите новый.
%br
%p== Команда поддержки «ROSA ABF»

View File

@ -3,3 +3,5 @@
%p Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
%p Click the link below to unlock your account:
%p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token)
%br
%p== Support team «ROSA ABF»

View File

@ -0,0 +1,7 @@
%p
Здравствуйте, #{@resource.email}!
%p Ваш аккаунт был заблокирован из-за слишком большого количества неудачных попыток авторизации.
%p Пожалуйста, перейдите по ссылке ниже, чтобы разблокировать Ваш аккаунт:
%p= link_to 'Разблокировать мой аккаунт', unlock_url(@resource, :unlock_token => @resource.unlock_token)
%br
%p== Команда поддержки «ROSA ABF»

View File

@ -27,4 +27,4 @@
.actions-bar.wat-cf
.actions
= will_paginate @downloads
= render 'admin/submenu'

View File

@ -5,6 +5,8 @@
%title= choose_title
= stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css', :media => 'screen, projection'
= stylesheet_link_tag "application"
/[if lt IE 9]
= javascript_include_tag 'http://html5shiv.googlecode.com/svn/trunk/html5.js'
= javascript_include_tag "application"
= csrf_meta_tag
@ -18,19 +20,23 @@
= render :partial => 'layouts/menu/top', :locals => {:which_menu => 'top_menu'}
.information
= render 'search/form'
.user
.avatar= image_tag avatar_url(current_user), :alt => 'avatar', :height => "30"
.profile
%a{:href => "#"}
= current_user.uname
= image_tag 'expand-white.png', :alt => 'ex'
- if current_user
.user
.avatar= image_tag avatar_url(current_user), :alt => 'avatar', :height => "30"
.profile
%a{:href => "#"}
= current_user.uname
= image_tag 'expand-white.png', :alt => 'ex'
.both
.both
.both
.droplist-wrap
#droplist.droplist
.a= link_to current_user.uname, current_user
.a= link_to t('layout.settings.label'), edit_profile_path
.a= link_to t('layout.logout'), destroy_user_session_path, :method => :delete
.droplist-wrap
#droplist.droplist
.a= link_to current_user.uname, current_user
.a= link_to t('layout.settings.label'), edit_profile_path
.a= link_to t('layout.logout'), destroy_user_session_path, :method => :delete
- else
.user
.profile= link_to t("layout.devise.shared_links.sign_in"), new_user_session_path
.right
.both
- if content_for?(:submenu)

View File

@ -7,9 +7,11 @@
= stylesheet_link_tag "login"
- elsif ['registrations', 'passwords'].include?(controller_name) && ['new', 'create', 'edit', 'update'].include?(action_name)
= stylesheet_link_tag "reg_session"
= csrf_meta_tag
/[if lt IE 9]
= javascript_include_tag 'http://html5shiv.googlecode.com/svn/trunk/html5.js'
= javascript_include_tag "login"
= csrf_meta_tag
%body
-# render :partial => "layouts/flashes"
= yield

View File

@ -21,10 +21,7 @@
- else
= hidden_field_tag :who_owns, :me
.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
.rightlist
=# f.select :visibility, Project::VISIBILITIES

View File

@ -7,8 +7,12 @@
#{ ' / ' }
= link_to project.name, project_path(project)
%td.td2= project.description
%td= t("layout.collaborators.role_names.#{project.relations.by_user_through_groups(current_user).first.role}")
- alone_member = alone_member? project
%td
- c = participant_class(alone_member, project)
%span{:class => c, :title => t("layout.relations.#{c}")}
= t("layout.collaborators.role_names.#{project.relations.by_user_through_groups(current_user).first.role}")
%td.td5
- unless project.owner == current_user
- unless project.owner == current_user or !alone_member
= link_to remove_user_project_path(project), :method => :delete, :confirm => t("layout.confirm") do
%span.delete &nbsp;

View File

@ -7,7 +7,9 @@ json.project do |proj|
proj.role t("layout.collaborators.role_names.#{project.relations.by_user_through_groups(current_user).first.role}").force_encoding(Encoding::UTF_8)
proj.leave_link remove_user_project_path(project) unless project.owner == current_user
proj.leave_link remove_user_project_path(project) unless project.owner == current_user or !alone_member? project
proj.rights_class participant_class(alone_member?(project), project)
proj.title t("layout.relations.#{participant_class(alone_member?(project), project)}")
proj.owner do |owner|
owner.name project.owner.uname

View File

@ -1,8 +1,16 @@
= link_to t('layout.projects.new'), new_project_path, :class => 'button' if can?(:create, Project)
.toolbar
= link_to t('layout.projects.new'), new_project_path, :class => 'button' if can?(:create, Project)
.legend.rights
%span.user_owner= t("layout.relations.user_owner")
%span.group_owner= t("layout.relations.group_owner")
%span.user= t("layout.relations.user")
%span.group= t("layout.relations.group")
.both
- columns = [{:type => 'html'},
{:type => 'html', :sortable => false, :searchable => false},
{:type => nil, :sortable => false, :searchable => false, :class => 'buttons'},
{:type => nil, :sortable => false, :searchable => false, :class => 'rights'},
{:type => nil, :sortable => false, :searchable => false, :class => 'buttons'}]
-#= raw datatable(columns, {:sort_by => "[0, 'asc']", :search_label => t("layout.search_by_name"), :processing => t("layout.processing"),
-# :pagination_labels => {:previous => t("datatables.previous_label"), :next => t("datatables.next_label")},
@ -44,6 +52,12 @@
'<div class="table-sort-right">' + owner + ' / ' + project + '<div>';
}
var thirdColumn = function(row) {
var project = row.project
return '<span class="' + project.rights_class + '" title="' + project.title + '">' + project.role + '</span>';
}
var lastColumn = function(row) {
var project = row.project
var res = '';
@ -63,7 +77,7 @@
var inner = [];
inner.push( firstColumn(data) );
inner.push( data.project.description );
inner.push( data.project.role );
inner.push( thirdColumn(data) );
inner.push( lastColumn(data) );
res.push( inner );
}
@ -113,9 +127,7 @@
return true;
});
$search.live('keyup', function() {
if (this.value.length > 1) {
oTable.fnFilter(this.value);
}
oTable.fnFilter(this.value);
});
});

View File

@ -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'

View File

@ -16,6 +16,8 @@ Rosa::Application.configure do
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
#config.action_mailer.raise_delivery_errors = true
#config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp # :letter_opener
config.action_mailer.smtp_settings = { :host => "localhost", :port => 1025 }
config.action_mailer.default_url_options = { :host => 'localhost:3000' }

View File

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

View File

@ -5,5 +5,14 @@
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
Mime::Type.register "text/plain", :diff
Mime::Type.register "text/plain", :patch
Mime::Type.register "text/plain", 'diff'
Mime::Type.register "text/plain", 'patch'
# add rpm spec as mime type for *.spec files
[["text/x-python", ['py'], '8bit'],
["text/x-rpm-spec", ['spec'], '8bit'],
["text/x-csrc", ['h', 'c'], '8bit'],
["text/x-c++src", ['cpp'], '8bit']
].each do |type|
MIME::Types.add MIME::Type.from_array(type)
end

View File

@ -1,2 +0,0 @@
# -*- encoding : utf-8 -*-
require './lib/rosa_presenter/rosa_presenter'

View File

@ -1,35 +1,12 @@
# -*- encoding : utf-8 -*-
APP_CONFIG = YAML.load_file("#{Rails.root}/config/application.yml")[Rails.env]
Dir[Rails.root.join("lib/ext/**/*.rb")].each {|f| require f}
require 'modules'
require 'plugins'
# Setup Smart HTTP GRack
require 'grack'
config = {:project_root => File.join(APP_CONFIG['root_path'], 'git_projects'), :git_path => 'git', :upload_pack => true, :receive_pack => true}
# Rosa::Application.config.middleware.insert_before 0, ::Grack::Handler, config
Rosa::Application.config.middleware.insert_after ::Rails::Rack::Logger, ::Grack::Handler, config
Rosa::Application.config.middleware.insert_before ::Grack::Handler, ::Grack::Auth
Grit::Git.git_timeout = 60
# Grit.debug = true
GAP_REPO_PATH = '/tmp/gap_repo.git'
unless File.directory? GAP_REPO_PATH
Grit::Repo.init_bare(GAP_REPO_PATH)
# FileUtils.chmod "a-w", GAP_REPO_PATH
end
Dir[Rails.root.join("lib/ext/**/*.rb")].each {|f| require f}
# add rpm spec as mime type for *.spec files
types = [
["text/x-python", ['py'], '8bit'],
["text/x-rpm-spec", ['spec'], '8bit'],
["text/x-csrc", ['h', 'c'], '8bit'],
["text/x-c++src", ['cpp'], '8bit']
]
types.each do |type|
MIME::Types.add MIME::Type.from_array(type)
end
# load datatables plugin
require Rails.root.join("lib/rails_datatables")

View File

@ -3,11 +3,11 @@ en:
messages:
expired: "has expired, please request a new one"
not_found: "not found"
already_confirmed: "was already confirmed, please try signing in"
not_locked: "was not locked"
already_confirmed: "is already confirmed, please try signing in"
not_locked: "is not locked"
not_saved:
one: "1 error prohibited this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:"
other: "%{count} errors prevented %{resource} from being saved:"
devise:
failure:
@ -18,7 +18,7 @@ en:
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.'
inactive: 'Your account was not activated yet.'
inactive: 'Your account is not yet activated.'
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
@ -52,11 +52,11 @@ en:
send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
omniauth_callbacks:
success: 'Successfully authorized from %{kind} account.'
failure: 'Could not authorize you from %{kind} because "%{reason}".'
failure: 'Could not authorize you from %{kind} due to "%{reason}".'
mailer:
confirmation_instructions:
subject: 'Confirmation instructions'
reset_password_instructions:
subject: 'Reset password instructions'
subject: 'Password reset instructions'
unlock_instructions:
subject: 'Unlock Instructions'

View File

@ -69,16 +69,6 @@ en:
message: Automatically updated every 24 hours
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:
Monday: Monday
Tuesday: Tuesday
@ -103,16 +93,6 @@ en:
regenerate_btn: Regenerate
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:
back_to_proj: Back to project
edit: Edit list
@ -168,17 +148,6 @@ en:
successfully_added: Member %s successfully added
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:
successfully_updated: File '%{name}' successfully updated
updating_error: Error updating file '%{name}'
@ -200,14 +169,12 @@ en:
can_have_less_or_equal: You cannot have more than %{count} projects.
models:
category: Category
arch: Arch
container: Container
rpm: RPM
private_user: Private user
product_build_list: Product build list
download: Statistics
auto_build_list: Auto rebuild list
attributes:
settings:
@ -221,24 +188,10 @@ en:
new_comment_commit_repo_owner: Notify about comments to my repository commits
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:
login: Login
password: Password
category:
parent_id: Parent
name: Name
arch:
name: Name
created_at: Created

View File

@ -13,7 +13,7 @@ en:
by: by
remove: Remove
find_project: Find project...
visibilities:

View File

@ -2,5 +2,5 @@ en:
layout:
messages:
commits:
header_with_branch: "%{committer} add %{commit} into %{branch} branch"
header: "%{committer} add %{commit}"
header_with_branch: "%{committer} has added %{commit} into %{branch} branch"
header: "%{committer} has added %{commit}"

View File

@ -3,8 +3,6 @@ en:
repositories: Repositories
personal_repository: My repository
products: Products
categories: Catalogue
auto_build_lists: Automated build
downloads: Statistics
top_menu:
platforms: Platforms
@ -13,7 +11,7 @@ en:
groups: Groups
bottom_menu:
copyright: ROSA Lab © 2012
about: About company
about: About the company
contacts: Contacts
tos: Terms Of Service
security: Security
@ -38,3 +36,5 @@ en:
users: Users
register_requests: Invites
event_logs: Event log
downloads: Download statistic

View File

@ -1,10 +1,8 @@
ru:
menu:
categories: Каталог
products: Продукты
repositories: Репозитории
personal_repository: Мой репозиторий
auto_build_lists: Авто. сборки
downloads: Статистика
top_menu:
platforms: Платформы
@ -38,3 +36,4 @@ ru:
users: Пользователи
register_requests: Инвайты
event_logs: Лог событий
downloads: Статистика закачек пакетов

View File

@ -20,13 +20,13 @@ en:
bodies:
new_comment_notification:
title: '%{user_link} has been added a new comment'
title: '%{user_link} added a new comment'
content: in issue %{issue_link}
commit_content: in commit %{commit_link}
new_issue_notification: '%{user_link} has been added a new <a href="%{issue_link}">issue</a>'
new_issue_notification: '%{user_link} added a new <a href="%{issue_link}">issue</a>'
new_user_notification:
title: Hello, %{user_name}.
content: You have been sign up to project «ROSA Build System» and now can sign in.
content: You have registered in project «ROSA ABF» and now you can sign in.
email: ==Your email %{user_email}
password: ==Your password %{user_password}
issue_assign_notification: You have been assigned to issue %{issue_link}
@ -34,11 +34,11 @@ en:
invite_approve_notification: Invite to ABF
project: in project %{project_link}
delete_branch: Branch %{branch_name} has been deleted
create_branch: '%{user_link} has been created a new branch %{branch_name}'
update_branch: '%{user_link} has been pushed to branch %{branch_name}'
create_branch: '%{user_link} created a new branch %{branch_name}'
update_branch: '%{user_link} pushed to branch %{branch_name}'
build_task: 'Build <a href="%{task_link}">task #%{task_num}</a>'
build_status:
published: published successfully
success: complete successfully
failed: complete with error "%{error}"
pending: build waiting
success: completed successfully
failed: completed with error "%{error}"
pending: build is pending

View File

@ -27,7 +27,7 @@ ru:
new_issue_notification: '%{user_link} добавил новую <a href="%{issue_link}">задачу</a>'
new_user_notification:
title: Здравствуйте, %{user_name}.
content: Вы зарегистрированы на проекте «ROSA Build System» и теперь можете войти в систему.
content: Вы зарегистрированы на проекте «ROSA ABF» и теперь можете войти в систему.
email: ==Ваш email %{user_email}
password: ==Ваш пароль %{user_password}
issue_assign_notification: Вам была назначена задача %{issue_link}

View File

@ -13,18 +13,18 @@ en:
project: Project
arch_id: Architecture
arch: Architecture
is_circle: Recurrent
is_circle: Recurrent build
notified_at: Notified at
additional_repos: Additional repository
include_repos: Includes repository
updated_at: Updated
created_at: Created
pl: Packet list repository
pl_id: Packet list repository
additional_repos: Additional repositories
include_repos: Included repositories
updated_at: Updated on
created_at: Created on
pl: Repository for package storage
pl_id: Repository for package storage
bpl: Platform
bpl_id: Platform
update_type: Update type
build_requires: Dependable build requires
build_requires: Build with all the required packages
auto_publish: Automated publising
project_version: Version
user: User
@ -41,21 +41,21 @@ en:
build_lists:
filter_header: Filter
current: Curent
created_at_start: "Build start from:"
created_at_end: "Build start to:"
notified_at_start: "Last update time by BS from:"
notified_at_end: " Last update time by BS to:"
bs_id_search: 'Id search'
project_name_search: Project name search
bs_id_not_set: Id isnt set
created_at_start: "Build to start on:"
created_at_end: "Build to start until:"
notified_at_start: "Last update from BS on:"
notified_at_end: " Last update from BS until:"
bs_id_search: 'Search by Id'
project_name_search: Search by project name
bs_id_not_set: Id has not been configured yet
items_header: Build items
no_items_data: No data
show: Show
cancel_success: 'Build canceled'
cancel_fail: 'Errors on build cancelling!'
publish_success: 'Build on publish queue'
publish_fail: 'Errors on publish queue!'
container_published: 'Container in a repository'
cancel_fail: 'Errors during build cancelation!'
publish_success: 'Build is queued for publishing'
publish_fail: 'Errors during build publishing!'
container_published: 'Container published in a repository'
action: Action
new_header: New build
main_data: Main data
@ -68,9 +68,9 @@ en:
build_server_status:
header: Build server status
client_count: Clients count
count_new_task: New task count
count_build_task: Build task count
client_count: Number of clients
count_new_task: Number of tasks in queue
count_build_task: Number of tasks in execution
items:
statuses:
@ -78,13 +78,13 @@ en:
build_error: Build error
dependencies_error: Dependences not found
success: Build complete
unknown: Build waiting
unknown: Build is waiting
git_error: Git error
statuses:
build_error: Build error
build_published: Build published
build_publish: Build publishing
build_published: Build has been published
build_publish: Build is being publishing
failed_publish: Publishing error
dependencies_fail: Dependences not found
waiting_for_response: Waiting for response
@ -101,10 +101,10 @@ en:
flash:
build_list:
saved: Project version '%{project_version}' build list, platform '%{bpl}', architecture '%{arch}' creation success
save_error: Project version '%{project_version}' build list, platform '%{bpl}', architecture '%{arch}' creation error
no_project_version_selected: Select any version of project
saved: Build list for project version '%{project_version}', platform '%{bpl}' and architecture '%{arch}' has been created successfully
save_error: Build list for project version '%{project_version}', platform '%{bpl}' and architecture '%{arch}' could not been created
no_project_version_selected: Select any version of the project
no_project_version_found: Project version '%{project_version}' not found
no_arch_or_platform_selected: At least one of architecture of platform must selected
wrong_platform: For the main repository its mail platform can be chosen only!
can_not_published: Build publishing with status "Build" available only
wrong_platform: Only the primary platform can be selected for the main repository!
can_not_published: Build can only be published with status "Build complete"

View File

@ -105,6 +105,6 @@ ru:
save_error: Не удалось сохранить билд лист для версии '%{project_version}', платформы '%{bpl}' и архитектуры '%{arch}'
no_project_version_selected: Выберите какую-нибудь версию
no_project_version_found: Выбранная версия '%{project_version}' не найдена
no_arch_or_platform_selected: Выберите хотя бы одну ахритектуру и платформу
no_arch_or_platform_selected: Выберите хотя бы одну архитектуру и платформу
wrong_platform: Для основного репозитория (main) может быть выбран только его же основная платформа!
can_not_published: Опубликовать сборку можно только со статусом "Собран"

View File

@ -1,10 +1,10 @@
en:
layout:
comments:
confirm_delete: Are you sure to delete the comment?
confirm_delete: Are you sure you want to delete the comment?
new_header: New comment
edit_header: Editing a comment
has_commented: "adds a note"
has_commented: "added a note"
notifications_are: "Notifications for new comments are"
comments_header: "Comments"
back: 'Back'
@ -12,7 +12,7 @@ en:
flash:
comment:
saved: Comment saved
save_error: Comment saves error
save_error: Error while saving comment
destroyed: Comment deleted
activerecord:

View File

@ -2,36 +2,30 @@ en:
event_log:
controllers:
products_controller: 'Product Management'
platforms_controller: 'Management of platforms'
repositories_controller: 'Manage Repositories'
projects_controller: 'Project Management'
build_lists_controller: 'Management index chart'
auto_build_lists_controller: 'Control automatic build'
product_build_lists_controller: 'Build management products'
platforms_controller: 'Platforms Management'
repositories_controller: 'Repositories Management'
projects_controller: 'Projects Management'
build_lists_controller: 'Build lists management'
product_build_lists_controller: 'Products build management'
'devise/registrations_controller': 'User Registration'
'devise/sessions_controller': 'User Authentication'
'devise/passwords_controller': 'password recovery'
'users/omniauth_callbacks_controller': 'External authentication of users'
'devise/passwords_controller': 'Password recovery'
'users/omniauth_callbacks_controller': 'External users authentication'
rpc_controller: 'XML RPC'
private_users_controller: 'access to private repositories'
personal_repositories_controller: 'Managing personal repositories'
personal_repositories_controller: 'Personal repositories management'
actions:
'devise/sessions_controller':
create: 'input'
create: 'enter'
destroy: 'exit'
'users/omniauth_callbacks_controller':
open_id: 'login via OpenID'
projects_controller:
auto_build: 'sent to the automatic assembly'
build_lists_controller:
create: 'sent to assembly'
cancel: 'assembly abolished'
publish: 'assembly issued'
auto_build_lists_controller:
create: 'assigned'
destroy: 'canceled'
create: 'sent to build'
cancel: 'build abolished'
publish: 'build published'
product_build_lists_controller:
create: 'sent to assembly'
create: 'sent to build'
rpc_controller:
xe_index: inquiry
private_users_controller:
@ -43,11 +37,11 @@ en:
update: 'updated'
destroy: 'deleted'
notices:
platforms_list: a list of platforms
platforms_list: list of platforms
users_list: list of custom projects
versions_list: version list
status: the status of the assembly
project_build: build package
versions_list: list of versions
status: build status
project_build: package build
layout:
event_logs:

View File

@ -6,7 +6,6 @@ ru:
repositories_controller: 'Управление репозиториями'
projects_controller: 'Управление проектами'
build_lists_controller: 'Управление сборочными листами'
auto_build_lists_controller: 'Управление автоматической сборкой'
product_build_lists_controller: 'Управление сборкой продуктов'
'devise/registrations_controller': 'Регистрация пользователей'
'devise/sessions_controller': 'Аутентификация пользователей'
@ -21,15 +20,10 @@ ru:
destroy: 'выход'
'users/omniauth_callbacks_controller':
open_id: 'вход через OpenID'
projects_controller:
auto_build: 'отправлен на автоматическую сборку'
build_lists_controller:
create: 'отправлен на сборку'
cancel: 'сборка отменена'
publish: 'сборка опубликована'
auto_build_lists_controller:
create: 'назначена'
destroy: 'отменена'
product_build_lists_controller:
create: 'отправлен на сборку'
rpc_controller:

View File

@ -10,7 +10,7 @@ en:
list_header: Groups
show: Group
back_to_the_list: ⇐ List of groups
confirm_delete: Are you sure to remove this group?
confirm_delete: Are you sure you want to remove this group?
edit_members: Members
group: Group
description: Descripton
@ -29,15 +29,15 @@ en:
flash:
group:
saved: Group saved
save_error: Group saves error
save_error: Unable to save group
destroyed: Group deleted
user_uname_exists: User already exists
members:
successfully_changed: Members list successfully changed
error_in_changing: Members list changing error
successfully_added: Member successfully added
error_in_adding: Member adding error
successfully_changed: Members list modified successfully
error_in_changing: Error while modifying members
successfully_added: Member added successfully
error_in_adding: Error while adding member
already_added: User already added
activerecord:

View File

@ -16,34 +16,34 @@ en:
all: All
to_me: Assigned to me
edit: Edit
search: Search issue...
search: Find issue...
comments_header: Comments
new: New issue
list_header: List
confirm_delete: Are you sure to delete this task?
edit_header: Task edit
confirm_delete: Are you sure you want to delete this task?
edit_header: Edit task
create_header: Create task
statuses:
open: Opened
open: Open
closed: Closed
any: Any
status:
open: Открыто
open: Open
closed: Closed
subscribe: Subscribe
subscribe: Subscribe to notifications
subscribe_btn: Subscribe
unsubscribe_btn: Unsubscribe
number: Number
description: Description
labels: Labels
invalid_labels: Invalid hex color code
invalid_labels: Invalid color hex code
new_label: New label name
update_label: Update label
label_custom_color: Custom color
label_manage: Manage
label_manage: Manage labels
executor: Executor
search_user: Search user...
search_labels: Search labels...
search_user: Find user...
search_labels: Find labels...
choose_user_on_left: Choose executor on the left
choose_labels_on_left: Choose labels on the left
at: at
@ -53,5 +53,5 @@ en:
flash:
issue:
saved: Task saved
save_error: Task saves error
save_error: Unable to save task
destroyed: Task deleted

View File

@ -19,24 +19,24 @@ en:
products: Products
location: Location
repositories: Repositories
back_to_the_list: ⇐To platform list
back_to_the_list: ⇐To platforms list
freeze: Freeze
unfreeze: Unfeeze
confirm_freeze: Are you sure to freeze this platform?
confirm_clone: Are you sure to clone this platform?
confirm_unfreeze: Are you sure to defrost this platform?
unfreeze: Unfreeze
confirm_freeze: Are you sure you want to freeze this platform?
confirm_clone: Are you sure you want to clone this platform?
confirm_unfreeze: Are you sure you want to unfreeze this platform?
released_suffix: (released)
confirm_delete: Are you sure to delete this platform?
confirm_delete: Are you sure you want to delete this platform?
current_platform_header: Current platform
owner: Owner
visibility: Visibility
platform_type: Platform type
distrib_type: Distribution kit type
distrib_type: Distribution type
private_users: Access data
confirm_clone: To clone?
clone: To clone
confirm_clone: Clone?
clone: Clone
delete_warning: Attention! Deleted platform can not be restored!
sys_repos_header: Connecting info
sys_repos_header: Connection info
target_platform: Target platform
target_architecture: Target architecture
members: Members
@ -46,19 +46,19 @@ en:
platform:
saved: Platform saved
created: Platform created
save_error: Platform saves error
save_error: Platform save error
create_error: Platform create error
freezed: Platform freezed
freezed: Platform frozen
freeze_error: Platform freezing error, try again
unfreezed: Platform unfreezed
unfreezed: Platform unfrozen
unfreeze_error: Platform unfreezing error, try again
destroyed: Platform deleted
build_all_success: All project build in progress
clone_success: Cloned successfully
members:
already_added: "%{name} is already added to platform"
successfully_added: "%{name} successfully added as member"
error_in_adding: "Fail to add %{name} as member"
already_added: "%{name} is already a member of platform"
successfully_added: "%{name} successfully added to the platform"
error_in_adding: "Unable to add %{name} as member"
activerecord:
models:
@ -75,5 +75,5 @@ en:
distrib_type: Source type
visibility: Status
visibility_types:
open: Open
hidden: Hidden
open: Public
hidden: Private

View File

@ -74,5 +74,5 @@ ru:
distrib_type: Тип дистрибутива
visibility: Статус
visibility_types:
open: Открытый
hidden: Закрытый
open: Публичный
hidden: Приватный

View File

@ -10,17 +10,17 @@ en:
build: Build
new_header: New product
edit_header: Product editing
confirm_delete: Are you sure to delete this product?
confirm_delete: Are you sure you want to delete this product?
cron_tab_generator:
show: Show cron tab the generator
hide: Hide cron tab the generator
show: Show cron tab generator
hide: Hide cron tab generator
choose: Choose
every_minute: Every minute
every_hour: Every hour
every_day: Every day
every_month: Every month
every_weekday: Every weekdays
every_weekday: Every week day
minutes: Minutes
hours: Hours
days: Days
@ -30,7 +30,7 @@ en:
flash:
product:
saved: Product saved
save_error: Product saves error
save_error: Unable to save product
build_started: Product build started
destroyed: Product deleted
build_list_delete: Product build list deleted
@ -47,12 +47,12 @@ en:
build_path: ISO path
created_at: Created
updated_at: Updated
ks: Content .ks.template
counter: Content .counter
build_script: Content build
menu: Content .menu.xml
ks: Contents of .ks.template
counter: Contents of .counter
build_script: Contents of build
menu: Contents of .menu.xml
tar: Tar.bz2 file
is_template: Template
system_wide: System
cron_tab: Cront tab
use_cron: Cron usage
system_wide: System-wide
cron_tab: Cron tab
use_cron: Use cron

View File

@ -54,5 +54,5 @@ ru:
tar: Tar.bz2 файл
is_template: Шаблон
system_wide: Общесистемный
cron_tab: Cront tab
cron_tab: Cron tab
use_cron: Использовать крон

View File

@ -6,11 +6,11 @@ en:
fork_and_edit: Fork and Edit
list: List
list_header: Projects
edit_header: Edit the project
edit_header: Edit project
show: Project
build: Build
new_build: New build %{project_name}
confirm_delete: Are you sure to delete this project?
confirm_delete: Are you sure you want to delete this project?
new: New project
location: Location
git_repo_location: Path to git repo
@ -25,10 +25,10 @@ en:
remove_user: Leave project
issues: Issues
wiki: Wiki
delete_warning: Attention! Deleted project can not be restored!
delete_warning: Attention! Deleted project cannot be restored!
sections: Sections
has_issue_description: Issues adds lightweight issue tracking tightly integrated with your repository. Add issues to milestones, label issues, and close & reference issues from commit messages.
has_wiki_description: Wikis are the simplest way to let others contribute content. Any user can create and edit pages to use for documentation, examples, support or anything you wish.
has_issue_description: Tracker adds a lightweight issue management system tightly integrated with your repository.
has_wiki_description: Wikis are the simplest way to allow other users to contribute content. Any user can create and edit pages for documentation, examples, support or anything you wish.
diff_show_header: "%{files} with %{additions} and %{deletions}."
about_subheader: "About project"
@ -39,6 +39,8 @@ en:
message: Message
author: Author
participant_type: Part. type
current_branch: Current branch/tag
current_commit: Current commit
files_in_project: Files in
@ -46,8 +48,8 @@ en:
flash:
project:
saved: Project saved
save_error: Project saves error
save_warning_ssh_key: Owner of the project must specify in profile a SSH key
save_error: Unable to save project
save_warning_ssh_key: Project owner must provide a SSH key in his profile
destroyed: Project deleted
forked: Project forked
fork_error: Project fork error
@ -58,23 +60,22 @@ en:
project: Project
attributes:
project:
category_id: Category
name: Name
description: Descripton
owner: Owner
visibility: Visibility
visibility_types:
open: Open
hidden: Hidden
open: Public
hidden: Private
repository_id: Repository
repository: Repository
created_at: Created
updated_at: Updated
has_issues: Tracker on
has_wiki: Wiki on
created_at: Created on
updated_at: Updated on
has_issues: Issues tracker enabled
has_wiki: Wiki enabled
srpm: Import code from src.rpm
who_owns:
me: I
me: Myself
group: Group
default_branch: Default branch
is_rpm: Project is a packet

View File

@ -39,6 +39,8 @@ ru:
message: Сообщение
author: Автор
participant_type: Тип участия
current_branch: Текущая ветка/тег
current_commit: Текущий коммит
files_in_project: Файлы в
@ -58,14 +60,13 @@ ru:
project: Проект
attributes:
project:
category_id: Категория
name: Название
description: Описание
owner: Владелец
visibility: Видимость
visibilities:
open: Публичная
hidden: Приватная
open: Публичный
hidden: Приватный
repository_id: Репозиторий
repository: Репозиторий
created_at: Создан

View File

@ -12,13 +12,13 @@ en:
projects: Projects
new_header: New repository
back_to_the_list: ⇐ List of repositories
confirm_delete: Are you sure to delete this repository?
confirm_delete: Are you sure you want to delete this repository?
current_repository_header: Current repository
personal_repositories:
settings_header: Settings
change_visibility_from_hidden: Replace the status to "Opened"
change_visibility_from_open: Replace the status to "Private"
change_visibility_from_hidden: Change status to "Public"
change_visibility_from_open: Change status to "Private"
settings: Settings
show: My repository
private_users: Private repository users
@ -26,12 +26,12 @@ en:
flash:
repository:
saved: Repository added
save_error: Repository adding error
save_error: Unable to add repository
destroyed: Repository deleted
project_added: Project added on repository
project_not_added: Project adding error. In this repository already is a project with such name. First remove the old project
project_added: Project added to repository
project_not_added: Project adding error. A project with such name already exists in this repository. Remove the old project first
project_removed: Project deleted
project_not_removed: Project deleting failed
project_not_removed: Unable to delete project from repository
activerecord:
models:

View File

@ -17,7 +17,7 @@ ru:
personal_repositories:
settings_header: Настройки
change_visibility_from_hidden: Сменить статус на "Открытый"
change_visibility_from_hidden: Сменить статус на "Публичный"
change_visibility_from_open: Сменить статус на "Приватный"
settings: Настройки
show: Мой репозиторий

View File

@ -10,15 +10,15 @@ en:
groups: Groups
show: User
back_to_the_list: ⇐ List of users
confirm_delete: Are you sure to remove this user?
confirm_delete: Are you sure you want to remove this user?
own_projects: My projects
part_projects: Participate projects
part_projects: Projects participation
filter_header: Filter
flash:
user:
saved: User saved
save_error: User data saves error
saved: User saved successtully
save_error: Unable to save user data
destroyed: User account deleted
activerecord:

View File

@ -69,16 +69,6 @@ ru:
message: Обновляется автоматически каждые 24 часа
refresh_btn: Обновить
auto_build_lists:
header: Проекты с автоматической сборкой
message: Все проекты собираются под пользовательский репозиторий и архитектуру i586
project: Проект
action: Действие
automate_btn: Автоматизировать
cancel_btn: Отменить
not_automated: Не автоматизированы
already_automated: Автоматизированы
weekdays:
Monday: Понедельник
Tuesday: Вторник
@ -103,16 +93,6 @@ ru:
regenerate_btn: Перегенерировать
warning_message: Примечание - При получении новых данных старые становятся недействительными
categories:
list: Список
new: Создать
edit: Редактировать
platforms: По платформам
list_header: Каталог
new_header: Новая категория
edit_header: Редактировать категорию
confirm_delete: Вы уверены, что хотите удалить эту категорию?
collaborators:
back_to_proj: Вернуться к проекту
edit: Редактировать список
@ -168,17 +148,6 @@ ru:
successfully_added: Участник %s успешно добавлен
error_in_adding: Ошибка при добавлении участника %s
auto_build_list:
success: Сборка проекта автоматизорована!
failed: Не удалось автоматизировать сборку!
cancel: Автоматическая сборка проекта отменена!
cancel_failed: Не удалось отменить автоматическую сборку проекта!
category:
saved: Категория успешно сохранена
save_error: Не удалось сохранить категорию
destroyed: Категория успешно удалена
blob:
successfully_updated: Файл '%{name}' успешно обновлен
updating_error: Ошибка обновления файла '%{name}'
@ -200,7 +169,6 @@ ru:
can_have_less_or_equal: Нельзя иметь больше, чем %{count} проектов.
models:
category: Категория
arch: Arch
container: Container
rpm: RPM
@ -221,24 +189,10 @@ ru:
new_comment_commit_repo_owner: Оповещать о комментариях к коммитам в моем репозитории
new_comment_commit_commentor: Оповещать о комментариях к коммиту после моего
auto_build_list:
project_id: Проект
project: Проект
bpl_id: Репозиторий для сохранения
bpl: Репозиторий для сохранения
pl_id: Платформа
pl: Платформа
arch_id: Архитектура
arch: Архитектура
private_user:
login: Логин
password: Пароль
category:
parent_id: Родитель
name: Название
arch:
name: Название
created_at: Создана

View File

@ -13,7 +13,7 @@ en:
pages: Pages
wiki_history: Wiki History
git_access: Git Access
search_and_hellip: Search & Hellip
search_and_hellip: Search & Help
search: Search
search_popup: Search this Wiki
commit_message_placeholder: Write a small message here explaining this change. (Optional)

View File

@ -1,7 +1,5 @@
# -*- encoding : utf-8 -*-
Rosa::Application.routes.draw do
# XML RPC
match 'api/xmlrpc' => 'rpc#xe_index'
devise_scope :user do
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/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 'build_lists/publish_build', :to => "build_lists#publish_build"
@ -68,8 +62,6 @@ Rosa::Application.routes.draw do
collection { post :search }
end
resources :auto_build_lists, :only => [:index, :create, :destroy]
resources :personal_repositories, :only => [:show] do
member do
get :settings
@ -93,7 +85,6 @@ Rosa::Application.routes.draw do
end
collection do
get :easy_urpmi
get :autocomplete_user_uname
end
@ -106,8 +97,6 @@ Rosa::Application.routes.draw do
end
resources :repositories
resources :categories, :only => [:index, :show]
end
resources :projects, :except => [:show] do
@ -203,8 +192,6 @@ Rosa::Application.routes.draw do
resources :search, :only => [:index]
match '/catalogs', :to => 'categories#platforms', :as => :catalogs
match 'product_status', :to => 'product_build_lists#status_build'
# Tree

View File

@ -0,0 +1,16 @@
# -*- encoding : utf-8 -*-
class AddConfirmableToUsers < ActiveRecord::Migration
def self.up
add_column :users, :confirmation_token, :string
add_column :users, :confirmed_at, :datetime
add_column :users, :confirmation_sent_at, :datetime
add_index :users, :confirmation_token, :unique => true
end
def self.down
remove_index :users, :confirmation_token
remove_column :users, :confirmation_sent_at
remove_column :users, :confirmed_at
remove_column :users, :confirmation_token
end
end

View File

@ -0,0 +1,9 @@
# -*- encoding : utf-8 -*-
class ConfirmAllRegisteredUsers < ActiveRecord::Migration
def up
User.all.each { |user| user.confirm! }
end
def down
end
end

View File

@ -0,0 +1,17 @@
# -*- encoding : utf-8 -*-
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

View File

@ -0,0 +1,18 @@
# -*- encoding : utf-8 -*-
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

View File

@ -11,7 +11,7 @@
#
# 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|
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", ["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|
t.string "name"
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", ["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|
t.string "commentable_type"
t.integer "user_id"
@ -282,27 +265,28 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
t.integer "owner_id"
t.string "owner_type"
t.string "visibility", :default => "open"
t.integer "category_id"
t.text "description"
t.string "ancestry"
t.boolean "has_issues", :default => true
t.boolean "has_wiki", :default => false
t.string "srpm_file_name"
t.string "srpm_content_type"
t.integer "srpm_file_size"
t.datetime "srpm_updated_at"
t.boolean "has_wiki", :default => false
t.string "default_branch", :default => "master"
t.boolean "is_rpm", :default => true
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|
t.string "name"
t.string "email"
t.string "token"
t.boolean "approved", :default => false
t.boolean "rejected", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.string "interest"
t.text "more"
end
@ -375,9 +359,6 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
t.string "uname"
t.string "role"
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.datetime "reset_password_sent_at"
t.text "professional_experience"
@ -391,6 +372,9 @@ ActiveRecord::Schema.define(:version => 20120326142636) do
t.integer "failed_attempts", :default => 0
t.string "unlock_token"
t.datetime "locked_at"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
end
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true

View File

@ -3,137 +3,3 @@ ARCHES = %w(i386 i586 x86_64)
ARCHES.each do |arch|
Arch.find_or_create_by_name arch
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

View File

@ -1,5 +1,4 @@
# -*- encoding : utf-8 -*-
# # -*- encoding : utf-8 -*-
module Gollum
class Wiki
# Public: Applies a reverse diff for a given page. If only 1 SHA is given,

View File

@ -1,6 +1,4 @@
# -*- encoding : utf-8 -*-
# -*- ruby encoding: utf-8 -*-
module Grit
class Blob
@ -48,3 +46,11 @@ module Grit
end
end
Grit::Git.git_timeout = 60
# Grit.debug = true
GAP_REPO_PATH = '/tmp/gap_repo.git'
unless File.directory? GAP_REPO_PATH
Grit::Repo.init_bare(GAP_REPO_PATH)
# FileUtils.chmod "a-w", GAP_REPO_PATH
end

View File

@ -34,6 +34,7 @@ module Preregistration
redirect_to new_register_request_path and return unless req and resource.email == req.email
@invitation_token = req.token
resource.skip_confirmation!
if resource.save
if resource.active_for_authentication?
set_flash_message :notice, :signed_up if is_navigational_format?

View File

@ -6,7 +6,5 @@ module Modules
module Models
extend ActiveSupport::Autoload
autoload :Owner
end
end

View File

@ -8,9 +8,6 @@ module Modules
after_create lambda { relations.create :object_id => owner.id, :object_type => owner.class.to_s, :role => 'admin' }
end
module InstanceMethods
end
module ClassMethods
end
end

View File

@ -8,30 +8,28 @@ module Modules
after_create :create_personal_repository
end
module InstanceMethods
def create_personal_repository
pl = platforms.build
pl.owner = self
pl.name = "#{self.uname}_personal"
pl.description = "#{self.uname}_personal"
pl.platform_type = 'personal'
pl.distrib_type = APP_CONFIG['distr_types'].first
pl.visibility = 'open'
pl.save!
def create_personal_repository
pl = platforms.build
pl.owner = self
pl.name = "#{self.uname}_personal"
pl.description = "#{self.uname}_personal"
pl.platform_type = 'personal'
pl.distrib_type = APP_CONFIG['distr_types'].first
pl.visibility = 'open'
pl.save!
rep = pl.repositories.build
rep.name = 'main'
rep.description = 'main'
rep.save!
end
rep = pl.repositories.build
rep.name = 'main'
rep.description = 'main'
rep.save!
end
def personal_platform
platforms.personal.first
end
def personal_platform
platforms.personal.first
end
def personal_repository
personal_platform.repositories.first
end
def personal_repository
personal_platform.repositories.first
end
module ClassMethods

View File

@ -18,9 +18,6 @@ module Modules
end
end
module InstanceMethods
end
module ClassMethods
end
end

5
lib/plugins.rb Normal file
View File

@ -0,0 +1,5 @@
# -*- encoding : utf-8 -*-
Dir[File.join(File.dirname(__FILE__), 'plugins', '*.rb')].each do |f|
$:.unshift File.dirname(f)
require f
end

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