class Flow::Build::Service::Git
Attributes
branch[R]
git_url[R]
repo_dir[R]
repo_name[R]
script[RW]
ssh_key[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/flow/build/service/git.rb, line 16 def initialize(options = {}) @git_url = options.fetch(:git_url, '') @ssh_key = options.fetch(:ssh_key, '') @repo_dir = options.fetch(:repo_dir, '') @repo_name = options.fetch(:repo_name, '') @branch = options.fetch(:branch, 'master') @script = [] end
Public Instance Methods
apply()
click to toggle source
# File lib/flow/build/service/git.rb, line 29 def apply install_ssh_key git_clone script.join("\n") end
git_host()
click to toggle source
# File lib/flow/build/service/git.rb, line 25 def git_host git_url =~ %r(^(?:https?|git)(?:://|@)([^/]*?)(?:/|:)) && $1.split('@').last end