class Fastlane::Actions::FrameScreenshotsAction
Public Class Methods
available_options()
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 28 def self.available_options require "frameit" require "frameit/options" FastlaneCore::CommanderGenerator.new.generate(Frameit::Options.available_options) + [ FastlaneCore::ConfigItem.new(key: :path, env_name: "FRAMEIT_SCREENSHOTS_PATH", description: "The path to the directory containing the screenshots", default_value: Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] || FastlaneCore::FastlaneFolder.path, default_value_dynamic: true) ] end
category()
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 55 def self.category :screenshots end
description()
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 17 def self.description "Adds device frames around all screenshots (via _frameit_)" end
details()
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 21 def self.details [ "Uses [frameit](https://docs.fastlane.tools/actions/frameit/) to prepare perfect screenshots for the App Store, your website, QA or emails.", "You can add background and titles to the framed screenshots as well." ].join("\n") end
example_code()
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 44 def self.example_code [ 'frame_screenshots', 'frameit # alias for "frame_screenshots"', 'frame_screenshots(use_platform: "ANDROID")', 'frame_screenshots(silver: true)', 'frame_screenshots(path: "/screenshots")', 'frame_screenshots(rose_gold: true)' ] end
is_supported?(platform)
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 59 def self.is_supported?(platform) [:ios, :mac, :android].include?(platform) end
run(config)
click to toggle source
# File fastlane/lib/fastlane/actions/frame_screenshots.rb, line 4 def self.run(config) return if Helper.test? require 'frameit' UI.message("Framing screenshots at path #{config[:path]} (via frameit)") Dir.chdir(config[:path]) do Frameit.config = config Frameit::Runner.new.run('.') end end