exe/soaspec in soaspec-0.2.19 vs exe/soaspec in soaspec-0.2.20

- old
+ new

@@ -2,10 +2,12 @@ require 'thor' $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'savon' require 'soaspec' +require 'soaspec/virtual_server' +require 'soaspec/wsdl_generator' module Soaspec # Common executable for Soaspec class Exe < Thor include Soaspec::ExeHelpers @@ -84,11 +86,10 @@ generate_from_wsdl(options) else require 'launchy' require 'soaspec/generate_server' Soaspec::GenerateServer.run! do - sleep 2 Launchy.open 'http://localhost:8999' if options[:open_browser] == 'true' end end end @@ -98,9 +99,24 @@ desc 'virtual_server [port]', 'Run virtual web service on localhost' def virtual_server(port = '4999') ENV['port'] = port require 'soaspec/virtual_server' Soaspec::VirtualServer.run!(Port: port) + end + + long_desc <<-LONGDESC + Run pry with Soaspec and other relevant libraries loaded. Pass either the relative path to files desired with a + '.rb' extension or the path to the folder to be loaded with 'require_all' + LONGDESC + desc 'pry [required_files]', 'Run pry with Soaspec and other relevant libraries loaded' + def pry(required_files = nil) + require 'soaspec' + + require 'require_all' + require_all required_files if required_files + + require 'pry' + Pry.start end end end Soaspec::Exe.start(ARGV)