From b78b06e25cfefc61cd42f2fa858725b071e77834 Mon Sep 17 00:00:00 2001 From: Gabriela Navarro Date: Thu, 11 Dec 2014 13:03:39 +0000 Subject: [PATCH] Set line to have 80 characters or less --- db/migrate/20140523132016_create_controlled_vocabulary_table.rb | 54 +++++++++++++++++++++++++++--------------------------- db/migrate/20140528193902_create_license_infos_table.rb | 4 +++- db/migrate/20140528194044_create_database_descriptions_table.rb | 3 ++- db/migrate/20140617132133_create_governmental_spheres.rb | 3 ++- db/migrate/20140617132451_create_governmental_powers.rb | 3 ++- db/migrate/20140714133901_create_operating_name_table.rb | 7 ++++--- db/migrate/20140714135007_change_operating_systems_table.rb | 16 ++++++++-------- db/migrate/20140814131606_create_juridical_natures_table.rb | 4 +++- 8 files changed, 51 insertions(+), 43 deletions(-) diff --git a/db/migrate/20140523132016_create_controlled_vocabulary_table.rb b/db/migrate/20140523132016_create_controlled_vocabulary_table.rb index c5a8964..8b5ec6e 100644 --- a/db/migrate/20140523132016_create_controlled_vocabulary_table.rb +++ b/db/migrate/20140523132016_create_controlled_vocabulary_table.rb @@ -1,35 +1,35 @@ class CreateControlledVocabularyTable < ActiveRecord::Migration def up - create_table :controlled_vocabulary do |t| - t.references :software_info - t.boolean :administration - t.boolean :agriculture - t.boolean :business_and_services - t.boolean :communication - t.boolean :culture - t.boolean :national_defense - t.boolean :economy_and_finances - t.boolean :education - t.boolean :energy - t.boolean :sports - t.boolean :habitation - t.boolean :industry - t.boolean :environment - t.boolean :research_and_development - t.boolean :social_security - t.boolean :social_protection - t.boolean :international_relations - t.boolean :sanitation - t.boolean :health - t.boolean :security_public_order - t.boolean :work - t.boolean :transportation - t.boolean :urbanism + create_table :controlled_vocabulary do |t| + t.references :software_info + t.boolean :administration + t.boolean :agriculture + t.boolean :business_and_services + t.boolean :communication + t.boolean :culture + t.boolean :national_defense + t.boolean :economy_and_finances + t.boolean :education + t.boolean :energy + t.boolean :sports + t.boolean :habitation + t.boolean :industry + t.boolean :environment + t.boolean :research_and_development + t.boolean :social_security + t.boolean :social_protection + t.boolean :international_relations + t.boolean :sanitation + t.boolean :health + t.boolean :security_public_order + t.boolean :work + t.boolean :transportation + t.boolean :urbanism - end + end end def down - drop_table :controlled_vocabulary + drop_table :controlled_vocabulary end end diff --git a/db/migrate/20140528193902_create_license_infos_table.rb b/db/migrate/20140528193902_create_license_infos_table.rb index 89fa231..4397346 100644 --- a/db/migrate/20140528193902_create_license_infos_table.rb +++ b/db/migrate/20140528193902_create_license_infos_table.rb @@ -4,7 +4,9 @@ class CreateLicenseInfosTable < ActiveRecord::Migration t.string :version t.string :link end - LicenseInfo.create(:version=>"CC-GPL-V2", :link=>"http://creativecommons.org/licenses/GPL/2.0/legalcode.pt") + + LINK="http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" + LicenseInfo.create(:version=>"CC-GPL-V2", :link=>LINK) end def self.down diff --git a/db/migrate/20140528194044_create_database_descriptions_table.rb b/db/migrate/20140528194044_create_database_descriptions_table.rb index e887295..f04641f 100644 --- a/db/migrate/20140528194044_create_database_descriptions_table.rb +++ b/db/migrate/20140528194044_create_database_descriptions_table.rb @@ -4,7 +4,8 @@ class CreateDatabaseDescriptionsTable < ActiveRecord::Migration t.string :name end - SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/databases.txt", DatabaseDescription) + PATH_TO_FILE="plugins/mpog_software/public/static/databases.txt" + SoftwareHelper.create_list_with_file(PATH_TO_FILE, DatabaseDescription) end def self.down diff --git a/db/migrate/20140617132133_create_governmental_spheres.rb b/db/migrate/20140617132133_create_governmental_spheres.rb index 0f0f710..4791fd4 100644 --- a/db/migrate/20140617132133_create_governmental_spheres.rb +++ b/db/migrate/20140617132133_create_governmental_spheres.rb @@ -6,6 +6,7 @@ class CreateGovernmentalSpheres < ActiveRecord::Migration t.timestamps end - SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/governmental_sphere.txt", GovernmentalSphere) + PATH_TO_FILE = "plugins/mpog_software/public/static/governmental_sphere.txt" + SoftwareHelper.create_list_with_file(PATH_TO_FILE, GovernmentalSphere) end end diff --git a/db/migrate/20140617132451_create_governmental_powers.rb b/db/migrate/20140617132451_create_governmental_powers.rb index 6d89894..2f9a953 100644 --- a/db/migrate/20140617132451_create_governmental_powers.rb +++ b/db/migrate/20140617132451_create_governmental_powers.rb @@ -6,6 +6,7 @@ class CreateGovernmentalPowers < ActiveRecord::Migration t.timestamps end - SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/governmental_powers.txt", GovernmentalPower) + PATH_TO_FILE="plugins/mpog_software/public/static/governmental_powers.txt" + SoftwareHelper.create_list_with_file(PATH_TO_FILE, GovernmentalPower) end end diff --git a/db/migrate/20140714133901_create_operating_name_table.rb b/db/migrate/20140714133901_create_operating_name_table.rb index 0cd23a5..f5dc243 100644 --- a/db/migrate/20140714133901_create_operating_name_table.rb +++ b/db/migrate/20140714133901_create_operating_name_table.rb @@ -1,13 +1,14 @@ class CreateOperatingNameTable < ActiveRecord::Migration def up - create_table :operating_system_names do |t| + create_table :operating_system_names do |t| t.string :name end - SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/operating_systems.txt", OperatingSystemName) + PATH_TO_FILE="plugins/mpog_software/public/static/operating_systems.txt" + SoftwareHelper.create_list_with_file(PATH_TO_FILE, OperatingSystemName) end def down - drop_table :operating_system_names + drop_table :operating_system_names end end diff --git a/db/migrate/20140714135007_change_operating_systems_table.rb b/db/migrate/20140714135007_change_operating_systems_table.rb index 98b843c..313bb17 100644 --- a/db/migrate/20140714135007_change_operating_systems_table.rb +++ b/db/migrate/20140714135007_change_operating_systems_table.rb @@ -1,16 +1,16 @@ class ChangeOperatingSystemsTable < ActiveRecord::Migration def up - change_table :operating_systems do |t| - t.remove :name - t.references :operating_system_name - end + change_table :operating_systems do |t| + t.remove :name + t.references :operating_system_name + end end def down - change_table :operating_systems do |t| - t.string :name - t.remove :operating_system_name_id - end + change_table :operating_systems do |t| + t.string :name + t.remove :operating_system_name_id + end end end diff --git a/db/migrate/20140814131606_create_juridical_natures_table.rb b/db/migrate/20140814131606_create_juridical_natures_table.rb index 40d55da..a31a3b3 100644 --- a/db/migrate/20140814131606_create_juridical_natures_table.rb +++ b/db/migrate/20140814131606_create_juridical_natures_table.rb @@ -3,7 +3,9 @@ class CreateJuridicalNaturesTable < ActiveRecord::Migration create_table :juridical_natures do |t| t.string :name end - SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/juridical_nature.txt", JuridicalNature) + + PATH_TO_FILE="plugins/mpog_software/public/static/juridical_nature.txt" + SoftwareHelper.create_list_with_file(PATH_TO_FILE, JuridicalNature) end def down -- libgit2 0.21.2