Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
stevendanna committed Aug 1, 2016
1 parent 22f064c commit 6575839
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/train/extras/os_detect_darwin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def detect_darwin
# TODO: ditto on error
return false if cmd.stdout.empty?

uname_m = @backend.run_command("uname -m").stdout.chomp
uname_m = @backend.run_command('uname -m').stdout.chomp
return false if uname_m.empty?

name = cmd.stdout[/^ProductName:\s+(.+)$/, 1]
Expand Down
8 changes: 4 additions & 4 deletions lib/train/extras/os_detect_linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def detect_linux_via_config # rubocop:disable Metrics/AbcSize, Metrics/Cyclomati
@platform[:release] = meta[:release]
elsif !(os_info = fetch_os_release).nil?
if os_info['ID_LIKE'] =~ /wrlinux/
@platform[:name] = 'wrlinux'
@platform[:name] = 'wrlinux'
@platform[:release] = os_info['VERSION']
end
end
Expand All @@ -95,9 +95,9 @@ def detect_linux_via_config # rubocop:disable Metrics/AbcSize, Metrics/Cyclomati
!@platform[:family].nil? && !@platform[:release].nil?
end

DEBIAN_FAMILY = %w{debian ubuntu linuxmint raspbian}
RHEL_FAMILY = %w{centos redhat oracle scientific enterpriseenterprise amazon xenserver cloudlinux ibm_powerkvm nexus_centos wrlinux}
SUSE_FAMILY = %w{suse opensuse}
DEBIAN_FAMILY = %w{debian ubuntu linuxmint raspbian}.freeze
RHEL_FAMILY = %w{centos redhat oracle scientific enterpriseenterprise amazon xenserver cloudlinux ibm_powerkvm nexus_centos wrlinux}.freeze
SUSE_FAMILY = %w{suse opensuse}.freeze

def family_for_platform
if DEBIAN_FAMILY.include?(@platform[:name])
Expand Down

0 comments on commit 6575839

Please sign in to comment.