Skip to content

Commit

Permalink
removed deprecations
Browse files Browse the repository at this point in the history
decided to take another less annoying way to refactor.
  • Loading branch information
rubiii committed Jun 29, 2012
1 parent 604a36d commit c9d1f1b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
21 changes: 0 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
## UPCOMING

* Deprecation: Passing anything other than a single Symbol to `Savon::Client#request` is deprecated.
What this means is, that Savon should be smart enough so you can replace this:

``` ruby
client.request :wsdl, :find_user, "xmlns:wsdl" => "http://example.com"
```

with just passing the operation name:

``` ruby
client.request :find_user
```

Please run `client.soap_actions`, find the (Symbol) name of your operation and use that instead.
If that doesn't work for you, please open an issue.
If you're passing a Hash with the special keys `:body` or `:soap_action`, that's ok for now.
But if you're using the Hash to set attributes on the operation tag, that's deprecated as well.
## 1.1.0 (2012-06-28)

* Improvement: Changed Savon's core dependencies to be more strict and only allow bug fix changes.
Expand Down
24 changes: 0 additions & 24 deletions lib/savon/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ def preconfigure(args)
soap_action = args[2].delete(:soap_action) || args[1]
set_soap_action soap_action

request_deprecations!(args)

if wsdl.document? && (operation = wsdl.operations[args[1]]) && operation[:namespace_identifier]
soap.namespace_identifier = operation[:namespace_identifier].to_sym
soap.namespace = wsdl.parser.namespaces[soap.namespace_identifier.to_s]
Expand Down Expand Up @@ -182,27 +180,5 @@ def method_missing(method, *args, &block)
original_self.send method, *args, &block
end

def request_deprecations!(args)
if args[0]
deprecate "DEPRECATION: You passed #{args[0].inspect} as a namespace to Savon::Client#request\n" +
"Please remove the namespace argument from the call as this feature will be removed in Savon v2.\n" +
"Open an issue at https://github.com/rubiii/savon/issues if this doesn't work for you."
end
if args[1].kind_of?(String)
deprecate "DEPRECATION: You passed #{args[1].inspect} as the operation name to Savon::Client#request\n" +
"Please run client.soap_actions, find the (Symbol) name of your operation and use that instead.\n" +
"Open an issue at https://github.com/rubiii/savon/issues if this doesn't work for you."
end
unless args[2].empty?
deprecate "DEPRECATION: You passed #{args[2].inspect} to Savon::Client#request\n" +
"Open an issue at https://github.com/rubiii/savon/issues if you need these attributes."
end
end

def deprecate(message)
config.logger.log message
puts message
end

end
end

0 comments on commit c9d1f1b

Please sign in to comment.