Sha256: ef72b3e65a5abd554ace11f921fe2a82933c279425843e0f72b4a0aa91b05ec2
Contents?: true
Size: 941 Bytes
Versions: 2
Compression:
Stored size: 941 Bytes
Contents
require 'ostruct' class Utils def self.credentials(options) credentials = OpenStruct.new if ENV['SLOWLANE_USERNAME'] credentials.username=ENV['SLOWLANE_USERNAME'] else if options[:username] == '<username>' puts "username is required" exit(-1) else credentials.username=options[:username] end end if ENV['SLOWLANE_PASSWORD'] credentials.password=ENV['SLOWLANE_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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slowlane-0.0.4 | lib/slowlane/portal/util.rb |
slowlane-0.0.3.alpha | lib/slowlane/portal/util.rb |