Sha256: 1405a6de5855a82a5f5fee6708d47159de2702723dfc6e44bf177944707f3bdb

Contents?: true

Size: 861 Bytes

Versions: 2

Compression:

Stored size: 861 Bytes

Contents

require 'digest'
require 'openssl'
require 'json'
require 'net/http'

require 'rest-client'

module Brickwall
  class << self
    attr_writer :configuration

    def configuration
      @configuration ||= Configuration.new
    end

    def configure
      yield configuration
    end
  end

  class Configuration
    attr_accessor :brick_public_key, :brick_private_key,
                  :widget_project_key, :widget_secret_key,
                  :application_domain

    def configured?
      present?(brick_public_key) &&
        present?(brick_private_key) &&
        present?(widget_project_key) &&
        present?(widget_secret_key)
    end

    private

    def present?(str)
      str != nil && str.match(/\A\s*\z/) == nil
    end
  end
end

require 'brickwall/version'
require 'brickwall/pingback'
require 'brickwall/signature'
require 'brickwall/api'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brickwall-0.2.0 lib/brickwall.rb
brickwall-0.1.0 lib/brickwall.rb