Module: Soaspec

Defined in:
lib/soaspec.rb,
lib/soaspec/version.rb,
lib/soaspec/exe_helpers.rb,
lib/soaspec/spec_logger.rb,
lib/soaspec/wsdl_generator.rb,
lib/soaspec/test_server/get_bank.rb,
lib/soaspec/test_server/invoices.rb,
lib/soaspec/test_server/puppy_service.rb,
lib/soaspec/test_server/test_attribute.rb,
lib/soaspec/test_server/test_namespace.rb,
lib/soaspec/exchange_handlers/rest_handler.rb,
lib/soaspec/exchange_handlers/rest_methods.rb,
lib/soaspec/exchange_handlers/soap_handler.rb,
lib/soaspec/exchange_handlers/rest_accessors.rb,
lib/soaspec/exchange_handlers/exchange_handler.rb,
lib/soaspec/exchange_handlers/handler_accessors.rb

Overview

Gem for handling SOAP and REST api tests

Defined Under Namespace

Modules: ExeHelpers, HandlerAccessors, RestAccessors, RestMethods, SoapAccessors, TestServer, WsdlGenerator Classes: ExchangeHandler, RestHandler, SoapHandler, SpecLogger

Constant Summary collapse

VERSION =
'0.1.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debug_oauth=(value) ⇒ Object (writeonly)

Specify whether to see params sent to and retrieved from oauth. This will put password in log file, only recommended for debugging



37
38
39
# File 'lib/soaspec.rb', line 37

def debug_oauth=(value)
  @debug_oauth = value
end

Class Method Details

.always_use_keys=(use_keys) ⇒ Object

Set whether to transform strings to keys in request automatically

Parameters:

  • use_keys (Boolean)


64
65
66
# File 'lib/soaspec.rb', line 64

def always_use_keys=(use_keys)
  @always_use_keys = use_keys
end

.always_use_keys?Boolean

Returns Whether to transform strings to keys in request automatically.

Returns:

  • (Boolean)

    Whether to transform strings to keys in request automatically



69
70
71
# File 'lib/soaspec.rb', line 69

def always_use_keys?
  @always_use_keys || true
end

.api_handlerObject

Exchange Handler class currently being used



58
59
60
# File 'lib/soaspec.rb', line 58

def api_handler
  @api_handler
end

.api_handler=(handler) ⇒ Object

Used so that exchange class knows what context it’s in

Parameters:

  • handler (ExchangeHandler)

    A class inheriting from Soaspec::ExchangeHandler. Exchange class uses this



53
54
55
# File 'lib/soaspec.rb', line 53

def api_handler=(handler)
  @api_handler = handler
end

.credentials_folderObject

Credentials folder used to store secret data (not in source control) E.g passwords



47
48
49
# File 'lib/soaspec.rb', line 47

def credentials_folder
  @credentials_folder
end

.credentials_folder=(folder) ⇒ Object

Folder used to store credentials Used in auth2_file command

Parameters:

  • folder (String)


42
43
44
# File 'lib/soaspec.rb', line 42

def credentials_folder=(folder)
  @credentials_folder = folder
end

.debug_oauth?Boolean

Returns Whether to see params sent to & received from oauth URL.

Returns:

  • (Boolean)

    Whether to see params sent to & received from oauth URL



74
75
76
# File 'lib/soaspec.rb', line 74

def debug_oauth?
  @debug_oauth || false
end

.log_api_traffic=(set) ⇒ Object

Whether to log all API traffic



79
80
81
82
# File 'lib/soaspec.rb', line 79

def log_api_traffic=(set)
  @log_api_traffic = set
  RestClient.log = nil unless set
end

.log_api_traffic?Boolean

Returns Whether to log all API traffic.

Returns:

  • (Boolean)

    Whether to log all API traffic



85
86
87
# File 'lib/soaspec.rb', line 85

def log_api_traffic?
  @log_api_traffic.nil? ? true : @log_api_traffic
end