class SinkUtility::User
Public Instance Methods
current_users()
click to toggle source
# File lib/sink_utility.rb, line 47 def current_users store = YAML::Store.new("data.yml") current_users = [] current_users << "Bitbucket: " + store.transaction { store[:bitbucket_user] } if store.transaction { store[:bitbucket_user] } current_users << "Github: " + store.transaction { store[:github_user] } if store.transaction { store[:github_user] } return current_users end
setup(username)
click to toggle source
# File lib/sink_utility.rb, line 31 def setup(username) case ARGV[1] when "bitbucket" store = YAML::Store.new("data.yml") store.transaction do store[:bitbucket_user] = username end when "github" store = YAML::Store.new("data.yml") store.transaction do store[:github_user] = username end else puts "Please specify either github or bitbucket" end end