Commit Graph

13615 Commits

Author SHA1 Message Date
rgarcia
a910eb69cd removes stats controller spec deprecation warning 2019-04-17 17:40:55 +02:00
rgarcia
bca824b759 removes controller spec deprecation warnings 2019-04-17 17:40:55 +02:00
Juanjo Bazán
0f34cae2ad updates specs to new keyword styles 2019-04-17 17:40:55 +02:00
rgarcia
b62eff841c Fix symbolize_keys deprectation warning
DEPRECATION WARNING: Method symbolize_keys is deprecated and will be
removed in Rails 5.1, as `ActionController::Parameters` no longer
inherits from hash. Using this deprecated behavior exposes potential
security problems. If you continue to use this method you may be
creating a security vulnerability in your app that can be exploited.
Instead, consider using one of these documented methods which are not
deprecated:
http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.ht
ml (called from csv_params at
/home/travis/build/consul/consul/app/helpers/budgets_helper.rb:15)
2019-04-17 17:40:55 +02:00
Angel Perez
7ddbf5ff35 Use separator key when parameterizing arguments 2019-04-17 17:40:55 +02:00
Angel Perez
cb1ed017f9 Use separator key when parameterizing arguments 2019-04-17 17:40:55 +02:00
rgarcia
90bcfe7a78 Fix parameterise deprecation warning
DEPRECATION WARNING: Passing the separator argument as a positional
parameter is deprecated and will soon be removed. Use `separator: '_'`
instead. (called from followable_translation_key at
/home/travis/build/consul/consul/app/controllers/follows_controller.rb:2
5)
2019-04-17 17:40:55 +02:00
rgarcia
f23fd6f3bb Remove parameterise deprecation warning
DEPRECATION WARNING: Passing the separator argument as a positional
parameter is deprecated and will soon be removed. Use `separator: '_'`
instead.
2019-04-17 17:40:55 +02:00
rgarcia
c6ab5dbe1b Remove before_filter deprecation warning
DEPRECATION WARNING: before_filter is deprecated and will be removed in
Rails 5.1. Use before_action instead. (called from
<class:RegistrationsController> at
/home/travis/build/consul/consul/app/controllers/users/registrations_con
troller.rb:3)
2019-04-17 17:40:55 +02:00
rgarcia
b2b418284d Fix ActiveModel::Errors#[]= deprecation warning
DEPRECATION WARNING: ActiveModel::Errors#[]= is deprecated and will be
removed in Rails 5.1. Use model.errors.add(:attachment, "content type
image/png does not match any of accepted content types pdf") instead.
(called from validate_attachment_content_type at
/home/travis/build/consul/consul/app/models/document.rb:92)
2019-04-17 17:40:55 +02:00
Julian Herrero
f668317cc1 Use #data_source_exists? instead of #table_exists?
DEPRECATION WARNING: #table_exists? currently checks both tables and
views. This behavior is deprecated and will be changed with Rails 5.1
to only check tables. Use #data_source_exists? instead.
2019-04-17 17:40:55 +02:00
alejandro
b7a9995b38 fixes deprecation warning relate to raise_in_transactional_callbacks
As described in
http://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-notable-changes
2019-04-17 17:40:55 +02:00
rgarcia
930fc58173 fixes lock specs 2019-04-17 17:40:55 +02:00
rgarcia
a4f0161aa8 fixes specs related to ActionController params 2019-04-17 17:40:55 +02:00
alejandro
bafab3b769 fixes some deprecation warnings 2019-04-17 17:40:52 +02:00
Julian Nicolas Herrero
ad10a8e86b Merge pull request #3443 from consul/fix_bug_admin_print_investments
Fix bug moderator can't print voted investments in balloting phase
2019-04-17 17:31:12 +02:00
Raimond Garcia
da23468f0f Merge pull request #3441 from consul/spending_proposals_check_rake
Add rake task to check for spending proposals
2019-04-17 16:52:51 +02:00
voodoorai2000
e47a8be2a2 Add more log messages 2019-04-17 16:51:13 +02:00
voodoorai2000
aa04757e16 Add rake task to check for spending proposals 2019-04-17 16:50:32 +02:00
Raimond Garcia
d16c9b0b9c Merge pull request #3440 from consul/contributing
Update core team members, contributors and alumni
2019-04-17 16:48:23 +02:00
Julian Herrero
7e422f2187 Fix bug management print voted investments
If budget is in balloting phase and there are voted investments, it
was not possible to print budgets investments because the ballot was
never being loaded in the controller and therefore an error was raised
when rendering the view.

Failure/Error: <% if ballot.has_investment?(investment) %>

  ActionView::Template::Error:
    undefined method `has_investment?' for nil:NilClass
      app/views/budgets/investments/_ballot.html.erb:3
      app/views/budgets/investments/_investment.html.erb:88
      app/views/custom/management/budgets/investments/print.html.erb:26
2019-04-17 14:19:32 +02:00
Julian Herrero
e714713d0c Refactor long lines
Also, use method `have_link' instead of `have_css' to make tests more
readable
2019-04-17 14:18:35 +02:00
Julian Herrero
879591cc5c Use let instead of an instance variable 2019-04-17 14:16:54 +02:00
Julian Herrero
73ae74b2b1 Allow method to pass a user for login 2019-04-17 14:16:46 +02:00
voodoorai2000
14d8af3a06 Update CONTRIBUTING_ES.md 2019-04-16 17:38:23 +02:00
rgarcia
1077a632cb permits parameters in urls 2019-04-16 17:28:07 +02:00
Julian Herrero
dc88212b75 Remove Budget::Phase overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.

Since module Sanitizable takes care of traslations, it's enough to
include the module in order to correctly sanitize the description.
2019-04-16 17:28:07 +02:00
Julian Herrero
aa0b48badd Remove Budget::Heading overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.

Another way to properly load our custom Milestone::Translation class is
to place it inside parent model class.
2019-04-16 17:28:07 +02:00
Julian Herrero
9a15f3d160 Remove Budget overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.

Another way to properly load our custom Milestone::Translation class is
to place it inside parent model class.
2019-04-16 17:28:07 +02:00
Julian Herrero
e104369b67 Remove Budget::Group overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.

Another way to properly load our custom Translation class is
to place it inside parent model class.
2019-04-16 17:28:07 +02:00
Julian Herrero
01a9ba4a87 Remove ProgressBar overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.
2019-04-16 17:28:07 +02:00
Senén Rodero Rodríguez
700f271a36 Remove milestone overrided translation class
Since Globalize gem update to v5.2.0 we cannot override translations
anymore in the same way that before the update. Milestone::Translation
class removed in this commit were no longer loaded correctly when
translation class is retrieved by translation_class method provided by
Globalize. Here is the diff between both gem versions:

https://github.com/globalize/globalize/compare/v5.0.0...v5.2.0#diff-a1370b109e0dd567545b072bc6447b8fR51

This problem is not happening on test environment but is throwing an
exception in other environments as it has not loaded the delegation
definition inside our custom translation class.

To fix this we added a new class method inside globalizable model
concern to allow to define method delegation on translations classes from
parent globalizable classes when needed without having to override
Translation classes.

Another way to properly load our custom Milestone::Translation class is
to place it inside parent model class, like the example below:

class Milestone
...

  class Translation
    delegate :status_id, to: :globalized_model
  end
end

Or maybe monkey patching translation_class method from globalize gem
to make it find our custom translation class. I don't like this option.
2019-04-16 17:28:07 +02:00
rgarcia
d8fdc10ed6 fixes activity specs 2019-04-16 17:28:07 +02:00
Juanjo Bazán
f740a868f5 fixes specs with current devise response implementation 2019-04-16 17:28:07 +02:00
alejandro
2de51d1888 Changes autorize path method.
Devise api changed autorize path method
2019-04-16 17:28:07 +02:00
rgarcia
4bce38bd64 Fix deprecated devise syntax
https://stackoverflow.com/questions/37341967/rails-5-undefined-method-fo
r-for-devise-on-line-devise-parameter-sanitizer
2019-04-16 17:28:07 +02:00
Angel Perez
25f104d2dd Fix deprecation warning for .uniq usage 2019-04-16 17:28:07 +02:00
rgarcia
c979cc7411 Fix uniq deprecation warning
DEPRECATION WARNING: uniq is deprecated and will be removed from Rails
5.1 (use distinct instead) (called from block in <class:User> at
/home/travis/build/consul/consul/app/models/user.rb:67)
2019-04-16 17:28:07 +02:00
alejandro
4c5d58448e fixes deprecation warning for uniq 2019-04-16 17:28:07 +02:00
alejandro
596ff77ec1 replaces uniq with distinct
Uniq is deprecated
2019-04-16 17:28:07 +02:00
alejandro
935b41154f removes configurations and settings for devise-async 2019-04-16 17:28:07 +02:00
alejandro
84338592da removes devise-async for delayed devise emails
Custom overwrite of the devise implementation following
https://github.com/plataformatec/devise#activejob-integration
2019-04-16 17:28:07 +02:00
rgarcia
23fcd78e6c removes uniq deprecation warning 2019-04-16 17:28:07 +02:00
rgarcia
7e3eb4a6fc fixes expire cache specs 2019-04-16 17:28:07 +02:00
Juanjo Bazán
f1e4fb946d updates Devise spec helpers required 2019-04-16 17:28:07 +02:00
Juanjo Bazán
eb36b7e2e5 updates config files 2019-04-16 17:28:06 +02:00
Julian Herrero
868ae77692 Upgrade gem rails and its dependecies 2019-04-16 17:28:06 +02:00
voodoorai2000
2fc1a85f0f Update CONTRIBUTING.md 2019-04-16 17:19:44 +02:00
Javier Martín
a0a871dc49 Merge pull request #2858 from consul/backport_1545-budget_poll_ballot
Verify poll ballots
2019-04-11 12:10:39 +02:00
Javier Martín
bc9d66ea31 Merge pull request #3432 from consul/fix_exception_with_wrong_token
Fix exception when confirming an invalid token
2019-04-10 18:55:44 +02:00