Commit Graph

17 Commits

Author SHA1 Message Date
Javi Martín
7ca55c44e0 Apply Rails/SaveBang rubocop rule
Having exceptions is better than having silent bugs.

There are a few methods I've kept the same way they were.

The `RelatedContentScore#score_with_opposite` method is a bit peculiar:
it creates scores for both itself and the opposite related content,
which means the opposite related content will try to create the same
scores as well.

We've already got a test to check `Budget::Ballot#add_investment` when
creating a line fails ("Edge case voting a non-elegible investment").

Finally, the method `User#send_oauth_confirmation_instructions` doesn't
update the record when the email address isn't already present, leading
to the test "Try to register with the email of an already existing user,
when an unconfirmed email was provided by oauth" fo fail if we raise an
exception for an invalid user. That's because updating a user's email
doesn't update the database automatically, but instead a confirmation
email is sent.

There are also a few false positives for classes which don't have bang
methods (like the GraphQL classes) or destroying attachments.

For these reasons, I'm adding the rule with a "Refactor" severity,
meaning it's a rule we can break if necessary.
2019-10-23 14:39:31 +02:00
Javi Martín
122b066573 Remove already executed tasks
These tasks were executed when upgading to version 0.19, 1.0.0-beta or
1.0.0.
2019-10-08 20:19:48 +02:00
Javi Martín
a21240b230 Use Date.current and Time.current
Using Date.today and Time.now might lead to inconsistencies if the time
zone the application uses is not the same as the system time zone.
2019-08-28 20:32:40 +02:00
decabeza
f40787561d Remove all references to question and external_url fields 2019-04-30 16:42:07 +02:00
decabeza
e88c66c92c Dont use faker gem on simulate successful proposal rake 2019-04-29 15:45:35 +02:00
decabeza
ad41f23a98 Improve rake to add published_at to proposals 2019-04-29 15:44:47 +02:00
decabeza
2cff3767c1 Remove open in new tab option for links 2019-04-24 13:58:13 +02:00
decabeza
91be3cf775 Fix more hound warnings 2019-03-27 15:22:14 +01:00
Juan Salvador Pérez García
6cc1ddb9af Fixes #231
Implements a poster feature for the proposals dashboard
2018-07-31 12:50:25 +02:00
Juan Salvador Pérez García
50f73abb0c Fixes #voodoorai2000 comments
Fixes some comments from #voodoorai2000 for the PR to consul
2018-07-27 16:30:03 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
256c0d72a5 Fixes issues with successful proposal generation task 2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
a872c5b5df Fixes #200
Adds settings to complete the polls card and feature view.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
762c4faef6 Fixes #141
Adds ideal progress to progress graph
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
6e75f5b494 Fixes #140
Adds a new setting that allows defining what is considered a successful
proposal.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
c8b2f13cfd Fixed bug in rake task 2018-07-17 17:58:22 +02:00
Juan Salvador Pérez García
3c3f60dfcc Implements #173
Public view for suggested actions as well as resources has been
completelly redesigned.

Private side for this feature has been adapted as well in order to meet
the requirements.
2018-07-17 17:58:22 +02:00