Commit 793315aee95df19b1e98a2c18fee7f952e122d09

Authored by Braulio Bhavamitra
2 parents 8e515c3e 55c00636

Merge branch 'master' of https://gitlab.com/noosfero/noosfero into responsive

Showing 163 changed files with 2555 additions and 5808 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 163 files displayed.

.gitlab-ci.yml 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +before_script:
  2 + - mkdir -p tmp/pids log
  3 + - bundle check || bundle install
  4 +# workaround for plugins with Gemfile
  5 + - perl -pi -e 's/--local //' script/noosfero-plugins
  6 + - script/noosfero-plugins disableall
  7 + - bundle exec rake makemo &>/dev/null
  8 +# database
  9 + - cp config/database.yml.gitlab-ci config/database.yml
  10 + - createdb gitlab_ci_test || true
  11 + - bundle exec rake db:schema:load &>/dev/null
  12 + - bundle exec rake db:migrate &>/dev/null
  13 +
  14 +units:
  15 + script: bundle exec rake test:units
  16 +functionals:
  17 + script: bundle exec rake test:functionals
  18 +integration:
  19 + script: bundle exec rake test:integration
  20 +cucumber:
  21 + script: bundle exec rake cucumber
  22 +selenium:
  23 + script: bundle exec rake selenium
  24 +plugins:
  25 + script: bundle exec rake test:noosfero_plugins
  26 +
... ...
.travis.yml 0 → 100644
... ... @@ -0,0 +1,53 @@
  1 +language: ruby
  2 +rvm:
  3 +# for 2.2 support we need to upgrade the pg gem
  4 + - 2.1.6
  5 +
  6 +sudo: false
  7 +addons:
  8 + apt:
  9 + packages:
  10 + - po4a
  11 + - iso-codes
  12 + - tango-icon-theme
  13 + - pidgin-data
  14 + # for gem extensions
  15 + - libmagickwand-dev
  16 + - libpq-dev
  17 + - libreadline-dev
  18 + - libsqlite3-dev
  19 + - libxslt1-dev
  20 +
  21 +before_install:
  22 + - gem env
  23 +
  24 +# workaround for https://github.com/travis-ci/travis-ci/issues/4536
  25 +before_install:
  26 + - export GEM_HOME=$PWD/vendor/bundle/ruby/2.1.0
  27 + - gem install bundler
  28 +cache: bundler
  29 +
  30 +before_script:
  31 + - mkdir -p tmp/pids log
  32 +# workaround for plugins with Gemfile
  33 + - perl -pi -e 's/cat .+ > \$gemfile/echo "source \\"https:\/\/rubygems.org\\"" > \$gemfile && cat \$source\/Gemfile >> \$gemfile/' script/noosfero-plugins
  34 + - perl -pi -e 's/--local --quiet/install --jobs=3 --retry=3/' script/noosfero-plugins
  35 + - script/noosfero-plugins disableall
  36 + - bundle exec rake makemo &>/dev/null
  37 +# database
  38 + - cp config/database.yml.travis config/database.yml
  39 + - psql -c 'create database myapp_test;' -U postgres
  40 + - bundle exec rake db:schema:load &>/dev/null
  41 + - bundle exec rake db:migrate &>/dev/null
  42 +
  43 +env:
  44 + - TASK=test:units
  45 + - TASK=test:functionals
  46 + - TASK=test:integration
  47 + - TASK=cucumber
  48 + - TASK=selenium
  49 + - TASK=test:noosfero_plugins
  50 +
  51 +script:
  52 + - bundle exec rake $TASK
  53 +
... ...
AUTHORS.md
  1 +This list is automatically generated at release time. Please do not change it.
  2 +
1 3 If you are not listed here, but should be, please write to the noosfero mailing
2 4 list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
3 5 (this list requires subscription to post, but since you are an author of
... ... @@ -8,261 +10,118 @@ Developers
8 10  
9 11 Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br>
10 12 Alan Freihof Tygel <alantygel@gmail.com>
11   -alcampelo <alcampelo@alcampelo.(none)>
12 13 Alessandro Palmeira <alessandro.palmeira@gmail.com>
13   -Alessandro Palmeira + Caio C. Salgado <alessandro.palmeira@gmail.com>
14   -Alessandro Palmeira + Caio Salgado <alessandro.palmeira@gmail.com>
15   -Alessandro Palmeira + Caio Salgado <caio.csalgado@gmail.com>
16   -Alessandro Palmeira + Caio Salgado + Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
17   -Alessandro Palmeira + Carlos Morais <alessandro.palmeira@gmail.com>
18   -Alessandro Palmeira + Daniel Alves <alessandro.palmeira@gmail.com>
19   -Alessandro Palmeira + Daniel Alves + Diego Araújo <diegoamc90@gmail.com>
20   -Alessandro Palmeira + Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com>
21   -Alessandro Palmeira + Diego Araujo <alessandro.palmeira@gmail.com>
22   -Alessandro Palmeira + Diego Araújo <alessandro.palmeira@gmail.com>
23   -Alessandro Palmeira + Diego Araujo + Daniela Feitosa <alessandro.palmeira@gmail.com>
24   -Alessandro Palmeira + Diego Araujo <diegoamc90@gmail.com>
25   -Alessandro Palmeira + Diego Araújo <diegoamc90@gmail.com>
26   -Alessandro Palmeira + Diego Araujo + Eduardo Morais <alessandro.palmeira@gmail.com>
27   -Alessandro Palmeira + Diego Araújo + João M. M. da Silva <alessandro.palmeira@gmail.com>
28   -Alessandro Palmeira + Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
29   -Alessandro Palmeira + Diego Araujo + João M. M. da Silva + Paulo Meirelles <alessandro.palmeira@gmail.com>
30   -Alessandro Palmeira + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
31   -Alessandro Palmeira + Diego Araújo + Pedro Leal + João M. M. da Silva <diegoamc90@gmail.com>
32   -Alessandro Palmeira + Diego Araujo + Rafael Manzo <alessandro.palmeira@gmail.com>
33   -Alessandro Palmeira + Eduardo Morais <alessandro.palmeira@gmail.com>
34   -Alessandro Palmeira + Guilherme Rojas <alessandro.palmeira@gmail.com>
35   -Alessandro Palmeira + Jefferson Fernandes <alessandro.palmeira@gmail.com>
36   -Alessandro Palmeira + João M. M. da Silva <alessandro.palmeira@gmail.com>
37   -Alessandro Palmeira + Joao M. M. da Silva + Diego Araujo <alessandro.palmeira@gmail.com>
38   -Alessandro Palmeira + João M. M. da Silva + Renan Teruo <alessandro.palmeira@gmail.com>
39   -Alessandro Palmeira + João M. M. Silva <alessandro.palmeira@gmail.com>
40   -Alessandro Palmeira + Paulo Meirelles <alessandro.palmeira@gmail.com>
41   -Alessandro Palmeira + Paulo Meirelles + João M. M. da Silva <alessandro.palmeira@gmail.com>
42   -Alessandro Palmeira + Rafael Manzo <alessandro.palmeira@gmail.com>
43   -analosnak <analosnak@gmail.com>
  14 +Alex Campelo <campelo.al1@gmail.com>
  15 +Álvaro Fernando <alvarofernandoms@gmail.com>
44 16 Ana Losnak <analosnak@gmail.com>
45   -Andre Bernardes <andrebsguedes@gmail.com>
46   -Antonio Terceiro + Carlos Morais <terceiro@colivre.coop.br>
47   -Antonio Terceiro + Paulo Meirelles <terceiro@colivre.coop.br>
  17 +Ana Paula Vargas <anapaulavnoronha@gmail.com>
  18 +Andre Bedran <bedran.fleck@gmail.com>
  19 +André Guedes <andrebsguedes@gmail.com>
48 20 Antonio Terceiro <terceiro@colivre.coop.br>
49 21 Arthur Del Esposte <arthurmde@gmail.com>
50   -Arthur Del Esposte <arthurmde@yahoo.com.br>
  22 +Athos Ribeiro <athoscribeiro@gmail.com>
51 23 Aurelio A. Heckert <aurelio@colivre.coop.br>
52   -Braulio Bhavamitra <brauliobo@gmail.com>
53   -Bráulio Bhavamitra <brauliobo@gmail.com>
54 24 Braulio Bhavamitra <braulio@eita.org.br>
55   -Caio <caio.csalgado@gmail.com>
56   -Caio + Diego + Pedro + João <caio.csalgado@gmail.com>
57 25 Caio Formiga <caio.formiga@gmail.com>
58   -Caio, Pedro <caio.csalgado@gmail.com>
59   -Caio Salgado + Alessandro Palmeira <caio.csalgado@gmail.com>
60 26 Caio Salgado <caio.csalgado@gmail.com>
61   -Caio Salgado + Carlos Morais + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
62   -Caio Salgado + Diego Araujo <caio.csalgado@gmail.com>
63   -Caio Salgado + Diego Araújo <caio.csalgado@gmail.com>
64   -Caio Salgado + Diego Araújo <diegoamc90@gmail.com>
65   -Caio Salgado + Diego Araújo + Jefferson Fernandes <caio.csalgado@gmail.com>
66   -Caio Salgado + Diego Araújo + João M. M. da Silva <caio.csalgado@gmail.com>
67   -Caio Salgado + Diego Araújo + Pedro Leal <caio.csalgado@gmail.com>
68   -Caio Salgado + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
69   -Caio Salgado + Diego Araújo + Rafael Manzo <diegoamc90@gmail.com>
70   -Caio Salgado + Jefferson Fernandes <caio.csalgado@gmail.com>
71   -Caio Salgado + Jefferson Fernandes <jeffs.fernandes@gmail.com>
72   -Caio Salgado + Rafael Manzo <caio.csalgado@gmail.com>
73   -Caio Salgado + Renan Teruo <caio.csalgado@gmail.com>
74   -Caio Salgado + Renan Teruo <caio.salgado@gmail.com>
75   -Caio Salgado + Renan Teruo + Jefferson Fernandes <jeffs.fernandes@gmail.com>
76   -Caio Salgado + Renan Teruo <renanteruoc@gmail.com>
77 27 Caio SBA <caio@colivre.coop.br>
78 28 Caio Tiago Oliveira <caiotiago@colivre.coop.br>
79 29 Carlos Andre de Souza <carlos.andre.souza@msn.com>
80 30 Carlos Morais <carlos88morais@gmail.com>
81   -Carlos Morais + Diego Araújo <diegoamc90@gmail.com>
82   -Carlos Morais + Eduardo Morais <carlos88morais@gmail.com>
83   -Carlos Morais + Paulo Meirelles <carlos88morais@gmail.com>
84   -Carlos Morais + Pedro Leal <carlos88morais@gmail.com>
85   -Daniel Alves + Diego Araújo <danpaulalves@gmail.com>
86   -Daniel Alves + Diego Araújo <diegoamc90@gmail.com>
87   -Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com>
88   -Daniel Alves + Diego Araújo + Guilherme Rojas <diegoamc90@gmail.com>
89   -Daniel Alves + Diego Araújo + Guilherme Rojas <guilhermehrojas@gmail.com>
90   -Daniel Alves + Guilherme Rojas <danpaulalves@gmail.com>
91   -Daniel Alves + Rafael Manzo <rr.manzo@gmail.com>
  31 +Christophe DANIEL <papaeng@gmail.com>
  32 +Daniela Feitosa <alessandro.palmeira@gmail.com>
  33 +Daniel Alves <danpaulalves@gmail.com>
92 34 Daniela Soares Feitosa <danielafeitosa@colivre.coop.br>
93 35 Daniel Bucher <daniel.bucher88@gmail.com>
94 36 Daniel Cunha <daniel@colivre.coop.br>
95   -daniel <dtygel@eita.org.br>
  37 +Daniel Tygel <dtygel@eita.org.br>
96 38 David Carlos <ddavidcarlos1392@gmail.com>
97   -diegoamc <diegoamc90@gmail.com>
98   -Diego Araújo + Alessandro Palmeira <diegoamc90@gmail.com>
99   -Diego Araújo + Alessandro Palmeira + João M. M. da Silva <diegoamc90@gmail.com>
100   -Diego Araújo + Alessandro Palmeira + Rafael Manzo <rr.manzo@gmail.com>
101   -Diego Araujo + Caio Salgado <diegoamc90@gmail.com>
102   -Diego Araújo + Daniel Alves + Rafael Manzo <rr.manzo@gmail.com>
103   -Diego Araújo <diegoamc90@gmail.com>
104   -Diego Araújo + Eduardo Morais + Paulo Meirelles <diegoamc90@gmail.com>
105   -Diego Araújo + Guilherme Rojas <diegoamc90@gmail.com>
106   -Diego Araújo + Jefferson Fernandes <diegoamc90@gmail.com>
107   -Diego Araujo + Jefferson Fernandes <jeffs.fernandes@gmail.com>
108   -Diego Araújo + João Machini <diegoamc90@gmail.com>
109   -Diego Araújo + João Machini <digoamc90@gmail.com>
110   -Diego Araújo + João M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
111   -Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
112   -Diego Araújo + João M. M. da Silva + João Machini <diegoamc90@gmail.com>
113   -Diego Araújo + João M. M. da Silva + Pedro Leal <diegoamc90@gmail.com>
114   -Diego Araújo + Paulo Meirelles <diegoamc90@gmail.com>
115   -Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
116   -Diego Araujo + Rafael Manzo <diegoamc90@gmail.com>
117   -Diego Araújo + Rafael Manzo <diegoamc90@gmail.com>
118   -Diego Araújo + Renan Teruo + Alessandro Palmeira <diegoamc90@gmail.com>
119   -Diego Araújo + Renan Teruo <diegoamc90@gmail.com>
120   -Diego Araujo + Rodrigo Souto + Rafael Manzo <rr.manzo@gmail.com>
121   -Diego + Jefferson <diegoamc90@gmail.com>
122   -Diego Martinez <diegoamc90@gmail.com>
123   -Diego + Renan <renanteruoc@gmail.com>
124   -dtygel <dtygel@gmail.com>
125   -DylanGuedes <djmgguedes@gmail.com>
126   -Eduardo Passos <eduardo@risa.localdomain.localhost>
  39 +Diego Araujo <diegoamc90@gmail.com>
  40 +Dylan Guedes <djmgguedes@gmail.com>
  41 +Eduardo Morais
127 42 Eduardo Passos <eduardosteps@gmail.com>
128 43 Eduardo Tourinho Edington <eduardo.edington@serpro.gov.br>
129   -Evandro Jr <evandrojr@gmail.com>
130   -Evandro Junior <evandrojr@gmail.com>
  44 +Eduardo Vital <vitaldu@gmail.com>
  45 +Evandro Magalhaes Leite Junior <evandro.leite@serpro.gov.br>
131 46 Fabio Teixeira <fabio1079@gmail.com>
132 47 FAMMA TV NOTICIAS MEDIOS DE CO <revistafammatvmusic.oficial@gmail.com>
133 48 Fernanda Lopes <nanda.listas+psl@gmail.com>
134   -Francisco Marcelo A. Lima Júnior <francisco.lima-junior@serpro.gov.br>
135   -Francisco Marcelo de Araujo Lima Junior <79350259591@serpro-1457614.(none)>
  49 +Filipe Ribeiro <firibeiro77@live.com>
136 50 Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>
137   -Francisco Marcelo de Araújo Lima Júnior <maljunior@gmail.com>
138 51 Gabriela Navarro <navarro1703@gmail.com>
139 52 Gonzalo Exequiel Pedone <hipersayan.x@gmail.com>
140 53 Grazieno Pellegrino <grazieno@gmail.com>
141   -Gust <darksshades@hotmail.com>
  54 +Guilherme C. Muniz <guilherme.cmuniz@gmail.com>
  55 +Guilherme Rojas <guilhermehrojas@gmail.com>
  56 +Gustavo Jaruga <darksshades@gmail.com>
142 57 Hebert Douglas <hebertdougl@gmail.com>
143 58 Hugo Melo <hugo@riseup.net>
  59 +Iolane Andrade <andrade.icaa@gmail.com>
144 60 Isaac Canan <isaac@intelletto.com.br>
145 61 Italo Valcy <italo@dcc.ufba.br>
146   -Jefferson Fernandes + Diego Araujo + Rafael Manzo <jeffs.fernandes@gmail.com>
147   -Jefferson Fernandes + Joao M. M. da Silva <jeffs.fernandes@gmail.com>
148   -Jefferson Fernandes + Joao M. M. Silva <jeffs.fernandes@gmail.com>
  62 +Jefferson Fernandes <jeffs.fernandes@gmail.com>
149 63 Jérôme Jutteau <j.jutteau@gmail.com>
150   -João da Silva + Eduardo Morais + Rafael Manzo <rr.manzo@gmail.com>
151   -João da Silva <jaodsilv@linux.ime.usp.br>
152   -João Marco Maciel da Silva + Rafael Manzo + Renan Teruo <jaodsilv@linux.ime.usp.br>
153   -João M. M. da Silva + Alessandro Palmeira + Diego Araújo + Caio Salgado <jaodsilv@linux.ime.usp.br>
154   -João M. M. da Silva + Alessandro Palmeira + Diego Araújo <jaodsilv@linux.ime.usp.br>
155   -Joao M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
156   -João M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
157   -João M. M. da Silva + Alessandro Palmeira + João Machini <jaodsilv@linux.ime.usp.br>
158   -João M. M. da Silva + Caio Salgado + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
159   -João M. M. da Silva + Caio Salgado <jaodsilv@linux.ime.usp.br>
160   -João M. M. da Silva + Carlos Morais <jaodsilv@linux.ime.usp.br>
161   -João M. M. da Silva + Diego Araújo <diegoamc90@gmail.com>
162   -João M. M. da Silva + Diego Araújo <jaodsilv@linux.ime.usp.br>
163   -João M. M. da Silva + Diego Araújo + Pedro Leal <jaodsilv@linux.ime.usp.br>
  64 +João Machini
164 65 João M. M. da Silva <jaodsilv@linux.ime.usp.br>
165   -Joao M. M. da Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
166   -João M. M. da Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
167   -João M. M. da Silva + João M. Miranda <jaodsilv@linux.ime.usp.br>
168   -João M. M. da Silva + Paulo Meirelles <jaodsilv@linux.ime.usp.br>
169   -João M. M. da Silva + Pedro Leal <jaodsilv@linux.ime.usp.br>
170   -João M. M. da Silva + Rafael Manzo + Diego Araújo <jaodsilv@linux.ime.usp.br>
171   -João M. M. da Silva + Rafael Manzo <jaodsilv@linux.ime.usp.br>
172   -João M. M. da Silva + Renan Teruo <jaodsilv@linux.ime.usp.br>
173   -João M. M. Silva + Caio Salgado <jaodsilv@linux.ime.usp.br>
174   -João M. M. Silva + Diego Araújo <jaodsilv@linux.ime.usp.br>
175   -Joao M. M. Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
176   -João M. M. Silva + Paulo Meirelles <jaodsilv@linux.ime.usp.br>
177   -João M. M. Silva + Rafael Manzo <jaodsilv@linux.ime.usp.br>
178   -João M. M. Silva + Renan Teruo <jaodsilv@linux.ime.usp.br>
179 66 Joenio Costa <joenio@colivre.coop.br>
180 67 Josef Spillner <josef.spillner@tu-dresden.de>
181 68 Jose Pedro <1jpsneto@gmail.com>
182   -Junior Silva <junior@bajor.localhost.localdomain>
183   -Junior Silva <junior@sedeantigo.colivre.coop.br>
184 69 Junior Silva <juniorsilva1001@gmail.com>
185   -Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)>
186   -Junior Silva <juniorsilva@colivre.coop.br>
187   -juniorsilva <juniorsilva@QonoS.localhost.localdomain>
188 70 Keilla Menezes <keilla@colivre.coop.br>
189 71 Larissa Reis <larissa@colivre.coop.br>
190   -Larissa Reis <reiss.larissa@gmail.com>
191 72 Leandro Alves <leandrosustenido@gmail.com>
192   -Leandro Nunes dos Santos <81665687568@serpro-1541727.Home>
193   -Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)>
194   -Leandro Nunes dos Santos <leandronunes@gmail.com>
195 73 Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>
  74 +Leandro Veloso <leandrovelosorodrigues@gmail.com>
196 75 LinguÁgil 2010 <linguagil.bahia@gmail.com>
  76 +Lucas Couto <loc.unb@gmail.com>
197 77 Lucas Kanashiro <kanashiro.duarte@gmail.com>
198   -Lucas Melo <lucas@colivre.coop.br>
199 78 Lucas Melo <lucaspradomelo@gmail.com>
200   -Luciano <lucianopcbr@gmail.com>
201 79 Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
202 80 Luis David Aguilar Carlos <ludwig9003@gmail.com>
203 81 Luiz Fernando de Freitas Matos <luiz@luizff.matos@gmail.com>
204   -Marcos <marcos.rpj2@gmail.com>
  82 +Luiz Matos <luizff.matos@gmail.com>
205 83 Marcos Ramos <ms.ramos@outlook.com>
  84 +Marcos Ronaldo <marcos.rpj2@gmail.com>
  85 +Mariel Zasso <noosfero-br@listas.softwarelivre.org>
206 86 Martín Olivera <molivera@solar.org.ar>
  87 +Matheus Faria <matheus.sousa.faria@gmail.com>
207 88 Maurilio Atila <cabelotaina@gmail.com>
208 89 M for Momo <mo@rtnp.org>
209 90 Michal Čihař <michal@cihar.com>
  91 +Michel Felipe <mfelipeof@gmail.com>
210 92 Moises Machado <moises@colivre.coop.br>
211 93 Naíla Alves <naila@colivre.coop.br>
212 94 Nanda Lopes <nanda.listas+psl@gmail.com>
213 95 Niemand Jedermann <predatorix@web.de>
214 96 Parley Martins <parleypachecomartins@gmail.com>
215   -Paulo Meirelles + Alessandro Palmeira + João M. M. da Silva <paulo@softwarelivre.org>
216   -Paulo Meirelles + Alessandro Palmeira <paulo@softwarelivre.org>
217   -Paulo Meirelles + Carlos Morais <paulo@softwarelivre.org>
218   -Paulo Meirelles + Diego Araújo <paulo@softwarelivre.org>
219   -Paulo Meirelles + João M. M. da Silva <paulo@softwarelivre.org>
220 97 Paulo Meirelles <paulo@softwarelivre.org>
221   -Paulo Meirelles + Rafael Manzo <paulo@softwarelivre.org>
  98 +Pedro de Lyra <pedrodelyra@gmail.com>
  99 +Pedro Leal
  100 +Rafael de Souza Queiroz <querafael@live.com>
222 101 Rafael Gomes <rafaelgomes@techfree.com.br>
223   -Rafael Manzo + Alessandro Palmeira <rr.manzo@gmail.com>
224   -Rafael Manzo + Daniel Alves <danpaulalves@gmail.com>
225   -Rafael Manzo + Diego Araújo <rr.manzo@gmail.com>
226   -Rafael Manzo + João M. M. Silva <rr.manzo@gmail.com>
227   -Rafael Manzo + Paulo Meirelles <rr.manzo@gmail.com>
228 102 Rafael Martins <rmmartins@gmail.com>
229   -Rafael Reggiani Manzo + Caio Salgado + Jefferson Fernandes <rr.manzo@gmail.com>
230   -Rafael Reggiani Manzo + Diego Araujo <diegoamc90@gmail.com>
231   -Rafael Reggiani Manzo + Diego Araujo <rr.manzo@gmail.com>
232   -Rafael Reggiani Manzo + Diego Araújo <rr.manzo@gmail.com>
233   -Rafael Reggiani Manzo + João M. M. da Silva <rr.manzo@gmail.com>
234 103 Rafael Reggiani Manzo <rr.manzo@gmail.com>
235 104 Raphaël Rousseau <raph@r4f.org>
236 105 Raquel Lira <raquel.lira@gmail.com>
237 106 Raquel <rcordioli@gmail.com>
238   -Renan Teruo + Caio Salgado <renanteruoc@gmail.com>
239   -Renan Teruoc + Diego Araujo <renanteruoc@gmail.com>
240   -Renan Teruo + Diego Araujo <renanteruoc@gmail.com>
241   -Renan Teruo + Diego Araújo <renanteruoc@gmail.com>
242   -Renan Teruo + Paulo Meirelles <renanteruoc@gmail.com>
243   -Renan Teruo + Rafael Manzo <renanteruoc@gmail.com>
244   -Rodrigo Souto + Ana Losnak + Daniel Bucher + Caio Almeida + Leandro Nunes + Daniela Feitosa + Mariel Zasso <noosfero-br@listas.softwarelivre.org>
  107 +Renan Costa <renan2727@hotmail.com>
  108 +Renan Teruo <renanteruoc@gmail.com>
  109 +Rodrigo Medeiros <rodrigo.mss01@gmail.com>
245 110 Rodrigo Souto <rodrigo@colivre.coop.br>
246 111 Ronny Kursawe <kursawe.ronny@googlemail.com>
247   -root <root@debian.sdr.serpro>
248 112 Samuel R. C. Vale <srcvale@holoscopio.com>
249   -Tallys Martins <tallysmartins@gmail.com>
250 113 Tallys Martins <tallysmartins@yahoo.com.br>
251   -tallys <tallys@tallys>
252   -tallys <tallys@tallys.(none)>
253 114 Thiago Casotti <thiago.casotti@uol.com.br>
  115 +Thiago Kairala <thiagor.kairala@gmail.com>
  116 +Thiago Ribeiro <thiagitosouza@hotmail.com>
254 117 Thiago Zoroastro <thiago.zoroastro@bol.com.br>
255 118 Tuux <tuxa@galaxie.eu.org>
256 119 TWS <tablettws@gmail.com>
257 120 Valessio Brito <contato@valessiobrito.com.br>
258   -Valessio Brito <contato@valessiobrito.info>
259   -Valessio Brito <valessio@gmail.com>
260   -vfcosta <vfcosta@gmail.com>
261   -Victor Carvalho <victorhugodf.ac@gmail.com>
262 121 Victor Costa <vfcosta@gmail.com>
263 122 Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com>
264 123 Vinicius Cubas Brand <viniciuscb@gmail.com>
265   -Visita <visita@debian.(none)>
  124 +Wilton Rodrigues <braynwilton@gmail.com>
266 125 Yann Lugrin <yann.lugrin@liquid-concept.ch>
267 126  
268 127 Ideas, specifications and incentive
... ...
Gemfile
1 1 source "https://rubygems.org"
2   -gem 'rails', '~> 3.2.21'
  2 +gem 'rails', '~> 3.2.22'
3 3 gem 'minitest', '~> 3.2.0'
4 4 gem 'fast_gettext', '~> 0.6.8'
5 5 gem 'acts-as-taggable-on', '~> 3.4.2'
... ... @@ -18,7 +18,7 @@ gem &#39;exception_notification&#39;, &#39;~&gt; 4.0.1&#39;
18 18 gem 'gettext', '~> 2.2.1', :require => false
19 19 gem 'locale', '~> 2.0.5'
20 20 gem 'whenever', :require => false
21   -gem 'eita-jrails', '>= 0.9.5', :require => 'jrails'
  21 +gem 'eita-jrails', '~> 0.9.5', require: 'jrails'
22 22  
23 23 # asset pipeline
24 24 gem 'uglifier', '>= 1.0.3'
... ... @@ -32,6 +32,7 @@ group :test do
32 32 gem 'rspec', '~> 2.14.0'
33 33 gem 'rspec-rails', '~> 2.14.1'
34 34 gem 'mocha', '~> 1.1.0', :require => false
  35 + gem 'test-unit' if RUBY_VERSION >= '2.2.0'
35 36 end
36 37  
37 38 group :cucumber do
... ...
app/controllers/application_controller.rb
... ... @@ -72,8 +72,8 @@ class ApplicationController &lt; ActionController::Base
72 72 FastGettext.available_locales = environment.available_locales
73 73 FastGettext.default_locale = environment.default_locale
74 74 FastGettext.locale = (params[:lang] || session[:lang] || environment.default_locale || request.env['HTTP_ACCEPT_LANGUAGE'] || 'en')
75   - I18n.locale = FastGettext.locale
76   - I18n.default_locale = FastGettext.default_locale
  75 + I18n.locale = FastGettext.locale.to_s.gsub '_', '-'
  76 + I18n.default_locale = FastGettext.default_locale.to_s.gsub '_', '-'
77 77 if params[:lang]
78 78 session[:lang] = params[:lang]
79 79 end
... ...
app/controllers/my_profile/cms_controller.rb
... ... @@ -6,7 +6,7 @@ class CmsController &lt; MyProfileController
6 6  
7 7 def search_tags
8 8 arg = params[:term].downcase
9   - result = ActsAsTaggableOn::Tag.find(:all, :conditions => ['LOWER(name) LIKE ?', "%#{arg}%"])
  9 + result = ActsAsTaggableOn::Tag.where('name ILIKE ?', "%#{arg}%").limit(10)
10 10 render :text => prepare_to_token_input_by_label(result).to_json, :content_type => 'application/json'
11 11 end
12 12  
... ... @@ -101,6 +101,11 @@ class CmsController &lt; MyProfileController
101 101 record_coming
102 102 if request.post?
103 103 @article.image = nil if params[:remove_image] == 'true'
  104 + if @article.image.present? && params[:article][:image_builder] &&
  105 + params[:article][:image_builder][:label]
  106 + @article.image.label = params[:article][:image_builder][:label]
  107 + @article.image.save!
  108 + end
104 109 @article.last_changed_by = user
105 110 if @article.update_attributes(params[:article])
106 111 if !continue
... ...
app/helpers/application_helper.rb
... ... @@ -1185,7 +1185,7 @@ module ApplicationHelper
1185 1185 pending_tasks_count = link_to(count.to_s, user.tasks_url, :id => 'pending-tasks-count', :title => _("Manage your pending tasks"))
1186 1186 end
1187 1187  
1188   - (_("<span class='welcome'>Welcome,</span> %s") % link_to("<i style='background-image:url(#{user.profile_custom_icon(gravatar_default)})'></i><strong>#{user.identifier}</strong>", user.public_profile_url, :id => "homepage-link", :title => _('Go to your homepage'))) +
  1188 + (_("<span class='welcome'>Welcome,</span> %s") % link_to("<i style='background-image:url(#{user.profile_custom_icon(gravatar_default)})'></i><strong>#{user.identifier}</strong>", user.url, :id => "homepage-link", :title => _('Go to your homepage'))) +
1189 1189 render_environment_features(:usermenu) +
1190 1190 admin_link +
1191 1191 manage_enterprises +
... ... @@ -1233,7 +1233,7 @@ module ApplicationHelper
1233 1233  
1234 1234 def task_information(task)
1235 1235 values = {}
1236   - values.merge!({:requestor => link_to(task.requestor.name, task.requestor.public_profile_url)}) if task.requestor
  1236 + values.merge!({:requestor => link_to(task.requestor.name, task.requestor.url)}) if task.requestor
1237 1237 values.merge!({:subject => content_tag('span', task.subject, :class=>'task_target')}) if task.subject
1238 1238 values.merge!({:linked_subject => link_to(content_tag('span', task.linked_subject[:text], :class => 'task_target'), task.linked_subject[:url])}) if task.linked_subject
1239 1239 values.merge!(task.information[:variables]) if task.information[:variables]
... ...
app/helpers/comment_helper.rb
... ... @@ -16,7 +16,7 @@ module CommentHelper
16 16 content_tag('span', show_date(article.published_at), :class => 'date') +
17 17 content_tag('span', [_(", by %s") % link_to(article.author_name, article.author_url)], :class => 'author') +
18 18 content_tag('span', comments, :class => 'comments'),
19   - :class => 'created-at'
  19 + :class => 'publishing-info'
20 20 )
21 21 end
22 22 title
... ...
app/helpers/content_viewer_helper.rb
... ... @@ -30,7 +30,7 @@ module ContentViewerHelper
30 30 date_format +
31 31 content_tag('span', _(", by %s") % (article.author ? link_to(article.author_name, article.author_url) : article.author_name), :class => 'author') +
32 32 content_tag('span', comments, :class => 'comments'),
33   - :class => 'created-at'
  33 + :class => 'publishing-info'
34 34 )
35 35 end
36 36 title
... ...
app/models/article.rb
... ... @@ -131,7 +131,7 @@ class Article &lt; ActiveRecord::Base
131 131  
132 132 scope :by_range, lambda { |range| {
133 133 :conditions => [
134   - 'published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last }
  134 + 'articles.published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last }
135 135 ]
136 136 }}
137 137  
... ... @@ -504,9 +504,9 @@ class Article &lt; ActiveRecord::Base
504 504 where(
505 505 [
506 506 "published = ? OR last_changed_by_id = ? OR profile_id = ? OR ?
507   - OR (show_to_followers = ? AND ? AND profile_id = ?)", true, user.id, user.id,
  507 + OR (show_to_followers = ? AND ? AND profile_id IN (?))", true, user.id, user.id,
508 508 profile.nil? ? false : user.has_permission?(:view_private_content, profile),
509   - true, user.follows?(profile), (profile.nil? ? nil : profile.id)
  509 + true, (profile.nil? ? true : user.follows?(profile)), ( profile.nil? ? (user.friends.select('profiles.id')) : [profile.id])
510 510 ]
511 511 )
512 512 }
... ... @@ -724,8 +724,9 @@ class Article &lt; ActiveRecord::Base
724 724 paragraphs.empty? ? '' : paragraphs.first.to_html
725 725 end
726 726  
727   - def lead
728   - abstract.blank? ? first_paragraph.html_safe : abstract.html_safe
  727 + def lead(length = nil)
  728 + content = abstract.blank? ? first_paragraph.html_safe : abstract.html_safe
  729 + length.present? ? content.truncate(length) : content
729 730 end
730 731  
731 732 def short_lead
... ...
app/models/event.rb
... ... @@ -98,47 +98,19 @@ class Event &lt; Article
98 98 start_date..(end_date||start_date)
99 99 end
100 100  
101   - # FIXME this shouldn't be needed
102   - include ActionView::Helpers::TagHelper
103   - include ActionView::Helpers::UrlHelper
104   - include DatesHelper
  101 + def first_paragraph
  102 + paragraphs = Nokogiri::HTML.fragment(self.body).css('p')
  103 + paragraphs.empty? ? '' : paragraphs.first.to_html
  104 + end
105 105  
106 106 def to_html(options = {})
  107 + event = self
  108 + format = options[:format]
107 109  
108   - result = ''
109   - html = ::Builder::XmlMarkup.new(:target => result)
110   -
111   - html.div(:class => 'event-info' ) {
112   - html.ul(:class => 'event-data' ) {
113   - html.li(:class => 'event-dates' ) {
114   - html.span _('When:')
115   - html.text! show_period(start_date, end_date)
116   - } if start_date.present? || end_date.present?
117   - html.li {
118   - html.span _('URL:')
119   - html.a(self.link || "", 'href' => self.link || "")
120   - } if self.link.present?
121   - html.li {
122   - html.span _('Address:')
123   - html.text! self.address || ""
124   - } if self.address.present?
125   - }
126   -
127   - # TODO: some good soul, please clean this ugly hack:
128   - if self.body
129   - html.div('_____XXXX_DESCRIPTION_GOES_HERE_XXXX_____', :class => 'event-description')
130   - end
131   - }
132   -
133   - if self.body
134   - if options[:format] == 'short'
135   - result.sub!('_____XXXX_DESCRIPTION_GOES_HERE_XXXX_____', display_short_format(self))
136   - else
137   - result.sub!('_____XXXX_DESCRIPTION_GOES_HERE_XXXX_____', self.body)
138   - end
  110 + proc do
  111 + render :file => 'content_viewer/event_page', :locals => { :event => event,
  112 + :format => format }
139 113 end
140   -
141   - result
142 114 end
143 115  
144 116 def duration
... ...
app/models/highlights_block.rb
... ... @@ -12,6 +12,7 @@ class HighlightsBlock &lt; Block
12 12 block.images.each do |i|
13 13 i[:image_id] = i[:image_id].to_i
14 14 i[:position] = i[:position].to_i
  15 + i[:address] = Noosfero.root + i[:address] unless Noosfero.root.nil?
15 16 begin
16 17 file = UploadedFile.find(i[:image_id])
17 18 i[:image_src] = file.public_filename
... ...
app/models/image.rb
... ... @@ -23,7 +23,7 @@ class Image &lt; ActiveRecord::Base
23 23  
24 24 postgresql_attachment_fu
25 25  
26   - attr_accessible :uploaded_data
  26 + attr_accessible :uploaded_data, :label
27 27  
28 28 def current_data
29 29 File.file?(full_filename) ? File.read(full_filename) : nil
... ...
app/models/organization.rb
... ... @@ -147,6 +147,12 @@ class Organization &lt; Profile
147 147 ]
148 148 end
149 149  
  150 + def short_name chars = 40
  151 + s = self.display_name
  152 + s = super(chars) if s.blank?
  153 + s
  154 + end
  155 +
150 156 def notification_emails
151 157 emails = [contact_email].select(&:present?) + admins.map(&:email)
152 158 if emails.empty?
... ...
app/models/user.rb
... ... @@ -67,7 +67,8 @@ class User &lt; ActiveRecord::Base
67 67  
68 68 attr_writer :person_data
69 69 def person_data
70   - @person_data || {}
  70 + @person_data = {} if @person_data.nil?
  71 + @person_data
71 72 end
72 73  
73 74 def email_domain
... ... @@ -320,6 +321,8 @@ class User &lt; ActiveRecord::Base
320 321  
321 322 {
322 323 'login' => self.login,
  324 + 'name' => self.person.name,
  325 + 'email' => self.email,
323 326 'avatar' => self.person.profile_custom_icon(gravatar_default),
324 327 'is_admin' => self.person.is_admin?,
325 328 'since_month' => self.person.created_at.month,
... ...
app/views/content_viewer/_article_title.html.erb 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +<% if @page.belongs_to_blog? || @page.belongs_to_forum?%>
  2 + <h1 class="title">
  3 + <% if no_link %>
  4 + <%= h(@page.title) %>
  5 + <% else %>
  6 + <%= link_to(@page.name, @page.url) %>
  7 + <% end %>
  8 + </h1>
  9 + <%= render :partial => "publishing_info" %>
  10 + <% unless @page.abstract.blank? %>
  11 + <div class="preview">
  12 + <%= @page.lead %>
  13 + </div>
  14 + <% end %>
  15 +<% else %>
  16 + <h1 class="title">
  17 + <%= h(@page.title) %>
  18 + </h1>
  19 + <%= render :partial => "publishing_info" %>
  20 +<% end %>
... ...
app/views/content_viewer/_article_toolbar.html.erb
... ... @@ -64,7 +64,7 @@
64 64 <% end %>
65 65 <%= link_to(image_tag('/images/icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
66 66 <%= @plugins.dispatch(:article_header_extra_contents, @page).collect { |content| instance_exec(&content) }.join("") %>
67   - <%= article_title(@page, :no_link => true) %>
  67 + <%= render :partial => 'article_title', :locals => {:no_link => true} %>
68 68 <%= article_translations(@page) %>
69 69 </div>
70 70 </div>
... ...
app/views/content_viewer/_display_compact_format.html.erb
... ... @@ -16,6 +16,6 @@
16 16 </div>
17 17 <% end %>
18 18 <div class = <%= className %> >
19   - <%= article.abstract.truncate(400) %>
  19 + <%= article.lead(400) %>
20 20 </div>
21 21 </div>
... ...
app/views/content_viewer/_publishing_info.html.erb 0 → 100644
... ... @@ -0,0 +1,29 @@
  1 +<span class="publishing-info">
  2 + <span class="date">
  3 + <%= show_date(@page.published_at) %>
  4 + </span>
  5 + <span class="author">
  6 + <%= _(", by %s") % (@page.author ? link_to(@page.author_name, @page.author_url) : @page.author_name) %>
  7 + </span>
  8 +<% unless @no_comments %>
  9 + <span class="comments">
  10 + <%= (" - %s") % link_to_comments(@page)%>
  11 + </span>
  12 +<% end %>
  13 +</span>
  14 +
  15 +<% if @page.display_hits? || @page.license.present? %>
  16 + <div id='article-sub-header'>
  17 + <% if @page.display_hits? %>
  18 + <div id="article-hits">
  19 + <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>
  20 + </div>
  21 + <% end %>
  22 +
  23 + <% if @page.license.present? %>
  24 + <div id="article-license">
  25 + <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>
  26 + </div>
  27 + <% end %>
  28 + </div>
  29 +<% end %>
... ...
app/views/content_viewer/event_page.html.erb 0 → 100644
... ... @@ -0,0 +1,41 @@
  1 +<div class="event-card">
  2 + <div class="event-image">
  3 + <% if event.image %>
  4 + <%= image_tag(event.image.public_filename(:big)) %>
  5 + <% end %>
  6 + </div>
  7 + <div class="about-event">
  8 + <% if event.start_date.present? || event.end_date.present? %>
  9 + <span class="event-date">
  10 + <%= show_period(event.start_date, event.end_date) %>
  11 + </span>
  12 + <% end %>
  13 + <% if event.link.present? %>
  14 + <span class="event-link">
  15 + <%= link_to event.link, event.link %>
  16 + </span>
  17 + <% end %>
  18 + <% if event.address.present? %>
  19 + <span class="event-address">
  20 + <span>
  21 + <%= event.address %>
  22 + </span>
  23 + </span>
  24 + <% end %>
  25 + </div>
  26 +</div>
  27 +
  28 +<div class="event-body">
  29 + <% if format == 'short' %>
  30 + <%= display_short_format event, :comments_link => false, :read_more_link => false %>
  31 + <% else %>
  32 + <% unless event.abstract.blank? %>
  33 + <div class="event-lead">
  34 + <%= event.article_lead %>
  35 + </div>
  36 + <% end %>
  37 + <div class="event-content">
  38 + <%= event.body %>
  39 + </div>
  40 + <% end %>
  41 +</div>
... ...
app/views/content_viewer/view_page.html.erb
... ... @@ -24,22 +24,6 @@
24 24 <%= render :partial => 'article_toolbar' %>
25 25 </div>
26 26  
27   -<% if @page.display_hits? || @page.license.present? %>
28   - <div id='article-sub-header'>
29   - <% if @page.display_hits? %>
30   - <div id="article-hits">
31   - <%= n_('Viewed one time', 'Viewed %{num} times', @page.hits) % { :num => @page.hits } %>
32   - </div>
33   - <% end %>
34   -
35   - <% if @page.license.present? %>
36   - <div id="article-license">
37   - <%= _('Licensed under %s') % (@page.license.url.present? ? link_to(@page.license.name, @page.license.url, :target => '_blank') : @page.license.name) %>
38   - </div>
39   - <% end %>
40   - </div>
41   -<% end %>
42   -
43 27 <% if NOOSFERO_CONF['addthis_enabled'] %>
44 28 <%= render :partial => 'addthis' %>
45 29 <% end %>
... ... @@ -47,6 +31,12 @@
47 31 <% cache(@page.cache_key(params, user, language)) do %>
48 32 <div class="<%="article-body article-body-" + @page.css_class_name %>">
49 33 <% options = @page.image? ? {:gallery_view => true} : {} %>
  34 + <% if @page.image.present? && !@page.event? %>
  35 + <div class="article-body-img">
  36 + <%= image_tag(@page.image.public_filename) %>
  37 + <p><%= @page.image.label%></p>
  38 + </div>
  39 + <% end %>
50 40 <%= article_to_html(@page, options) %>
51 41 <br style="clear:both" />
52 42 </div> <!-- end class="article-body" -->
... ...
app/views/layouts/application-ng.html.erb
... ... @@ -27,6 +27,7 @@
27 27  
28 28 <script type="text/javascript">
29 29 DEFAULT_LOADING_MESSAGE = <%="'#{ _('loading...') }'" %>;
  30 + noosfero.profile = <%= (@profile.identifier if @profile).to_json %>
30 31 </script>
31 32  
32 33 </head>
... ...
app/views/manage_products/_categories_autocomplete.html.erb
1 1 <%= text_field_tag 'product_category_id', '', :placeholder => _('type a category for the product') %>
2 2  
3 3 <%= javascript_include_tag '/javascripts/product_categories.js' %>
4   -<% javascript_tag do %>
  4 +<%= javascript_tag do %>
5 5 product_categories.autocomplete.search_url = <%= url_for(:controller => :manage_products, :action => :search_categories).to_json %>
6 6 product_categories.autocomplete.select_url = <%= url_for(:controller => :manage_products, :action => :show_category_tree).to_json %>
7 7 product_categories.autocomplete.load('#product_category_id')
... ...
app/views/shared/_change_image.html.erb
1   - <%= i.file_field( :uploaded_data, { :onchange => 'updateImg(this.value)' } ) %>
2   - <%= button_to_function(:cancel,_('Cancel'),"jQuery('#change-image-link').show(); jQuery('#change-image').html('')", :id => 'cancel-change-image-link', :style => 'display: none')%>
  1 +<%= i.file_field( :uploaded_data, { :onchange => 'updateImg(this.value)' } ) %>
  2 +<%= labelled_form_field(_("Image Label:"), i.text_field(:label)) %>
  3 +<%= button_to_function(:cancel,_('Cancel'),"jQuery('#change-image-link').show(); jQuery('#change-image').html('')", :id => 'cancel-change-image-link', :style => 'display: none')%>
... ...
config/database.yml.gitlab-ci 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +test: &TEST
  2 + adapter: postgresql
  3 + database: gitlab_ci_test
  4 + username: gitlab_ci_runner
  5 +development:
  6 + <<: *TEST
... ...
config/database.yml.travis 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +# From http://about.travis-ci.org/docs/user/database-setup/
  2 +test:
  3 + adapter: postgresql
  4 + database: myapp_test
  5 + username: postgres
... ...
config/environments/staging.rb 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +# inherit from production
  2 +require_relative 'production'
  3 +
  4 +Noosfero::Application.configure do
  5 +
  6 + # expose errors
  7 + config.consider_all_requests_local = true
  8 +
  9 + # ease debug
  10 + config.assets.compress = false
  11 +
  12 +end
  13 +
... ...
config/initializers/unicorn.rb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +require_dependency 'scheduler/defer'
  2 +
  3 +if defined? Unicorn
  4 + ObjectSpace.each_object Unicorn::HttpServer do |s|
  5 + s.extend Scheduler::Defer::Unicorn
  6 + end
  7 +end
  8 +
... ...
config/locales/de.yml
... ... @@ -3,7 +3,7 @@
3 3 # contributors:
4 4 # - Alexander Dreher - http://github.com/alexdreher - Rails 3 update
5 5  
6   -de:
  6 +de: &de
7 7 date:
8 8 formats:
9 9 default: "%d.%m.%Y"
... ... @@ -221,3 +221,6 @@ de:
221 221  
222 222 full_messages:
223 223 format: "%{attribute} %{message}"
  224 +
  225 +de-DE:
  226 + <<: *de
... ...
config/locales/en-US.yml
... ... @@ -2,7 +2,7 @@
2 2 #
3 3 # Use this as the base for the locale file of your language.
4 4  
5   -"en-US":
  5 +"en-US": &en-US
6 6 date:
7 7 formats:
8 8 default: "%Y-%m-%d"
... ... @@ -220,4 +220,7 @@
220 220 template:
221 221 <<: *errors_template
222 222 full_messages:
223   - format: "%{attribute} %{message}"
224 223 \ No newline at end of file
  224 + format: "%{attribute} %{message}"
  225 +
  226 +en:
  227 + <<: *en-US
... ...
config/locales/en.yml 0 → 120000
... ... @@ -0,0 +1 @@
  1 +en-US.yml
0 2 \ No newline at end of file
... ...
config/locales/es.yml
... ... @@ -4,7 +4,7 @@
4 4 # - Tsutomu Kuroda - http://github.com/kuroda (t-kuroda@oiax.jp)
5 5 # Corrected by Eloy Serra Labán: http://goo.gl/i9Kts, /nQ928, /XfKaX
6 6  
7   -"es":
  7 +es: &es
8 8 date:
9 9 formats:
10 10 default: "%d/%m/%Y"
... ... @@ -223,3 +223,6 @@
223 223  
224 224 full_messages:
225 225 format: "%{attribute} %{message}"
  226 +
  227 +es_ES:
  228 + <<: *es
... ...
config/locales/fr-FR.yml 0 → 120000
... ... @@ -0,0 +1 @@
  1 +fr.yml
0 2 \ No newline at end of file
... ...
config/locales/fr.yml
... ... @@ -5,7 +5,7 @@
5 5 # - Bruno Michel - http://github.com/nono
6 6 # - Tsutomu Kuroda - http://github.com/kuroda (t-kuroda@oiax.jp)
7 7  
8   -fr:
  8 +fr: &fr
9 9 date:
10 10 formats:
11 11 default: "%d/%m/%Y"
... ... @@ -222,3 +222,7 @@ fr:
222 222 <<: *errors_template
223 223 full_messages:
224 224 format: "%{attribute} %{message}"
  225 +
  226 +fr-FR:
  227 + <<: *fr
  228 +
... ...
config/locales/hr.yml
... ... @@ -176,4 +176,4 @@
176 176 template:
177 177 <<: *errors_template
178 178 full_messages:
179   - format: "%{attribute} %{message}"
180 179 \ No newline at end of file
  180 + format: "%{attribute} %{message}"
... ...
config/locales/hy-AM.yml 0 → 120000
... ... @@ -0,0 +1 @@
  1 +hy.yml
0 2 \ No newline at end of file
... ...
config/locales/hy.yml
... ... @@ -3,7 +3,7 @@
3 3 # FIXME: This is a copy of en-US.yml. Armenian translators, please translate
4 4 # this into Armenian.
5 5  
6   -"hy":
  6 +hy: &hy
7 7 date:
8 8 formats:
9 9 default: "%Y-%m-%d"
... ... @@ -222,3 +222,6 @@
222 222 <<: *errors_template
223 223 full_messages:
224 224 format: "%{attribute} %{message}"
  225 +
  226 +hy-AM:
  227 + <<: *hy
... ...
config/locales/it.yml
... ... @@ -5,7 +5,7 @@
5 5 # - Simone Carletti (weppos@weppos.net)
6 6 # - Davide Guerri (d.guerri@caspur.it)
7 7  
8   -it:
  8 +it: &it
9 9 number:
10 10 format:
11 11 delimiter: ","
... ... @@ -234,3 +234,6 @@ it:
234 234  
235 235 full_messages:
236 236 format: "%{attribute} %{message}"
  237 +
  238 +it_IT:
  239 + <<: *it
... ...
config/locales/pt-BR.yml
1 1 # encoding: UTF-8
2 2 # pt-BR translations for Ruby on Rails
3   -"pt-BR":
  3 +
  4 +"pt-BR": &pt-BR
4 5 # formatos de data e hora
5 6 date:
6 7 formats:
... ... @@ -231,3 +232,6 @@
231 232  
232 233 full_messages:
233 234 format: "%{attribute} %{message}"
  235 +
  236 +pt:
  237 + <<: *pt-BR
... ...
config/locales/pt.yml
... ... @@ -1,233 +0,0 @@
1   -# encoding: UTF-8
2   -# pt-BR translations for Ruby on Rails
3   -"pt":
4   - # formatos de data e hora
5   - date:
6   - formats:
7   - default: "%d/%m/%Y"
8   - short: "%d de %B"
9   - long: "%d de %B de %Y"
10   -
11   - day_names:
12   - - Domingo
13   - - Segunda
14   - - Terça
15   - - Quarta
16   - - Quinta
17   - - Sexta
18   - - Sábado
19   - abbr_day_names:
20   - - Dom
21   - - Seg
22   - - Ter
23   - - Qua
24   - - Qui
25   - - Sex
26   - - Sáb
27   -
28   - month_names:
29   - - ~
30   - - Janeiro
31   - - Fevereiro
32   - - Março
33   - - Abril
34   - - Maio
35   - - Junho
36   - - Julho
37   - - Agosto
38   - - Setembro
39   - - Outubro
40   - - Novembro
41   - - Dezembro
42   - abbr_month_names:
43   - - ~
44   - - Jan
45   - - Fev
46   - - Mar
47   - - Abr
48   - - Mai
49   - - Jun
50   - - Jul
51   - - Ago
52   - - Set
53   - - Out
54   - - Nov
55   - - Dez
56   - order:
57   - - :day
58   - - :month
59   - - :year
60   -
61   - time:
62   - formats:
63   - default: "%A, %d de %B de %Y, %H:%M h"
64   - short: "%d/%m, %H:%M h"
65   - long: "%A, %d de %B de %Y, %H:%M h"
66   - am: ''
67   - pm: ''
68   -
69   - # Usado no Array.to_sentence
70   - support:
71   - array:
72   - words_connector: ", "
73   - two_words_connector: " e "
74   - last_word_connector: " e "
75   -
76   - select:
77   - prompt: "Por favor selecione"
78   -
79   - number:
80   - format:
81   - separator: ','
82   - delimiter: '.'
83   - precision: 3
84   - significant: false
85   - strip_insignificant_zeros: false
86   -
87   - currency:
88   - format:
89   - format: '%u %n'
90   - unit: 'R$'
91   - separator: ','
92   - delimiter: '.'
93   - precision: 2
94   - significant: false
95   - strip_insignificant_zeros: false
96   -
97   - percentage:
98   - format:
99   - delimiter: '.'
100   -
101   - precision:
102   - format:
103   - delimiter: '.'
104   -
105   - human:
106   - format:
107   - delimiter: '.'
108   - precision: 2
109   - significant: true
110   - strip_insignificant_zeros: true
111   - storage_units:
112   - format: "%n %u"
113   - units:
114   - byte:
115   - one: "Byte"
116   - other: "Bytes"
117   - kb: "KB"
118   - mb: "MB"
119   - gb: "GB"
120   - tb: "TB"
121   - # number_to_human()
122   - # new in rails 3: please add to other locales
123   - decimal_units:
124   - format: "%n %u"
125   - units:
126   - unit: ""
127   - thousand: "mil"
128   - million:
129   - one: milhão
130   - other: milhões
131   - billion:
132   - one: bilhão
133   - other: bilhões
134   - trillion:
135   - one: trilhão
136   - other: trilhões
137   - quadrillion:
138   - one: quatrilhão
139   - other: quatrilhões
140   -
141   - # distancia do tempo em palavras
142   - datetime:
143   - distance_in_words:
144   - half_a_minute: 'meio minuto'
145   - less_than_x_seconds:
146   - one: 'menos de 1 segundo'
147   - other: 'menos de %{count} segundos'
148   - x_seconds:
149   - one: '1 segundo'
150   - other: '%{count} segundos'
151   - less_than_x_minutes:
152   - one: 'menos de um minuto'
153   - other: 'menos de %{count} minutos'
154   - x_minutes:
155   - one: '1 minuto'
156   - other: '%{count} minutos'
157   - about_x_hours:
158   - one: 'aproximadamente 1 hora'
159   - other: 'aproximadamente %{count} horas'
160   - x_days:
161   - one: '1 dia'
162   - other: '%{count} dias'
163   - about_x_months:
164   - one: 'aproximadamente 1 mês'
165   - other: 'aproximadamente %{count} meses'
166   - x_months:
167   - one: '1 mês'
168   - other: '%{count} meses'
169   - about_x_years:
170   - one: 'aproximadamente 1 ano'
171   - other: 'aproximadamente %{count} anos'
172   - over_x_years:
173   - one: 'mais de 1 ano'
174   - other: 'mais de %{count} anos'
175   - almost_x_years:
176   - one: 'quase 1 ano'
177   - other: 'quase %{count} anos'
178   - prompts:
179   - year: "Ano"
180   - month: "Mês"
181   - day: "Dia"
182   - hour: "Hora"
183   - minute: "Minuto"
184   - second: "Segundo"
185   -
186   - helpers:
187   - select:
188   - prompt: "Por favor selecione"
189   -
190   - submit:
191   - create: 'Criar %{model}'
192   - update: 'Atualizar %{model}'
193   - submit: 'Salvar %{model}'
194   -
195   - errors:
196   - format: "%{attribute} %{message}"
197   - messages: &errors_messages
198   - inclusion: "não está incluído na lista"
199   - exclusion: "não está disponível"
200   - invalid: "não é válido"
201   - confirmation: "não está de acordo com a confirmação"
202   - accepted: "deve ser aceito"
203   - empty: "não pode ficar vazio"
204   - blank: "não pode ficar em branco"
205   - too_long: "é muito longo (máximo: %{count} caracteres)"
206   - too_short: "é muito curto (mínimo: %{count} caracteres)"
207   - wrong_length: "não possui o tamanho esperado (%{count} caracteres)"
208   - not_a_number: "não é um número"
209   - not_an_integer: "não é um número inteiro"
210   - greater_than: "deve ser maior que %{count}"
211   - greater_than_or_equal_to: "deve ser maior ou igual a %{count}"
212   - equal_to: "deve ser igual a %{count}"
213   - less_than: "deve ser menor que %{count}"
214   - less_than_or_equal_to: "deve ser menor ou igual a %{count}"
215   - odd: "deve ser ímpar"
216   - even: "deve ser par"
217   - taken: "já está em uso"
218   - record_invalid: "A validação falhou: %{errors}"
219   - template: &errors_template
220   - header:
221   - one: "Não foi possível gravar %{model}: 1 erro"
222   - other: "Não foi possível gravar %{model}: %{count} erros."
223   - body: "Por favor, verifique o(s) seguinte(s) campo(s):"
224   -
225   - activerecord:
226   - errors:
227   - messages:
228   - <<: *errors_messages
229   - template:
230   - <<: *errors_template
231   -
232   - full_messages:
233   - format: "%{attribute} %{message}"
config/locales/pt.yml 0 → 120000
... ... @@ -0,0 +1 @@
  1 +pt-BR.yml
0 2 \ No newline at end of file
... ...
config/locales/ru.yml
... ... @@ -10,7 +10,7 @@
10 10 # (http://github.com/yaroslav/russian). Следующие данные -- выдержка их него, чтобы
11 11 # была возможность минимальной локализации приложения на русский язык.
12 12  
13   -ru:
  13 +ru: &ru
14 14 date:
15 15 formats:
16 16 default: "%d.%m.%Y"
... ... @@ -300,3 +300,7 @@ ru:
300 300 words_connector: ", "
301 301 two_words_connector: " и "
302 302 last_word_connector: " и "
  303 +
  304 +ru_RU:
  305 + <<: *ru
  306 +
... ...
db/migrate/20150603182105_add_label_to_image.rb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +class AddLabelToImage < ActiveRecord::Migration
  2 + def up
  3 + add_column :images, :label, :string, :default => ""
  4 + end
  5 + def down
  6 + remove_column :images, :label
  7 + end
  8 +end
... ...
db/schema.rb
... ... @@ -11,7 +11,7 @@
11 11 #
12 12 # It's strongly recommended to check this file into your version control system.
13 13  
14   -ActiveRecord::Schema.define(:version => 20150602142030) do
  14 +ActiveRecord::Schema.define(:version => 20150603182105) do
15 15  
16 16 create_table "abuse_reports", :force => true do |t|
17 17 t.integer "reporter_id"
... ... @@ -376,6 +376,7 @@ ActiveRecord::Schema.define(:version =&gt; 20150602142030) do
376 376 t.integer "width"
377 377 t.integer "height"
378 378 t.boolean "thumbnails_processed", :default => false
  379 + t.string "label", :default => ""
379 380 end
380 381  
381 382 add_index "images", ["parent_id"], :name => "index_images_on_parent_id"
... ...
debian/changelog
1   -noosfero (1.2~1) UNRELEASED; urgency=medium
2   -
3   - [ Antonio Terceiro ]
4   - * Temporary version in heavy development
  1 +noosfero (1.2~rc1) wheezy; urgency=medium
5 2  
6 3 [ Joenio Costa ]
7 4 * Build noosfero-chat package
8 5  
9   - -- Joenio Costa <joenio@colivre.coop.br> Mon, 18 May 2015 14:32:21 -0300
  6 + [ Antonio Terceiro ]
  7 + * Noosfero 1.2 RC1
  8 +
  9 + -- Antonio Terceiro <terceiro@colivre.coop.br> Mon, 13 Jul 2015 15:44:17 -0300
10 10  
11 11 noosfero (1.1) wheezy; urgency=low
12 12  
... ...
features/comment.feature
... ... @@ -37,7 +37,7 @@ Feature: comment
37 37 And I fill in "Title" with "Hey ho, let's go!"
38 38 And I fill in "Enter your comment" with "Hey ho, let's go!"
39 39 When I press "Post comment"
40   - Then I should see "Hey ho, let's go"
  40 + Then I should see "Hey ho, let"
41 41  
42 42 @selenium-fixme
43 43 Scenario: redirect to right place after comment a picture
... ...
features/events.feature
... ... @@ -160,6 +160,7 @@ Feature: events
160 160 When I am on /search/events
161 161 Then I should see "Colivre.net's Events"
162 162  
  163 +
163 164 @selenium
164 165 Scenario: published events should be listed in the agenda too
165 166 Given the following community
... ...
lib/noosfero/plugin.rb
... ... @@ -138,11 +138,12 @@ class Noosfero::Plugin
138 138 filters = [filters]
139 139 end
140 140 filters.each do |plugin_filter|
  141 + plugin_filter[:options] ||= {}
  142 + plugin_filter[:options][:if] = -> { environment.plugin_enabled? plugin.module_name }
  143 +
141 144 filter_method = "#{plugin.identifier}_#{plugin_filter[:method_name]}".to_sym
142   - controller_class.send(plugin_filter[:type], filter_method, (plugin_filter[:options] || {}))
143   - controller_class.send(:define_method, filter_method) do
144   - instance_exec(&plugin_filter[:block]) if environment.plugin_enabled?(plugin)
145   - end
  145 + controller_class.send plugin_filter[:type], filter_method, plugin_filter[:options]
  146 + controller_class.send :define_method, filter_method, &plugin_filter[:block]
146 147 end
147 148 end
148 149  
... ...
lib/noosfero/plugin/parent_methods.rb
... ... @@ -11,6 +11,10 @@ class Noosfero::Plugin
11 11 @identifier ||= (if self.parents.first.instance_of? Module then self.parents.first else self end).name.underscore
12 12 end
13 13  
  14 + def module_name
  15 + @name ||= (if self.parents.first != Object then self.parents.first else self end).to_s
  16 + end
  17 +
14 18 def public_name
15 19 @public_name ||= self.identifier.gsub '_plugin', ''
16 20 end
... ...
lib/noosfero/scheduler/defer.rb 0 → 100644
... ... @@ -0,0 +1,95 @@
  1 +# based on https://github.com/discourse/discourse/blob/master/lib/scheduler/defer.rb
  2 +
  3 +module Scheduler
  4 + module Deferrable
  5 + def initialize
  6 + # FIXME: do some other way when not using Unicorn
  7 + @async = (not Rails.env.test?) and defined? Unicorn
  8 + @queue = Queue.new
  9 + @mutex = Mutex.new
  10 + @paused = false
  11 + @thread = nil
  12 + end
  13 +
  14 + def pause
  15 + stop!
  16 + @paused = true
  17 + end
  18 +
  19 + def resume
  20 + @paused = false
  21 + end
  22 +
  23 + # for test
  24 + def async= val
  25 + @async = val
  26 + end
  27 +
  28 + def later desc = nil, &blk
  29 + if @async
  30 + start_thread unless (@thread && @thread.alive?) || @paused
  31 + @queue << [blk, desc]
  32 + else
  33 + blk.call
  34 + end
  35 + end
  36 +
  37 + def stop!
  38 + @thread.kill if @thread and @thread.alive?
  39 + @thread = nil
  40 + end
  41 +
  42 + # test only
  43 + def stopped?
  44 + !(@thread and @thread.alive?)
  45 + end
  46 +
  47 + def do_all_work
  48 + while !@queue.empty?
  49 + do_work _non_block=true
  50 + end
  51 + end
  52 +
  53 + private
  54 +
  55 + def start_thread
  56 + @mutex.synchronize do
  57 + return if @thread && @thread.alive?
  58 + @thread = Thread.new do
  59 + while true
  60 + do_work
  61 + end
  62 + end
  63 + @thread.priority = -2
  64 + end
  65 + end
  66 +
  67 + # using non_block to match Ruby #deq
  68 + def do_work non_block=false
  69 + job, desc = @queue.deq non_block
  70 + begin
  71 + job.call
  72 + rescue => ex
  73 + ExceptionNotifier.notify_exception ex, message: "Running deferred code '#{desc}'"
  74 + end
  75 + rescue => ex
  76 + ExceptionNotifier.notify_exception ex, message: "Processing deferred code queue"
  77 + end
  78 + end
  79 +
  80 + class Defer
  81 +
  82 + module Unicorn
  83 + def process_client client
  84 + ::Scheduler::Defer.pause
  85 + super client
  86 + ::Scheduler::Defer.do_all_work
  87 + ::Scheduler::Defer.resume
  88 + end
  89 + end
  90 +
  91 + extend Deferrable
  92 + initialize
  93 + end
  94 +
  95 +end
... ...
lib/noosfero/version.rb
1 1 module Noosfero
2 2 PROJECT = 'noosfero'
3   - VERSION = '1.2~0'
  3 + VERSION = '1.2~rc1'
4 4 end
5 5  
6 6 root = File.expand_path(File.dirname(__FILE__) + '/../..')
... ...
lib/tasks/release.rake
... ... @@ -53,6 +53,8 @@ namespace :noosfero do
53 53 end
54 54  
55 55 AUTHORS_HEADER = <<EOF
  56 +This list is automatically generated at release time. Please do not change it.
  57 +
56 58 If you are not listed here, but should be, please write to the noosfero mailing
57 59 list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
58 60 (this list requires subscription to post, but since you are an author of
... ... @@ -82,7 +84,7 @@ EOF
82 84 begin
83 85 File.open("AUTHORS.md", 'w') do |output|
84 86 output.puts AUTHORS_HEADER
85   - output.puts `git log --no-merges --pretty=format:'%aN <%aE>' | sort | uniq`
  87 + output.puts `./script/authors`
86 88 output.puts AUTHORS_FOOTER
87 89 end
88 90 commit_changes(['AUTHORS.md'], 'Updating authors file') if !pendencies_on_authors[:ok]
... ...
plugins/analytics/Gemfile 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +gem 'slim'
  2 +
... ...
plugins/analytics/controllers/profile/analytics_plugin/time_on_page_controller.rb 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +class AnalyticsPlugin::TimeOnPageController < ProfileController
  2 +
  3 + before_filter :skip_page_view
  4 +
  5 + def page_load
  6 + # to avoid concurrency problems with the original deferred request, also defer this
  7 + Scheduler::Defer.later do
  8 + page_view = profile.page_views.where(request_id: params[:id]).first
  9 + page_view.request = request
  10 + page_view.page_load!
  11 + end
  12 +
  13 + render nothing: true
  14 + end
  15 +
  16 + def report
  17 + page_view = profile.page_views.where(request_id: params[:id]).first
  18 + page_view.request = request
  19 + page_view.increase_time_on_page!
  20 +
  21 + render nothing: true
  22 + end
  23 +
  24 + protected
  25 +
  26 + def skip_page_view
  27 + @analytics_skip_page_view = true
  28 + end
  29 +
  30 +end
... ...
plugins/analytics/db/migrate/20150715001149_init_analytics_plugin.rb 0 → 100644
... ... @@ -0,0 +1,47 @@
  1 +class InitAnalyticsPlugin < ActiveRecord::Migration
  2 +
  3 + def up
  4 + create_table :analytics_plugin_visits do |t|
  5 + t.integer :profile_id
  6 + end
  7 +
  8 + create_table :analytics_plugin_page_views do |t|
  9 + t.string :type
  10 + t.integer :visit_id
  11 + t.integer :track_id
  12 + t.integer :referer_page_view_id
  13 + t.string :request_id
  14 +
  15 + t.integer :user_id
  16 + t.integer :session_id
  17 + t.integer :profile_id
  18 +
  19 + t.text :url
  20 + t.text :referer_url
  21 +
  22 + t.text :user_agent
  23 + t.string :remote_ip
  24 +
  25 + t.datetime :request_started_at
  26 + t.datetime :request_finished_at
  27 + t.datetime :page_loaded_at
  28 + t.integer :time_on_page, default: 0
  29 +
  30 + t.text :data, default: {}.to_yaml
  31 + end
  32 + add_index :analytics_plugin_page_views, :request_id
  33 + add_index :analytics_plugin_page_views, :referer_page_view_id
  34 +
  35 + add_index :analytics_plugin_page_views, :user_id
  36 + add_index :analytics_plugin_page_views, :session_id
  37 + add_index :analytics_plugin_page_views, :profile_id
  38 + add_index :analytics_plugin_page_views, :url
  39 + add_index :analytics_plugin_page_views, [:user_id, :session_id, :profile_id, :url], name: :analytics_plugin_referer_find
  40 + end
  41 +
  42 + def down
  43 + drop_table :analytics_plugin_visits
  44 + drop_table :analytics_plugin_page_views
  45 + end
  46 +
  47 +end
... ...
plugins/analytics/lib/analytics_plugin.rb 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +module AnalyticsPlugin
  2 +
  3 + TimeOnPageUpdateInterval = 2.minutes * 1000
  4 +
  5 + extend Noosfero::Plugin::ParentMethods
  6 +
  7 + def self.plugin_name
  8 + I18n.t'analytics_plugin.lib.plugin.name'
  9 + end
  10 +
  11 + def self.plugin_description
  12 + I18n.t'analytics_plugin.lib.plugin.description'
  13 + end
  14 +
  15 +end
... ...
plugins/analytics/lib/analytics_plugin/base.rb 0 → 100644
... ... @@ -0,0 +1,43 @@
  1 +
  2 +class AnalyticsPlugin::Base < Noosfero::Plugin
  3 +
  4 + def body_ending
  5 + return unless profile and profile.analytics_enabled?
  6 + lambda do
  7 + render 'analytics_plugin/body_ending'
  8 + end
  9 + end
  10 +
  11 + def js_files
  12 + ['analytics'].map{ |j| "javascripts/#{j}" }
  13 + end
  14 +
  15 + def application_controller_filters
  16 + [{
  17 + type: 'around_filter', options: {}, block: -> &block do
  18 + request_started_at = Time.now
  19 + block.call
  20 + request_finished_at = Time.now
  21 +
  22 + return if @analytics_skip_page_view
  23 + return unless profile and profile.analytics_enabled?
  24 +
  25 + Scheduler::Defer.later 'analytics: register page view' do
  26 + page_view = profile.page_views.build request: request, profile_id: profile,
  27 + request_started_at: request_started_at, request_finished_at: request_finished_at
  28 +
  29 + unless profile.analytics_anonymous?
  30 + # FIXME: use session.id in Rails 4
  31 + session_id = Marshal.load(Base64.decode64 request['_session_id'])['session_id'] rescue nil
  32 + #session_id = request.session_options[:id]
  33 + page_view.user = user
  34 + page_view.session_id = session_id
  35 + end
  36 +
  37 + page_view.save!
  38 + end
  39 + end,
  40 + }]
  41 + end
  42 +
  43 +end
... ...
plugins/analytics/lib/ext/profile.rb 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +require_dependency 'profile'
  2 +require_dependency 'community'
  3 +
  4 +([Profile] + Profile.descendants).each do |subclass|
  5 +subclass.class_eval do
  6 +
  7 + has_many :visits, foreign_key: :profile_id, class_name: 'AnalyticsPlugin::Visit'
  8 + has_many :page_views, foreign_key: :profile_id, class_name: 'AnalyticsPlugin::PageView'
  9 +
  10 +end
  11 +end
  12 +
  13 +class Profile
  14 +
  15 + def analytics_settings attrs = {}
  16 + @analytics_settings ||= Noosfero::Plugin::Settings.new self, AnalyticsPlugin, attrs
  17 + attrs.each{ |a, v| @analytics_settings.send "#{a}=", v }
  18 + @analytics_settings
  19 + end
  20 + alias_method :analytics_settings=, :analytics_settings
  21 +
  22 + def analytics_enabled?
  23 + self.analytics_settings.enabled
  24 + end
  25 +
  26 + def analytics_anonymous?
  27 + self.analytics_settings.anonymous
  28 + end
  29 +
  30 +end
... ...
plugins/analytics/locales/en.yml 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +
  2 +en: &en
  3 + analytics_plugin:
  4 + lib:
  5 + plugin:
  6 + name: 'Access tracking'
  7 + description: 'Register the access of selected profiles'
  8 +
  9 +en-US:
  10 + <<: *en
  11 +
... ...
plugins/analytics/locales/pt.yml 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +
  2 +pt: &pt
  3 + analytics_plugin:
  4 + lib:
  5 + plugin:
  6 + name: 'Rastreio de accesso'
  7 + description: 'Registra o acesso de perfis selecionados'
  8 +
  9 +pt-BR:
  10 + <<: *pt
... ...
plugins/analytics/models/analytics_plugin/page_view.rb 0 → 100644
... ... @@ -0,0 +1,67 @@
  1 +class AnalyticsPlugin::PageView < ActiveRecord::Base
  2 +
  3 + serialize :data
  4 +
  5 + attr_accessible *self.column_names
  6 + attr_accessible :user, :profile
  7 +
  8 + attr_accessor :request
  9 + attr_accessible :request
  10 +
  11 + acts_as_having_settings field: :options
  12 +
  13 + belongs_to :visit, class_name: 'AnalyticsPlugin::Visit'
  14 + belongs_to :referer_page_view, class_name: 'AnalyticsPlugin::PageView'
  15 +
  16 + belongs_to :user, class_name: 'Person'
  17 + belongs_to :session, primary_key: :session_id, foreign_key: :session_id, class_name: 'Session'
  18 + belongs_to :profile
  19 +
  20 + validates_presence_of :visit
  21 + validates_presence_of :request, on: :create
  22 + validates_presence_of :url
  23 +
  24 + before_validation :extract_request_data, on: :create
  25 + before_validation :fill_referer_page_view, on: :create
  26 + before_validation :fill_visit, on: :create
  27 +
  28 + def request_duration
  29 + self.request_finished_at - self.request_started_at
  30 + end
  31 +
  32 + def page_load!
  33 + self.page_loaded_at = Time.now
  34 + self.update_column :page_loaded_at, self.page_loaded_at
  35 + end
  36 +
  37 + def increase_time_on_page!
  38 + now = Time.now
  39 + initial_time = self.page_loaded_at || self.request_finished_at
  40 + return unless now > initial_time
  41 +
  42 + self.time_on_page = now - initial_time
  43 + self.update_column :time_on_page, self.time_on_page
  44 + end
  45 +
  46 + protected
  47 +
  48 + def extract_request_data
  49 + self.url = self.request.url.sub /\/+$/, ''
  50 + self.referer_url = self.request.referer
  51 + self.user_agent = self.request.headers['User-Agent']
  52 + self.request_id = self.request.env['action_dispatch.request_id']
  53 + self.remote_ip = self.request.remote_ip
  54 + end
  55 +
  56 + def fill_referer_page_view
  57 + self.referer_page_view = AnalyticsPlugin::PageView.order('request_started_at DESC').
  58 + where(url: self.referer_url, session_id: self.session_id, user_id: self.user_id, profile_id: self.profile_id).first if self.referer_url.present?
  59 + end
  60 +
  61 + def fill_visit
  62 + self.visit = self.referer_page_view.visit if self.referer_page_view
  63 + self.visit ||= AnalyticsPlugin::Visit.new profile: profile
  64 + end
  65 +
  66 +end
  67 +
... ...
plugins/analytics/models/analytics_plugin/visit.rb 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +class AnalyticsPlugin::Visit < ActiveRecord::Base
  2 +
  3 + attr_accessible *self.column_names
  4 + attr_accessible :profile
  5 +
  6 + default_scope -> { includes :page_views }
  7 +
  8 + belongs_to :profile
  9 + has_many :page_views, class_name: 'AnalyticsPlugin::PageView', dependent: :destroy
  10 +
  11 +end
... ...
plugins/analytics/po/pt/analytics.po 0 → 100644
... ... @@ -0,0 +1,29 @@
  1 +# translation of analytic.po to portuguese
  2 +# Krishnamurti Lelis Lima Vieira Nunes <krishna@colivre.coop.br>, 2007.
  3 +# noosfero - Brazilian Portuguese translation
  4 +# Copyright (C) 2007,
  5 +# Forum Brasileiro de Economia Solidaria <http://www.fbes.org.br/>
  6 +# Copyright (C) 2007,
  7 +# Ynternet.org Foundation <http://www.ynternet.org/>
  8 +# This file is distributed under the same license as noosfero itself.
  9 +# Joenio Costa <joenio@colivre.coop.br>, 2008.
  10 +#
  11 +#
  12 +msgid ""
  13 +msgstr ""
  14 +"Project-Id-Version: 1.0-690-gcb6e853\n"
  15 +"POT-Creation-Date: 2015-03-05 12:10-0300\n"
  16 +"PO-Revision-Date: 2015-07-21 09:23-0300\n"
  17 +"Last-Translator: Michal Čihař <michal@cihar.com>\n"
  18 +"Language-Team: Portuguese <https://hosted.weblate.org/projects/noosfero"
  19 +"/plugin-solr/pt/>\n"
  20 +"Language: pt\n"
  21 +"MIME-Version: 1.0\n"
  22 +"Content-Type: text/plain; charset=UTF-8\n"
  23 +"Content-Transfer-Encoding: 8bit\n"
  24 +"Plural-Forms: nplurals=2; plural=n != 1;\n"
  25 +"X-Generator: Weblate 2.3-dev\n"
  26 +
  27 +msgid "Select the set of communities and users to track"
  28 +msgstr "Seleciona o conjunto de comunidades e usuários para rastrear"
  29 +
... ...
plugins/analytics/public/javascripts/analytics.js 0 → 100644
... ... @@ -0,0 +1,39 @@
  1 +analytics = {
  2 + requestId: '',
  3 +
  4 + timeOnPage: {
  5 + updateInterval: 0,
  6 + baseUrl: '',
  7 +
  8 + report: function() {
  9 + $.ajax(analytics.timeOnPage.baseUrl+'/report', {
  10 + type: 'POST', data: {id: analytics.requestId},
  11 + success: function(data) {
  12 +
  13 + analytics.timeOnPage.poll()
  14 + },
  15 + })
  16 + },
  17 +
  18 + poll: function() {
  19 + if (analytics.timeOnPage.updateInterval)
  20 + setTimeout(analytics.timeOnPage.report, analytics.timeOnPage.updateInterval)
  21 + },
  22 + },
  23 +
  24 + init: function() {
  25 + analytics.timeOnPage.poll()
  26 + },
  27 +
  28 + pageLoad: function() {
  29 + $.ajax(analytics.timeOnPage.baseUrl+'/page_load', {
  30 + type: 'POST', data: {id: analytics.requestId},
  31 + success: function(data) {
  32 + },
  33 + });
  34 + }
  35 +
  36 +};
  37 +
  38 +$(document).ready(analytics.pageLoad)
  39 +
... ...
plugins/analytics/test/functional/content_viewer_controller_test.rb 0 → 100644
... ... @@ -0,0 +1,48 @@
  1 +require 'test_helper'
  2 +require 'content_viewer_controller'
  3 +
  4 +class ContentViewerControllerTest < ActionController::TestCase
  5 +
  6 + def setup
  7 + @controller = ContentViewerController.new
  8 + @request = ActionController::TestRequest.new
  9 + @response = ActionController::TestResponse.new
  10 +
  11 + @environment = Environment.default
  12 + @environment.enabled_plugins += ['AnalyticsPlugin']
  13 + @environment.save!
  14 +
  15 + @user = create_user('testinguser').person
  16 + login_as @user.identifier
  17 +
  18 + @community = build Community, identifier: 'testcomm', name: 'test'
  19 + @community.analytics_settings.enabled = true
  20 + @community.analytics_settings.anonymous = false
  21 + @community.save!
  22 + @community.add_member @user
  23 + end
  24 +
  25 + should 'register page view correctly' do
  26 + @request.env['HTTP_REFERER'] = 'http://google.com'
  27 + first_url = 'http://test.host'
  28 + get :view_page, profile: @community.identifier, page: []
  29 + assert_equal 1, @community.page_views.count
  30 + assert_equal 1, @community.visits.count
  31 +
  32 + first_page_view = @community.page_views.order(:id).first
  33 + assert_equal @request.referer, first_page_view.referer_url
  34 +
  35 + @request.env['HTTP_REFERER'] = first_url
  36 + get :view_page, profile: @community.identifier, page: @community.articles.last.path.split('/')
  37 + assert_equal 2, @community.page_views.count
  38 + assert_equal 1, @community.visits.count
  39 +
  40 + second_page_view = @community.page_views.order(:id).last
  41 + assert_equal first_page_view, second_page_view.referer_page_view
  42 +
  43 + assert_equal @user, second_page_view.user
  44 +
  45 + assert second_page_view.request_duration > 0 and second_page_view.request_duration < 1
  46 + end
  47 +
  48 +end
... ...
plugins/analytics/views/analytics_plugin/_body_ending.html.slim 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +javascript:
  2 + analytics.timeOnPage.baseUrl = #{url_for(controller: 'analytics_plugin/time_on_page').to_json}
  3 + analytics.timeOnPage.updateInterval = #{AnalyticsPlugin::TimeOnPageUpdateInterval.to_json}
  4 + analytics.requestId = #{request.env['action_dispatch.request_id'].to_json}
  5 + analytics.init()
  6 +
... ...
plugins/comment_classification/po/fr/comment_classification.po
... ... @@ -7,8 +7,8 @@ msgstr &quot;&quot;
7 7 "Project-Id-Version: 1.1-166-gaf47713\n"
8 8 "Report-Msgid-Bugs-To: \n"
9 9 "POT-Creation-Date: 2015-06-01 17:26-0300\n"
10   -"PO-Revision-Date: 2015-03-07 12:26+0200\n"
11   -"Last-Translator: Tuux <tuxa@galaxie.eu.org>\n"
  10 +"PO-Revision-Date: 2015-07-03 00:34+0200\n"
  11 +"Last-Translator: Christophe DANIEL <papaeng@gmail.com>\n"
12 12 "Language-Team: French <https://hosted.weblate.org/projects/noosfero/plugin-"
13 13 "comment-classification/fr/>\n"
14 14 "Language: fr\n"
... ... @@ -16,7 +16,7 @@ msgstr &quot;&quot;
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n > 1;\n"
19   -"X-Generator: Weblate 2.3-dev\n"
  19 +"X-Generator: Weblate 2.4-dev\n"
20 20  
21 21 #: plugins/comment_classification/lib/comment_classification_plugin.rb:11
22 22 msgid "A plugin that allow classification of comments."
... ... @@ -80,7 +80,7 @@ msgstr &quot;Statuts&quot;
80 80  
81 81 #: plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb:7
82 82 msgid "Reason:"
83   -msgstr "Raison:"
  83 +msgstr "Raison :"
84 84  
85 85 #: plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb:1
86 86 msgid "Status for comment"
... ... @@ -121,7 +121,7 @@ msgstr &quot;Couleur&quot;
121 121  
122 122 #: plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb:8
123 123 msgid "Enable this label?"
124   -msgstr "Activer ce label?"
  124 +msgstr "Activer ce label ?"
125 125  
126 126 #: plugins/comment_classification/views/comment_classification_plugin_labels/edit.html.erb:1
127 127 msgid "Editing label %s"
... ... @@ -149,7 +149,7 @@ msgstr &quot;Label&quot;
149 149 #: plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb:11
150 150 #: plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb:10
151 151 msgid "Enabled"
152   -msgstr "Activé"
  152 +msgstr "Activé(e)"
153 153  
154 154 #: plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb:12
155 155 #: plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb:12
... ... @@ -162,7 +162,7 @@ msgstr &quot;Êtes-vous sûr(e) que vous voulez retirer ce label ?&quot;
162 162  
163 163 #: plugins/comment_classification/views/comment_classification_plugin_status/_form.html.erb:7
164 164 msgid "Enable this status?"
165   -msgstr "Activer ce statut?"
  165 +msgstr "Activer ce statut ?"
166 166  
167 167 #: plugins/comment_classification/views/comment_classification_plugin_status/edit.html.erb:1
168 168 msgid "Editing status %s"
... ... @@ -177,13 +177,12 @@ msgid &quot;(no status registered yet)&quot;
177 177 msgstr "(il n'y a pas de statut enregistré pour le moment)"
178 178  
179 179 #: plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb:11
180   -#, fuzzy
181 180 msgid "Reason enabled?"
182   -msgstr "%s n'était pas activé(e)"
  181 +msgstr "Raison activée ?"
183 182  
184 183 #: plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb:21
185 184 msgid "Are you sure you want to remove this status?"
186   -msgstr "Êtes-vous sûr(e) de vouloir supprimer ce statut?"
  185 +msgstr "Êtes-vous sûr(e) de vouloir supprimer ce statut ?"
187 186  
188 187 #: plugins/comment_classification/views/comment/comments_labels_select.html.erb:3
189 188 msgid "[Select ...]"
... ...
plugins/community_track/controllers/myprofile/community_track_plugin_myprofile_controller.rb
1 1 class CommunityTrackPluginMyprofileController < MyProfileController
2   - append_view_path File.join(File.dirname(__FILE__) + '/../../views')
3 2  
4 3 before_filter :allow_edit_track, :only => :save_order
5 4  
... ...
plugins/community_track/controllers/public/community_track_plugin_public_controller.rb
1 1 class CommunityTrackPluginPublicController < PublicController
2   - append_view_path File.join(File.dirname(__FILE__) + '/../../views')
3 2  
4 3 no_design_blocks
5 4  
... ...
plugins/community_track/lib/community_track_plugin/track.rb
... ... @@ -65,7 +65,8 @@ class CommunityTrackPlugin::Track &lt; Folder
65 65  
66 66 def category_name
67 67 category = categories.first
68   - category ? category.top_ancestor.name : ''
  68 + category = category.top_ancestor unless category.nil?
  69 + category.nil? ? '' : category.name
69 70 end
70 71  
71 72 def to_html(options = {})
... ...
plugins/community_track/test/functional/community_track_plugin_cms_controller_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
  1 +require_relative '../test_helper'
2 2  
3 3 # Re-raise errors caught by the controller.
4 4 class CmsController; def rescue_action(e) raise e end; end
... ...
plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
2   -
3   -class ContentViewerController
4   - append_view_path File.join(File.dirname(__FILE__) + '/../../views')
5   - def rescue_action(e)
6   - raise e
7   - end
8   -end
  1 +require_relative '../test_helper'
9 2  
  3 +class ContentViewerController; def rescue_action(e) raise e end; end
10 4 class ContentViewerControllerTest < ActionController::TestCase
11 5  
12 6 def setup
... ... @@ -87,32 +81,32 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
87 81 end
88 82  
89 83 should 'render a div with block id for track list block' do
90   - @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.last)
  84 + @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.first)
91 85 get :view_page, @step.url
92 86 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" }
93 87 end
94 88  
95 89 should 'render a div with block id for track card list block' do
96   - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last)
  90 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
97 91 get :view_page, @step.url
98 92 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" }
99 93 end
100 94  
101 95 should 'render tracks in track list block' do
102   - @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.last)
  96 + @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.first)
103 97 get :view_page, @step.url
104 98 assert_tag :tag => 'div', :attributes => { :class => "item category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'steps' }, :descendant => { :tag => 'span', :attributes => { :class => "step #{@block.status_class(@step)}" } } }
105 99 end
106 100  
107 101 should 'render tracks in track card list block' do
108   - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last)
  102 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
109 103 get :view_page, @step.url
110 104 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_content' } }
111 105 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_stats' } }
112 106 end
113 107  
114 108 should 'render link to display more tracks in track list block' do
115   - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last)
  109 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
116 110 (@block.limit+1).times { |i| create_track("track#{i}", @profile) }
117 111  
118 112 get :view_page, @step.url
... ... @@ -120,7 +114,7 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
120 114 end
121 115  
122 116 should 'render link to show all tracks in track list block' do
123   - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last)
  117 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
124 118 @block.more_another_page = true
125 119 @block.save!
126 120  
... ...
plugins/community_track/test/functional/community_track_plugin_environment_design_controller_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
  1 +require_relative '../test_helper'
2 2  
3 3 # Re-raise errors caught by the controller.
4 4 class EnvironmentDesignController; def rescue_action(e) raise e end; end
... ...
plugins/community_track/test/functional/community_track_plugin_myprofile_controller_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
2   -require File.dirname(__FILE__) + '/../../controllers/myprofile/community_track_plugin_myprofile_controller'
  1 +require_relative '../test_helper'
  2 +require_relative '../../controllers/myprofile/community_track_plugin_myprofile_controller'
3 3  
4 4 # Re-raise errors caught by the controller.
5 5 class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end; end
... ... @@ -7,10 +7,6 @@ class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end;
7 7 class CommunityTrackPluginMyprofileControllerTest < ActionController::TestCase
8 8  
9 9 def setup
10   - @controller = CommunityTrackPluginMyprofileController.new
11   - @request = ActionController::TestRequest.new
12   - @response = ActionController::TestResponse.new
13   -
14 10 @profile = fast_create(Community)
15 11 @track = create_track('track', @profile)
16 12  
... ...
plugins/community_track/test/functional/community_track_plugin_public_controller_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
2   -require File.dirname(__FILE__) + '/../../controllers/public/community_track_plugin_public_controller'
  1 +require_relative '../test_helper'
  2 +require_relative '../../controllers/public/community_track_plugin_public_controller'
3 3  
4 4 # Re-raise errors caught by the controller.
5 5 class CommunityTrackPluginPublicController; def rescue_action(e) raise e end; end
... ...
plugins/community_track/test/test_helper.rb
1   -require File.dirname(__FILE__) + '/../../../test/test_helper'
  1 +require_relative '../../../test/test_helper'
2 2  
3 3 def create_track(name, profile)
4 4 track = CommunityTrackPlugin::Track.new(:abstract => 'abstract', :body => 'body', :name => name, :profile => profile)
... ...
plugins/community_track/test/unit/article_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
  1 +require_relative '../test_helper'
2 2  
3 3 class ArticleTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/activation_job_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class ActivationJobTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/step_helper_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class StepHelperTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/step_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class StepTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/track_card_list_block_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class TrackCardListBlockTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/track_helper_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class TrackHelperTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class TrackListBlockTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin/track_test.rb
1   -require File.dirname(__FILE__) + '/../../test_helper'
  1 +require_relative '../../test_helper'
2 2  
3 3 class TrackTest < ActiveSupport::TestCase
4 4  
... ...
plugins/community_track/test/unit/community_track_plugin_test.rb
1   -require File.dirname(__FILE__) + '/../test_helper'
  1 +require_relative '../test_helper'
2 2  
3 3 class CommunityTrackPluginTest < ActiveSupport::TestCase
4 4  
... ...
plugins/custom_forms/po/fr/custom_forms.po
... ... @@ -7,8 +7,8 @@ msgstr &quot;&quot;
7 7 "Project-Id-Version: 1.1-166-gaf47713\n"
8 8 "Report-Msgid-Bugs-To: \n"
9 9 "POT-Creation-Date: 2015-06-01 17:26-0300\n"
10   -"PO-Revision-Date: 2015-02-23 11:38+0200\n"
11   -"Last-Translator: Michal Čihař <michal@cihar.com>\n"
  10 +"PO-Revision-Date: 2015-07-03 00:36+0200\n"
  11 +"Last-Translator: Christophe DANIEL <papaeng@gmail.com>\n"
12 12 "Language-Team: French <https://hosted.weblate.org/projects/noosfero/plugin-"
13 13 "custom-forms/fr/>\n"
14 14 "Language: fr\n"
... ... @@ -16,17 +16,16 @@ msgstr &quot;&quot;
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n > 1;\n"
19   -"X-Generator: Weblate 2.3-dev\n"
  19 +"X-Generator: Weblate 2.4-dev\n"
20 20  
21 21 #: plugins/custom_forms/lib/custom_forms_plugin/form.rb:67
22 22 msgid "Invalid string format of access."
23   -msgstr ""
  23 +msgstr "Format de chaîne d'accès non valide."
24 24  
25 25 #: plugins/custom_forms/lib/custom_forms_plugin/form.rb:71
26 26 #: plugins/custom_forms/lib/custom_forms_plugin/form.rb:76
27   -#, fuzzy
28 27 msgid "There is no profile with the provided id."
29   -msgstr "Il y a un problème avec les lignes suivantes : "
  28 +msgstr "Il n'y a pas le profil avec l'ID fourni."
30 29  
31 30 #: plugins/custom_forms/lib/custom_forms_plugin/form.rb:81
32 31 msgid "Invalid type format of access."
... ... @@ -64,9 +63,8 @@ msgstr &quot;%{fn} est obligatoire&quot;
64 63  
65 64 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:14
66 65 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:47
67   -#, fuzzy
68 66 msgid "Logged users"
69   -msgstr "Connecté en tant que %s"
  67 +msgstr "Utilisateurs connectés"
70 68  
71 69 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:19
72 70 #, fuzzy
... ... @@ -213,7 +211,7 @@ msgstr &quot;Une entreprise&quot;
213 211  
214 212 #: plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb:29
215 213 msgid "Ok"
216   -msgstr ""
  214 +msgstr "Ok"
217 215  
218 216 #: plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_alternative.html.erb:10
219 217 #, fuzzy
... ...
plugins/display_content/po/fr/display_content.po
... ... @@ -7,8 +7,8 @@ msgstr &quot;&quot;
7 7 "Project-Id-Version: 1.1-166-gaf47713\n"
8 8 "Report-Msgid-Bugs-To: \n"
9 9 "POT-Creation-Date: 2015-06-01 17:26-0300\n"
10   -"PO-Revision-Date: 2015-03-07 02:11+0200\n"
11   -"Last-Translator: Tuux <tuxa@galaxie.eu.org>\n"
  10 +"PO-Revision-Date: 2015-07-03 00:31+0200\n"
  11 +"Last-Translator: Christophe DANIEL <papaeng@gmail.com>\n"
12 12 "Language-Team: French <https://hosted.weblate.org/projects/noosfero/plugin-"
13 13 "display-content/fr/>\n"
14 14 "Language: fr\n"
... ... @@ -16,14 +16,14 @@ msgstr &quot;&quot;
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n > 1;\n"
19   -"X-Generator: Weblate 2.3-dev\n"
  19 +"X-Generator: Weblate 2.4-dev\n"
20 20  
21 21 #: plugins/display_content/lib/display_content_plugin.rb:10
22 22 msgid ""
23 23 "A plugin that adds a block where you could choose any of your content and "
24 24 "display it."
25 25 msgstr ""
26   -"Un greffon qui permet d'ajouter une zone ou vous pourrez y afficher le "
  26 +"Un plugin qui permet d'ajouter une zone ou vous pourrez y afficher le "
27 27 "contenue de votre choix."
28 28  
29 29 #: plugins/display_content/lib/display_content_block.rb:34
... ... @@ -48,33 +48,33 @@ msgstr &quot;Résumé&quot;
48 48  
49 49 #: plugins/display_content/lib/display_content_block.rb:151
50 50 msgid "Read more"
51   -msgstr "En lire plus"
  51 +msgstr "Lire plus"
52 52  
53 53 #: plugins/display_content/lib/display_content_block.rb:194
54 54 msgid "%{month}/%{day}/%{year}"
55   -msgstr "%{mois}/%{jour}/%{année}"
  55 +msgstr "%{day}/%{month}/%{year}"
56 56  
57 57 #: plugins/display_content/lib/display_content_block.rb:194
58 58 msgid "%{month}/%{day}"
59   -msgstr "%{mois}/%{jour}"
  59 +msgstr "%{day}/%{month}"
60 60  
61 61 #: plugins/display_content/lib/display_content_block.rb:197
62 62 msgid "%{month_name} %{day}, %{year}"
63   -msgstr "%{nom_du_mois} %{jour}, %{année}"
  63 +msgstr "%{day} %{month_name} %{year}"
64 64  
65 65 #: plugins/display_content/lib/display_content_block.rb:197
66 66 msgid "%{month_name} %{day}"
67   -msgstr "%{nom_du_mois} %{jour}"
  67 +msgstr "%{day} %{month_name}"
68 68  
69 69 #: plugins/display_content/views/box_organizer/_display_content_block.html.erb:5
70 70 msgid "Choose which attributes should be displayed and drag to reorder them:"
71 71 msgstr ""
72 72 "Choisissez quels attribues doivent êtres afficher et glisser/déposer pour "
73   -"les réorganiser:"
  73 +"les réorganiser :"
74 74  
75 75 #: plugins/display_content/views/box_organizer/_display_content_block.html.erb:21
76 76 msgid "Choose which content should be displayed:"
77   -msgstr "Choisissez le contenu à afficher:"
  77 +msgstr "Choisissez le contenu à afficher :"
78 78  
79 79 #: plugins/display_content/views/box_organizer/_display_content_block.html.erb:23
80 80 msgid "Choose directly"
... ... @@ -86,7 +86,7 @@ msgstr &quot;Choisir par type de contenu&quot;
86 86  
87 87 #: plugins/display_content/views/box_organizer/_display_content_block.html.erb:28
88 88 msgid "Order by:"
89   -msgstr "Trier par:"
  89 +msgstr "Trier par :"
90 90  
91 91 #: plugins/display_content/views/box_organizer/_display_content_block.html.erb:29
92 92 msgid "Most recent"
... ... @@ -98,7 +98,7 @@ msgstr &quot;Le plus ancien&quot;
98 98  
99 99 #: plugins/display_content/views/box_organizer/_choose_by_content_type.html.erb:1
100 100 msgid "Display content types:"
101   -msgstr "Afficher le types de contenue:"
  101 +msgstr "Afficher le type de contenu :"
102 102  
103 103 #: plugins/display_content/views/box_organizer/_choose_by_content_type.html.erb:7
104 104 msgid "more"
... ... @@ -106,9 +106,8 @@ msgstr &quot;plus&quot;
106 106  
107 107 #: plugins/display_content/views/box_organizer/_choose_directly.html.erb:5
108 108 msgid "Dinamically load children of selected folders"
109   -msgstr ""
110   -"Dynamiquement charger les sous répertoires des répertoires sélectionnés"
  109 +msgstr "charger dynamiquement les sous répertoires des répertoires sélectionnés"
111 110  
112 111 #: plugins/display_content/views/box_organizer/_choose_directly.html.erb:9
113 112 msgid "Limit:"
114   -msgstr "Limite:"
  113 +msgstr "Limite :"
... ...
plugins/event/lib/event_plugin/event_block.rb
... ... @@ -26,8 +26,8 @@ class EventPlugin::EventBlock &lt; Block
26 26 end
27 27  
28 28 def events(user = nil)
29   - events = events_source.events
30   - events = events.published.order('start_date')
  29 + events = events_source.events.order('start_date')
  30 + events = user.nil? ? events.public : events.display_filter(user,nil)
31 31  
32 32 if future_only
33 33 events = events.where('start_date >= ?', Date.today)
... ...
plugins/event/test/test_helper.rb 0 → 100644
... ... @@ -0,0 +1 @@
  1 +require_relative '../../../test/test_helper'
... ...
plugins/event/test/unit/event_block_test.rb
1   -require File.dirname(__FILE__) + '/../../../../test/test_helper'
  1 +require_relative '../test_helper'
2 2  
3   -class EventPlugin::EventBlockTest < ActiveSupport::TestCase
  3 +class EventBlockTest < ActiveSupport::TestCase
4 4  
5 5 def setup
6 6 @env = Environment.default
... ... @@ -165,7 +165,7 @@ class EventPlugin::EventBlockTest &lt; ActiveSupport::TestCase
165 165  
166 166 def visibility_content_test_from_a_profile(profile)
167 167 @block.box.owner = @env
168   - ev = fast_create Event, :name => '2 de Julho', :profile_id => profile.id
  168 + ev = Event.create!(:name => '2 de Julho', :profile => profile)
169 169 @block.all_env_events = true
170 170  
171 171 # Do not list event from private profile for non logged visitor
... ...
plugins/event/test/unit/event_plugin_test.rb
1   -require File.dirname(__FILE__) + '/../../../../test/test_helper'
  1 +require_relative '../test_helper'
2 2  
3 3 class EventPluginTest < ActiveSupport::TestCase
4 4  
... ...
plugins/lattes_curriculum/features/lattes_curriculum.feature
... ... @@ -29,7 +29,7 @@ Feature: import lattes information
29 29 And I fill in "Lattes URL" with "http://lattes.cnpq.br/2864976228727880"
30 30 And I press "Save"
31 31 And I go to /profile/admin_user#lattes_tab
32   - Then I should see "Endereço para acessar este CV: http://lattes.cnpq.br/2864976228727880"
  32 + Then I should see "Lattes"
33 33  
34 34 Scenario: Don't show lattes informations for blank lattes urls
35 35 Given I am on admin_user's control panel
... ...
plugins/lattes_curriculum/lib/html_parser.rb
... ... @@ -19,6 +19,8 @@ class Html_parser
19 19 page = _("Lattes not found. Please, make sure the informed URL is correct.")
20 20 rescue Timeout::Error => e
21 21 page = _("Lattes Platform is unreachable. Please, try it later.")
  22 + rescue
  23 + page = _("Could not import the lattes")
22 24 end
23 25 end
24 26  
... ...
plugins/lattes_curriculum/test/unit/html_parser_test.rb
... ... @@ -12,13 +12,4 @@ class HtmlParserTest &lt; ActiveSupport::TestCase
12 12 should 'be not nil the instance' do
13 13 assert_not_nil @parser
14 14 end
15   -
16   - should 'be not nil the return get_html' do
17   - result = @parser.get_html("http://lattes.cnpq.br/2193972715230641")
18   - assert result.include?("Endereço para acessar este CV")
19   - end
20   -
21   - should 'inform that lattes was not found' do
22   - assert_equal "Lattes not found. Please, make sure the informed URL is correct.", @parser.get_html("http://lattes.cnpq.br/123")
23   - end
24 15 end
... ...
plugins/metadata/lib/ext/product.rb
... ... @@ -7,7 +7,7 @@ class Product
7 7 url: proc{ |p, plugin| plugin.og_url_for p.url },
8 8 gr_hascurrencyvalue: proc{ |p, plugin| p.price.to_f },
9 9 gr_hascurrency: proc{ |p, plugin| p.environment.currency_unit },
10   - title: proc{ |a, plugin| "#{p.name} - #{p.profile.name}" },
  10 + title: proc{ |p, plugin| "#{p.name} - #{p.profile.name}" if p },
11 11 description: proc{ |p, plugin| ActionView::Base.full_sanitizer.sanitize p.description },
12 12  
13 13 image: proc{ |p, plugin| "#{p.environment.top_url}#{p.image.public_filename}" if p.image },
... ... @@ -17,7 +17,7 @@ class Product
17 17  
18 18 see_also: [],
19 19 site_name: proc{ |p, plugin| plugin.og_url_for p.profile.url },
20   - updated_time: proc{ |p, plugin| p.updated_at.iso8601 },
  20 + updated_time: proc{ |p, plugin| p.updated_at.iso8601 if p.updated_at },
21 21  
22 22 'locale:locale' => proc{ |p, plugin| p.environment.default_language },
23 23 'locale:alternate' => proc{ |p, plugin| p.environment.languages - [p.environment.default_language] if p.environment.languages },
... ...
plugins/metadata/test/functional/home_controller_test.rb
... ... @@ -12,7 +12,7 @@ class HomeControllerTest &lt; ActionController::TestCase
12 12 @response = ActionController::TestResponse.new
13 13  
14 14 Noosfero::Plugin.stubs(:all).returns([MetadataPlugin.name])
15   - Noosfero::Plugin::Manager.any_instance.stubs(:enabled_plugins).returns([MetadataPlugin.new])
  15 + Noosfero::Plugin::Manager.any_instance.stubs(:enabled_plugins).returns([MetadataPlugin.new(@controller)])
16 16 end
17 17  
18 18 should 'display meta tags for social media' do
... ...
plugins/metadata/test/functional/manage_products_controller_test.rb 0 → 100644
... ... @@ -0,0 +1,27 @@
  1 +require 'test_helper'
  2 +require 'home_controller'
  3 +
  4 +# Re-raise errors caught by the controller.
  5 +class ManageProductsController; def rescue_action(e) raise e end; end
  6 +
  7 +class ManageProductsControllerTest < ActionController::TestCase
  8 +
  9 + def setup
  10 + @controller = ManageProductsController.new
  11 + @request = ActionController::TestRequest.new
  12 + @response = ActionController::TestResponse.new
  13 + @enterprise = fast_create(Enterprise, name: 'test', identifier: 'test_ent')
  14 + @user = create_user_with_permission('test_user', 'manage_products', @enterprise)
  15 + @environment = @enterprise.environment
  16 + @environment.enable('products_for_enterprises')
  17 + login_as :test_user
  18 +
  19 + Noosfero::Plugin.stubs(:all).returns([MetadataPlugin.name])
  20 + Noosfero::Plugin::Manager.any_instance.stubs(:enabled_plugins).returns([MetadataPlugin.new(@controller)])
  21 + end
  22 +
  23 + should "not crash on new products" do
  24 + get :new, profile: @enterprise.identifier
  25 + end
  26 +
  27 +end
... ...
plugins/people_block/lib/friends_block.rb
... ... @@ -17,7 +17,7 @@ class FriendsBlock &lt; PeopleBlockBase
17 17 end
18 18  
19 19 def suggestions
20   - owner.profile_suggestions.of_person.enabled.limit(3).includes(:suggestion)
  20 + owner.suggested_profiles.of_person.enabled.limit(3).includes(:suggestion)
21 21 end
22 22  
23 23 def footer
... ...
plugins/people_block/po/fr/people_block.po
... ... @@ -7,63 +7,55 @@ msgstr &quot;&quot;
7 7 "Project-Id-Version: 1.1-166-gaf47713\n"
8 8 "Report-Msgid-Bugs-To: \n"
9 9 "POT-Creation-Date: 2015-06-01 17:26-0300\n"
10   -"PO-Revision-Date: 2014-12-12 14:22+0200\n"
11   -"Last-Translator: Michal Čihař <michal@cihar.com>\n"
12   -"Language-Team: French <https://hosted.weblate.org/projects/noosfero/noosfero/"
13   -"fr/>\n"
  10 +"PO-Revision-Date: 2015-07-03 00:41+0200\n"
  11 +"Last-Translator: Christophe DANIEL <papaeng@gmail.com>\n"
  12 +"Language-Team: French <https://hosted.weblate.org/projects/noosfero/plugin-"
  13 +"people-block/fr/>\n"
14 14 "Language: fr\n"
15 15 "MIME-Version: 1.0\n"
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n > 1;\n"
19   -"X-Generator: Weblate 2.2-dev\n"
  19 +"X-Generator: Weblate 2.4-dev\n"
20 20  
21 21 #: plugins/people_block/lib/friends_block.rb:8
22   -#, fuzzy
23 22 msgid "Clicking a friend takes you to his/her homepage"
24 23 msgstr "Cliquer sur une personne vous amène à sa page personnelle"
25 24  
26 25 #: plugins/people_block/lib/friends_block.rb:12
27   -#, fuzzy
28 26 msgid "{#} friend"
29 27 msgid_plural "{#} friends"
30   -msgstr[0] "contacts"
31   -msgstr[1] "contacts"
  28 +msgstr[0] "{#} ami"
  29 +msgstr[1] "{#} amis"
32 30  
33 31 #: plugins/people_block/lib/people_block_base.rb:9
34   -#, fuzzy
35 32 msgid "Random people"
36   -msgstr "Trouver des personnes"
  33 +msgstr "Personnes au hasard"
37 34  
38 35 #: plugins/people_block/lib/people_block_base.rb:17
39 36 #: plugins/people_block/lib/people_block.rb:12
40   -#, fuzzy
41 37 msgid "{#} People"
42   -msgstr "Personnes"
  38 +msgstr "{#} Personne"
43 39  
44 40 #: plugins/people_block/lib/members_block.rb:11
45   -#, fuzzy
46 41 msgid "Clicking a member takes you to his/her homepage"
47   -msgstr "Cliquer sur une personne vous amène à sa page personnelle"
  42 +msgstr "Cliquer sur un membre vous amène à sa page personnelle"
48 43  
49 44 #: plugins/people_block/lib/members_block.rb:15
50   -#, fuzzy
51 45 msgid "members"
52   -msgstr "Membres"
  46 +msgstr "membres"
53 47  
54 48 #: plugins/people_block/lib/members_block.rb:16
55   -#, fuzzy
56 49 msgid "{#} %s"
57   -msgstr "%{num} groupes"
  50 +msgstr "{#} %s"
58 51  
59 52 #: plugins/people_block/lib/members_block.rb:42
60 53 msgid "Show join leave button"
61   -msgstr ""
  54 +msgstr "Afficher le bouton quitter"
62 55  
63 56 #: plugins/people_block/lib/people_block_plugin.rb:8
64   -#, fuzzy
65 57 msgid "A plugin that adds a people block"
66   -msgstr "Un bloc qui affiche vos groupes"
  58 +msgstr "Un plugin qui ajoute un bloc de personnes"
67 59  
68 60 #: plugins/people_block/lib/people_block.rb:8
69 61 msgid "Clicking a person takes you to his/her homepage"
... ... @@ -71,17 +63,16 @@ msgstr &quot;Cliquer sur une personne vous amène à sa page personnelle&quot;
71 63  
72 64 #: plugins/people_block/views/box_organizer/_people_block_base.html.erb:6
73 65 msgid "Filter by role:"
74   -msgstr ""
  66 +msgstr "Filtrer par rôle :"
75 67  
76 68 #: plugins/people_block/views/blocks/friends.html.erb:1
77   -#, fuzzy
78 69 msgid "friends|View all"
79 70 msgstr "Voir tout"
80 71  
81 72 #: plugins/people_block/views/blocks/friends.html.erb:5
82 73 msgid "Some suggestions for you"
83   -msgstr ""
  74 +msgstr "Quelques suggestions pour vous"
84 75  
85 76 #: plugins/people_block/views/blocks/friends.html.erb:10
86 77 msgid "See all suggestions"
87   -msgstr ""
  78 +msgstr "Voir toutes les suggestions"
... ...
plugins/people_block/test/functional/profile_controller_test.rb
... ... @@ -17,8 +17,8 @@ class ProfileControllerTest &lt; ActionController::TestCase
17 17 login_as(user.login)
18 18 owner = user.person
19 19  
20   - suggestion1 = owner.profile_suggestions.create(:suggestion => fast_create(Person))
21   - suggestion2 = owner.profile_suggestions.create(:suggestion => fast_create(Person))
  20 + suggestion1 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner)
  21 + suggestion2 = ProfileSuggestion.create!(:suggestion => fast_create(Person), :person => owner)
22 22  
23 23 FriendsBlock.delete_all
24 24 block = FriendsBlock.new
... ...