From 0134f4adf9045abb56443b79e7919e5d1a3ccd3f 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 | 11 +++++------ lib/product_builder.rb | 2 +- spec/controllers/projects_controller_spec.rb | 4 ++-- 4 files changed, 10 insertions(+), 12 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 1e6684487..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" @@ -249,16 +248,16 @@ ActiveRecord::Schema.define(:version => 20111128140341) do create_table "users", :force => true do |t| t.string "name" - t.string "email", :default => "", :null => false - t.string "encrypted_password", :limit => 128, :default => "", :null => false + t.string "email", :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.datetime "reset_password_sent_at" + t.string "remember_token" 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'])