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-15.5.0 lib/gemsmith/generators/cli.rb
gemsmith-15.4.0 lib/gemsmith/generators/cli.rb
gemsmith-15.3.0 lib/gemsmith/generators/cli.rb
gemsmith-15.2.0 lib/gemsmith/generators/cli.rb
gemsmith-15.1.1 lib/gemsmith/generators/cli.rb
gemsmith-15.1.0 lib/gemsmith/generators/cli.rb
gemsmith-15.0.0 lib/gemsmith/generators/cli.rb
gemsmith-14.11.0 lib/gemsmith/generators/cli.rb
gemsmith-14.10.1 lib/gemsmith/generators/cli.rb
gemsmith-14.10.0 lib/gemsmith/generators/cli.rb
gemsmith-14.9.0 lib/gemsmith/generators/cli.rb
gemsmith-14.8.0 lib/gemsmith/generators/cli.rb
gemsmith-14.7.0 lib/gemsmith/generators/cli.rb
gemsmith-14.6.0 lib/gemsmith/generators/cli.rb
gemsmith-14.5.0 lib/gemsmith/generators/cli.rb
gemsmith-14.4.0 lib/gemsmith/generators/cli.rb
gemsmith-14.3.0 lib/gemsmith/generators/cli.rb
gemsmith-14.2.0 lib/gemsmith/generators/cli.rb
gemsmith-14.1.3 lib/gemsmith/generators/cli.rb
gemsmith-14.1.2 lib/gemsmith/generators/cli.rb