logger.debug "Trying login"
scope = %w(profile group group_write)
- auth_url = "https://osdn.jp/account/oauth2ui/authorize?client_id=#{CLI.client_id}&state=cli#{Time.now.to_i}&response_type=code&scope=#{scope.join('%20')}"
+ auth_url = "https://#{OSDNClient.configure.host}/account/oauth2ui/authorize?client_id=#{CLI.client_id}&state=cli#{Time.now.to_i}&response_type=code&scope=#{scope.join('%20')}"
launch_brwoser auth_url
puts
@logger.formatter = proc { |severity, time, progname, msg|
"[%s] %s\n" % [severity, msg]
}
+ OSDNClient.configure do |config|
+ ENV['OSDN_API_OVERRIDE_HOST'] and
+ config.host = ENV['OSDN_API_OVERRIDE_HOST']
+ ENV['OSDN_API_SKIP_SSL_VERIFY'].to_s =~ /^(1|t(rue)?|y(es)?)$/ and
+ config.verify_ssl = false
+ end
end
attr_reader :logger