lib/pacto/contract_factory.rb in pacto-0.4.0.rc1 vs lib/pacto/contract_factory.rb in pacto-0.4.0.rc2

- old
+ new

@@ -14,18 +14,18 @@ def remove_factory(format) @factories.delete format end - def build(contract_files, host, format = :default) + def build(contract_files, host, format = :legacy) factory = @factories[format.to_sym] fail "No Contract factory registered for #{format}" if factory.nil? contract_files.map { |file| factory.build_from_file(file, host) }.flatten end - def load_contracts(contracts_path, host, format = :default) + def load_contracts(contracts_path, host, format = :legacy) factory = @factories[format.to_sym] files = factory.files_for(contracts_path) contracts = ContractFactory.build(files, host, format) contracts end @@ -35,7 +35,7 @@ def_delegators :instance, *ContractFactory.instance_methods(false) end end end -require 'pacto/native_contract_factory' -require 'pacto/swagger_contract_factory' +require 'pacto/formats/legacy/contract_factory' +require 'pacto/formats/swagger/contract_factory'