Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dehall committed Dec 18, 2024
1 parent dafe3cb commit 252796f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/inferno/entities/ig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class IG < Entity

include Inferno::Entities::Attributes

def initialize(params)
def initialize(**params)
super(params, ATTRIBUTES)

@profiles = []
Expand Down Expand Up @@ -57,7 +57,7 @@ def self.from_tgz(ig_path)
Zlib::GzipReader.open(ig_path)
)

ig = IG.new({})
ig = IG.new

tar.each do |entry|
next if skip_item?(entry.full_name, entry.directory?)
Expand All @@ -75,7 +75,7 @@ def self.from_tgz(ig_path)
end

def self.from_directory(ig_directory)
ig = IG.new({})
ig = IG.new

ig_path = Pathname.new(ig_directory)
Dir.glob("#{ig_path}/**/*") do |f|
Expand All @@ -102,7 +102,6 @@ def self.skip_item?(relative_path, is_directory)

file_name = relative_path.split('/').last

# TODO: consider making these regexes we can iterate over in a single loop
return true unless file_name.end_with? '.json'
return true unless relative_path.start_with? 'package/'

Expand Down

0 comments on commit 252796f

Please sign in to comment.