Sha256: bb010cfae033a71ab172838078e79141dce9a9343e561f290cbe8ae1f61eb997

Contents?: true

Size: 464 Bytes

Versions: 34

Compression:

Stored size: 464 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

34 entries across 34 versions & 1 rubygems

Version Path
gemsmith-14.1.1 lib/gemsmith/generators/cli.rb
gemsmith-14.1.0 lib/gemsmith/generators/cli.rb
gemsmith-14.0.2 lib/gemsmith/generators/cli.rb
gemsmith-14.0.1 lib/gemsmith/generators/cli.rb
gemsmith-14.0.0 lib/gemsmith/generators/cli.rb
gemsmith-13.8.0 lib/gemsmith/generators/cli.rb
gemsmith-13.7.2 lib/gemsmith/generators/cli.rb
gemsmith-13.7.1 lib/gemsmith/generators/cli.rb
gemsmith-13.7.0 lib/gemsmith/generators/cli.rb
gemsmith-13.6.0 lib/gemsmith/generators/cli.rb
gemsmith-13.5.0 lib/gemsmith/generators/cli.rb
gemsmith-13.4.0 lib/gemsmith/generators/cli.rb
gemsmith-13.3.0 lib/gemsmith/generators/cli.rb
gemsmith-13.2.0 lib/gemsmith/generators/cli.rb