Sha256: c93a123efc619187ca24b6526c20d09c3cfbeecc1840750f97ba9f47ecf27d93

Contents?: true

Size: 1.58 KB

Versions: 4

Compression:

Stored size: 1.58 KB

Contents

#!/usr/bin/env ruby

$:.push File.expand_path("../../lib", __FILE__)

require 'frameit'
require 'commander'

HighLine.track_eof = false

class FrameItApplication
  include Commander::Methods

  def run
    program :version, Frameit::VERSION
    program :description, 'Quickly put your screenshots into the right device frames'
    program :help, 'Author', 'Felix Krause <frameit@krausefx.com>'
    program :help, 'Website', 'https://fastlane.tools'
    program :help, 'GitHub', 'https://github.com/krausefx/frameit'
    program :help_formatter, :compact

    global_option('--verbose') { $verbose = true }

    default_command :black

    command :black do |c|
      c.syntax = 'frameit black'
      c.description = "Adds a black frame around all screenshots."

      c.action do |args, options|
        Frameit::Runner.new.run('.', Frameit::Color::BLACK)
      end
    end

    command :silver do |c|
      c.syntax = 'frameit silver'
      c.description = "Adds a silver frame around all screenshots."

      c.action do |args, options|
        Frameit::Runner.new.run('.', Frameit::Color::SILVER)
      end
    end

    command :setup do |c|
      c.syntax = 'frameit setup'
      c.description = "Helps you adding new frames."

      c.action do |args, options|
        Frameit::FrameConverter.new.run
      end
    end

    alias_command :white, :silver

    run!
  end
end

begin
  FastlaneCore::UpdateChecker.start_looking_for_update('frameit')
  Frameit::DependencyChecker.check_dependencies
  FrameItApplication.new.run
ensure
  FastlaneCore::UpdateChecker.show_update_status('frameit', Frameit::VERSION)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
frameit-2.4.1 bin/frameit
frameit-2.4.0 bin/frameit
frameit-2.3.0 bin/frameit
frameit-2.2.2 bin/frameit