lib/dingbot/configuration.rb in dingbot-0.2.3 vs lib/dingbot/configuration.rb in dingbot-0.2.5

- old
+ new

@@ -1,10 +1,10 @@ module DingBot # Defines constants and methods related to configuration. module Configuration - # An array of valid keys in the options hash when configuring a Sentry::API. - VALID_OPTIONS_KEYS = [:endpoint, :access_token, :httparty].freeze + # An array of valid keys in the options hash when configuring a DingBot::API. + VALID_OPTIONS_KEYS = [:endpoint, :access_token, :httparty, :secret].freeze # The user agent that will be sent to the API endpoint if none is set. DEFAULT_USER_AGENT = "DingBot Ruby Gem #{DingBot::VERSION}".freeze DEFAULT_ENDPOINT = "https://oapi.dingtalk.com/robot/send" @@ -32,9 +32,10 @@ # Resets all configuration options to the defaults. def reset self.endpoint = ENV['DINGTALK_ENDPOINT'] || DEFAULT_ENDPOINT self.access_token = ENV['DINGTALK_ACCESS_TOKEN'] + self.secret = ENV['DINGTALK_SECRET'] end end end