11 Commits

Author SHA1 Message Date
Javi Martín
2951d0fdf8 Add and apply Rails/ResponseParsedBody rubocop rule
This rule was introduced in rubocop-rails 2.18.0.

Since using `response.parsed_body` is shorter than using
`JSON.parse(response.body)`, this also means we can group some lines in
one.
2023-09-06 19:00:39 +02:00
Javi Martín
201e23da3d Describe enabled processes in the consul.json URL
The idea to show the status of the existing features was done in commit
7339a98b74. Back then, we didn't have the separate `process.` prefix,
and so processes were enabled/disabled using settings like
`feature.debates` instead of `process.debates`.

IMHO making the information about the enabled features public could
potentially be a bit risky since it gives too much information about the
current status of the application.

Showing which processes are enabled, on the other hand, is pretty
harmless, and it's the reason why this feature was added in the first
place.
2022-06-02 17:10:38 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
da121ebc53 Remove redundant setting resets in after blocks
Settings are stored in the database, and so any changes to the settings
done during the tests are automatically rolled back between one test and
the next one.

There were also a few places where we weren't using an `after` block but
changing the setting at the end of the test.
2019-09-23 13:47:45 +02:00
Julian Herrero
31ac8b7f55 Change single quotes to double quotes 2019-02-15 11:40:39 +01:00
Bertocq
28008d64e2 Improve performance swapping keys.each for each_key, plus line lenght comply 2018-01-19 23:44:08 +01:00
Bertocq
cdbf0a77e1 Improve consul.json request spec, to avoid maintaining the setting features list up with seeds.rb content 2018-01-07 15:24:46 +01:00
Alberto García
19925de06b Merge pull request #2170 from consul/design
Design improvements
2017-12-14 11:31:31 +01:00
Bertocq
34f07bcc82 Add feature allow_images flag to installation specs 2017-12-13 14:30:43 +01:00
rgarcia
c63c734ec2 fixes specs 2017-12-12 11:04:05 +01:00
Bertocq
516081d109 Describe with a request spec the consul.json install details route 2017-12-04 18:17:10 +01:00