Class: Gemsmith::Generators::Gem

Inherits:
Base
  • Object
show all
Defined in:
lib/gemsmith/generators/gem.rb

Overview

Generates default gem support.

Instance Method Summary collapse

Methods inherited from Base

#initialize, run

Constructor Details

This class inherits a constructor from Gemsmith::Generators::Base

Instance Method Details

#runObject

rubocop:disable Metrics/AbcSize



8
9
10
11
12
13
14
15
# File 'lib/gemsmith/generators/gem.rb', line 8

def run
  cli.template "%gem_name%/bin/setup.tt", configuration
  cli.template "%gem_name%/Gemfile.tt", configuration
  cli.template "%gem_name%/%gem_name%.gemspec.tt", configuration
  cli.template "#{lib_gem_root}.rb.tt", configuration
  cli.template "#{lib_gem_root}/identity.rb.tt", configuration
  cli.chmod "#{configuration.dig(:gem, :name)}/bin/setup", 0o755
end