Sha256: a16e67d407d8f4d48fae6187cc6099b212341cdd3ed8b556a7ffea9bca8de63a

Contents?: true

Size: 676 Bytes

Versions: 25

Compression:

Stored size: 676 Bytes

Contents

# frozen_string_literal: true

module Gemsmith
  module Generators
    # Generates default gem support.
    class Gem < Base
      def run
        create_binaries
        create_skeleton
      end

      private

      def create_binaries
        template "%gem_name%/bin/console.tt"
        template "%gem_name%/bin/setup.tt"
        cli.chmod "#{gem_name}/bin/console", 0o755
        cli.chmod "#{gem_name}/bin/setup", 0o755
      end

      def create_skeleton
        template "%gem_name%/Gemfile.tt"
        template "%gem_name%/%gem_name%.gemspec.tt"
        template "#{LIB_ROOT_GEM}.rb.tt"
        template "#{LIB_ROOT_GEM}/identity.rb.tt"
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
gemsmith-15.5.0 lib/gemsmith/generators/gem.rb
gemsmith-15.4.0 lib/gemsmith/generators/gem.rb
gemsmith-15.3.0 lib/gemsmith/generators/gem.rb
gemsmith-15.2.0 lib/gemsmith/generators/gem.rb
gemsmith-15.1.1 lib/gemsmith/generators/gem.rb
gemsmith-15.1.0 lib/gemsmith/generators/gem.rb
gemsmith-15.0.0 lib/gemsmith/generators/gem.rb
gemsmith-14.11.0 lib/gemsmith/generators/gem.rb
gemsmith-14.10.1 lib/gemsmith/generators/gem.rb
gemsmith-14.10.0 lib/gemsmith/generators/gem.rb
gemsmith-14.9.0 lib/gemsmith/generators/gem.rb
gemsmith-14.8.0 lib/gemsmith/generators/gem.rb
gemsmith-14.7.0 lib/gemsmith/generators/gem.rb
gemsmith-14.6.0 lib/gemsmith/generators/gem.rb
gemsmith-14.5.0 lib/gemsmith/generators/gem.rb
gemsmith-14.4.0 lib/gemsmith/generators/gem.rb
gemsmith-14.3.0 lib/gemsmith/generators/gem.rb
gemsmith-14.2.0 lib/gemsmith/generators/gem.rb
gemsmith-14.1.3 lib/gemsmith/generators/gem.rb
gemsmith-14.1.2 lib/gemsmith/generators/gem.rb