class V1gittools::BaseTool
Attributes
args[R]
config[R]
git[R]
github[R]
repo_config[R]
v1[R]
Public Class Methods
new(args=nil)
click to toggle source
# File lib/v1gittools/base_tool.rb, line 5 def initialize args=nil @args = args @config = V1gittools::config check_proper_init @repo_config = V1gittools::repo_config git_root_path = `git rev-parse --show-toplevel`.strip @git = Git.open(git_root_path) @v1 = VersiononeSdk::Client.new(@config[:v1config]) @github = Github.new(Hash[@config[:github].map{ |k, v| [k.to_sym, v] }]) end
Public Instance Methods
check_proper_init()
click to toggle source
# File lib/v1gittools/base_tool.rb, line 18 def check_proper_init if @config[:github] && @config[:github][:oauth_token] == 'AUTOGENERATE' puts "v1git has not been setup for this repository yet. Please run #{$0} init to initialize and setup v1git." exit end end