exe/soaspec in soaspec-0.1.8 vs exe/soaspec in soaspec-0.1.9

- old
+ new

@@ -1,10 +1,10 @@ #!/usr/bin/env ruby require 'thor' -$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) +$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') require 'savon' require 'soaspec' module Soaspec @@ -30,12 +30,12 @@ @virtual = options[:virtual] puts "Creating files for soaspec. options are #{options}" create_file(filename: 'Gemfile') create_file(filename: 'Rakefile') create_file(filename: '.rspec') - create_file(filename: '.travis.yml') if options[:ci] == 'travis' create_file(filename: 'README.md') + create_file(filename: '.travis.yml') if options[:ci] == 'travis' if type == 'soap' create_file filename: 'lib/blz_service.rb' create_file filename: 'lib/shared_example.rb' end create_file(filename: 'config/data/default.yml') @@ -102,9 +102,18 @@ create_file(filename: "config/data/#{operation}.yml", content: @content) create_file(filename: "spec/#{operation}_spec.rb", content: generated_soap_spec_for(operation)) end end + long_desc <<-LONGDESC + Run virtual web services on localhost. See root for documentation of web services provided. + LONGDESC + 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 end end Soaspec::Exe.start(ARGV) \ No newline at end of file