Class: SyncGithubForks::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/sync_github_forks/cli.rb

Class Method Summary collapse

Class Method Details

.find_configObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/sync_github_forks/cli.rb', line 12

def self.find_config
  if ENV['SYNC_GITHUB_FORKS']
    return ENV['SYNC_GITHUB_FORKS']
  end

  search_path = [
    'sync_github_forks.yaml',
    '.sync_github_forks.yaml',
    "#{ENV['HOME']}/.sync_github_forks.yaml",
    "#{ENV['HOME']}/.sync_github_forks/config.yaml"
  ]

  search_path.each do |path|
    if File.exist?(path)
      return path
    end
  end

  return nil
end

.versionObject



33
34
35
# File 'lib/sync_github_forks/cli.rb', line 33

def self.version
  return SyncGithubForks::VERSION
end