lib/soaspec.rb in soaspec-0.2.8 vs lib/soaspec.rb in soaspec-0.2.9

- old
+ new

@@ -34,11 +34,10 @@ require 'soaspec/wsdl_generator' require 'soaspec/wait' # Gem for handling SOAP and REST api tests module Soaspec - @template_folder = 'templates' @auto_oauth = true class << self # Specify whether to see params sent to and retrieved from oauth. This will put password in log file, only recommended for debugging @@ -57,35 +56,25 @@ end # Folder used to store credentials # Used in auth2_file command # @param [String] folder - def credentials_folder=(folder) - @credentials_folder = folder - end + attr_writer :credentials_folder # Credentials folder used to store secret data (not in source control) E.g passwords - def credentials_folder - @credentials_folder - end + attr_reader :credentials_folder # Used so that exchange class knows what context it's in # @param [ExchangeHandler] handler A class inheriting from Soaspec::ExchangeHandler. Exchange class uses this - def api_handler=(handler) - @api_handler = handler - end + attr_writer :api_handler # Exchange Handler class currently being used - def api_handler - @api_handler - end + attr_reader :api_handler # Set whether to transform strings to keys in request automatically # @param [Boolean] use_keys - def always_use_keys=(use_keys) - @always_use_keys = use_keys - end + attr_writer :always_use_keys # @return [Boolean] Whether to transform strings to keys in request automatically def always_use_keys? @always_use_keys || true end @@ -95,16 +84,17 @@ @debug_oauth || false end # Whether to log all API traffic def log_api_traffic=(set) - @log_api_traffic = set - RestClient.log = nil unless 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 def log_api_traffic? - @log_api_traffic.nil? ? true : @log_api_traffic + puts 'Soaspec.log_api_traffic? now deprecated. Please use Soaspec::SpecLogger.log_api_traffic? instead' + Soaspec::SpecLogger.log_api_traffic? end end end RestClient.log = Soaspec::SpecLogger.create