Method: Frameit::Runner#skip_path?

Defined in:
frameit/lib/frameit/runner.rb

#skip_path?(path) ⇒ Boolean

Returns:



54
55
56
57
58
59
60
61
62
63
64
# File 'frameit/lib/frameit/runner.rb', line 54

def skip_path?(path)
  return true if path.include?("_framed.png")
  return true if path.include?(".itmsp/") # a package file, we don't want to modify that
  return true if path.include?("device_frames/") # these are the device frames the user is using
  device = path.rpartition('/').last.partition('-').first # extract device name
  if device.downcase.include?("watch")
    UI.error("Apple Watch screenshots are not framed: '#{path}'")
    return true # we don't care about watches right now
  end
  false
end