Module: ReleaseMe::VcsProvider

Included in:
BumpTag
Defined in:
lib/release_me/vcs_provider.rb

Instance Method Summary collapse

Instance Method Details

#provider_config(project_path = Dir.pwd) ⇒ Hash

Returns - adapter config.

Parameters:

  • - (String)

    path to the directory in which you want to check

Returns:

  • (Hash)
    • adapter config



9
10
11
12
13
14
15
16
17
18
# File 'lib/release_me/vcs_provider.rb', line 9

def provider_config(project_path = Dir.pwd)
  path = project_path || Dir.pwd
  config = local_config(path) || detect_provider_config
  raise 'Cannot find config' if config.nil?
  if vcs = config.fetch('vcs', nil)
    pdata = provider_data(vcs['provider'])
    config = pdata.merge(vcs) # merge and override the default provider data
  end
  OpenStruct.new(config)
end