Sha256: 159d6a65624d47f93c14eff2b94a33d24f1d2ff23138a18206aa1730ce4558a9

Contents?: true

Size: 465 Bytes

Versions: 8

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module Gemsmith
  module Generators
    # Generates Command Line Interface (CLI) support.
    class CLI < Base
      def run
        return unless configuration.dig(:generate, :cli)

        template "%gem_name%/bin/%gem_name%.tt"
        template "%gem_name%/lib/%gem_path%/cli.rb.tt"
        template "%gem_name%/spec/lib/%gem_path%/cli_spec.rb.tt"
        cli.chmod "#{gem_name}/bin/#{gem_name}", 0o755
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gemsmith-13.1.0 lib/gemsmith/generators/cli.rb
gemsmith-13.0.0 lib/gemsmith/generators/cli.rb
gemsmith-12.4.0 lib/gemsmith/generators/cli.rb
gemsmith-12.3.0 lib/gemsmith/generators/cli.rb
gemsmith-12.2.0 lib/gemsmith/generators/cli.rb
gemsmith-12.1.0 lib/gemsmith/generators/cli.rb
gemsmith-12.0.0 lib/gemsmith/generators/cli.rb
gemsmith-11.3.0 lib/gemsmith/generators/cli.rb