Module: Frameit

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

Defined Under Namespace

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

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__))
VERSION =
"4.0.0".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



20
21
22
# File 'lib/frameit.rb', line 20

def config
  @config
end

Class Method Details

.frames_versionObject

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



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/frameit.rb', line 28

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