Sha256: 71acba35ee107da56f3b4154384a5f890f190065a0aa51481f15639c2187a228
Contents?: true
Size: 969 Bytes
Versions: 14
Compression:
Stored size: 969 Bytes
Contents
require 'ostruct' class Utils def self.credentials(options) credentials = OpenStruct.new if ENV['SLOWLANE_PORTAL_USERNAME'] credentials.username=ENV['SLOWLANE_PORTAL_USERNAME'] else if options[:username] == '<username>' puts "username is required" exit(-1) else credentials.username=options[:username] end end if ENV['SLOWLANE_PORTAL_PASSWORD'] credentials.password=ENV['SLOWLANE_PORTAL_PASSWORD'] else if options[:password] == '<password>' puts "password is required" exit(-1) else credentials.password=options[:username] end end return credentials end def self.team(options) if ENV['SLOWLANE_PORTAL_TEAM'] team=ENV['SLOWLANE_PORTAL_TEAM'] else if options[:team] == '<team>' puts "team is required" exit(-1) else team=options[:team] end end return team end end
Version data entries
14 entries across 14 versions & 1 rubygems