Sha256: e647216468047cbc648aa0236ebfe58f6441065f3fc14486ce2ae6be841dbe1e

Contents?: true

Size: 904 Bytes

Versions: 3

Compression:

Stored size: 904 Bytes

Contents

# frozen_string_literal: true

module Cybele
  module Helpers
    module Pronto
      def configure_pronto
        # Create pronto files
        create_config_files
        template 'pronto/rubo.erb',
                 'bin/rubo',
                 force: true
        run 'chmod +x bin/rubo'

        # Ignore secret information file
        append_file('.gitignore', '.pronto.yml')
      end

      private

      def create_config_files
        template 'pronto/example.pronto.yml.erb',
                 '.pronto.yml',
                 force: true
        files_to_template(
          'pronto/example.pronto.yml.erb' => 'example.pronto.yml',
          'pronto/.haml-lint.yml.erb' => '.haml-lint.yml',
          'pronto/.erb-lint.yml.erb' => '.erb-lint.yml',
          'pronto/.rubocop.yml.erb' => '.rubocop.yml',
          'pronto/.flayignore.erb' => '.flayignore'
        )
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cybele-2.3.2 lib/cybele/helpers/pronto.rb
cybele-2.3.1 lib/cybele/helpers/pronto.rb
cybele-2.2.0 lib/cybele/helpers/pronto.rb