Module: Frameit

Defined in:
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, Orientation Classes: CommandsGenerator, ConfigParser, DependencyChecker, Editor, FrameDownloader, MacEditor, Offsets, Options, Runner, Screenshot, StringsParser, TemplateFinder, Trimbox

Constant Summary collapse

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.



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

def config
  @config
end

Class Method Details

.frames_versionObject

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



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

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