Sha256: 0290244da28b17978ae2c5641edf84fdbf71843138721e19eab1c7689d703bef

Contents?: true

Size: 933 Bytes

Versions: 3

Compression:

Stored size: 933 Bytes

Contents

# frozen_string_literal: true

require_relative 'generator'

class CommonGenerator < Generator
  def generate_readme_file
    template('common/read_me.tt', "#{name}/Readme.md")
  end

  def generate_config_file
    return if single_platform?

    template('common/config.tt', "#{name}/config/config.yml")
  end

  def generate_rake_file
    template('common/rakefile.tt', "#{name}/Rakefile")
  end

  def generate_gemfile
    template('common/gemfile.tt', "#{name}/Gemfile")
  end

  def generate_reek_file
    template('common/reek.tt', "#{name}/.reek.yml")
  end

  def generate_rubocop_file
    template('common/rubocop.tt', "#{name}/.rubocop.yml")
  end

  def generate_gitignore_file
    template('common/git_ignore.tt', "#{name}/.gitignore")
  end

  def create_allure_folder
    empty_directory "#{name}/allure-results"
  end

  def create_screenshots_folder
    empty_directory "#{name}/allure-results/screenshots"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_raider-0.8.2 lib/generators/common_generator.rb
ruby_raider-0.8.1 lib/generators/common_generator.rb
ruby_raider-0.8.0 lib/generators/common_generator.rb