From 4f46b82914bf9fafe070a1121b73616e83e44543 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Wed, 30 Nov 2011 01:41:12 +0200 Subject: [PATCH] Fix bugs after renaming unixname to name. Refs #2261 --- config/locales/ru.yml | 5 ++--- db/schema.rb | 4 +--- lib/product_builder.rb | 2 +- spec/controllers/projects_controller_spec.rb | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 0ce1daf02..eee59670e 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -436,9 +436,9 @@ ru: repository: name: Название + description: Описание platform_id: Платформа platform: Платформа - unixname: Unixname created_at: Создан updated_at: Обновлен owner: Владелец @@ -476,7 +476,7 @@ ru: platform: name: Название - unixname: Unixname + description: Описание parent_platform_id: Родительская платформа parent: Родительская платформа released: Released @@ -499,7 +499,6 @@ ru: project: category_id: Категория name: Название - unixname: Unixname description: Описание owner: Владелец visibility: Видимость diff --git a/db/schema.rb b/db/schema.rb index 33ea2eeda..74e364bc6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -220,7 +220,6 @@ ActiveRecord::Schema.define(:version => 20111128140341) do t.string "object_type" t.integer "target_id" t.string "target_type" - t.integer "role_id" t.datetime "created_at" t.datetime "updated_at" t.string "role" @@ -257,9 +256,8 @@ ActiveRecord::Schema.define(:version => 20111128140341) do t.datetime "remember_created_at" t.datetime "created_at" t.datetime "updated_at" - t.string "uname" t.text "ssh_key" - t.integer "role_id" + t.string "uname" t.string "role" end diff --git a/lib/product_builder.rb b/lib/product_builder.rb index 0a3447445..10a6212c1 100644 --- a/lib/product_builder.rb +++ b/lib/product_builder.rb @@ -10,7 +10,7 @@ class ProductBuilder def self.create_product pbl # product_build_list 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}") end end diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index acd3260e7..3e45b88bb 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -5,8 +5,8 @@ describe ProjectsController do before(:each) do @project = Factory(:project) @another_user = Factory(:user) - @create_params = {:project => {:name => 'pro', :unixname => 'pro2'}} - @update_params = {:project => {:name => 'pro2', :unixname => 'pro2'}} + @create_params = {:project => {:name => 'pro'}} + @update_params = {:project => {:name => 'pro2'}} platform = Factory(:platform) any_instance_of(Project, :collected_project_versions => ['v1.0', 'v2.0'])