Sha256: 42da99cf7c872662181fbe65fcf85285c2cf29f92e4ecf932ce8403dd1113037

Contents?: true

Size: 602 Bytes

Versions: 8

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Hanami
  # TODO: move elsewhere
  def self.architecture
    return :monolith if File.exist?("config/application.rb")
  end

  module CLI
    module Commands
    end

    def self.register_commands!(architecture = Hanami.architecture)
      commands = case architecture
                 when :monolith
                   require_relative "commands/monolith"
                   Commands::Monolith
                 else
                   require_relative "commands/gem"
                   Commands::Gem
                 end

      extend(commands)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hanami-cli-2.0.0.alpha8.1 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha8 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha7 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha6.1 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha6 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha4 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha3 lib/hanami/cli/commands.rb
hanami-cli-2.0.0.alpha2 lib/hanami/cli/commands.rb