Apply remaining rubocop fixes
This commit is contained in:
@@ -89,6 +89,8 @@ Performance/CaseWhenSplat:
|
|||||||
Performance/Casecmp:
|
Performance/Casecmp:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Performance/CollectionLiteralInLoop:
|
Performance/CollectionLiteralInLoop:
|
||||||
|
Exclude:
|
||||||
|
- spec/**/*
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Performance/CompareWithBlock:
|
Performance/CompareWithBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
@@ -294,6 +296,8 @@ Metrics/AbcSize:
|
|||||||
Enabled: false
|
Enabled: false
|
||||||
Metrics/BlockLength:
|
Metrics/BlockLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Enabled: false
|
||||||
Metrics/ClassLength:
|
Metrics/ClassLength:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
@@ -308,6 +312,8 @@ Metrics/PerceivedComplexity:
|
|||||||
Enabled: false
|
Enabled: false
|
||||||
Migration/DepartmentName:
|
Migration/DepartmentName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
Naming/AccessorMethodName:
|
||||||
|
Enabled: false
|
||||||
Naming/BlockParameterName:
|
Naming/BlockParameterName:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Naming/HeredocDelimiterCase:
|
Naming/HeredocDelimiterCase:
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Facter.add(:java_version) do
|
|||||||
confine operatingsystem: 'Darwin'
|
confine operatingsystem: 'Darwin'
|
||||||
has_weight 100
|
has_weight 100
|
||||||
setcode do
|
setcode do
|
||||||
unless %r{Unable to find any JVMs matching version} =~ Facter::Util::Resolution.exec('/usr/libexec/java_home --failfast 2>&1')
|
unless Facter::Util::Resolution.exec('/usr/libexec/java_home --failfast 2>&1').include?('Unable to find any JVMs matching version')
|
||||||
version = nil
|
version = nil
|
||||||
Facter::Util::Resolution.exec('java -Xmx12m -version 2>&1').lines.each { |line| version = Regexp.last_match(1) if %r{^.+ version \"(.+)\"} =~ line }
|
Facter::Util::Resolution.exec('java -Xmx12m -version 2>&1').lines.each { |line| version = Regexp.last_match(1) if %r{^.+ version \"(.+)\"} =~ line }
|
||||||
version
|
version
|
||||||
|
|||||||
@@ -189,13 +189,14 @@ install_sap_jdk_jre = <<EOL
|
|||||||
}
|
}
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
context 'installing java jre', unless: UNSUPPORTED_PLATFORMS.include?(os[:family]) do
|
describe 'installing' do
|
||||||
|
context 'installing java jre' do
|
||||||
it 'installs jre' do
|
it 'installs jre' do
|
||||||
idempotent_apply(java_class_jre)
|
idempotent_apply(java_class_jre)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'installing java jdk', unless: UNSUPPORTED_PLATFORMS.include?(os[:family]) do
|
context 'installing java jdk' do
|
||||||
it 'installs jdk' do
|
it 'installs jdk' do
|
||||||
idempotent_apply(java_class)
|
idempotent_apply(java_class)
|
||||||
end
|
end
|
||||||
@@ -280,3 +281,4 @@ context 'java::adopt', if: sap_enabled && ['Sles'].include?(os[:family]), unless
|
|||||||
idempotent_apply(install_sap_jdk_jre)
|
idempotent_apply(install_sap_jdk_jre)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user