Commit de00609183e2c2e0c68e8776b93425bebe1e5493

Authored by Luciano Prestes
1 parent 4079ecb6

software-communities: refactoring namespaces

- Update migrations

Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
src/noosfero-spb/software_communities/db/migrate/20140528193902_create_license_infos_table.rb
... ... @@ -4,9 +4,6 @@ class CreateLicenseInfosTable &lt; ActiveRecord::Migration
4 4 t.string :version
5 5 t.string :link
6 6 end
7   -
8   - link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt"
9   - LicenseInfo.create(:version => "CC-GPL-V2", :link => link)
10 7 end
11 8  
12 9 def self.down
... ...
src/noosfero-spb/software_communities/db/migrate/20140528193956_create_programming_languages_table.rb
... ... @@ -3,8 +3,6 @@ class CreateProgrammingLanguagesTable &lt; ActiveRecord::Migration
3 3 create_table :programming_languages do |t|
4 4 t.string :name
5 5 end
6   -
7   - SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", ProgrammingLanguage)
8 6 end
9 7  
10 8 def self.down
... ...
src/noosfero-spb/software_communities/db/migrate/20140528194044_create_database_descriptions_table.rb
... ... @@ -3,9 +3,6 @@ class CreateDatabaseDescriptionsTable &lt; ActiveRecord::Migration
3 3 create_table :database_descriptions do |t|
4 4 t.string :name
5 5 end
6   -
7   - path_to_file = "plugins/software_communities/public/static/databases.txt"
8   - SoftwareHelper.create_list_with_file(path_to_file, DatabaseDescription)
9 6 end
10 7  
11 8 def self.down
... ...
src/noosfero-spb/software_communities/db/migrate/20140714133901_create_operating_name_table.rb
... ... @@ -3,9 +3,6 @@ class CreateOperatingNameTable &lt; ActiveRecord::Migration
3 3 create_table :operating_system_names do |t|
4 4 t.string :name
5 5 end
6   -
7   - path_to_file = "plugins/software_communities/public/static/operating_systems.txt"
8   - SoftwareHelper.create_list_with_file(path_to_file, OperatingSystemName)
9 6 end
10 7  
11 8 def down
... ...
src/noosfero-spb/software_communities/db/migrate/20150210182519_rename_cc_license.rb
... ... @@ -1,13 +0,0 @@
1   -class RenameCcLicense < ActiveRecord::Migration
2   - def up
3   - license = LicenseInfo.find_by_version "CC-GPL-V2"
4   - license.version = "Creative Commons GPL V2"
5   - license.save!
6   - end
7   -
8   - def down
9   - license = LicenseInfo.find_by_version "Creative Commons GPL V2"
10   - license.version = "CC-GPL-V2"
11   - license.save!
12   - end
13   -end
src/noosfero-spb/software_communities/db/migrate/20151125170753_rename_cc_license.rb 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +class RenameCcLicense < ActiveRecord::Migration
  2 + def up
  3 + license = SoftwareCommunitiesPlugin::LicenseInfo.find_by_version "CC-GPL-V2"
  4 + unless license.nil?
  5 + license.version = "Creative Commons GPL V2"
  6 + license.save!
  7 + end
  8 + end
  9 +
  10 + def down
  11 + license = SoftwareCommunitiesPlugin::LicenseInfo.find_by_version "Creative Commons GPL V2"
  12 + unless license.nil?
  13 + license.version = "CC-GPL-V2"
  14 + license.save!
  15 + end
  16 + end
  17 +end
  18 +
... ...
src/noosfero-spb/software_communities/db/migrate/20151125171258_create_basic_infos.rb 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +class CreateBasicInfos < ActiveRecord::Migration
  2 + def up
  3 + link = "http://creativecommons.org/licenses/GPL/2.0/legalcode.pt"
  4 + SoftwareCommunitiesPlugin::LicenseInfo.create(:version => "CC-GPL-V2", :link => link)
  5 +
  6 + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file("plugins/software_communities/public/static/languages.txt", SoftwareCommunitiesPlugin::ProgrammingLanguage)
  7 +
  8 + path_to_file = "plugins/software_communities/public/static/databases.txt"
  9 + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file(path_to_file, SoftwareCommunitiesPlugin::DatabaseDescription)
  10 +
  11 + path_to_file = "plugins/software_communities/public/static/operating_systems.txt"
  12 + SoftwareCommunitiesPlugin::SoftwareHelper.create_list_with_file(path_to_file, SoftwareCommunitiesPlugin::OperatingSystemName)
  13 + end
  14 +
  15 + def down
  16 + end
  17 +end
... ...