Sha256: 610516eddb1e1cbc60467d3db7dfdfbc9ff503488f448a33c9ba1716f18f4316

Contents?: true

Size: 883 Bytes

Versions: 36

Compression:

Stored size: 883 Bytes

Contents

module Screengrab
  class Setup
    # This method will take care of creating a screengrabfile and other necessary files
    def self.create(path, is_swift_fastfile: false)
      if is_swift_fastfile
        template_location = "#{Screengrab::ROOT}/lib/assets/ScreengrabfileTemplate.swift"
        screengrabfile_path = File.join(path, 'Screengrabfile.swift')
      else
        template_location = "#{Screengrab::ROOT}/lib/assets/ScreengrabfileTemplate"
        screengrabfile_path = File.join(path, 'Screengrabfile')
      end

      if File.exist?(screengrabfile_path)
        UI.user_error!("Screengrabfile already exists at path '#{screengrabfile_path}'. Run 'screengrab' to use screengrab.")
      end

      File.write(screengrabfile_path, File.read(template_location))

      UI.success("Successfully created new Screengrabfile at '#{screengrabfile_path}'")
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fastlane-2.74.0.beta.20180106010004 screengrab/lib/screengrab/setup.rb
fastlane-2.73.0 screengrab/lib/screengrab/setup.rb
fastlane-2.73.0.beta.20180105010003 screengrab/lib/screengrab/setup.rb
fastlane-2.73.0.beta.20180104010004 screengrab/lib/screengrab/setup.rb
fastlane-2.73.0.beta.20180103010003 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20180102010003 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20180101010003 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20171231010003 screengrab/lib/screengrab/setup.rb
fastlane-2.71.1 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20171230010003 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20171229010003 screengrab/lib/screengrab/setup.rb
fastlane-2.72.0.beta.20171228010004 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171227010004 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171226010004 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171225010003 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171224010003 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171223010003 screengrab/lib/screengrab/setup.rb
fastlane-2.71.0.beta.20171222010003 screengrab/lib/screengrab/setup.rb