Sha256: 95930756c58b886525cae053a9a9c7406a8c0b1bda92730637a8e66ba646bdf5

Contents?: true

Size: 640 Bytes

Versions: 7

Compression:

Stored size: 640 Bytes

Contents

module Screengrab
  class Setup
    # This method will take care of creating a screengrabfile and other necessary files
    def self.create(path)
      screengrabfile_path = File.join(path, 'Screengrabfile')

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

      gem_path = Helper.gem_path("screengrab")
      File.write(screengrabfile_path, File.read("#{gem_path}/lib/assets/ScreengrabfileTemplate"))

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
screengrab-0.5.0 lib/screengrab/setup.rb
screengrab-0.4.0 lib/screengrab/setup.rb
screengrab-0.3.2 lib/screengrab/setup.rb
screengrab-0.3.1 lib/screengrab/setup.rb
screengrab-0.3.0 lib/screengrab/setup.rb
screengrab-0.2.1 lib/screengrab/setup.rb
screengrab-0.2.0 lib/screengrab/setup.rb