Module: Soaspec
- Defined in:
- lib/soaspec.rb,
lib/soaspec/wait.rb,
lib/soaspec/errors.rb,
lib/soaspec/o_auth2.rb,
lib/soaspec/version.rb,
lib/soaspec/baseline.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_globals.rb,
lib/soaspec/exchange_handlers/soap_handler.rb,
lib/soaspec/exchange_handlers/soap_defaults.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, SoapDefaults, SoapGlobals, TestServer, VariableStorer, WsdlGenerator Classes: ApiLogger, Baseline, BaselineError, Error, ExchangeHandler, GenerateServer, OAuth2, ResponseError, RestHandler, RestRequest, SoapHandler, SoapRequest, SpecLogger, TemplateReader, TimeOutError, VirtualServer, Wait
Constant Summary collapse
- VERSION =
Returns Version of the gem.
'0.3.11'
Class Attribute Summary collapse
-
.always_use_keys ⇒ Boolean
writeonly
Set whether to transform strings to keys in request automatically.
-
.api_handler ⇒ ExchangeHandler
Handler A class inheriting from Soaspec::ExchangeHandler.
-
.auto_oauth ⇒ Boolean
Automatically add Authorization header to RestHandler where oauth2 credentials are specified.
-
.credentials_folder ⇒ String
Credentials folder used to store secret data (not in source control) E.g passwords Used in oauth2_file command.
-
.last_exchange ⇒ Exchange
Stores last exchange.
-
.log_warnings ⇒ Boolean
Whether to log warnings such as methods that may change usage in the future.
-
.template_folder ⇒ String
Folder used to store templates for API calls.
Class Method Summary collapse
-
.always_use_keys? ⇒ Boolean
Whether to transform strings to keys in request automatically.
-
.debug_oauth=(set) ⇒ Object
Specify whether to see params sent to and retrieved from oauth.
-
.debug_oauth? ⇒ Boolean
Whether to see params sent to & received from oauth URL.
-
.log_api_traffic=(set) ⇒ Object
Whether to log all API traffic.
-
.log_api_traffic? ⇒ Boolean
Whether to log all API traffic.
Class Attribute Details
.always_use_keys=(value) ⇒ Boolean (writeonly)
Set whether to transform strings to keys in request automatically.
81 82 83 |
# File 'lib/soaspec.rb', line 81 def always_use_keys=(value) @always_use_keys = value end |
.api_handler ⇒ ExchangeHandler
Returns handler A class inheriting from Soaspec::ExchangeHandler. Exchange class uses this.
71 72 73 74 75 76 77 |
# File 'lib/soaspec.rb', line 71 def api_handler unless @api_handler raise Soaspec::Error, '@exchange_handler not set. ' \ 'Set either with `Soaspec.api_handler = Handler.new` or within the exchange' end @api_handler end |
.auto_oauth ⇒ Boolean
Automatically add Authorization header to RestHandler where oauth2 credentials are specified
53 54 55 |
# File 'lib/soaspec.rb', line 53 def auto_oauth @auto_oauth end |
.credentials_folder ⇒ String
Credentials folder used to store secret data (not in source control) E.g passwords Used in oauth2_file command
64 65 66 |
# File 'lib/soaspec.rb', line 64 def credentials_folder @credentials_folder end |
.last_exchange ⇒ Exchange
Stores last exchange
50 51 52 |
# File 'lib/soaspec.rb', line 50 def last_exchange @last_exchange end |
.log_warnings ⇒ Boolean
Returns Whether to log warnings such as methods that may change usage in the future.
84 85 86 |
# File 'lib/soaspec.rb', line 84 def log_warnings @log_warnings end |
.template_folder ⇒ String
Folder used to store templates for API calls
47 48 49 |
# File 'lib/soaspec.rb', line 47 def template_folder @template_folder end |
Class Method Details
.always_use_keys? ⇒ Boolean
Returns Whether to transform strings to keys in request automatically.
87 88 89 |
# File 'lib/soaspec.rb', line 87 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
100 101 102 103 |
# File 'lib/soaspec.rb', line 100 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
Returns Whether to see params sent to & received from oauth URL.
92 93 94 95 |
# File 'lib/soaspec.rb', line 92 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
107 108 109 110 |
# File 'lib/soaspec.rb', line 107 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
Returns Whether to log all API traffic.
113 114 115 116 |
# File 'lib/soaspec.rb', line 113 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 |