Sha256: e5c99c241bd3d1c767cdf28c49bc210d2161c627096291e6298cd0daf84dc634

Contents?: true

Size: 629 Bytes

Versions: 11

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

require "tocer"

module Gemsmith
  module Generators
    # Generates documentation support.
    class Documentation < Base
      def create_files
        template "%gem_name%/README.md.tt"
        template "%gem_name%/CONTRIBUTING.md.tt"
        template "%gem_name%/CODE_OF_CONDUCT.md.tt"
        template "%gem_name%/LICENSE.md.tt"
        template "%gem_name%/CHANGES.md.tt"
      end

      def update_readme
        readme = File.join gem_root, "README.md"
        Tocer::Writer.new(readme).write
      end

      def run
        create_files
        update_readme
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gemsmith-13.4.0 lib/gemsmith/generators/documentation.rb
gemsmith-13.3.0 lib/gemsmith/generators/documentation.rb
gemsmith-13.2.0 lib/gemsmith/generators/documentation.rb
gemsmith-13.1.0 lib/gemsmith/generators/documentation.rb
gemsmith-13.0.0 lib/gemsmith/generators/documentation.rb
gemsmith-12.4.0 lib/gemsmith/generators/documentation.rb
gemsmith-12.3.0 lib/gemsmith/generators/documentation.rb
gemsmith-12.2.0 lib/gemsmith/generators/documentation.rb
gemsmith-12.1.0 lib/gemsmith/generators/documentation.rb
gemsmith-12.0.0 lib/gemsmith/generators/documentation.rb
gemsmith-11.3.0 lib/gemsmith/generators/documentation.rb