Commit Graph

19 Commits

Author SHA1 Message Date
Marcelo Guimarães 4bb0c7d637 Removing ruby 2.6 as required version because JRuby jruby-9.2 considers itself to be compliant with MRI 2.5 so if we add 2.6 as required minimum version for ruby it will causes conflict errors on bundler 2022-01-15 13:17:51 -03:00
Marcelo Guimarães 05bc3c3dcc update rubocop to 1.24 2022-01-12 21:39:41 -03:00
Duncan Stuart e8a6e0ac3c Build against currently supported rubies
...and use the latest (2020) Travis build environment: focal

2.6 is the earliest currently supported Ruby version:

  https://www.ruby-lang.org/en/downloads/branches/

The focal environment doesn't seem to support openjdk 8. Here's the
failure from the build:

    install-jdk.sh 2020-06-02
    Expected feature release number in range of 9 to 17, but got: 8
    The command "~/bin/install-jdk.sh --target "/home/travis/openjdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "GPL" --cacerts" failed and exited with 3 during .

It looks like JRuby 9.1 isn't under development: the last release was in
2018, and it's described as being "compatible with Ruby 2.3.x", which is
a very old version . It feels OK to drop it.

JRuby 9.2 says it's "compatible with Ruby 2.5.x", but it's the latest
JRuby version so it seems like something we should keep.
2021-05-24 14:49:22 +02:00
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