Project

General

Profile

« Previous | Next » 

Revision cabe2c2e

Added by Ohad Levy about 7 years ago

Fixes #19700 - update rubocop rules

The following changes have been made:

- Performance/RedundantMerge:
changes lines such as:
```not_found_message.merge! :message => options```
to:
```not_found_message[:message] = options```

- converts str.match() to str =~ ()
- remove extra whitespaces etc.

View differences:

app/services/power_manager/virt.rb
def state_output(result)
result = result.to_s
return 'on' if result.match(/started/i)
return 'off' if result.match(/paused/i)
return 'on' if result =~ /started/i
return 'off' if result =~ /paused/i
translate_status(result) # unknown output
end

Also available in: Unified diff