Module: Castle

Defined in:
lib/castle.rb,
lib/castle/api.rb,
lib/castle/utils.rb,
lib/castle/client.rb,
lib/castle/errors.rb,
lib/castle/events.rb,
lib/castle/review.rb,
lib/castle/command.rb,
lib/castle/version.rb,
lib/castle/api/request.rb,
lib/castle/api/session.rb,
lib/castle/secure_mode.rb,
lib/castle/api/response.rb,
lib/castle/utils/cloner.rb,
lib/castle/utils/merger.rb,
lib/castle/configuration.rb,
lib/castle/extractors/ip.rb,
lib/castle/support/rails.rb,
lib/castle/commands/track.rb,
lib/castle/context/merger.rb,
lib/castle/headers_filter.rb,
lib/castle/support/hanami.rb,
lib/castle/commands/review.rb,
lib/castle/context/default.rb,
lib/castle/utils/timestamp.rb,
lib/castle/commands/identify.rb,
lib/castle/context/sanitizer.rb,
lib/castle/headers_formatter.rb,
lib/castle/extractors/headers.rb,
lib/castle/validators/present.rb,
lib/castle/commands/impersonate.rb,
lib/castle/extractors/client_id.rb,
lib/castle/commands/authenticate.rb,
lib/castle/failover_auth_response.rb,
lib/castle/validators/not_supported.rb

Overview

main sdk module

Defined Under Namespace

Modules: API, CastleClient, Commands, Context, Events, Extractors, Hanami, SecureMode, Utils, Validators Classes: ApiError, BadRequestError, Client, Command, Configuration, ConfigurationError, Error, FailoverAuthResponse, ForbiddenError, HeadersFilter, HeadersFormatter, ImpersonationFailed, InternalServerError, InvalidParametersError, NotFoundError, RequestError, Review, SecurityError, UnauthorizedError, UserUnauthorizedError

Constant Summary collapse

VERSION =
'4.3.0'

Class Method Summary collapse

Class Method Details

.api_secret=(api_secret) ⇒ Object



60
61
62
# File 'lib/castle.rb', line 60

def api_secret=(api_secret)
  config.api_secret = api_secret
end

.configObject



56
57
58
# File 'lib/castle.rb', line 56

def config
  Configuration.instance
end

.configure(config_hash = nil) {|config| ... } ⇒ Object

Yields:



48
49
50
51
52
53
54
# File 'lib/castle.rb', line 48

def configure(config_hash = nil)
  (config_hash || {}).each do |config_name, config_value|
    config.send("#{config_name}=", config_value)
  end

  yield(config) if block_given?
end