Adapt code for upcoming Rubocop

Fix some cops that will be active in the next version of Rubocop.

Change-Id: Iafd91b380ceb44e8c251e4a8e8333c0b1098083a
Reviewed-on: http://gerrit.causes.com/37816
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane@causes.com>