1
0
Fork 0
mirror of https://github.com/varvet/pundit.git synced 2022-11-09 12:30:11 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Duncan Stuart
e982fc83a9 Stop building against ruby 2.3
It went end-of-life in March 2019:

https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/

Build against latest versions of other rubies
2019-12-09 09:49:17 +01:00
Duncan Stuart
2f68c154f0 Remove rubocop rule around access modifiers
The fewer exceptions to the default the better, and we're going to want
to use an access modifier in a generator, which will end up in other
people's codebases, so we should be as conventional as possible.
2019-11-12 10:26:31 +01:00
Duncan Stuart
386cae5f07 Make generators comply with Rubocop
There doesn't seem to be any particular reason to exclude these. It's at
least nice to have consistent use of quotes within the same file.

This does run the risk of imposing our specific rubocop rules on other
people's code (double vs single quotes is the cause of holy wars), but
if anything obviously awful comes up, we can exclude generators from
that specific rule.

We do however need to exclude the templates, since these have a .rb
extension despite containing erb tags.
2019-08-21 17:23:00 +02:00
Duncan Stuart
28dd15074e Upgrade Rubocop to latest version (0.74)
Now that we don't need to support Ruby 2.1 or 2.2, we can use the latest
version of Rubocop (which dropped support for those versions).

Also remove things from Rubocop which are now defaults:

- FrozenStringLiteralComment is now on by default
- DisplayCopNames used to be off by default but now seems to be on
- This project doesn't seem to have ever had gemfiles or vendor
  directories - my guess is that this was a copy-paste from another
  project.
2019-08-14 18:12:36 +02:00
Duncan Stuart
26a6d5504d Rubocop: Group cops by type
This decreases the risk of adding a rule twice, and makes things easier
to find
2019-08-12 15:03:10 +02:00
Duncan Stuart
e4ed3ecba8 Rubocop: re-enable rules with no issues
There are no violations of these and there doesn't seem to be any
particular reason to disable these rules.

One reason to have as few exceptions as possible is that it insulates us
from future changes to cop names and attributes.
2019-08-12 15:02:57 +02:00
Duncan Stuart
19b2613e7a Rubocop: re-enable SpecialGlobalVars cop
This seems like a reasonable thing to fix: in my opinion the fewer
exceptions to the default config, the better
2019-08-12 15:02:15 +02:00
Duncan Stuart
f13c28d854 Add frozen string literal magic comment
This is enabled by default in later versions of Rubocop. Making this
change now removes this conflict for people running later versions.

Automatically fixed with `rubocop -a`
2019-08-12 15:02:15 +02:00
Duncan Stuart
e39e1c5a81 Rubocop: re-enable IndentHash rule
One advantage of sticking with the default rule is that it insulates us
from naming changes: this cop is renamed in later versions of Rubocop.
2019-08-12 15:02:15 +02:00
Duncan Stuart
ca44b39f30 Rubocop: re-enable trivial accessors rule
This has no violations and there doesn't seem to be a good reason to
disable it.

Also it had two declarations - these were both added in the initial
commit which added Rubocop - presumably due to the config being copied
from a previous project (?).
2019-08-12 15:02:06 +02:00
Linus Marton
45c3408004
Update rubocop target version 2018-07-21 21:21:32 +02:00
Linus Marton
d28170b722
Remove unneeded rubocop file 2018-05-17 20:20:34 +02:00
Linus Marton
70935c5e93
Fix rubocop issues
This makes rubocop work with newer versions.
2018-04-27 12:40:42 +02:00
284km
4c488be943 CI against Ruby 2.2.8/2.3.5/2.4.2 (#489)
* CI against Ruby 2.2.8/2.3.5/2.4.2

* Remove unnecessary magic comments with ruby 2.0 or later

* Change `TargetRubyVersion` to 2.0

ruby 1.9.3 has already been dropped by 0569b065d7

* Change `TargetRubyVersion` to 2.1

* Drop jruby1.7 on Travis
2017-12-05 10:46:03 +01:00
Olle Jonsson
f60d059df9 Travis build change: Fix build, use latest JRuby
- Lint only 1 time, on modern Ruby
2017-05-11 14:53:16 +02:00
Jonas Nicklas
d079c86ebb Add Rubocop. 2016-01-14 15:30:03 +01:00