lib/soaspec/exe_helpers.rb in soaspec-0.1.13 vs lib/soaspec/exe_helpers.rb in soaspec-0.1.14

- old
+ new

@@ -2,9 +2,26 @@ require 'fileutils' module Soaspec # Help with tasks common to soaspec executables module ExeHelpers + # Create files in project depending on type of project + # @param [String] type Type of project to create, e.g., 'soap', 'rest' + def create_files_for(type) + case type + when 'soap' + create_file filename: 'lib/blz_service.rb' + create_file filename: 'lib/shared_example.rb' + create_file(filename: 'template/soap_template.xml', erb: false) + create_file(filename: 'spec/soap_spec.rb') + when 'rest' + create_file(filename: 'spec/rest_spec.rb') + create_file(filename: 'lib/package_service.rb') + else + # TODO: This needs to have placeholders explaining what to fill in + end + end + # Spec task string depending upon whether virtual is used def spec_task task_name = options[:virtual] ? 'spec: :start_test_server' : ':spec' "RSpec::Core::RakeTask.new(#{task_name}) do |t|" end \ No newline at end of file