
aliyun_vod_config = {}

begin
  config = Rails.application.config_for(:configuration)
  aliyun_vod_config = config['aliyun_vod']
  raise 'oauth wechat config missing' if aliyun_vod_config.blank?
rescue => ex
  raise ex if Rails.env.production?

  puts %Q{\033[33m [warning] aliyun vod config or configuration.yml missing,
           please add it or execute 'cp config/configuration.yml.example config/configuration.yml' \033[0m}
  aliyun_vod_config = {}
end

AliyunVod.access_key_id     = aliyun_vod_config['access_key_id']
AliyunVod.access_key_secret = aliyun_vod_config['access_key_secret']
AliyunVod.base_url          = aliyun_vod_config['base_url'] || 'http://vod.cn-shanghai.aliyuncs.com'.freeze
AliyunVod.cate_id           = aliyun_vod_config['cate_id']
AliyunVod.callback_url      = aliyun_vod_config['callback_url']
AliyunVod.signature_key     = aliyun_vod_config['signature_key']
