Skip to content

Commit

Permalink
Merge branch 'release/v0.10.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 17, 2013
2 parents 3d0165b + 0ccbcf4 commit 905245b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 8 deletions.
12 changes: 9 additions & 3 deletions app/helpers/washout_builder_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,18 @@ def create_html_public_method(xml, operation, formats)
xml.p "Return value:"
xml.ul {
xml.li {
if !formats[:out].nil?

unless formats[:out].nil?
complex_class = formats[:out][0].get_complex_class_name
if WashoutBuilder::Type::BASIC_TYPES.include?(formats[:out][0].type)
xml.span("class" => "pre") { |xml| xml.span("class" => "blue") { |sp| sp << "#{formats[:out][0].type}" } }
else
xml.span("class" => "pre") { xml.a("href" => "##{formats[:out][0].type}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"#{formats[:out][0].type}" } } }
unless complex_class.nil?
if formats[:out][0].multiplied == false
xml.span("class" => "pre") { xml.a("href" => "##{complex_class}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"#{complex_class}" } } }
else
xml.span("class" => "pre") { xml.a("href" => "##{complex_class}") { |xml| xml.span("class" => "lightBlue") { |y| y<<"Array of #{complex_class}" } } }
end
end
end
else
xml.span("class" => "pre") { |sp| sp << "void" }
Expand Down
4 changes: 2 additions & 2 deletions lib/washout_builder/document/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def fault_types
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.select { |x| x.is_a?(Class) && (x.ancestors.include?(WashOut::SOAPError) || x.ancestors.include?(SOAPError) ) } unless defined.blank?
fault_types = []
if defined.blank?
defined = [SOAPError]
defined = [WashOut::SOAPError]
else
defined << SOAPError
defined << WashOut::SOAPError
end
defined.each{ |exception_class| exception_class.get_fault_class_ancestors( fault_types, true)} unless defined.blank?
complex_types = extract_nested_complex_types_from_exceptions(fault_types)
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WashoutBuilder
VERSION = "0.10.3"
VERSION = "0.10.4"
end
10 changes: 10 additions & 0 deletions spec/lib/washout_builder/document/generator_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#encoding:utf-8
require 'spec_helper'


describe WashoutBuilder::Document::Generator do

let(:generator) { FactoryGirl.build(:generator)}


end
18 changes: 18 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
require "savon"
require 'wash_out'

require 'capybara/rspec'
require 'capybara/rails'
require 'capybara/firebug/rspec'
require 'forgery/forgery'
require 'webmock/rspec'
require 'headless'

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Expand All @@ -33,8 +40,19 @@
# mock framework
# config.mock_with :mocha

#config.include Savon::Spec::Macros
#config.include AbstractController::Translation

config.before(:suite) do
# Reload factories in spec/factories.
FactoryGirl.reload
# Blocks all remote HTTP requests by default, they need to be stubbed.
WebMock.disable_net_connect!(:allow_localhost => true)
if !RUBY_PLATFORM.downcase.include?('darwin') && !ENV['NO_HEADLESS']
Headless.new(reuse: false, destroy_on_exit: false).start
end
end

config.mock_with :rspec
config.before(:all) do
WashoutBuilder::Engine.config.wash_out = {
Expand Down
4 changes: 2 additions & 2 deletions washout_builder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Gem::Specification.new do |s|
s.name = "washout_builder"
s.version = WashoutBuilder::VERSION
s.platform = Gem::Platform::RUBY
s.summary = "WashOut Soap Service Documentation builder (extends WashOut https://github.com/inossidabile/wash_out/)"
s.summary = "WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/)"
s.email = "[email protected]"
s.homepage = "http://github.com/bogdanRada/washout_builder/"
s.description = "WashOut Soap Service Documentation builder (extends WashOut https://github.com/inossidabile/wash_out/) "
s.description = "WashOut Soap Service HTML-Documentation generator (extends WashOut https://github.com/inossidabile/wash_out/) "
s.authors = ["bogdanRada"]
s.date = "2013-11-20"

Expand Down

0 comments on commit 905245b

Please sign in to comment.