Sha256: 2dfa88b762f84b353aa234d232ea2674fb69c6baa901ce709483fa4c05590302

Contents?: true

Size: 637 Bytes

Versions: 3

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Gemsmith
  module Generators
    # Generates Git support.
    class Git < Base
      def create_ignore_file
        template "%gem_name%/.gitignore.tt"
      end

      # :reek:TooManyStatements
      def create_repository
        subject = "Added Gemsmith skeleton."
        body = "Built with #{Identity.version_label}."

        Dir.chdir gem_root do
          `git init`
          `git add .`
          `git commit --all --no-verify --message "#{subject}" --message "#{body}"`
        end
      end

      def run
        create_ignore_file
        create_repository
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gemsmith-13.4.0 lib/gemsmith/generators/git.rb
gemsmith-13.3.0 lib/gemsmith/generators/git.rb
gemsmith-13.2.0 lib/gemsmith/generators/git.rb