Class: Middleman::Deploy::Strategies::Git::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-deploy/strategies/git/base.rb

Direct Known Subclasses

ForcePush, Submodule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(build_dir, remote, branch, commit_message) ⇒ Base



8
9
10
11
12
13
14
15
# File 'lib/middleman-deploy/strategies/git/base.rb', line 8

def initialize(build_dir, remote, branch, commit_message)
  self.branch         = branch
  self.build_dir      = build_dir
  self.remote         = remote
  self.commit_message = commit_message
  self.user_name      = `git config --get user.name`
  self.user_email     = `git config --get user.email`
end

Instance Attribute Details

#branchObject

Returns the value of attribute branch.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def branch
  @branch
end

#build_dirObject

Returns the value of attribute build_dir.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def build_dir
  @build_dir
end

#commit_messageObject

Returns the value of attribute commit_message.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def commit_message
  @commit_message
end

#remoteObject

Returns the value of attribute remote.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def remote
  @remote
end

#user_emailObject

Returns the value of attribute user_email.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def user_email
  @user_email
end

#user_nameObject

Returns the value of attribute user_name.



6
7
8
# File 'lib/middleman-deploy/strategies/git/base.rb', line 6

def user_name
  @user_name
end

Instance Method Details

#processObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/middleman-deploy/strategies/git/base.rb', line 17

def process
  raise NotImplementedError
end