Skip to content

Commit

Permalink
Merge branch 'release/v0.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 9, 2013
2 parents 079e769 + 0a0c20e commit 29ef690
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
19 changes: 15 additions & 4 deletions lib/washout_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,22 @@ def wash_out(controller_name, options={})


Mime::Type.register "application/soap+xml", :soap
ActiveRecord::Base.send :extend, WashOut::Model if defined?(ActiveRecord)
WashOut::Dispatcher::SOAPError.send :include, ActiveModel::MassAssignmentSecurity
ActiveRecord::Base.send :extend, WashOut::Model if defined?(ActiveRecord) && defined?(WashOut::Model)
ActiveRecord::Base.send :extend, WashOut::Rails::ActiveRecord if defined?(ActiveRecord) && defined?(WashOut::Rails::ActiveRecord)
WashOut::Dispatcher::SOAPError.send :include, ActiveModel::MassAssignmentSecurity if defined?(WashOut::Dispatcher)
WashOut::SOAPError.send :include, ActiveModel::MassAssignmentSecurity if defined?(WashOut::SOAPError)

WashOut::SOAP::ClassMethods.class_eval do
alias_method :original_soap_action, :soap_action

if defined?(WashOut::Soap)
WashOut::SOAP::ClassMethods.class_eval do
alias_method :original_soap_action, :soap_action
end
end

if defined?(WashOut::Rails::Controller)
WashOut::Rails::Controller::ClassMethods.class_eval do
alias_method :original_soap_action, :soap_action
end
end

ActionController::Renderers.add :soap do |what, options|
Expand Down
3 changes: 2 additions & 1 deletion lib/washout_builder/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class Engine < ::Rails::Engine
match "/washout" => "washout_builder#all", :via => :get, :format => false
end
if app.config.wash_out[:catch_xml_errors]
app.config.middleware.insert_after 'ActionDispatch::ShowExceptions', WashOut::Middleware
app.config.middleware.insert_after 'ActionDispatch::ShowExceptions', WashOut::Middleware if defined?(WashOut::Middleware)
app.config.middleware.insert_after 'ActionDispatch::ShowExceptions', WashOut::Middlewares::Catcher if defined?(WashOut::Middlewares::Catcher)
end
end
end
Expand Down
7 changes: 4 additions & 3 deletions lib/washout_builder/soap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
module WashoutBuilder
module SOAP
extend ActiveSupport::Concern
include WashOut::SOAP
include WashOut::SOAP if defined?(WashOut::SOAP)
include WashOut::Rails::Controller if defined?(WashOut::Rails::Controller)


module ClassMethods
Expand All @@ -27,8 +28,8 @@ def soap_action(action, options={})


included do
include WashOut::Configurable
include WashOut::Dispatcher
include WashOut::Configurable if defined?(WashOut::Configurable)
include WashOut::Dispatcher if defined?(WashOut::Dispatcher)
include WashoutBuilder::Dispatcher
self.soap_actions = {}
end
Expand Down
3 changes: 1 addition & 2 deletions lib/washout_builder/type.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module WashoutBuilder
class Type < WashOut::Type

class Type

BASIC_TYPES=[
"string",
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.6.2"
VERSION = "0.7.0"
end

0 comments on commit 29ef690

Please sign in to comment.