Sha256: edb9ab4664175a8849603623c64989edf8f1568cf47529c3839412f462af8516

Contents?: true

Size: 1.3 KB

Versions: 72

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

require 'net/http'
require 'net/https'
require 'cgi'
require 'openssl'
require 'base64'
require 'forwardable'
require 'time'
require 'json'

require 'twilio-ruby/version' unless defined?(Twilio::VERSION)
require 'rack/twilio_webhook_authentication' if defined?(Rack) && defined?(Rack::MediaType)

require 'twilio-ruby/util'
require 'twilio-ruby/security/request_validator'
require 'twilio-ruby/util/configuration'

Dir[File.join(__dir__, 'twilio-ruby/framework/*.rb')].sort.each do |file|
  require file
end

module Twilio
  extend SingleForwardable

  autoload :JWT, File.join(__dir__, 'twilio-ruby', 'jwt', 'jwt.rb')
  autoload :TwiML, File.join(__dir__, 'twilio-ruby', 'twiml', 'twiml.rb')
  autoload :HTTP, File.join(__dir__, 'twilio-ruby', 'http.rb')
  autoload :REST, File.join(__dir__, 'twilio-ruby', 'rest.rb')

  def_delegators :configuration, :account_sid, :auth_token, :http_client, :region, :edge, :logger

  ##
  # Pre-configure with account SID and auth token so that you don't need to
  # pass them to various initializers each time.
  def self.configure(&block)
    yield configuration
  end

  ##
  # Returns an existing or instantiates a new configuration object.
  def self.configuration
    @configuration ||= Util::Configuration.new
  end

  private_class_method :configuration
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
whoosh-ruby-0.1.2 lib/twilio-ruby.rb
twilio-ruby-6.0.1 lib/twilio-ruby.rb
whoosh-ruby-0.1.1 lib/twilio-ruby.rb
twilio-ruby-6.0.0 lib/twilio-ruby.rb
twilio-ruby-6.0.0.pre.rc.3 lib/twilio-ruby.rb
twilio-ruby-5.77.0 lib/twilio-ruby.rb
twilio-ruby-6.0.0.pre.rc.2 lib/twilio-ruby.rb
twilio-ruby-5.76.0 lib/twilio-ruby.rb
twilio-ruby-6.0.0.pre.rc.1 lib/twilio-ruby.rb
twilio-ruby-5.75.0 lib/twilio-ruby.rb
twilio-ruby-5.74.5 lib/twilio-ruby.rb
twilio-ruby-5.74.4 lib/twilio-ruby.rb
twilio-ruby-5.74.3 lib/twilio-ruby.rb
twilio-ruby-5.74.2 lib/twilio-ruby.rb
twilio-ruby-5.74.1 lib/twilio-ruby.rb
twilio-ruby-5.74.0 lib/twilio-ruby.rb
twilio-ruby-5.73.4 lib/twilio-ruby.rb
twilio-ruby-5.73.3 lib/twilio-ruby.rb
twilio-ruby-5.73.2 lib/twilio-ruby.rb
twilio-ruby-5.73.1 lib/twilio-ruby.rb