Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-performance
- rubocop-rake

Expand Down
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Naming/MethodParameterName:
# ForbiddenPrefixes: is_, has_, have_
# AllowedMethods: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Naming/PredicatePrefix:
Exclude:
- 'spec/**/*'
- 'modules/puppet_proxy_common/puppet_class.rb'
Expand Down
4 changes: 2 additions & 2 deletions bundler.d/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
gem 'mocha', '~> 1.10', :require => false
gem 'rack-test'
gem 'rake'
gem 'rubocop', '~> 1.56.0'
gem 'rubocop-performance', '~> 1.5.2'
gem 'rubocop', '~> 1.88.0'
gem 'rubocop-performance', '~> 1.26.0'
gem 'rubocop-rake'
gem 'ruby-prof', '< 1.4'
gem 'test-unit'
Expand Down
2 changes: 1 addition & 1 deletion extra/migrations/20160413000000_migrate_puppet_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def migrate_puppet_configuration(to_migrate)

if migrated.has_key?(:puppet_proxy_mcollective)
puppet_user = migrated[:puppet_proxy_mcollective].delete(:puppet_user)
unless (migrated[:puppet_proxy_mcollective].has_key?(:user) || puppet_user.nil?)
unless migrated[:puppet_proxy_mcollective].has_key?(:user) || puppet_user.nil?
migrated[:puppet_proxy_mcollective][:user] = puppet_user
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def resolve_tls_min_version
def resolve_tls_ciphers
configured = settings.tls_ciphers
raise "Invalid tls_ciphers value '#{configured}': must be a String" if !configured.nil? && !configured.is_a?(String)
return nil if configured&.empty?
return nil if configured == ''
return configured unless configured.nil?

if File.exist?(CRYPTO_POLICIES_CONFIG)
Expand Down
2 changes: 1 addition & 1 deletion modules/dhcp_common/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def vendor_options_supported?

# Default: manage any subnet. If specified: manage only specified subnets.
def managed_subnet?(subnet)
@managed_subnets.empty? ? true : @managed_subnets.include?(subnet)
@managed_subnets.empty? || @managed_subnets.include?(subnet)
end
end
end
2 changes: 1 addition & 1 deletion modules/templates/templates_unattended_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Proxy::TemplatesUnattendedApi < Sinatra::Base
# It will also modify the rendering of the foreman_url specified in the templates.
get "/templateServer" do
content_type :json
{"templateServer" => (Proxy::Templates::Plugin.settings.template_url || "")}.to_json
{"templateServer" => Proxy::Templates::Plugin.settings.template_url || ""}.to_json
rescue => e
log_halt 400, e
end
Expand Down
4 changes: 2 additions & 2 deletions modules/tftp/tftp_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def instantiate(variant, mac = nil)
def create(variant, mac, os: nil, release: nil, arch: nil, bootfile_suffix: nil)
tftp = instantiate variant, mac
log_halt(400, "TFTP: Failed to setup host specific bootloader directory: ") { tftp.setup_bootloader(mac: mac, os: os, release: release, arch: arch, bootfile_suffix: bootfile_suffix) }
log_halt(400, "TFTP: Failed to create pxe config file: ") { tftp.set(mac, (params[:pxeconfig] || params[:syslinux_config])) }
log_halt(400, "TFTP: Failed to create pxe config file: ") { tftp.set(mac, params[:pxeconfig] || params[:syslinux_config]) }
end

def delete(variant, mac)
Expand Down Expand Up @@ -70,7 +70,7 @@ def create_default(variant)

# Get the value for next_server
get "/serverName" do
{"serverName" => (Proxy::TFTP::Plugin.settings.tftp_servername || "")}.to_json
{"serverName" => Proxy::TFTP::Plugin.settings.tftp_servername || ""}.to_json
end
end
end
Loading