boomi-ruby 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -12,4 +12,6 @@ group :development do
12
12
  gem "bundler"
13
13
  gem "jeweler", "~> 1.8.4"
14
14
  gem "rcov", "0.9.11"
15
+ gem "rspec-rails"
16
+ gem "fakeweb"
15
17
  end
data/Gemfile.lock CHANGED
@@ -1,6 +1,12 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ actionpack (4.0.0)
5
+ activesupport (= 4.0.0)
6
+ builder (~> 3.1.0)
7
+ erubis (~> 2.7.0)
8
+ rack (~> 1.5.2)
9
+ rack-test (~> 0.6.2)
4
10
  activesupport (4.0.0)
5
11
  i18n (~> 0.6, >= 0.6.4)
6
12
  minitest (~> 4.2)
@@ -8,6 +14,10 @@ GEM
8
14
  thread_safe (~> 0.1)
9
15
  tzinfo (~> 0.3.37)
10
16
  atomic (1.1.9)
17
+ builder (3.1.4)
18
+ diff-lcs (1.2.4)
19
+ erubis (2.7.0)
20
+ fakeweb (1.3.0)
11
21
  git (1.2.5)
12
22
  i18n (0.6.4)
13
23
  jeweler (1.8.4)
@@ -19,18 +29,38 @@ GEM
19
29
  mime-types (1.23)
20
30
  minitest (4.7.5)
21
31
  multi_json (1.7.7)
32
+ rack (1.5.2)
33
+ rack-test (0.6.2)
34
+ rack (>= 1.0)
35
+ railties (4.0.0)
36
+ actionpack (= 4.0.0)
37
+ activesupport (= 4.0.0)
38
+ rake (>= 0.8.7)
39
+ thor (>= 0.18.1, < 2.0)
22
40
  rake (10.1.0)
23
41
  rcov (0.9.11)
24
42
  rdoc (3.12.2)
25
43
  json (~> 1.4)
26
44
  rest-client (1.6.7)
27
45
  mime-types (>= 1.16)
46
+ rspec-core (2.14.5)
47
+ rspec-expectations (2.14.3)
48
+ diff-lcs (>= 1.1.3, < 2.0)
49
+ rspec-mocks (2.14.3)
50
+ rspec-rails (2.14.0)
51
+ actionpack (>= 3.0)
52
+ activesupport (>= 3.0)
53
+ railties (>= 3.0)
54
+ rspec-core (~> 2.14.0)
55
+ rspec-expectations (~> 2.14.0)
56
+ rspec-mocks (~> 2.14.0)
28
57
  shoulda (3.5.0)
29
58
  shoulda-context (~> 1.0, >= 1.0.1)
30
59
  shoulda-matchers (>= 1.4.1, < 3.0)
31
60
  shoulda-context (1.1.3)
32
61
  shoulda-matchers (2.2.0)
33
62
  activesupport (>= 3.0.0)
63
+ thor (0.18.1)
34
64
  thread_safe (0.1.0)
35
65
  atomic
36
66
  tzinfo (0.3.37)
@@ -41,9 +71,11 @@ PLATFORMS
41
71
 
42
72
  DEPENDENCIES
43
73
  bundler
74
+ fakeweb
44
75
  jeweler (~> 1.8.4)
45
76
  rcov (= 0.9.11)
46
77
  rdoc (~> 3.12)
47
78
  rest-client (~> 1.6.0)
79
+ rspec-rails
48
80
  shoulda
49
81
  xml-simple (~> 1.0.0)
data/LICENSE.txt CHANGED
@@ -1,20 +1,174 @@
1
- Copyright (c) 2013 Charles Cooke
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
data/README.rdoc CHANGED
@@ -8,9 +8,9 @@ Providing the optional override_account will use the Boomi Partner API
8
8
 
9
9
  @boomi = Boomi.new(:account => 'boomi-account123', :user => 'boomiuser', :pass => 'boomipass', :override_account => 'mychildaccount')
10
10
  @boomi.get_execution_records("executionTime[GREATER_THAN_OR_EQUAL]" => 15.minutes.ago)
11
+ @boomi.get_events("executionTime[GREATER_THAN_OR_EQUAL]" => 15.minutes.ago)
11
12
 
12
- == Copyright
13
+ == License
13
14
 
14
- Copyright (c) 2013 Coupa Software. See LICENSE.txt for
15
- further details.
15
+ Apache 2.0 License. See LICENSE.txt for further details.
16
16
 
data/Rakefile CHANGED
@@ -40,7 +40,11 @@ Rcov::RcovTask.new do |test|
40
40
  test.rcov_opts << '--exclude "gems/*"'
41
41
  end
42
42
 
43
- task :default => :test
43
+ require 'rspec/core/rake_task'
44
+
45
+ RSpec::Core::RakeTask.new(:spec)
46
+
47
+ task :default => :spec
44
48
 
45
49
  require 'rdoc/task'
46
50
  Rake::RDocTask.new do |rdoc|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
data/boomi-ruby.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "boomi-ruby"
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Charles Cooke"]
12
- s.date = "2013-06-25"
12
+ s.date = "2013-09-28"
13
13
  s.description = "Supports the Boomi REST Webservice"
14
14
  s.email = "charles@coupa.com"
15
15
  s.extra_rdoc_files = [
@@ -27,13 +27,17 @@ Gem::Specification.new do |s|
27
27
  "boomi-ruby.gemspec",
28
28
  "lib/boomi-ruby.rb",
29
29
  "lib/boomi/boomi.rb",
30
- "test/helper.rb",
31
- "test/test_boomi-ruby.rb"
30
+ "spec/boomi/boomi_spec.rb",
31
+ "spec/spec_helper.rb",
32
+ "spec/xml/Account-GET.xml",
33
+ "spec/xml/getEvent-1result.xml",
34
+ "spec/xml/getExecutionRecord-3results.xml",
35
+ "test/helper.rb"
32
36
  ]
33
37
  s.homepage = "http://github.com/coupacooke/boomi-ruby"
34
38
  s.licenses = ["MIT"]
35
39
  s.require_paths = ["lib"]
36
- s.rubygems_version = "1.8.11"
40
+ s.rubygems_version = "1.8.25"
37
41
  s.summary = "Ruby gem for Boomi webservices"
38
42
 
39
43
  if s.respond_to? :specification_version then
@@ -47,6 +51,8 @@ Gem::Specification.new do |s|
47
51
  s.add_development_dependency(%q<bundler>, [">= 0"])
48
52
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
49
53
  s.add_development_dependency(%q<rcov>, ["= 0.9.11"])
54
+ s.add_development_dependency(%q<rspec-rails>, [">= 0"])
55
+ s.add_development_dependency(%q<fakeweb>, [">= 0"])
50
56
  else
51
57
  s.add_dependency(%q<rest-client>, ["~> 1.6.0"])
52
58
  s.add_dependency(%q<xml-simple>, ["~> 1.0.0"])
@@ -55,6 +61,8 @@ Gem::Specification.new do |s|
55
61
  s.add_dependency(%q<bundler>, [">= 0"])
56
62
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
57
63
  s.add_dependency(%q<rcov>, ["= 0.9.11"])
64
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
65
+ s.add_dependency(%q<fakeweb>, [">= 0"])
58
66
  end
59
67
  else
60
68
  s.add_dependency(%q<rest-client>, ["~> 1.6.0"])
@@ -64,6 +72,8 @@ Gem::Specification.new do |s|
64
72
  s.add_dependency(%q<bundler>, [">= 0"])
65
73
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
66
74
  s.add_dependency(%q<rcov>, ["= 0.9.11"])
75
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
76
+ s.add_dependency(%q<fakeweb>, [">= 0"])
67
77
  end
68
78
  end
69
79
 
data/lib/boomi/boomi.rb CHANGED
@@ -37,12 +37,12 @@ EOS
37
37
  end
38
38
 
39
39
  def get_events(opts)
40
- post("#{@account}/Event/query?overrideAccount=#{@override_account}", make_query(opts))
40
+ post("#{@account}/Event/query"+(@override_account ? "?overrideAccount=#{@override_account}" : ""), make_query(opts))
41
41
  end
42
42
 
43
43
 
44
44
  def get_execution_records(opts)
45
- post("#{@account}/ExecutionRecord/query?overrideAccount=#{@override_account}", make_query(opts))
45
+ post("#{@account}/ExecutionRecord/query"+(@override_account ? "?overrideAccount=#{@override_account}" : ""), make_query(opts))
46
46
  end
47
47
 
48
48
  def execute_process(atom_id,process_id)
@@ -74,7 +74,7 @@ EOS
74
74
  "<nestedExpression operator='#{operator}' property='#{field}' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='SimpleExpression'>
75
75
  <argument>#{value.is_a?(Time) ? boomi_time(value) : value}</argument>
76
76
  </nestedExpression>"
77
- end.join('\n')
77
+ end.join("\n")
78
78
  }
79
79
  </expression>
80
80
  </QueryFilter>
@@ -89,7 +89,6 @@ EXPR
89
89
  def get(url)
90
90
  contents = @resource[url].get
91
91
  parsed = parse(contents)
92
- parsed['queryToken']
93
92
  end
94
93
 
95
94
  def post(url,content)
@@ -105,9 +104,12 @@ EXPR
105
104
  else
106
105
  response = @resource[url].post(content)
107
106
  end
108
- if xml_doc = parse(response)
109
- results += xml_doc['result'] if xml_doc['result']
110
- query_token = xml_doc['queryToken'] && xml_doc['queryToken'].first
107
+ if xml_doc = parse(response)
108
+ results =
109
+ if xml_doc['result']
110
+ xml_doc['result'].is_a?(Array) ? results + xml_doc['result'] : [xml_doc['result']]
111
+ end
112
+ query_token = xml_doc['queryToken']
111
113
  end
112
114
  rescue RestClient::BadRequest => e
113
115
  puts e.http_body
@@ -115,12 +117,12 @@ EXPR
115
117
  rescue RestClient::InternalServerError => e
116
118
  puts "Received error from server, stopped processing but dealing with any results that exist: #{e}"
117
119
  error = true
118
- end while query_token && !error && attempts < 50
120
+ end while query_token.present? && !error && attempts < 50
119
121
  results
120
122
  end
121
123
 
122
124
  def parse(content)
123
125
  return if content.empty?
124
- XmlSimple.xml_in(content)
126
+ XmlSimple.xml_in(content, { 'NoAttr' => true, 'ForceArray' => false})
125
127
  end
126
128
  end
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+ require 'time'
3
+
4
+ describe Boomi do
5
+ XML_PATH = File.join(File.dirname(__FILE__), "..", "xml")
6
+
7
+ before do
8
+ # log to stdout & proxy
9
+ # RestClient.log = Logger.new(STDOUT)
10
+ # RestClient.proxy = 'http://localhost:8080/'
11
+
12
+ # FakeWeb.allow_net_connect = false
13
+ end
14
+
15
+ context "parent account" do
16
+ before do
17
+ @boomi = Boomi.new(:account => 'boo-me', :user => 'boo-user', :pass => 'boo-you')
18
+ end
19
+
20
+ describe 'Boomi access' do
21
+ it 'should be able to retrieve accounts' do
22
+ FakeWeb.register_uri(:get, %r(https://.*@platform.boomi.com/api/rest/v1/.*/Account/.*), :body => File.join(XML_PATH, "Account-GET.xml"))
23
+ @boomi.get_account['user'].size.should == 2
24
+ end
25
+
26
+ it 'should be able to retrieve execution records' do
27
+ FakeWeb.register_uri(:post, %r(https://.*@platform.boomi.com/api/rest/v1/.*/ExecutionRecord/.*), :body => File.join(XML_PATH, "getExecutionRecord-3results.xml"))
28
+ records = @boomi.get_execution_records("executionTime[GREATER_THAN_OR_EQUAL]" => Time.now-15*60)
29
+ records.size.should == 3
30
+ records.first['account'].should == 'Boupa'
31
+ end
32
+
33
+ it 'should be able to retrieve events for execution record' do
34
+ FakeWeb.register_uri(:post, %r(https://.*@platform.boomi.com/api/rest/v1/.*/ExecutionRecord/.*), :body => File.join(XML_PATH, "getExecutionRecord-3results.xml"))
35
+ # FakeWeb.register_uri(:post, %r(https://.*@platform.boomi.com/api/rest/v1/.*/Event/.*), :body => File.join(XML_PATH, "getEvent-1result.xml"))
36
+ records = @boomi.get_execution_records("executionTime[GREATER_THAN_OR_EQUAL]" => Time.now-15*60)
37
+ records.size.should == 3
38
+ events = @boomi.get_events("executionId[EQUALS]" => records[0]['executionId'], "eventDate[GREATER_THAN_OR_EQUAL]" => records[0]['executionTime'])
39
+ events.size.should == 1
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'boomi-ruby'
5
+ require 'fakeweb'
6
+ require 'logger'
7
+
8
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
9
+ ENV["RAILS_ENV"] ||= 'test'
10
+
11
+ RSpec.configure do |config|
12
+ # == Mock Framework
13
+ #
14
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
15
+ #
16
+ # config.mock_with :mocha
17
+ # config.mock_with :flexmock
18
+ # config.mock_with :rr
19
+ config.mock_with :rspec
20
+ end
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <Account xmlns="http://api.platform.boomi.com/" supportLevel="standard" supportAccess="true" widgetAccount="false" dateCreated="2008-08-28T02:51:29Z" status="active" name="Boopa" accountId="account">
3
+ <user email="user1@boopa.com" lastName="Testuser" firstName="One"/>
4
+ <user email="user2@blah.com" lastName="Testuser" firstName="Two"/>
5
+ <licensing>
6
+ <standard used="23" purchased="30"/><smallBusiness used="0" purchased="30"/><enterprise used="2" purchased="30"/><tradingPartner used="1" purchased="5"/>
7
+ </licensing>
8
+ </Account>
@@ -0,0 +1,22 @@
1
+ <bns:QueryResult xmlns:bns="http://api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfResults="1">
2
+ <bns:result xsi:type="bns:Event">
3
+ <bns:eventId>event-9629753e-e11a-44b7-9739-a7f735048f25</bns:eventId>
4
+ <bns:accountId>Boopa</bns:accountId>
5
+ <bns:atomId>atom</bns:atomId>
6
+ <bns:atomName>Atom Cloud</bns:atomName>
7
+ <bns:eventLevel>INFO</bns:eventLevel>
8
+ <bns:eventDate>2013-09-27T18:00:00Z</bns:eventDate>
9
+ <bns:status>COMPLETE</bns:status>
10
+ <bns:eventType>process.execution</bns:eventType>
11
+ <bns:executionId>execution-6b88a5d9-64b2-4734-a1b9-0a8b847352e0-2013.09.27</bns:executionId>
12
+ <bns:updateDate>2013-09-27T18:00:00Z</bns:updateDate>
13
+ <bns:startTime>2013-09-27T18:00:00Z</bns:startTime>
14
+ <bns:endTime>2013-09-27T18:03:07Z</bns:endTime>
15
+ <bns:errorDocumentCount>0</bns:errorDocumentCount>
16
+ <bns:inboundDocumentCount>1</bns:inboundDocumentCount>
17
+ <bns:outboundDocumentCount>0</bns:outboundDocumentCount>
18
+ <bns:processName>1 Coupa Boupa Widget</bns:processName>
19
+ <bns:recordDate>2013-09-27T18:03:16Z</bns:recordDate>
20
+ <bns:classification>PROD</bns:classification>
21
+ </bns:result>
22
+ </bns:QueryResult>
@@ -0,0 +1,52 @@
1
+ <bns:QueryResult xmlns:bns="http://api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfResults="3">
2
+ <bns:result xsi:type="bns:ExecutionRecord">
3
+ <bns:executionId>execution-6b88a5d9-64b2-4734-a1b9-0a8b847352e0-2013.09.27</bns:executionId>
4
+ <bns:account>Boupa</bns:account>
5
+ <bns:executionTime>2013-09-27T18:00:00Z</bns:executionTime>
6
+ <bns:status>COMPLETE</bns:status>
7
+ <bns:executionType>exec_sched</bns:executionType>
8
+ <bns:processName>1 Coupa Boupa Widget</bns:processName>
9
+ <bns:processId></bns:processId>
10
+ <bns:atomName>Atom Cloud</bns:atomName>
11
+ <bns:atomId>6e282349-5952-4f21-8966-859f6d515503</bns:atomId>
12
+ <bns:inboundDocumentCount>1</bns:inboundDocumentCount>
13
+ <bns:outboundDocumentCount>0</bns:outboundDocumentCount>
14
+ <bns:executionDuration>187307</bns:executionDuration>
15
+ <bns:inboundDocumentSize>0</bns:inboundDocumentSize>
16
+ <bns:outboundDocumentSize>0</bns:outboundDocumentSize>
17
+ </bns:result>
18
+ <bns:result xsi:type="bns:ExecutionRecord">
19
+ <bns:executionId>execution-68471c69-a2cf-403c-8640-11af290ebcb6-2013.09.27</bns:executionId>
20
+ <bns:account>Boupa</bns:account>
21
+ <bns:executionTime>2013-09-27T18:02:12Z</bns:executionTime>
22
+ <bns:status>COMPLETE</bns:status>
23
+ <bns:executionType>sub_process</bns:executionType>
24
+ <bns:processName>1.1 Coupa Boupa</bns:processName>
25
+ <bns:processId>f5d87522-a72a-45d2-9324-25c7804f96c6</bns:processId>
26
+ <bns:atomName>Atom Cloud</bns:atomName>
27
+ <bns:atomId>6e282349-5952-4f21-8966-859f6d515503</bns:atomId>
28
+ <bns:inboundDocumentCount>0</bns:inboundDocumentCount>
29
+ <bns:outboundDocumentCount>0</bns:outboundDocumentCount>
30
+ <bns:executionDuration>24530</bns:executionDuration>
31
+ <bns:topLevelExecutionId>execution-6b88a5d9-64b2-4734-a1b9-0a8b847352e0-2013.09.27</bns:topLevelExecutionId>
32
+ <bns:inboundDocumentSize>0</bns:inboundDocumentSize>
33
+ <bns:outboundDocumentSize>0</bns:outboundDocumentSize>
34
+ </bns:result>
35
+ <bns:result xsi:type="bns:ExecutionRecord">
36
+ <bns:executionId>execution-c734de55-f314-4416-9c61-0b1fe0a26d17-2013.09.27</bns:executionId>
37
+ <bns:account>Boupa</bns:account>
38
+ <bns:executionTime>2013-09-27T18:02:39Z</bns:executionTime>
39
+ <bns:status>COMPLETE</bns:status>
40
+ <bns:executionType>sub_process</bns:executionType>
41
+ <bns:processName>1.2 Coupa Boupa Master Process</bns:processName>
42
+ <bns:processId>2d554734-a437-4860-bf67-b4f882a9b763</bns:processId>
43
+ <bns:atomName>Atom Cloud</bns:atomName>
44
+ <bns:atomId>6e282349-5952-4f21-8966-859f6d515503</bns:atomId>
45
+ <bns:inboundDocumentCount>0</bns:inboundDocumentCount>
46
+ <bns:outboundDocumentCount>0</bns:outboundDocumentCount>
47
+ <bns:executionDuration>27141</bns:executionDuration>
48
+ <bns:topLevelExecutionId>execution-6b88a5d9-64b2-4734-a1b9-0a8b847352e0-2013.09.27</bns:topLevelExecutionId>
49
+ <bns:inboundDocumentSize>0</bns:inboundDocumentSize>
50
+ <bns:outboundDocumentSize>0</bns:outboundDocumentSize>
51
+ </bns:result>
52
+ </bns:QueryResult>
metadata CHANGED
@@ -1,93 +1,160 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boomi-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
4
  prerelease:
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Charles Cooke
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-25 00:00:00.000000000 Z
12
+ date: 2013-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rest-client
16
- requirement: &76188340 !ruby/object:Gem::Requirement
17
- none: false
15
+ version_requirements: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.6.0
22
- type: :runtime
20
+ none: false
21
+ name: rest-client
23
22
  prerelease: false
24
- version_requirements: *76188340
25
- - !ruby/object:Gem::Dependency
26
- name: xml-simple
27
- requirement: &76187800 !ruby/object:Gem::Requirement
23
+ type: :runtime
24
+ requirement: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ version: 1.6.0
28
29
  none: false
30
+ - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
29
32
  requirements:
30
33
  - - ~>
31
34
  - !ruby/object:Gem::Version
32
35
  version: 1.0.0
33
- type: :runtime
36
+ none: false
37
+ name: xml-simple
34
38
  prerelease: false
35
- version_requirements: *76187800
36
- - !ruby/object:Gem::Dependency
37
- name: shoulda
38
- requirement: &76186160 !ruby/object:Gem::Requirement
39
+ type: :runtime
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 1.0.0
39
45
  none: false
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
40
48
  requirements:
41
49
  - - ! '>='
42
50
  - !ruby/object:Gem::Version
43
51
  version: '0'
44
- type: :development
52
+ none: false
53
+ name: shoulda
45
54
  prerelease: false
46
- version_requirements: *76186160
47
- - !ruby/object:Gem::Dependency
48
- name: rdoc
49
- requirement: &76202420 !ruby/object:Gem::Requirement
55
+ type: :development
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
50
61
  none: false
62
+ - !ruby/object:Gem::Dependency
63
+ version_requirements: !ruby/object:Gem::Requirement
51
64
  requirements:
52
65
  - - ~>
53
66
  - !ruby/object:Gem::Version
54
67
  version: '3.12'
55
- type: :development
68
+ none: false
69
+ name: rdoc
56
70
  prerelease: false
57
- version_requirements: *76202420
58
- - !ruby/object:Gem::Dependency
59
- name: bundler
60
- requirement: &76200150 !ruby/object:Gem::Requirement
71
+ type: :development
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: '3.12'
61
77
  none: false
78
+ - !ruby/object:Gem::Dependency
79
+ version_requirements: !ruby/object:Gem::Requirement
62
80
  requirements:
63
81
  - - ! '>='
64
82
  - !ruby/object:Gem::Version
65
83
  version: '0'
66
- type: :development
84
+ none: false
85
+ name: bundler
67
86
  prerelease: false
68
- version_requirements: *76200150
69
- - !ruby/object:Gem::Dependency
70
- name: jeweler
71
- requirement: &76198470 !ruby/object:Gem::Requirement
87
+ type: :development
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
72
93
  none: false
94
+ - !ruby/object:Gem::Dependency
95
+ version_requirements: !ruby/object:Gem::Requirement
73
96
  requirements:
74
97
  - - ~>
75
98
  - !ruby/object:Gem::Version
76
99
  version: 1.8.4
77
- type: :development
100
+ none: false
101
+ name: jeweler
78
102
  prerelease: false
79
- version_requirements: *76198470
103
+ type: :development
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ~>
107
+ - !ruby/object:Gem::Version
108
+ version: 1.8.4
109
+ none: false
80
110
  - !ruby/object:Gem::Dependency
81
- name: rcov
82
- requirement: &76196320 !ruby/object:Gem::Requirement
111
+ version_requirements: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - '='
114
+ - !ruby/object:Gem::Version
115
+ version: 0.9.11
83
116
  none: false
117
+ name: rcov
118
+ prerelease: false
119
+ type: :development
120
+ requirement: !ruby/object:Gem::Requirement
84
121
  requirements:
85
- - - =
122
+ - - '='
86
123
  - !ruby/object:Gem::Version
87
124
  version: 0.9.11
125
+ none: false
126
+ - !ruby/object:Gem::Dependency
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ none: false
133
+ name: rspec-rails
134
+ prerelease: false
88
135
  type: :development
136
+ requirement: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ! '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ none: false
142
+ - !ruby/object:Gem::Dependency
143
+ version_requirements: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ! '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ none: false
149
+ name: fakeweb
89
150
  prerelease: false
90
- version_requirements: *76196320
151
+ type: :development
152
+ requirement: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ none: false
91
158
  description: Supports the Boomi REST Webservice
92
159
  email: charles@coupa.com
93
160
  executables: []
@@ -106,8 +173,12 @@ files:
106
173
  - boomi-ruby.gemspec
107
174
  - lib/boomi-ruby.rb
108
175
  - lib/boomi/boomi.rb
176
+ - spec/boomi/boomi_spec.rb
177
+ - spec/spec_helper.rb
178
+ - spec/xml/Account-GET.xml
179
+ - spec/xml/getEvent-1result.xml
180
+ - spec/xml/getExecutionRecord-3results.xml
109
181
  - test/helper.rb
110
- - test/test_boomi-ruby.rb
111
182
  homepage: http://github.com/coupacooke/boomi-ruby
112
183
  licenses:
113
184
  - MIT
@@ -116,23 +187,23 @@ rdoc_options: []
116
187
  require_paths:
117
188
  - lib
118
189
  required_ruby_version: !ruby/object:Gem::Requirement
119
- none: false
120
190
  requirements:
121
191
  - - ! '>='
122
192
  - !ruby/object:Gem::Version
123
- version: '0'
193
+ hash: -72245453
124
194
  segments:
125
195
  - 0
126
- hash: -262214157
127
- required_rubygems_version: !ruby/object:Gem::Requirement
196
+ version: '0'
128
197
  none: false
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
199
  requirements:
130
200
  - - ! '>='
131
201
  - !ruby/object:Gem::Version
132
202
  version: '0'
203
+ none: false
133
204
  requirements: []
134
205
  rubyforge_project:
135
- rubygems_version: 1.8.11
206
+ rubygems_version: 1.8.25
136
207
  signing_key:
137
208
  specification_version: 3
138
209
  summary: Ruby gem for Boomi webservices
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestBoomiRuby < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end