Fix bugs after renaming unixname to name. Refs #2261

This commit is contained in:
Pavel Chipiga 2011-11-30 01:41:12 +02:00
parent 43eb873b70
commit 0134f4adf9
4 changed files with 10 additions and 12 deletions

View File

@ -436,9 +436,9 @@ ru:
repository: repository:
name: Название name: Название
description: Описание
platform_id: Платформа platform_id: Платформа
platform: Платформа platform: Платформа
unixname: Unixname
created_at: Создан created_at: Создан
updated_at: Обновлен updated_at: Обновлен
owner: Владелец owner: Владелец
@ -476,7 +476,7 @@ ru:
platform: platform:
name: Название name: Название
unixname: Unixname description: Описание
parent_platform_id: Родительская платформа parent_platform_id: Родительская платформа
parent: Родительская платформа parent: Родительская платформа
released: Released released: Released
@ -499,7 +499,6 @@ ru:
project: project:
category_id: Категория category_id: Категория
name: Название name: Название
unixname: Unixname
description: Описание description: Описание
owner: Владелец owner: Владелец
visibility: Видимость visibility: Видимость

View File

@ -220,7 +220,6 @@ ActiveRecord::Schema.define(:version => 20111128140341) do
t.string "object_type" t.string "object_type"
t.integer "target_id" t.integer "target_id"
t.string "target_type" t.string "target_type"
t.integer "role_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "role" t.string "role"
@ -249,16 +248,16 @@ ActiveRecord::Schema.define(:version => 20111128140341) do
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "name" t.string "name"
t.string "email", :default => "", :null => false t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "reset_password_token" t.string "reset_password_token"
t.datetime "reset_password_sent_at" t.string "remember_token"
t.datetime "remember_created_at" t.datetime "remember_created_at"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "uname"
t.text "ssh_key" t.text "ssh_key"
t.integer "role_id" t.string "uname"
t.string "role" t.string "role"
end end

View File

@ -10,7 +10,7 @@ class ProductBuilder
def self.create_product pbl # product_build_list def self.create_product pbl # product_build_list
self.client(pbl.product.platform.distrib_type). self.client(pbl.product.platform.distrib_type).
call('create_product', pbl.id.to_s, pbl.product.platform.unixname, pbl.product.ks, pbl.product.menu, call('create_product', pbl.id.to_s, pbl.product.platform.name, pbl.product.ks, pbl.product.menu,
pbl.product.build_script, pbl.product.counter, [], "#{pbl.base_url}#{pbl.product.tar.url}") pbl.product.build_script, pbl.product.counter, [], "#{pbl.base_url}#{pbl.product.tar.url}")
end end
end end

View File

@ -5,8 +5,8 @@ describe ProjectsController do
before(:each) do before(:each) do
@project = Factory(:project) @project = Factory(:project)
@another_user = Factory(:user) @another_user = Factory(:user)
@create_params = {:project => {:name => 'pro', :unixname => 'pro2'}} @create_params = {:project => {:name => 'pro'}}
@update_params = {:project => {:name => 'pro2', :unixname => 'pro2'}} @update_params = {:project => {:name => 'pro2'}}
platform = Factory(:platform) platform = Factory(:platform)
any_instance_of(Project, :collected_project_versions => ['v1.0', 'v2.0']) any_instance_of(Project, :collected_project_versions => ['v1.0', 'v2.0'])