Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
update rubocop to 0.54.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed May 5, 2018
1 parent 912bcb0 commit 7d3242f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_from:
- .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.2
TargetRubyVersion: 2.3
TargetRailsVersion: 5.1

Rails:
Expand Down
17 changes: 16 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-01-07 04:56:11 +0100 using RuboCop version 0.52.1.
# on 2018-05-05 02:13:49 +0200 using RuboCop version 0.54.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -74,6 +74,21 @@ Metrics/ParameterLists:
Metrics/PerceivedComplexity:
Max: 13

# Offense count: 4
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to
Naming/UncommunicativeMethodParamName:
Exclude:
- 'app/helpers/xen_compute_helper.rb'
- 'app/models/foreman_xen/xenserver.rb'

# Offense count: 19
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Style/FrozenStringLiteralComment:
Enabled: false

# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
sudo: false
language: ruby
rvm:
- 2.1.5
- 2.2.3
- 2.3.1
- 2.4.2
- 2.5.0
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'https://rubygems.org'

gemspec

gem 'rubocop', '~> 0.52.1', require: false
gem 'rubocop', '~> 0.54.0', require: false
2 changes: 1 addition & 1 deletion foreman_xen.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
$LOAD_PATH.push File.expand_path('lib', __dir__)

# Maintain your gem's version:
require 'foreman_xen/version'
Expand Down
6 changes: 3 additions & 3 deletions lib/foreman_xen/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Engine < ::Rails::Engine
engine_name 'foreman_xen'

initializer 'foreman_xen.register_gettext', :after => :load_config_initializers do |app|
locale_dir = File.join(File.expand_path('../../..', __FILE__), 'locale')
locale_dir = File.join(File.expand_path('../..', __dir__), 'locale')
locale_domain = 'foreman-xen'

Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
Expand Down Expand Up @@ -43,8 +43,8 @@ class Engine < ::Rails::Engine
begin
# extend fog xen server and image models.
require 'fog/compute/xen_server/models/server'
require File.expand_path('../../../app/models/concerns/fog_extensions/xenserver/server', __FILE__)
require File.expand_path('../../../app/models/concerns/foreman_xen/host_helper_extensions', __FILE__)
require File.expand_path('../../app/models/concerns/fog_extensions/xenserver/server', __dir__)
require File.expand_path('../../app/models/concerns/foreman_xen/host_helper_extensions', __dir__)

Fog::Compute::XenServer::Server.send(:include, ::FogExtensions::Xenserver::Server)
::HostsHelper.send(:include, ForemanXen::HostHelperExtensions)
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'

require File.expand_path('../dummy/config/environment.rb', __FILE__)
require File.expand_path('dummy/config/environment.rb', __dir__)
require 'rails/test_help'

Rails.backtrace_cleaner.remove_silencers!
Expand All @@ -11,5 +11,5 @@

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
ActiveSupport::TestCase.fixture_path = File.expand_path('fixtures', __dir__)
end

0 comments on commit 7d3242f

Please sign in to comment.