lib/produce/developer_center.rb in produce-0.1.2 vs lib/produce/developer_center.rb in produce-0.1.3
- old
+ new
@@ -2,10 +2,11 @@
require 'open-uri'
require 'openssl'
require 'capybara'
require 'capybara/poltergeist'
+require 'phantomjs/poltergeist'
module Produce
class DeveloperCenter
# This error occurs only if there is something wrong with the given login data
class DeveloperCenterLoginError < StandardError
@@ -124,14 +125,11 @@
error_occured(ex)
end
end
def select_team
- team_id = ENV["PRODUCE_TEAM_ID"]
- team_id = nil if team_id.to_s.length == 0
-
- team_name = ENV["PRODUCE_TEAM_NAME"]
- team_name = nil if team_name.to_s.length == 0
+ team_id = Config.val(:team_id) if Config.has_key?(:team_id)
+ team_name = Config.val(:team_name) if Config.has_key?(:team_name)
if team_id == nil and team_name == nil
Helper.log.info "You can store you preferred team using the environment variable `PRODUCE_TEAM_ID` or `PRODUCE_TEAM_NAME`".green
Helper.log.info "Your ID belongs to the following teams:".green
end