Sha256: 78b0586d5b8f9f2161622145026f391f4a516837abdbf6a06f482bfd33387874

Contents?: true

Size: 737 Bytes

Versions: 2

Compression:

Stored size: 737 Bytes

Contents

require "securerandom"
require "dry/web/web_pipe/generators/abstract_project"
require "dry/web/web_pipe/generators/sub_app"

module Dry
  module Web
    module WebPipe
      module Generators
        class UmbrellaProject < AbstractProject
          private

          def add_boot
            add_template("umbrella_project/boot.rb.tt", "system/boot.rb")
          end

          def add_application
            add_template("umbrella_project/router.rb.tt", "system/#{underscored_project_name}/router.rb")
          end

          def post_process_callback
            Dir.chdir(target_dir) do
              Generators::SubApp.new("main", umbrella: target_dir).call
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dry-web-web_pipe-0.2.0 lib/dry/web/web_pipe/generators/umbrella_project.rb
dry-web-web_pipe-0.1.0 lib/dry/web/web_pipe/generators/umbrella_project.rb