Sha256: 52b430bffc5f78d55c2bb46d2747903dc05bc4fa6123646ceecdbcf0ae6e7688

Contents?: true

Size: 638 Bytes

Versions: 8

Compression:

Stored size: 638 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

8 entries across 8 versions & 1 rubygems

Version Path
gemsmith-13.1.0 lib/gemsmith/generators/git.rb
gemsmith-13.0.0 lib/gemsmith/generators/git.rb
gemsmith-12.4.0 lib/gemsmith/generators/git.rb
gemsmith-12.3.0 lib/gemsmith/generators/git.rb
gemsmith-12.2.0 lib/gemsmith/generators/git.rb
gemsmith-12.1.0 lib/gemsmith/generators/git.rb
gemsmith-12.0.0 lib/gemsmith/generators/git.rb
gemsmith-11.3.0 lib/gemsmith/generators/git.rb