Sha256: 0d8a537d9a9921c7f239cb69135998ce8f1178052f2a54623bb421bf639a390b

Contents?: true

Size: 1.83 KB

Versions: 42

Compression:

Stored size: 1.83 KB

Contents

module Fastlane
  module Actions
    class FrameitAction < Action
      def self.run(config)
        return if Helper.test?

        require 'frameit'

        FastlaneCore::UpdateChecker.start_looking_for_update('frameit') unless Helper.is_test?

        UI.message("Framing screenshots at path #{config[:path]}")

        Dir.chdir(config[:path]) do
          Frameit.config = config
          Frameit::Runner.new.run('.')
        end
      end

      def self.description
        "Adds device frames around the screenshots using frameit"
      end

      def self.details
        [
          "Use [frameit](https://github.com/fastlane/fastlane/tree/master/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

      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)
        ]
      end

      def self.author
        "KrauseFx"
      end

      def self.example_code
        [
          'frameit',
          'frameit(silver: true)',
          'frameit(path: "/screenshots")',
          'frameit(rose_gold: true)'
        ]
      end

      def self.category
        :screenshots
      end

      def self.is_supported?(platform)
        [:ios, :mac].include? platform
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
fastlane-2.18.2 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.19.0.beta.20170222010016 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.1 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170221010026 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170220010017 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170219010032 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170218010103 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170217010035 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.18.0.beta.20170216184940 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.17.1 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.17.0 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.16.0 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.15.1 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.16.0.beta.20170214010051 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.15.0 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.15.0.beta.20170213032052 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.14.2 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.14.1 fastlane/lib/fastlane/actions/frameit.rb
fastlane-2.14.0 fastlane/lib/fastlane/actions/frameit.rb