Sha256: d30eb261a99dffb977f40dbfd1174aeb1ad61567264860540044349c38970970

Contents?: true

Size: 709 Bytes

Versions: 28

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

require "refinements/structs"

module Hanamismith
  module Builders
    module Environments
      # Builds test environment skeleton.
      class Test
        using Refinements::Structs

        def self.call(...) = new(...).call

        def initialize configuration, builder: Rubysmith::Builder
          @configuration = configuration
          @builder = builder
        end

        def call
          builder.call(configuration.merge(template_path: "%project_name%/env.test.erb"))
                 .render
                 .rename(".env.test")

          configuration
        end

        private

        attr_reader :configuration, :builder
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
hanamismith-0.7.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.6.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.5.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.4.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.3.1 lib/hanamismith/builders/environments/test.rb
hanamismith-0.3.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.2.0 lib/hanamismith/builders/environments/test.rb
hanamismith-0.1.0 lib/hanamismith/builders/environments/test.rb