Module: TentValidator

Defined in:
lib/tent-validator.rb,
lib/tent-validator/spec.rb,
lib/tent-validator/runner.rb,
lib/tent-validator/version.rb,
lib/tent-validator/runner/cli.rb,
lib/tent-validator/faraday/tent_rack_adapter.rb,
lib/tent-validator/validators/post_validator.rb,
lib/tent-validator/faraday/tent_net_http_adapter.rb,
lib/tent-validator/validators/new_post_validator.rb,
lib/tent-validator/validators/without_authentication/app_validator.rb

Defined Under Namespace

Modules: Runner, WithoutAuthentication Classes: PostValidator, Spec, TentNetHttpFaradayAdapter, TentRackFaradayAdapter

Constant Summary collapse

VERSION =
"0.2.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.remote_auth_detailsObject



32
33
34
# File 'lib/tent-validator.rb', line 32

def self.remote_auth_details
  @remote_auth_details || Hash.new
end

.remote_entity_uriObject

Returns the value of attribute remote_entity_uri.



18
19
20
# File 'lib/tent-validator.rb', line 18

def remote_entity_uri
  @remote_entity_uri
end

.remote_server_metaObject

Returns the value of attribute remote_server_meta.



18
19
20
# File 'lib/tent-validator.rb', line 18

def remote_server_meta
  @remote_server_meta
end

Class Method Details

.remote_adapterObject



36
37
38
# File 'lib/tent-validator.rb', line 36

def self.remote_adapter
  @remote_adapter ||= :tent_net_http
end

.setup!(options = {}) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/tent-validator.rb', line 21

def self.setup!(options = {})
  require 'tentd'
  TentD.setup!(:database_url => options[:tent_database_url] || ENV['TENT_DATABASE_URL'])

  [:remote_entity_uri, :remote_auth_details, :remote_server_meta].each do |key|
    if options.has_key?(key)
      self.send("#{key}=", options.delete(key))
    end
  end
end

.validatorsObject



40
41
42
# File 'lib/tent-validator.rb', line 40

def self.validators
  @validators ||= []
end