summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin McNeese <cmcneese@chef.io>2021-02-13 09:36:31 -0600
committerCollin McNeese <cmcneese@chef.io>2021-02-13 09:36:31 -0600
commit094581c115dd67b67d2df4e60e9ac9948d10c55e (patch)
tree27fa060cb49f4331d3f6df72a62762abe7852f3f
parent8aaa1c0efad7174058611a449e1eaf5a5e9a5225 (diff)
downloadohai-094581c115dd67b67d2df4e60e9ac9948d10c55e.tar.gz
Pipeline linting fixes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
-rw-r--r--lib/ohai/plugins/habitat.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ohai/plugins/habitat.rb b/lib/ohai/plugins/habitat.rb
index 2d7d4a3e..84a54706 100644
--- a/lib/ohai/plugins/habitat.rb
+++ b/lib/ohai/plugins/habitat.rb
@@ -19,29 +19,29 @@ Ohai.plugin(:Habitat) do
provides "habitat"
def fetch_habitat_version
- shell_out("hab -V").stdout.gsub(/hab\s*/, "").strip() || nil
+ shell_out("hab -V").stdout.gsub(/hab\s*/, "").strip || nil
end
def fetch_habitat_packages
if Dir.exist?("C:/hab/pkgs")
- Dir.glob("C:/hab/pkgs/*/*/*/*/").sort.map{ |pkg| pkg.gsub("C\:\/hab\/pkgs\/", "").chomp("/") }
+ Dir.glob("C:/hab/pkgs/*/*/*/*/").sort.map { |pkg| pkg.gsub("C\:\/hab\/pkgs\/", "").chomp("/") }
elsif Dir.exist?("/hab/pkgs")
- Dir.glob("/hab/pkgs/*/*/*/*/").sort.map{ |pkg| pkg.gsub("\/hab\/pkgs\/", "").chomp("/") }
+ Dir.glob("/hab/pkgs/*/*/*/*/").sort.map { |pkg| pkg.gsub("\/hab\/pkgs\/", "").chomp("/") }
end
end
def fetch_habitat_services
if Dir.exist?("C:/hab/svc")
- Dir.glob("C:/hab/svc/*").sort.map{ |svc| svc.gsub("C\:\/hab\/svc\/", "").chomp("/") }
+ Dir.glob("C:/hab/svc/*").sort.map { |svc| svc.gsub("C\:\/hab\/svc\/", "").chomp("/") }
elsif Dir.exist?("/hab/svc")
- Dir.glob("/hab/svc/*").sort.map{ |svc| svc.gsub("\/hab\/svc\/", "").chomp("/") }
+ Dir.glob("/hab/svc/*").sort.map { |svc| svc.gsub("\/hab\/svc\/", "").chomp("/") }
end
end
collect_data(:default) do
habitat Mash.new
- habitat["version"] = fetch_habitat_version()
- habitat["packages"] = fetch_habitat_packages()
- habitat["services"] = fetch_habitat_services()
+ habitat["version"] = fetch_habitat_version
+ habitat["packages"] = fetch_habitat_packages
+ habitat["services"] = fetch_habitat_services
end
end