From 05186b292f73aaead76429c09907b9e7e6a3188d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 16 Nov 2012 15:10:54 +0100 Subject: [PATCH] Revert OBS:Maintainer attribute till it's green everywhere --- ...121114104300_add_maintainer_attrib_type.rb | 20 ------------------- src/api/db/seeds.rb | 6 +----- src/api/db/structure.sql | 2 -- .../test/fixtures/attrib_allowed_values.yml | 8 -------- .../fixtures/attrib_type_modifiable_bies.yml | 4 ---- src/api/test/fixtures/attrib_types.yml | 4 ---- src/api/test/functional/attributes_test.rb | 4 ++-- 7 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 src/api/db/migrate/20121114104300_add_maintainer_attrib_type.rb diff --git a/src/api/db/migrate/20121114104300_add_maintainer_attrib_type.rb b/src/api/db/migrate/20121114104300_add_maintainer_attrib_type.rb deleted file mode 100644 index 1a97649dccc..00000000000 --- a/src/api/db/migrate/20121114104300_add_maintainer_attrib_type.rb +++ /dev/null @@ -1,20 +0,0 @@ -class AddMaintainerAttribType < ActiveRecord::Migration - - def self.up - p={} - p[:role] = Role.find_by_title("Admin") - ans = AttribNamespace.find_by_name "OBS" - - self.transaction do - at=AttribType.create( :attrib_namespace => ans, :name => "Maintainer" ) - at.attrib_type_modifiable_bies.create(p) - at.allowed_values << AttribAllowedValue.new( :value => "DisableDevel" ) - at.allowed_values << AttribAllowedValue.new( :value => "BugownerOnly" ) - end - end - - def self.down - AttribType.find_by_namespace_and_name("OBS", "Maintainer").destroy() - end - -end diff --git a/src/api/db/seeds.rb b/src/api/db/seeds.rb index a568cef9964..605209707cb 100644 --- a/src/api/db/seeds.rb +++ b/src/api/db/seeds.rb @@ -78,11 +78,6 @@ at = AttribType.find_or_create_by_attrib_namespace_id_and_name(ans.id, "ScreenShots") at.attrib_type_modifiable_bies.find_or_create_by_bs_user_id(admin.id) -at = AttribType.find_or_create_by_attrib_namespace_id_and_name(ans.id, "Maintainer") -at.attrib_type_modifiable_bies.find_or_create_by_bs_user_id(admin.id) -at.allowed_values << AttribAllowedValue.new( :value => "DisableDevel" ) -at.allowed_values << AttribAllowedValue.new( :value => "BugownerOnly" ) - at = AttribType.find_or_create_by_attrib_namespace_id_and_name(ans.id, "RequestCloned", :value_count => 1) at.attrib_type_modifiable_bies.find_or_create_by_bs_role_id(maintainer_role.id) at = AttribType.find_or_create_by_attrib_namespace_id_and_name(ans.id, "ProjectStatusPackageFailComment", :value_count => 1) @@ -94,6 +89,7 @@ at = AttribType.find_or_create_by_attrib_namespace_id_and_name(ans.id, "QualityCategory", :value_count => 1) at.attrib_type_modifiable_bies.find_or_create_by_bs_role_id(maintainer_role.id) + at.allowed_values << AttribAllowedValue.new( :value => "Stable" ) at.allowed_values << AttribAllowedValue.new( :value => "Testing" ) at.allowed_values << AttribAllowedValue.new( :value => "Development" ) diff --git a/src/api/db/structure.sql b/src/api/db/structure.sql index ca77cd266a6..82d07879227 100644 --- a/src/api/db/structure.sql +++ b/src/api/db/structure.sql @@ -994,8 +994,6 @@ INSERT INTO schema_migrations (version) VALUES ('20121112110642'); INSERT INTO schema_migrations (version) VALUES ('20121114093616'); -INSERT INTO schema_migrations (version) VALUES ('20121114104300'); - INSERT INTO schema_migrations (version) VALUES ('21'); INSERT INTO schema_migrations (version) VALUES ('22'); diff --git a/src/api/test/fixtures/attrib_allowed_values.yml b/src/api/test/fixtures/attrib_allowed_values.yml index a072bb9fe16..d5a08b47d10 100644 --- a/src/api/test/fixtures/attrib_allowed_values.yml +++ b/src/api/test/fixtures/attrib_allowed_values.yml @@ -18,11 +18,3 @@ attrib_allowed_values_67: id: 67 attrib_type_id: 59 value: neutral -Maintainer_DisableDevel: - id: 77 - attrib_type_id: 77 - value: DisableDevel -Maintainer_BugownerOnly: - id: 78 - attrib_type_id: 77 - value: BugownerOnly diff --git a/src/api/test/fixtures/attrib_type_modifiable_bies.yml b/src/api/test/fixtures/attrib_type_modifiable_bies.yml index c1a0e531a6b..986b5049d00 100644 --- a/src/api/test/fixtures/attrib_type_modifiable_bies.yml +++ b/src/api/test/fixtures/attrib_type_modifiable_bies.yml @@ -79,7 +79,3 @@ attrib_type_modifiable_bies_973674881: id: 973674881 attrib_type_id: 75 bs_role_id: 3 -attrib_type_modifiable_bies_973674882: - id: 973674882 - attrib_type_id: 77 - bs_role_id: 1 diff --git a/src/api/test/fixtures/attrib_types.yml b/src/api/test/fixtures/attrib_types.yml index b203a4405df..4e061099091 100644 --- a/src/api/test/fixtures/attrib_types.yml +++ b/src/api/test/fixtures/attrib_types.yml @@ -22,10 +22,6 @@ OBS_Maintained: name: Maintained value_count: 0 attrib_namespace_id: 9 -OBS_Maintainer: - id: 77 - name: Maintainer - attrib_namespace_id: 9 OBS_MaintenanceIdTemplate: id: 63 name: MaintenanceIdTemplate diff --git a/src/api/test/functional/attributes_test.rb b/src/api/test/functional/attributes_test.rb index b542f346dba..cfa0e24a639 100644 --- a/src/api/test/functional/attributes_test.rb +++ b/src/api/test/functional/attributes_test.rb @@ -30,7 +30,7 @@ def test_namespace_index get "/attribute/OBS" assert_response :success - count = 14 + count = 13 assert_xml_tag :tag => 'directory', :attributes => { :count => count } assert_xml_tag :children => { :count => count } assert_xml_tag :child => { :tag => 'entry', :attributes => { :name => "Maintained" } } @@ -161,7 +161,7 @@ def test_attrib_type_meta get "/attribute/OBS" assert_response :success - count = 14 + count = 13 assert_xml_tag :tag => 'directory', :attributes => { :count => count } assert_xml_tag :children => { :count => count } assert_xml_tag :child => { :tag => 'entry', :attributes => { :name => "Maintained" } }