Commit dcc51f8b663f54b9e2298b2570631289b1d3fe66

Authored by Victor Costa
2 parents a1b696f2 55f43549

Merge branch 'master' into staging

AUTHORS.md
... ... @@ -11,6 +11,7 @@ Developers
11 11 Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br>
12 12 Alan Freihof Tygel <alantygel@gmail.com>
13 13 Alessandro Palmeira <alessandro.palmeira@gmail.com>
  14 +Alexandre Barbosa <alexandreab@live.com>
14 15 Alexandre Torres <alexandrekry@gmail.com>
15 16 Alex Campelo <campelo.al1@gmail.com>
16 17 Álvaro Fernando <alvarofernandoms@gmail.com>
... ... @@ -120,6 +121,7 @@ Raquel &lt;rcordioli@gmail.com&gt;
120 121 Renan Costa <renan2727@hotmail.com>
121 122 Renan Teruo <renanteruoc@gmail.com>
122 123 Rodrigo Medeiros <rodrigo.mss01@gmail.com>
  124 +Rodrigo Siqueira <siqueira@kuniri.org>
123 125 Rodrigo Souto <rodrigo@colivre.coop.br>
124 126 Ronnie Simon <ronniesimonf@gmail.com>
125 127 Ronny Kursawe <kursawe.ronny@googlemail.com>
... ...
debian/changelog
  1 +noosfero (1.4~rc2) jessie-test; urgency=medium
  2 +
  3 + * Noosfero 1.4 RC2
  4 +
  5 + -- Antonio Terceiro <terceiro@colivre.coop.br> Tue, 26 Jan 2016 17:03:34 -0200
  6 +
1 7 noosfero (1.4~rc1) jessie-test; urgency=low
2 8  
3 9 * Noosfero 1.4 RC 0
... ...
features/manage_users.feature
... ... @@ -8,40 +8,40 @@ Background:
8 8 | login | name |
9 9 | joaosilva | Joao Silva |
10 10 | paulosantos | Paulo Santos |
11   - Given I am logged in as admin
12   - Given I go to /admin/users
  11 + And I am logged in as admin
  12 + And I go to /admin/users
13 13  
14 14 @selenium
15 15 Scenario: deactive user
16   - When I follow "Deactivate user" within "tr[title='Joao Silva']"
17   - And I confirm the "Do you want to deactivate this user?" dialog
  16 + Given I follow "Deactivate user" within "tr[title='Joao Silva']"
  17 + When I confirm the browser dialog
18 18 Then the "tr[title='Joao Silva'] td.actions a.icon-activate-user" button should be enabled
19 19  
20 20 @selenium
21 21 Scenario: activate user
22 22 Given I follow "Deactivate user" within "tr[title='Paulo Santos']"
23   - Given I confirm the "Do you want to deactivate this user?" dialog
24   - When I follow "Activate user" within "tr[title='Paulo Santos']"
25   - And I confirm the "Do you want to activate this user?" dialog
  23 + And I confirm the browser dialog
  24 + And I follow "Activate user" within "tr[title='Paulo Santos']"
  25 + When I confirm the browser dialog
26 26 Then the "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" button should be enabled
27 27  
28 28 @selenium
29 29 Scenario: remove user
30   - When I follow "Remove" within "tr[title='Joao Silva']"
31   - And I confirm the "Do you want to remove this user?" dialog
  30 + Given I follow "Remove" within "tr[title='Joao Silva']"
  31 + And I confirm the browser dialog
32 32 And I go to /admin/users
33 33 Then I should not see "Joao Silva"
34 34  
35 35 @selenium
36 36 Scenario: admin user
37   - When I follow "Set admin role" within "tr[title='Joao Silva']"
38   - And I confirm the "Do you want to set this user as administrator?" dialog
  37 + Given I follow "Set admin role" within "tr[title='Joao Silva']"
  38 + When I confirm the browser dialog
39 39 Then the "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" button should be enabled
40 40  
41 41 @selenium
42 42 Scenario: unadmin user
43 43 Given I follow "Set admin role" within "tr[title='Paulo Santos']"
44   - And I confirm the "Do you want to set this user as administrator?" dialog
45   - When I follow "Reset admin role" within "tr[title='Paulo Santos']"
46   - And I confirm the "Do you want to reset this user as administrator?" dialog
  44 + And I confirm the browser dialog
  45 + And I follow "Reset admin role" within "tr[title='Paulo Santos']"
  46 + When I confirm the browser dialog
47 47 Then the "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" button should be enabled
... ...
features/step_definitions/custom_web_steps.rb
... ... @@ -43,6 +43,7 @@ end
43 43  
44 44 When /^I confirm the browser dialog$/ do
45 45 page.driver.browser.switch_to.alert.accept
  46 + sleep 1 # FIXME Don't know why, but this is necessary... :/
46 47 end
47 48  
48 49 When /^I type in "([^\"]*)" into autocomplete list "([^\"]*)" and I choose "([^\"]*)"$/ do |term, input, result|
... ...
features/step_definitions/noosfero_steps.rb
... ... @@ -754,13 +754,6 @@ Given /^there are no pending jobs$/ do
754 754 end
755 755 end
756 756  
757   -When /^I confirm the "(.*)" dialog$/ do |confirmation|
758   - a = page.driver.browser.switch_to.alert
759   - a.accept
760   - # FIXME: a.text is returning nil
761   - #assert_equal confirmation, a.text
762   -end
763   -
764 757 Given /^the field (.*) is public for all users$/ do |field|
765 758 Person.all.each do |person|
766 759 person.fields_privacy = Hash.new if person.fields_privacy.nil?
... ...
lib/noosfero/version.rb
1 1 module Noosfero
2 2 PROJECT = 'noosfero'
3   - VERSION = '1.4~rc1'
  3 + VERSION = '1.4~rc2'
4 4 end
5 5  
6 6 root = File.expand_path(File.dirname(__FILE__) + '/../..')
... ...
lib/tasks/ci.rake
... ... @@ -57,7 +57,7 @@ namespace :ci do
57 57  
58 58 sh 'ruby', '-Itest', *tests unless tests.empty?
59 59 sh 'cucumber', *features unless features.empty?
60   - sh 'xvfb-run', 'cucumber', '-p', 'selenium', *features unless features.empty?
  60 + sh 'xvfb-run', '-a', 'cucumber', '-p', 'selenium', *features unless features.empty?
61 61  
62 62 changed_plugins.each do |plugin|
63 63 if $broken_plugins.include?(plugin)
... ...
lib/tasks/plugins_tests.rake
... ... @@ -116,7 +116,7 @@ def run_minitest files
116 116 end
117 117  
118 118 def run_cucumber(profile, files)
119   - sh 'xvfb-run', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
  119 + sh 'xvfb-run', '-a', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
120 120 end
121 121  
122 122 def custom_run(name, files, run=:all)
... ...
lib/tasks/release.rake
... ... @@ -184,6 +184,7 @@ EOF
184 184 {
185 185 dput: :dput,
186 186 dch: :devscripts,
  187 + git: :git,
187 188 }.each do |program, package|
188 189 if ! system("which #{program} >/dev/null 2>&1")
189 190 puts "Program #{program} missing, install the package #{package}"
... ...
plugins/sub_organizations/features/sub_organizations_block.feature
... ... @@ -20,29 +20,24 @@ Feature: related_organizations_block
20 20 And I am logged in as "homer"
21 21 And I go to springfield's control panel
22 22  
23   - Scenario: display sub organizations block add option
24   - When I follow "Edit sideboxes"
25   - And I follow "Add a block"
26   - Then I should see "Related Organizations"
27   -
28 23 Scenario: display both sub types on block
  24 + Given the following blocks
  25 + | owner | type |
  26 + | springfield | RelatedOrganizationsBlock |
29 27 When I follow "Edit sideboxes"
30   - And I follow "Add a block"
31   - And I choose "Related Organizations"
32   - And I press "Add"
33   - Then I should see "Moe" within ".related-organizations-block"
34   - And I should see "Duff" within ".related-organizations-block"
  28 + Then I should see "Moe" within ".block.related-organizations-block"
  29 + And I should see "Duff" within ".block.related-organizations-block"
35 30  
36 31 Scenario: display only sub-communities
37 32 Given the following blocks
38 33 | owner | type |
39 34 | springfield | RelatedOrganizationsBlock |
40 35 When I follow "Edit sideboxes"
41   - And I follow "Edit" within ".related-organizations-block"
  36 + And I follow "Edit" within ".block.related-organizations-block"
42 37 And I select "Community" from "block_organization_type"
43 38 And I press "Save"
44   - Then I should see "Moe" within ".related-organizations-block"
45   - And I should not see "Duff" within ".related-organizations-block"
  39 + Then I should see "Moe" within ".block.related-organizations-block"
  40 + And I should not see "Duff" within ".block.related-organizations-block"
46 41  
47 42 Scenario: display both sub types on sub-organizations page
48 43 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin
... ... @@ -54,9 +49,9 @@ Feature: related_organizations_block
54 49 | owner | type |
55 50 | springfield | RelatedOrganizationsBlock |
56 51 When I follow "Edit sideboxes"
57   - And I follow "Edit" within ".related-organizations-block"
  52 + And I follow "Edit" within ".block.related-organizations-block"
58 53 And I select "Community" from "block_organization_type"
59 54 And I press "Save"
60   - And I follow "View all" within ".related-organizations-block"
  55 + And I follow "View all" within ".block.related-organizations-block"
61 56 Then I should see "Moe" within ".profile-list"
62 57 And I should not see "Duff" within ".profile-list"
... ...
plugins/sub_organizations/features/sub_organizations_display.feature
... ... @@ -16,12 +16,12 @@ Feature: sub_organizations_display
16 16 And the following enterprise
17 17 | identifier | name | owner | description | city | state |
18 18 | school | School | nelson | School description | Terra do Nunca | Billy Jean |
  19 + And the following blocks
  20 + | owner | type |
  21 + | springfield | RelatedOrganizationsBlock |
19 22 And I am logged in as "nelson"
20 23 And I go to springfield's control panel
21 24 When I follow "Edit sideboxes"
22   - And I follow "Add a block"
23   - And I choose "Related Organizations"
24   - And I press "Add"
25 25  
26 26 @selenium
27 27 Scenario: Display the sub organization block when there is a sub enterprise and communitys
... ... @@ -76,6 +76,6 @@ Feature: sub_organizations_display
76 76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name"
77 77  
78 78 Scenario: Display message when display full block are empty
79   - Given I follow "View all" within ".related-organizations-block"
  79 + Given I follow "View all" within ".block.related-organizations-block"
80 80 Then I should see "There are no sub-communities yet."
81 81 And I should see "There are no sub-enterprises yet."
... ...
public/javascripts/application.js
... ... @@ -583,7 +583,7 @@ jQuery(function($) {
583 583 $.ajaxSetup({
584 584 cache: false,
585 585 headers: {
586   - 'X-CSRF-Token': $.cookie("_noosfero_.XSRF-TOKEN")
  586 + 'X-XSRF-TOKEN': $.cookie("_noosfero_.XSRF-TOKEN")
587 587 }
588 588 });
589 589  
... ...
script/authors.sed
... ... @@ -168,6 +168,7 @@ s/macartur.sc@gmail.com$/macartur.sc@gmail.com&gt;/
168 168  
169 169 s/Marcos da Silva Ramos <ms.ramos@outlook.com>/Marcos Ramos <ms.ramos@outlook.com>/
170 170 s/Marcos Ramos <ms.ramos@outlook.com$/Marcos Ramos <ms.ramos@outlook.com>/
  171 +s/msramos@outlook.com/ms.ramos@outlook.com/
171 172 s/Marcos <marcos.rpj2@gmail.com>/Marcos Ronaldo <marcos.rpj2@gmail.com>/
172 173  
173 174 s/melissa@colivre.coop.br/melissa.srw@gmail.com/
... ...
script/install-dependencies/debian-jessie.sh
... ... @@ -61,12 +61,26 @@ else
61 61 sudo rm -f /etc/apt/sources.list.d/local.list
62 62 fi
63 63  
  64 +retry() {
  65 + local times="$1"
  66 + shift
  67 + local i=0
  68 + local rc=0
  69 + while [ $i -lt "$times" ]; do
  70 + echo '$' "$@"
  71 + "$@" && rc=0 || rc=$?
  72 + i=$(($i + 1))
  73 + if [ $rc -eq 0 ]; then return 0; fi
  74 + done
  75 + return $rc
  76 +}
  77 +
64 78 # update system, at most every 6h (internal between Debian mirror pushes)
65 79 timestamp=/tmp/.noosfero.apt-get.update
66 80 now=$(date +%s)
67 81 if [ ! -f $timestamp ] || [ $(($now - $(stat --format=%Y $timestamp))) -gt 21600 ]; then
68   - run sudo apt-get update
69   - run sudo apt-get -qy dist-upgrade
  82 + run retry 3 sudo apt-get update
  83 + run retry 3 sudo apt-get -qy dist-upgrade
70 84 touch $timestamp
71 85 fi
72 86  
... ...