Skip to content

Commit

Permalink
fixing Style/MultilineTernaryOperator
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Aug 19, 2016
1 parent 635e7a3 commit 4e3d818
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/ohai/config.rb
Expand Up @@ -86,8 +86,11 @@ def self.merge_deprecated_config
# Furthermore, when the top-level config settings are removed we will
# need to ensure that Ohai.config[:log_level] can be set by writing
# log_level in a configuration file for consistent behavior with chef.
deprecation_warning = [ :log_level, :log_location ].include?(value) ?
option_might_be_deprecated(option) : option_deprecated(option)
deprecation_warning = if [ :log_level, :log_location ].include?(value)
option_might_be_deprecated(option)
else
option_deprecated(option)
end
Ohai::Log.warn(deprecation_warning)
value
end
Expand Down
8 changes: 5 additions & 3 deletions lib/ohai/plugins/windows/cpu.rb
Expand Up @@ -54,9 +54,11 @@
cpu[current_cpu]["vendor_id"] = processor["manufacturer"]
cpu[current_cpu]["family"] = processor["family"].to_s
cpu[current_cpu]["model"] = processor["revision"].to_s
cpu[current_cpu]["stepping"] = processor["stepping"].nil? \
? processor["description"].match(/Stepping\s+(\d+)/)[1] \
: processor["stepping"]
cpu[current_cpu]["stepping"] = if processor["stepping"].nil?
processor["description"].match(/Stepping\s+(\d+)/)[1]
else
processor["stepping"]
end
cpu[current_cpu]["physical_id"] = processor["deviceid"]
cpu[current_cpu]["model_name"] = processor["description"]
cpu[current_cpu]["mhz"] = processor["maxclockspeed"].to_s
Expand Down

0 comments on commit 4e3d818

Please sign in to comment.