Sha256: 263210525c9f1d8aad073276600636b991cdac13afa0ff68da3b9b854f41da56

Contents?: true

Size: 524 Bytes

Versions: 4

Compression:

Stored size: 524 Bytes

Contents

module Gemaker
  module Cmd
    class ConfigureGit < Gemaker::Cmd::Base
      def in_normal_context
        remove_in_gem(".git")
        do_initial_commit
      end

      def in_engine_context
        copy_file("engine/gitignore", ".gitignore")
        do_initial_commit
      end

      private

      def do_initial_commit
        execute_in_gem("git init")
        execute_in_gem("bundle install")
        execute_in_gem("git add .")
        execute_in_gem("git commit -m 'Initial commit'")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gemaker-1.0.0 lib/gemaker/commands/configure_git.rb
gemaker-0.6.0 lib/gemaker/commands/configure_git.rb
gemaker-0.5.0 lib/gemaker/commands/configure_git.rb
gemaker-0.4.0 lib/gemaker/commands/configure_git.rb