Commit e0b0cbde246d50edfdc0f4d7445c55dc758bb067

Authored by Gabriela Navarro
Committed by David Silva
1 parent 57ae8cf1
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Remove trailing whitespace

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Signed-off-by: Parley Martins <parley@outlook.com>
db/migrate/20140528193905_create_software_infos_table.rb
... ... @@ -3,11 +3,11 @@ class CreateSoftwareInfosTable &lt; ActiveRecord::Migration
3 3 create_table :software_infos do |t|
4 4 t.references :license_info
5 5 t.references :community
6   - t.boolean :e_mag, :default => false
7   - t.boolean :icp_brasil,:default => false
8   - t.boolean :intern, :default => false
9   - t.boolean :e_ping, :default => false
10   - t.boolean :e_arq, :default => false
  6 + t.boolean :e_mag, :default => false
  7 + t.boolean :icp_brasil,:default => false
  8 + t.boolean :intern, :default => false
  9 + t.boolean :e_ping, :default => false
  10 + t.boolean :e_arq, :default => false
11 11 t.string :name, :default => ' '
12 12 t.string :operating_platform
13 13 t.string :demonstration_url
... ...
db/migrate/20140812143218_remove_field_role_from_user.rb
1 1 class RemoveFieldRoleFromUser < ActiveRecord::Migration
2 2 def up
3 3 change_table :users do |t|
4   - t.remove :role
  4 + t.remove :role
5 5 end
6 6 end
7 7  
8 8 def down
9 9 change_table :users do |t|
10   - t.string :role
  10 + t.string :role
11 11 end
12 12 end
13 13 end
... ...
db/migrate/20140814125947_add_new_fields_to_public_institution.rb
... ... @@ -6,6 +6,6 @@ class AddNewFieldsToPublicInstitution &lt; ActiveRecord::Migration
6 6  
7 7 def down
8 8 remove_column :institutions, :sisp
9   - add_column :institutions, :juridical_nature, :string
  9 + add_column :institutions, :juridical_nature, :string
10 10 end
11 11 end
... ...
db/migrate/20140814131606_create_juridical_natures_table.rb
... ... @@ -3,11 +3,10 @@ class CreateJuridicalNaturesTable &lt; ActiveRecord::Migration
3 3 create_table :juridical_natures do |t|
4 4 t.string :name
5 5 end
6   -
7 6 SoftwareHelper.create_list_with_file("plugins/mpog_software/public/static/juridical_nature.txt", JuridicalNature)
8 7 end
9 8  
10 9 def down
11   - drop_table :juridical_natures
  10 + drop_table :juridical_natures
12 11 end
13 12 end
... ...
db/migrate/20141007140419_add_finality_field_to_software_table.rb
1 1 class AddFinalityFieldToSoftwareTable < ActiveRecord::Migration
2 2 def up
3 3 add_column :software_infos, :finality, :string, :limit => 140
4   -
5 4 end
6 5  
7 6 def down
... ...
lib/ext/user.rb
... ... @@ -18,9 +18,9 @@ class User
18 18 def email_has_already_been_used?
19 19 user_already_saved = User.find(:first, :conditions=>["email = ?", self.email])
20 20  
21   - if user_already_saved.nil?
  21 + if user_already_saved.nil?
22 22 primary_email_hasnt_been_used = User.primary_or_secondary_email_already_used?(self.email).empty?
23   - if !self.secondary_email.nil? and self.secondary_email.empty?
  23 + if !self.secondary_email.nil? and self.secondary_email.empty?
24 24 self.secondary_email = nil
25 25 end
26 26 secondary_email_hasnt_been_used = User.primary_or_secondary_email_already_used?(self.secondary_email).empty?
... ...
lib/institution.rb
... ... @@ -13,8 +13,8 @@ class Institution &lt; ActiveRecord::Base
13 13  
14 14 has_and_belongs_to_many :users
15 15  
16   - attr_accessible :name, :acronym, :unit_code, :parent_code, :unit_type,
17   - :sub_juridical_nature, :normalization_level,
  16 + attr_accessible :name, :acronym, :unit_code, :parent_code, :unit_type,
  17 + :sub_juridical_nature, :normalization_level,
18 18 :version, :cnpj, :type, :governmental_power, :governmental_sphere,
19 19 :sisp, :juridical_nature, :corporate_name
20 20  
... ... @@ -25,7 +25,7 @@ class Institution &lt; ActiveRecord::Base
25 25 before_save :verify_institution_type
26 26  
27 27 belongs_to :community
28   -
  28 +
29 29 scope :search_institution, lambda{ |value|
30 30 where("name ilike ? OR acronym ilike ?", "%#{value}%", "%#{value}%" )
31 31 }
... ...
lib/operating_system_helper.rb
... ... @@ -35,8 +35,8 @@ module OperatingSystemHelper
35 35 lambdas_list = []
36 36  
37 37 if not show_information
38   - return operating_system_html_structure({:operating_system_name_id => "", :version => ""}, have_delete_button) if list_operating_system.nil?
39   -
  38 + return operating_system_html_structure({:operating_system_name_id => "", :version => ""}, have_delete_button) if list_operating_system.nil?
  39 +
40 40 list_operating_system.each do |operating_system|
41 41 lambdas_list << operating_system_html_structure(operating_system,have_delete_button)
42 42 end
... ...
lib/public_institution.rb
... ... @@ -3,6 +3,4 @@ class PublicInstitution &lt; Institution
3 3 validates :acronym, :allow_blank => true, :allow_nil => true, :uniqueness=>true
4 4 validates :cnpj, :uniqueness=>true
5 5 validates_format_of :cnpj, :with => /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/, :allow_nil => true, :allow_blank => true
6   -
7   -
8 6 end
... ...
lib/search_catalog_block.rb
... ... @@ -10,7 +10,6 @@ class SearchCatalogBlock &lt; Block
10 10  
11 11 def help
12 12 _('This block displays the search categories field ')
13   -
14 13 end
15 14  
16 15 def content(args={})
... ...
lib/software_language.rb
1 1 class SoftwareLanguage < ActiveRecord::Base
2 2 attr_accessible :version, :operating_system
3   -
  3 +
4 4 belongs_to :software_info
5 5 belongs_to :programming_language
6 6  
... ...
lib/software_language_helper.rb
... ... @@ -45,7 +45,7 @@ module SoftwareLanguageHelper
45 45 ActionView::Helpers::FormOptionsHelper,
46 46 ApplicationHelper
47 47 )
48   -
  48 +
49 49 lambdas_list = []
50 50  
51 51 if not show_information
... ... @@ -55,7 +55,7 @@ module SoftwareLanguageHelper
55 55 lambdas_list << language_html_structure(language)
56 56 end
57 57  
58   - else
  58 + else
59 59 list_languages.each do |language|
60 60 lambdas_list << language_html_show_structure(language)
61 61 end
... ...
test/unit/governmental_power_test.rb
... ... @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + &#39;/../../../../test/test_helper&#39;
2 2 require File.dirname(__FILE__) + '/../helpers/institution_test_helper'
3 3  
4 4 class GovernmentalPowerTest < ActiveSupport::TestCase
5   -
  5 +
6 6 def setup
7 7 @gov_sphere = GovernmentalSphere.create(:name=>"Some Gov Sphere")
8 8 @juridical_nature = JuridicalNature.create(:name => "Autarquia")
... ...
test/unit/software_database_test.rb
... ... @@ -13,31 +13,31 @@ class SoftwareDatabaseTest &lt; ActiveSupport::TestCase
13 13 end
14 14  
15 15 should "save if all informations of @software_database are filled" do
16   - assert @software_database.save, "Database should have been saved"
  16 + assert @software_database.save, "Database should have been saved"
17 17 end
18   -
  18 +
19 19 should "not save if database description id is empty" do
20 20 @software_database.database_description_id = nil
21   - assert !@software_database.save, "Database description must be filled"
  21 + assert !@software_database.save, "Database description must be filled"
22 22 end
23 23  
24 24 should "not save if version is empty" do
25 25 @software_database.version = nil
26   - assert !@software_database.save, "Version must be filled"
  26 + assert !@software_database.save, "Version must be filled"
27 27 end
28 28  
29 29 should "not save if version has more than 20 characters" do
30 30 @software_database.version = "a"*21
31   - assert !@software_database.save, "Version must have until 20 characters"
  31 + assert !@software_database.save, "Version must have until 20 characters"
32 32 end
33 33  
34 34 should "not save if operating system is empty" do
35 35 @software_database.operating_system = nil
36   - assert !@software_database.save, "Operating system must be filled"
  36 + assert !@software_database.save, "Operating system must be filled"
37 37 end
38   -
  38 +
39 39 should "not save if operating system has more than 20 characters" do
40 40 @software_database.operating_system = "a"*21
41   - assert !@software_database.save, "Operating system must have until 20 characters"
  41 + assert !@software_database.save, "Operating system must have until 20 characters"
42 42 end
43 43 end
... ...
test/unit/software_language_validation.rb
... ... @@ -67,7 +67,7 @@ class SoftwareLanguageValidationTest &lt; ActiveSupport::TestCase
67 67 software_info.intern = true
68 68 software_info.e_ping = true
69 69 software_info.e_arq = true
70   - software_info.operating_platform = 'GNU/Linux'
  70 + software_info.operating_platform = 'GNU/Linux'
71 71 software_info.features = "Do a lot of things"
72 72 software_info.objectives = "All tests should pass !"
73 73 software_info
... ...