Module: Frameit

Defined in:
frameit/lib/frameit/device.rb,
frameit/lib/frameit/editor.rb,
frameit/lib/frameit/module.rb,
frameit/lib/frameit/runner.rb,
frameit/lib/frameit/offsets.rb,
frameit/lib/frameit/options.rb,
frameit/lib/frameit/trim_box.rb,
frameit/lib/frameit/mac_editor.rb,
frameit/lib/frameit/screenshot.rb,
frameit/lib/frameit/device_types.rb,
frameit/lib/frameit/config_parser.rb,
frameit/lib/frameit/strings_parser.rb,
frameit/lib/frameit/template_finder.rb,
frameit/lib/frameit/frame_downloader.rb,
frameit/lib/frameit/commands_generator.rb,
frameit/lib/frameit/dependency_checker.rb

Defined Under Namespace

Modules: Color, Devices, Orientation, Platform Classes: CommandsGenerator, ConfigParser, DependencyChecker, Device, Editor, FrameDownloader, MacEditor, Offsets, Options, Runner, Screenshot, StringsParser, TemplateFinder, Trimbox

Constant Summary collapse

Boolean =
Fastlane::Boolean
Helper =

you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore

FastlaneCore::Helper
UI =
FastlaneCore::UI
ROOT =
Pathname.new(File.expand_path('../../..', __FILE__))

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config


8
9
10
# File 'frameit/lib/frameit/module.rb', line 8

def config
  @config
end

Class Method Details

.frames_versionObject

Defaults to latest, might be a time stamp if defined in the Framefile.json


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'frameit/lib/frameit/module.rb', line 17

def self.frames_version
  return @frames_version if @frames_version
  @frames_version = "latest"

  config_files = Dir["./**/Framefile.json"]
  if config_files.count > 0
    config = ConfigParser.new.load(config_files.first)
    if config.data["device_frame_version"].to_s.length > 0
      @frames_version = config.data["device_frame_version"]
    end
  end

  UI.success("Using device frames version '#{@frames_version}'")

  return @frames_version
end