Module: Soaspec

Defined in:
lib/soaspec.rb,
lib/soaspec/wait.rb,
lib/soaspec/o_auth2.rb,
lib/soaspec/version.rb,
lib/soaspec/exe_helpers.rb,
lib/soaspec/spec_logger.rb,
lib/soaspec/virtual_server.rb,
lib/soaspec/wsdl_generator.rb,
lib/soaspec/generate_server.rb,
lib/soaspec/template_reader.rb,
lib/soaspec/test_server/get_bank.rb,
lib/soaspec/test_server/invoices.rb,
lib/soaspec/test_server/id_manager.rb,
lib/soaspec/exchange/request_builder.rb,
lib/soaspec/exchange/variable_storer.rb,
lib/soaspec/test_server/puppy_service.rb,
lib/soaspec/exchange/exchange_repeater.rb,
lib/soaspec/test_server/test_attribute.rb,
lib/soaspec/test_server/test_namespace.rb,
lib/soaspec/exchange/exchange_extractor.rb,
lib/soaspec/exchange/exchange_properties.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_parameters.rb,
lib/soaspec/exchange_handlers/exchange_handler.rb,
lib/soaspec/exchange_handlers/handler_accessors.rb,
lib/soaspec/exchange_handlers/response_extractor.rb,
lib/soaspec/exchange_handlers/request/rest_request.rb,
lib/soaspec/exchange_handlers/request/soap_request.rb,
lib/soaspec/exchange_handlers/rest_exchanger_factory.rb,
lib/soaspec/exchange_handlers/rest_parameters_defaults.rb

Overview

Gem for handling SOAP and REST api tests

Defined Under Namespace

Modules: ExchangeExtractor, ExchangeProperties, ExchangeRepeater, ExeHelpers, HandlerAccessors, RequestBuilder, ResponseExtractor, RestExchangeFactory, RestMethods, RestParameters, RestParametersDefaults, SoapAccessors, TestServer, VariableStorer, WsdlGenerator Classes: ApiLogger, ExchangeHandler, GenerateServer, OAuth2, RestHandler, RestRequest, SoapHandler, SoapRequest, SpecLogger, TemplateReader, TimeOutError, VirtualServer, Wait

Constant Summary collapse

VERSION =
'0.2.25'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.always_use_keys=(value) ⇒ Boolean (writeonly)

Set whether to transform strings to keys in request automatically.



66
67
68
# File 'lib/soaspec.rb', line 66

def always_use_keys=(value)
  @always_use_keys = value
end

.api_handlerExchangeHandler

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



62
63
64
# File 'lib/soaspec.rb', line 62

def api_handler
  @api_handler
end

.auto_oauthBoolean

Automatically add Authorization header to RestHandler where oauth2 credentials are specified



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

def auto_oauth
  @auto_oauth
end

.credentials_folderString

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



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

def credentials_folder
  @credentials_folder
end

.last_exchangeExchange

Stores last exchange



44
45
46
# File 'lib/soaspec.rb', line 44

def last_exchange
  @last_exchange
end

.log_warningsBoolean



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

def log_warnings
  @log_warnings
end

.template_folderString

Folder used to store templates for API calls



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

def template_folder
  @template_folder
end

Class Method Details

.always_use_keys?Boolean



72
73
74
# File 'lib/soaspec.rb', line 72

def always_use_keys?
  @always_use_keys || true
end

.debug_oauth=(set) ⇒ Object

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



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

def debug_oauth=(set)
  puts 'Soaspec.debug_oauth= now deprecated. Please use Soaspec::OAuth2.debug_oauth= instead'
  Soaspec::OAuth2.debug_oauth = set
end

.debug_oauth?Boolean



77
78
79
80
# File 'lib/soaspec.rb', line 77

def debug_oauth?
  puts 'Soaspec.debug_oauth? now deprecated. Please use Soaspec::OAuth2.debug_oauth? instead'
  Soaspec::OAuth2.debug_oauth?
end

.log_api_traffic=(set) ⇒ Object

Whether to log all API traffic



92
93
94
95
# File 'lib/soaspec.rb', line 92

def log_api_traffic=(set)
  puts 'Soaspec.log_api_traffic= now deprecated. Please use Soaspec::SpecLogger.log_api_traffic= instead'
  Soaspec::SpecLogger.log_api_traffic = set
end

.log_api_traffic?Boolean



98
99
100
101
# File 'lib/soaspec.rb', line 98

def log_api_traffic?
  puts 'Soaspec.log_api_traffic? now deprecated. Please use Soaspec::SpecLogger.log_api_traffic? instead'
  Soaspec::SpecLogger.log_api_traffic?
end