Sha256: bf1ee249bb4dc0cf8778ea5fb3a6170e005dbfdf1264da3db58c86c291d5c0a8

Contents?: true

Size: 567 Bytes

Versions: 10

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Rubysmith
  module Builders
    # Builds project skeleton Guard support for a red, green, refactor loop.
    class Guard < Abstract
      using Refinements::Struct

      def call
        return false unless settings.build_guard

        builder.call(settings.merge(template_path: "%project_name%/bin/guard.erb"))
               .render
               .permit 0o755

        builder.call(settings.merge(template_path: "%project_name%/Guardfile.erb")).render
        true
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubysmith-7.9.0 lib/rubysmith/builders/guard.rb
rubysmith-7.8.0 lib/rubysmith/builders/guard.rb
rubysmith-7.7.0 lib/rubysmith/builders/guard.rb
rubysmith-7.6.0 lib/rubysmith/builders/guard.rb
rubysmith-7.5.0 lib/rubysmith/builders/guard.rb
rubysmith-7.4.0 lib/rubysmith/builders/guard.rb
rubysmith-7.3.0 lib/rubysmith/builders/guard.rb
rubysmith-7.2.0 lib/rubysmith/builders/guard.rb
rubysmith-7.1.0 lib/rubysmith/builders/guard.rb
rubysmith-7.0.0 lib/rubysmith/builders/guard.rb