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/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/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_parameters.rb,
lib/soaspec/exchange_handlers/exchange_handler.rb,
lib/soaspec/exchange_handlers/handler_accessors.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: ExeHelpers, HandlerAccessors, RestExchangeFactory, RestMethods, RestParameters, RestParametersDefaults, SoapAccessors, TestServer, WsdlGenerator Classes: ExchangeHandler, OAuth2, RestHandler, SoapHandler, SpecLogger, TemplateReader, TimeOutError, VirtualServer, Wait
Constant Summary collapse
- VERSION =
'0.2.8'.freeze
Class Attribute Summary collapse
-
.auto_oauth ⇒ Object
Automatically add Authorization header to RestHandler where oauth2 credentials are specified.
-
.debug_oauth ⇒ Object
writeonly
Specify whether to see params sent to and retrieved from oauth.
-
.last_exchange ⇒ Object
Stores last exchange.
-
.template_folder ⇒ Object
Folder used to store templates for API calls.
Class Method Summary collapse
-
.always_use_keys=(use_keys) ⇒ Object
Set whether to transform strings to keys in request automatically.
-
.always_use_keys? ⇒ Boolean
Whether to transform strings to keys in request automatically.
-
.api_handler ⇒ Object
Exchange Handler class currently being used.
-
.api_handler=(handler) ⇒ Object
Used so that exchange class knows what context it’s in.
-
.credentials_folder ⇒ Object
Credentials folder used to store secret data (not in source control) E.g passwords.
-
.credentials_folder=(folder) ⇒ Object
Folder used to store credentials Used in auth2_file command.
-
.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
.auto_oauth ⇒ Object
Automatically add Authorization header to RestHandler where oauth2 credentials are specified
51 52 53 |
# File 'lib/soaspec.rb', line 51 def auto_oauth @auto_oauth end |
.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
45 46 47 |
# File 'lib/soaspec.rb', line 45 def debug_oauth=(value) @debug_oauth = value end |
.last_exchange ⇒ Object
Stores last exchange
49 50 51 |
# File 'lib/soaspec.rb', line 49 def last_exchange @last_exchange end |
.template_folder ⇒ Object
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=(use_keys) ⇒ Object
Set whether to transform strings to keys in request automatically
84 85 86 |
# File 'lib/soaspec.rb', line 84 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.
89 90 91 |
# File 'lib/soaspec.rb', line 89 def always_use_keys? @always_use_keys || true end |
.api_handler ⇒ Object
Exchange Handler class currently being used
78 79 80 |
# File 'lib/soaspec.rb', line 78 def api_handler @api_handler end |
.api_handler=(handler) ⇒ Object
Used so that exchange class knows what context it’s in
73 74 75 |
# File 'lib/soaspec.rb', line 73 def api_handler=(handler) @api_handler = handler end |
.credentials_folder ⇒ Object
Credentials folder used to store secret data (not in source control) E.g passwords
67 68 69 |
# File 'lib/soaspec.rb', line 67 def credentials_folder @credentials_folder end |
.credentials_folder=(folder) ⇒ Object
Folder used to store credentials Used in auth2_file command
62 63 64 |
# File 'lib/soaspec.rb', line 62 def credentials_folder=(folder) @credentials_folder = folder end |
.debug_oauth? ⇒ Boolean
Returns Whether to see params sent to & received from oauth URL.
94 95 96 |
# File 'lib/soaspec.rb', line 94 def debug_oauth? @debug_oauth || false end |
.log_api_traffic=(set) ⇒ Object
Whether to log all API traffic
99 100 101 102 |
# File 'lib/soaspec.rb', line 99 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.
105 106 107 |
# File 'lib/soaspec.rb', line 105 def log_api_traffic? @log_api_traffic.nil? ? true : @log_api_traffic end |