Sha256: 33fedaddcad356f8d36db06d657cefd8adf79763678d9fe02708a87635ec049b

Contents?: true

Size: 720 Bytes

Versions: 8

Compression:

Stored size: 720 Bytes

Contents

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

module Dry
  module Web
    module Roda
      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/web.rb.tt", "system/#{underscored_project_name}/web.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

8 entries across 8 versions & 1 rubygems

Version Path
dry-web-roda-0.14.0 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.13.1 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.13.0 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.12.0 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.11.0 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.10.0 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.9.1 lib/dry/web/roda/generators/umbrella_project.rb
dry-web-roda-0.9.0 lib/dry/web/roda/generators/umbrella_project.rb