From 2d15d8cf7f038df17788d1bee1d2b6b23aad6e81 Mon Sep 17 00:00:00 2001 From: Luciano Date: Tue, 16 Dec 2014 15:33:44 -0200 Subject: [PATCH] Change migrate constants to variables --- db/migrate/20140528193902_create_license_infos_table.rb | 4 ++-- db/migrate/20140528194044_create_database_descriptions_table.rb | 4 ++-- db/migrate/20140617132133_create_governmental_spheres.rb | 4 ++-- db/migrate/20140617132451_create_governmental_powers.rb | 4 ++-- db/migrate/20140714133901_create_operating_name_table.rb | 4 ++-- db/migrate/20140814131606_create_juridical_natures_table.rb | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/db/migrate/20140528193902_create_license_infos_table.rb b/db/migrate/20140528193902_create_license_infos_table.rb index 4397346..0024f7d 100644 --- a/db/migrate/20140528193902_create_license_infos_table.rb +++ b/db/migrate/20140528193902_create_license_infos_table.rb @@ -5,8 +5,8 @@ class CreateLicenseInfosTable < ActiveRecord::Migration t.string :link end - LINK="http://creativecommons.org/licenses/GPL/2.0/legalcode.pt" - LicenseInfo.create(:version=>"CC-GPL-V2", :link=>LINK) + 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 f04641f..5da8d11 100644 --- a/db/migrate/20140528194044_create_database_descriptions_table.rb +++ b/db/migrate/20140528194044_create_database_descriptions_table.rb @@ -4,8 +4,8 @@ class CreateDatabaseDescriptionsTable < ActiveRecord::Migration t.string :name end - PATH_TO_FILE="plugins/mpog_software/public/static/databases.txt" - SoftwareHelper.create_list_with_file(PATH_TO_FILE, 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 4791fd4..260c37c 100644 --- a/db/migrate/20140617132133_create_governmental_spheres.rb +++ b/db/migrate/20140617132133_create_governmental_spheres.rb @@ -6,7 +6,7 @@ class CreateGovernmentalSpheres < ActiveRecord::Migration t.timestamps end - PATH_TO_FILE = "plugins/mpog_software/public/static/governmental_sphere.txt" - SoftwareHelper.create_list_with_file(PATH_TO_FILE, 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 2f9a953..4b3003c 100644 --- a/db/migrate/20140617132451_create_governmental_powers.rb +++ b/db/migrate/20140617132451_create_governmental_powers.rb @@ -6,7 +6,7 @@ class CreateGovernmentalPowers < ActiveRecord::Migration t.timestamps end - PATH_TO_FILE="plugins/mpog_software/public/static/governmental_powers.txt" - SoftwareHelper.create_list_with_file(PATH_TO_FILE, 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 f5dc243..1ba8074 100644 --- a/db/migrate/20140714133901_create_operating_name_table.rb +++ b/db/migrate/20140714133901_create_operating_name_table.rb @@ -4,8 +4,8 @@ class CreateOperatingNameTable < ActiveRecord::Migration t.string :name end - PATH_TO_FILE="plugins/mpog_software/public/static/operating_systems.txt" - SoftwareHelper.create_list_with_file(PATH_TO_FILE, OperatingSystemName) + path_to_file = "plugins/mpog_software/public/static/operating_systems.txt" + SoftwareHelper.create_list_with_file(path_to_file, OperatingSystemName) end def down diff --git a/db/migrate/20140814131606_create_juridical_natures_table.rb b/db/migrate/20140814131606_create_juridical_natures_table.rb index a31a3b3..ad6aaae 100644 --- a/db/migrate/20140814131606_create_juridical_natures_table.rb +++ b/db/migrate/20140814131606_create_juridical_natures_table.rb @@ -4,8 +4,8 @@ class CreateJuridicalNaturesTable < ActiveRecord::Migration t.string :name end - PATH_TO_FILE="plugins/mpog_software/public/static/juridical_nature.txt" - SoftwareHelper.create_list_with_file(PATH_TO_FILE, 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