Sha256: d4eb5a495769089d7fd34ae1ef70f0abcaa7e60a80c08d4ad54b4f4ffbbd9927

Contents?: true

Size: 600 Bytes

Versions: 12

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    module Git
      # Initializes project skeleton as a Git repository.
      class Setup
        def self.call realm, builder: Builder
          new(realm, builder: builder).call
        end

        def initialize realm, builder: Builder
          @realm = realm
          @builder = builder
        end

        def call
          return unless realm.build_git

          builder.call(realm).run("git init", chdir: realm.project_name)
        end

        private

        attr_reader :realm, :builder
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rubysmith-0.9.1 lib/rubysmith/builders/git/setup.rb
rubysmith-0.9.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.8.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.7.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.6.1 lib/rubysmith/builders/git/setup.rb
rubysmith-0.6.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.5.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.4.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.3.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.2.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.1.1 lib/rubysmith/builders/git/setup.rb
rubysmith-0.1.0 lib/rubysmith/builders/git/setup.rb