Sha256: d8e9fa8b3ed0cc781b8b1bb55e4317d7e7897ab0ee7fddececca12780216bc0f

Contents?: true

Size: 724 Bytes

Versions: 15

Compression:

Stored size: 724 Bytes

Contents

# frozen_string_literal: true

require "tocer"

module Gemsmith
  module Generators
    # Generates documentation support.
    class Documentation < Base
      def create_files
        cli.template "%gem_name%/README.md.tt", configuration
        cli.template "%gem_name%/CONTRIBUTING.md.tt", configuration
        cli.template "%gem_name%/CODE_OF_CONDUCT.md.tt", configuration
        cli.template "%gem_name%/LICENSE.md.tt", configuration
        cli.template "%gem_name%/CHANGES.md.tt", configuration
      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

15 entries across 15 versions & 1 rubygems

Version Path
gemsmith-11.2.0 lib/gemsmith/generators/documentation.rb
gemsmith-11.1.0 lib/gemsmith/generators/documentation.rb
gemsmith-11.0.1 lib/gemsmith/generators/documentation.rb
gemsmith-11.0.0 lib/gemsmith/generators/documentation.rb
gemsmith-10.4.2 lib/gemsmith/generators/documentation.rb
gemsmith-10.4.1 lib/gemsmith/generators/documentation.rb
gemsmith-10.4.0 lib/gemsmith/generators/documentation.rb
gemsmith-10.3.0 lib/gemsmith/generators/documentation.rb
gemsmith-10.2.0 lib/gemsmith/generators/documentation.rb
gemsmith-10.1.0 lib/gemsmith/generators/documentation.rb
gemsmith-10.0.0 lib/gemsmith/generators/documentation.rb
gemsmith-9.6.0 lib/gemsmith/generators/documentation.rb
gemsmith-9.5.0 lib/gemsmith/generators/documentation.rb
gemsmith-9.4.0 lib/gemsmith/generators/documentation.rb
gemsmith-9.3.0 lib/gemsmith/generators/documentation.rb