soap-object 0.5.1 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.gitignore +20 -20
- data/.rspec +1 -1
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/ChangeLog +38 -33
- data/Gemfile +11 -11
- data/Guardfile +17 -17
- data/LICENSE.txt +21 -21
- data/README.md +42 -42
- data/Rakefile +21 -21
- data/cucumber.yml +6 -6
- data/features/basic_functionality.feature +40 -40
- data/features/step_definitions/basic_functionality_steps.rb +89 -89
- data/features/support/env.rb +5 -5
- data/features/wsdl/uszip.asmx.wsdl.xml +394 -394
- data/lib/soap-object.rb +120 -114
- data/lib/soap-object/class_methods.rb +111 -111
- data/lib/soap-object/factory.rb +22 -22
- data/lib/soap-object/version.rb +5 -5
- data/soap-object.gemspec +24 -24
- data/spec/lib/soap_object_spec.rb +125 -108
- data/spec/spec_helper.rb +6 -6
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NDY1ZDczZWRmYWI2ODJjZWQyMmRhNWI2YmU5ZWE0NjM1OTkwNWNmZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NjM3MGZhNzQzYjFlOGYyZWY5OWViNzY2YzEyZjBlM2I1MDRkM2JkOQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YWYyYThjNmM1ZWZmOGE3NmY0ZTJmMDk2MGVjYzI5ZjY1MzFmYzA3MTk0NWU3
|
10
|
+
YmI4NGE3YWZhNzgwMzVlNjhmMTg2NTQyNzQ0M2IzMjZmNDc0YjJkOTE2NDM1
|
11
|
+
MTA4NmQyNWIyOWYwZjZiNDE4ODUyZTk3MzZlZmYxNjI4ZjMzMjk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjUyMzU0ZGYwNTdiMDk4ZTZlNDIxZDIyMTBlNjM3NmQxNmY3YTg2NzNhZDg4
|
14
|
+
MWJiOTE4NzU2M2Y0YzY3ZDYzYzczZjU3MjU5ZWExNzIxM2QyMDQyNTM3ZmQ2
|
15
|
+
ZGYyOGY2MTNkZDgyNWM3NGVlY2RmYTM2ZjZhYjVmZDZhYjI1ZWM=
|
data/.gitignore
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
18
|
-
*.swp
|
19
|
-
TAGS
|
20
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.swp
|
19
|
+
TAGS
|
20
|
+
.idea/
|
data/.rspec
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
--color
|
1
|
+
--color
|
2
2
|
--format doc
|
data/.ruby-gemset
CHANGED
@@ -1 +1 @@
|
|
1
|
-
soap-object
|
1
|
+
soap-object
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.0.0-p195
|
1
|
+
ruby-2.0.0-p195
|
data/ChangeLog
CHANGED
@@ -1,33 +1,38 @@
|
|
1
|
-
=== Version 0.
|
2
|
-
* Enhancements
|
3
|
-
* Added
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
*
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
*
|
13
|
-
|
14
|
-
|
15
|
-
*
|
16
|
-
* Added
|
17
|
-
*
|
18
|
-
|
19
|
-
=== Version 0.
|
20
|
-
* Enhancements
|
21
|
-
* Added
|
22
|
-
* Added
|
23
|
-
|
24
|
-
=== Version 0.
|
25
|
-
* Enhancements
|
26
|
-
* Added
|
27
|
-
* Added
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
1
|
+
=== Version 0.6 / 2014-12-22
|
2
|
+
* Enhancements
|
3
|
+
* Added ability to call operation with hand rolled xml
|
4
|
+
* Disabled logging by default, setting log_level enables it
|
5
|
+
|
6
|
+
=== Version 0.5.1 / 2013-6-1
|
7
|
+
* Enhancements
|
8
|
+
* Added body method to return the body of the result as a Hash
|
9
|
+
|
10
|
+
=== Version 0.5 / 2013-6-1
|
11
|
+
* Enhancements
|
12
|
+
* Removed the body accessor
|
13
|
+
* Removed the body_xml method
|
14
|
+
* Added to_xml method to return the response as a String containing the XML
|
15
|
+
* Added to_hash method to return the respons as a Hash
|
16
|
+
* Added doc method to return response as a Nokogiri::XML::Document document
|
17
|
+
* Updated method_missing so when services methods are called the raw XML is returned
|
18
|
+
|
19
|
+
=== Version 0.4 / 2013-3-18
|
20
|
+
* Enhancements
|
21
|
+
* Added body accessor to SoapObject to return raw body
|
22
|
+
* Added body_xml method to SoapObject to return Nokogiri::XML::Document containing body
|
23
|
+
|
24
|
+
=== Version 0.3 / 2013-3-17
|
25
|
+
* Enhancements
|
26
|
+
* Added SoapObject::Factory to assist in creating new service objects
|
27
|
+
* Added accessor for @response
|
28
|
+
|
29
|
+
=== Version 0.2 / 2013-3-11
|
30
|
+
* Enhancements
|
31
|
+
* Added ability to add XML to the soap header
|
32
|
+
* Added ability to set the encoding for the messages
|
33
|
+
* Added ability to use basic authentication
|
34
|
+
* Added ability to use digest authentication
|
35
|
+
* Added ability to set the log level
|
36
|
+
|
37
|
+
=== Version 0.1 / 2013-3-4
|
38
|
+
Initial release
|
data/Gemfile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in soap-object.gemspec
|
4
|
-
|
5
|
-
gem 'rake'
|
6
|
-
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
|
7
|
-
gem 'growl'
|
8
|
-
gem 'guard-rspec'
|
9
|
-
gem 'guard-cucumber'
|
10
|
-
|
11
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in soap-object.gemspec
|
4
|
+
|
5
|
+
gem 'rake'
|
6
|
+
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
|
7
|
+
gem 'growl'
|
8
|
+
gem 'guard-rspec'
|
9
|
+
gem 'guard-cucumber'
|
10
|
+
|
11
|
+
gemspec
|
data/Guardfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
guard 'rspec', :cli => '--color --format doc' do
|
5
|
-
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { "spec" }
|
7
|
-
watch('spec/spec_helper.rb') { "spec" }
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
|
-
guard 'cucumber', :notification => true, :all_after_pass => false, :cli => '--profile focus' do
|
12
|
-
watch(%r{^features/.+\.feature$})
|
13
|
-
watch(%r{^features/support/.+$}) { 'features' }
|
14
|
-
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
15
|
-
watch(%r{^lib/.+\.rb$}) { "features" }
|
16
|
-
watch(%r{^cucumber.yml$}) { "features" }
|
17
|
-
end
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec', :cli => '--color --format doc' do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { "spec" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
guard 'cucumber', :notification => true, :all_after_pass => false, :cli => '--profile focus' do
|
12
|
+
watch(%r{^features/.+\.feature$})
|
13
|
+
watch(%r{^features/support/.+$}) { 'features' }
|
14
|
+
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
15
|
+
watch(%r{^lib/.+\.rb$}) { "features" }
|
16
|
+
watch(%r{^cucumber.yml$}) { "features" }
|
17
|
+
end
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2013 Jeffrey S. Morgan
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1
|
+
Copyright (c) 2013 Jeffrey S. Morgan
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
# Soap::Object
|
2
|
-
|
3
|
-
Module to make it simpler to tests SOAP web services. The goal is
|
4
|
-
to abstract all information about how your call and parse results
|
5
|
-
from the web service within the soap objects.
|
6
|
-
|
7
|
-
````ruby
|
8
|
-
class AirportService
|
9
|
-
include SoapObject
|
10
|
-
|
11
|
-
wsdl 'http://www.webservicex.net/airport.asmx?WSDL'
|
12
|
-
|
13
|
-
def get_airport_name_for(airport_code)
|
14
|
-
response = get_airport_information_by_airport_code airport_code: airport_code
|
15
|
-
doc = Nokogiri::XML(response)
|
16
|
-
doc.xpath('//Table/CityOrAirportName').first.content
|
17
|
-
end
|
18
|
-
end
|
19
|
-
````
|
20
|
-
|
21
|
-
## Installation
|
22
|
-
|
23
|
-
Add this line to your application's Gemfile:
|
24
|
-
|
25
|
-
gem 'soap-object'
|
26
|
-
|
27
|
-
And then execute:
|
28
|
-
|
29
|
-
$ bundle
|
30
|
-
|
31
|
-
Or install it yourself as:
|
32
|
-
|
33
|
-
$ gem install soap-object
|
34
|
-
|
35
|
-
|
36
|
-
## Contributing
|
37
|
-
|
38
|
-
1. Fork it
|
39
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
-
5. Create new Pull Request
|
1
|
+
# Soap::Object
|
2
|
+
|
3
|
+
Module to make it simpler to tests SOAP web services. The goal is
|
4
|
+
to abstract all information about how your call and parse results
|
5
|
+
from the web service within the soap objects.
|
6
|
+
|
7
|
+
````ruby
|
8
|
+
class AirportService
|
9
|
+
include SoapObject
|
10
|
+
|
11
|
+
wsdl 'http://www.webservicex.net/airport.asmx?WSDL'
|
12
|
+
|
13
|
+
def get_airport_name_for(airport_code)
|
14
|
+
response = get_airport_information_by_airport_code airport_code: airport_code
|
15
|
+
doc = Nokogiri::XML(response)
|
16
|
+
doc.xpath('//Table/CityOrAirportName').first.content
|
17
|
+
end
|
18
|
+
end
|
19
|
+
````
|
20
|
+
|
21
|
+
## Installation
|
22
|
+
|
23
|
+
Add this line to your application's Gemfile:
|
24
|
+
|
25
|
+
gem 'soap-object'
|
26
|
+
|
27
|
+
And then execute:
|
28
|
+
|
29
|
+
$ bundle
|
30
|
+
|
31
|
+
Or install it yourself as:
|
32
|
+
|
33
|
+
$ gem install soap-object
|
34
|
+
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
1. Fork it
|
39
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
42
|
+
5. Create new Pull Request
|
data/Rakefile
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
|
3
|
-
require 'rspec/core/rake_task'
|
4
|
-
require 'cucumber'
|
5
|
-
require 'cucumber/rake/task'
|
6
|
-
|
7
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
8
|
-
spec.ruby_opts = "-I lib:spec"
|
9
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
10
|
-
end
|
11
|
-
task :spec
|
12
|
-
|
13
|
-
Cucumber::Rake::Task.new(:features, "Run all features") do |t|
|
14
|
-
t.profile = 'focus'
|
15
|
-
end
|
16
|
-
|
17
|
-
desc 'Run all specs and features'
|
18
|
-
task :test => %w[spec features]
|
19
|
-
|
20
|
-
task :default => :test
|
21
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
require 'cucumber'
|
5
|
+
require 'cucumber/rake/task'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
8
|
+
spec.ruby_opts = "-I lib:spec"
|
9
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
10
|
+
end
|
11
|
+
task :spec
|
12
|
+
|
13
|
+
Cucumber::Rake::Task.new(:features, "Run all features") do |t|
|
14
|
+
t.profile = 'focus'
|
15
|
+
end
|
16
|
+
|
17
|
+
desc 'Run all specs and features'
|
18
|
+
task :test => %w[spec features]
|
19
|
+
|
20
|
+
task :default => :test
|
21
|
+
|
data/cucumber.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
std_opts = "--no-source --color --format pretty"
|
3
|
-
%>
|
4
|
-
|
5
|
-
default: <%= std_opts %>
|
6
|
-
focus: <%= std_opts %> --tags @focus
|
1
|
+
<%
|
2
|
+
std_opts = "--no-source --color --format pretty"
|
3
|
+
%>
|
4
|
+
|
5
|
+
default: <%= std_opts %>
|
6
|
+
focus: <%= std_opts %> --tags @focus
|
@@ -1,40 +1,40 @@
|
|
1
|
-
@focus
|
2
|
-
Feature: This describes the core functionality of the SoapObject object
|
3
|
-
|
4
|
-
Scenario: Establishing communications with remote wsdl
|
5
|
-
Given I have the url for a remote wsdl
|
6
|
-
When I create an instance of the SoapObject class
|
7
|
-
Then I should have a connection
|
8
|
-
|
9
|
-
Scenario: Establishing communications with a local wsdl
|
10
|
-
Given I have a wsdl file residing locally
|
11
|
-
When I create an instance of the SoapObject class
|
12
|
-
Then I should have a connection
|
13
|
-
|
14
|
-
Scenario: Providing operations when using wsdl
|
15
|
-
Given I have the url for a remote wsdl
|
16
|
-
When I create an instance of the SoapObject class
|
17
|
-
Then I should be able to determine the operations
|
18
|
-
|
19
|
-
Scenario: Calling a service when using wsdl
|
20
|
-
Given I have the url for a remote wsdl
|
21
|
-
When I create an instance of the SoapObject class
|
22
|
-
Then I should be able to make a call and receive the correct results
|
23
|
-
|
24
|
-
Scenario: Getting the xml from a response
|
25
|
-
Given I have the url for a remote wsdl
|
26
|
-
When I create an instance of the SoapObject class
|
27
|
-
Then I should be able to make a call and receive the correct results
|
28
|
-
And the results xml should contain "<STATE>CA"
|
29
|
-
|
30
|
-
Scenario: Getting the doc from a response as a Nokogiri object
|
31
|
-
Given I have the url for a remote wsdl
|
32
|
-
When I create an instance of the SoapObject class
|
33
|
-
Then I should be able to make a call and receive the correct results
|
34
|
-
And the results doc should be a Nokogiri XML object
|
35
|
-
|
36
|
-
Scenario: Calling another service with wsdl
|
37
|
-
Given I am calling the Define service
|
38
|
-
When I create an instance of the SoapObject class
|
39
|
-
Then I should be able to get the correct definition results
|
40
|
-
|
1
|
+
@focus
|
2
|
+
Feature: This describes the core functionality of the SoapObject object
|
3
|
+
|
4
|
+
Scenario: Establishing communications with remote wsdl
|
5
|
+
Given I have the url for a remote wsdl
|
6
|
+
When I create an instance of the SoapObject class
|
7
|
+
Then I should have a connection
|
8
|
+
|
9
|
+
Scenario: Establishing communications with a local wsdl
|
10
|
+
Given I have a wsdl file residing locally
|
11
|
+
When I create an instance of the SoapObject class
|
12
|
+
Then I should have a connection
|
13
|
+
|
14
|
+
Scenario: Providing operations when using wsdl
|
15
|
+
Given I have the url for a remote wsdl
|
16
|
+
When I create an instance of the SoapObject class
|
17
|
+
Then I should be able to determine the operations
|
18
|
+
|
19
|
+
Scenario: Calling a service when using wsdl
|
20
|
+
Given I have the url for a remote wsdl
|
21
|
+
When I create an instance of the SoapObject class
|
22
|
+
Then I should be able to make a call and receive the correct results
|
23
|
+
|
24
|
+
Scenario: Getting the xml from a response
|
25
|
+
Given I have the url for a remote wsdl
|
26
|
+
When I create an instance of the SoapObject class
|
27
|
+
Then I should be able to make a call and receive the correct results
|
28
|
+
And the results xml should contain "<STATE>CA"
|
29
|
+
|
30
|
+
Scenario: Getting the doc from a response as a Nokogiri object
|
31
|
+
Given I have the url for a remote wsdl
|
32
|
+
When I create an instance of the SoapObject class
|
33
|
+
Then I should be able to make a call and receive the correct results
|
34
|
+
And the results doc should be a Nokogiri XML object
|
35
|
+
|
36
|
+
Scenario: Calling another service with wsdl
|
37
|
+
Given I am calling the Define service
|
38
|
+
When I create an instance of the SoapObject class
|
39
|
+
Then I should be able to get the correct definition results
|
40
|
+
|