module Soaspec
Gem for handling SOAP and REST api tests
Constants
- VERSION
@return [String] Version of the gem
Attributes
Set whether to transform strings to keys in request automatically. @return [Boolean]
Used so that exchange class knows what context it's in. @return [ExchangeHandler] handler A class inheriting from Soaspec::ExchangeHandler
. Exchange
class uses this
Automatically add Authorization header to RestHandler
where oauth2 credentials are specified @return [Boolean] Whether to add authorization header
Credentials folder used to store secret data (not in source control) E.g passwords Used in oauth2_file command @return [String] Folder in which credentials are stored
Stores last exchange @return [Exchange]
@return [Boolean] Whether to log warnings such as methods that may change usage in the future
Folder used to store templates for API calls @return [String]
Public Class Methods
@return [Boolean] Whether to transform strings to keys in request automatically
# File lib/soaspec.rb, line 87 def always_use_keys? @always_use_keys || true end
@return [ExchangeHandler] handler A class inheriting from Soaspec::ExchangeHandler
. Exchange
class uses this
# 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
Specify whether to see params sent to and retrieved from oauth. This will put password in log file, only recommended for debugging @param [String] set Whether to debug oauth
# 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
@return [Boolean] Whether to see params sent to & received from oauth URL
# 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
Whether to log all API traffic @param [Boolean] set
# 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
@return [Boolean] Whether to log all API traffic
# 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
Folder used to store templates for API calls Converts folder / folders into an array depending upon string passed
# File lib/soaspec.rb, line 57 def template_folder=(folder) @template_folder = folder.include?('\\') ? folder.split('\\') : folder.split('/') end