sekken 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,82 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Integration with Marketo Marketo Automation Software' do
4
+
5
+ subject(:client) { Sekken.new fixture('wsdl/marketo') }
6
+
7
+ let(:service_name) { :MktMktowsApiService }
8
+ let(:port_name) { :MktowsApiSoapPort }
9
+
10
+ it 'returns header parts' do
11
+ operation = client.operation(service_name, port_name, :getLead)
12
+ expect(operation.example_header).to eq({
13
+ AuthenticationHeader: {
14
+ mktowsUserId: "string",
15
+ requestSignature: "string",
16
+ requestTimestamp: "string",
17
+ audit: "string",
18
+ mode: "int"
19
+ }
20
+ })
21
+ end
22
+
23
+ it 'creates an example body' do
24
+ operation = client.operation(service_name, port_name, :getLead)
25
+
26
+ expect(operation.example_body).to eq({
27
+ paramsGetLead: {
28
+ leadKey: {
29
+ keyType: 'string',
30
+ keyValue: 'string'
31
+ }
32
+ }
33
+ })
34
+ end
35
+
36
+ it 'builds a request' do
37
+ operation = client.operation(service_name, port_name, :getLead)
38
+
39
+ operation.header = {
40
+ AuthenticationHeader: {
41
+ mktowsUserId: 'bigcorp1_461839624B16E06BA2D663',
42
+ requestSignature: "ffbff4d4bef354807481e66dc7540f7890523a87",
43
+ requestTimestamp: '2013-07-30T14:15:06-07:00'
44
+ }
45
+ }
46
+
47
+ operation.body = {
48
+ paramsGetLead: {
49
+ leadKey: {
50
+ keyType: "EMAIL",
51
+ keyValue: "rufus@marketo.com"
52
+ }
53
+ }
54
+ }
55
+
56
+ expected = Nokogiri.XML(%{
57
+ <SOAP-ENV:Envelope
58
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
59
+ xmlns:ns1="http://www.marketo.com/mktows/">
60
+ <SOAP-ENV:Header>
61
+ <ns1:AuthenticationHeader>
62
+ <mktowsUserId>bigcorp1_461839624B16E06BA2D663</mktowsUserId>
63
+ <requestSignature>ffbff4d4bef354807481e66dc7540f7890523a87</requestSignature>
64
+ <requestTimestamp>2013-07-30T14:15:06-07:00</requestTimestamp>
65
+ </ns1:AuthenticationHeader>
66
+ </SOAP-ENV:Header>
67
+ <SOAP-ENV:Body>
68
+ <ns1:paramsGetLead>
69
+ <leadKey>
70
+ <keyType>EMAIL</keyType>
71
+ <keyValue>rufus@marketo.com</keyValue>
72
+ </leadKey>
73
+ </ns1:paramsGetLead>
74
+ </SOAP-ENV:Body>
75
+ </SOAP-ENV:Envelope>
76
+ })
77
+
78
+ expect(Nokogiri.XML operation.build).
79
+ to be_equivalent_to(expected).respecting_element_order
80
+ end
81
+
82
+ end
@@ -331,47 +331,6 @@ describe Sekken::Operation do
331
331
  expect(Nokogiri.XML vatAccount_update_from_data_array.build).
332
332
  to be_equivalent_to(expected).respecting_element_order
333
333
  end
334
-
335
- # TODO: Finish me
336
-
337
- # let(:test_body) do
338
- # client = Savon.new fixture('wsdl/daisycon.wsdl')
339
-
340
- # service, port = "transactionService", "transactionPort"
341
-
342
- # client.operation(service, port, 'validateTransaction')
343
- # end
344
- # it 'test' do
345
- # test_body.body = {
346
- # transactions: {
347
- # "validate_transaction" => {
348
- # "program_id" => 5623,
349
- # "affiliatemarketing_id" => "WQACE273RVA8YF49YQ",
350
- # "status" => "disapproved",
351
- # "disapprove_reason" => "testorder"
352
- # }
353
- # }
354
- # }
355
-
356
- # expected = Nokogiri.XML(%{
357
- # <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://api.daisycon.com/advertiser/soap//transaction/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
358
- # <env:Body>
359
- # <tns:validateTransaction>
360
- # <transactions>
361
- # <validate_transaction>
362
- # <program_id>5623</program_id>
363
- # <affiliatemarketing_id>WQACE273RVA8YF49YQ</affiliatemarketing_id>
364
- # <status>disapproved</status>
365
- # <disapprove_reason>testorder</disapprove_reason>
366
- # </validate_transaction>
367
- # </transactions>
368
- # </tns:validateTransaction>
369
- # </env:Body>
370
- # </env:Envelope>
371
- # })
372
-
373
- # expect( Nokogiri.XML test_body.build ).to be_equivalent_to(expected).respecting_element_order
374
- # end
375
334
  end
376
335
 
377
336
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sekken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
@@ -9,143 +9,157 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-06 00:00:00.000000000 Z
12
+ date: 2015-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nori
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: 2.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 2.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nokogiri
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 1.4.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.4.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: builder
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: 3.0.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: 3.0.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: httpclient
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '2.3'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '2.3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: logging
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.8'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.8'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rake
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ~>
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
90
  version: '10.1'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '10.1'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rspec
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ~>
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: '2.14'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ~>
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '2.14'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: mocha
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ~>
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0.14'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ~>
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0.14'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: equivalent-xml
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ~>
130
+ - - "~>"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.3'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ~>
137
+ - - "~>"
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0.3'
140
+ - !ruby/object:Gem::Dependency
141
+ name: transpec
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
140
154
  description: Sekken is an experimental SOAP client for the Ruby community.
141
155
  email: tjarratt@gmail.com
142
156
  executables: []
143
157
  extensions: []
144
158
  extra_rdoc_files: []
145
159
  files:
146
- - .gitignore
147
- - .travis.yml
148
- - .yardopts
160
+ - ".gitignore"
161
+ - ".travis.yml"
162
+ - ".yardopts"
149
163
  - CHANGELOG.md
150
164
  - CONTRIBUTING.md
151
165
  - Gemfile
@@ -242,6 +256,7 @@ files:
242
256
  - spec/fixtures/wsdl/jetairways.wsdl
243
257
  - spec/fixtures/wsdl/jira.wsdl
244
258
  - spec/fixtures/wsdl/juniper.wsdl
259
+ - spec/fixtures/wsdl/marketo.wsdl
245
260
  - spec/fixtures/wsdl/namespaced_actions.wsdl
246
261
  - spec/fixtures/wsdl/oracle.wsdl
247
262
  - spec/fixtures/wsdl/ratp.wsdl
@@ -288,6 +303,7 @@ files:
288
303
  - spec/integration/jetairways_spec.rb
289
304
  - spec/integration/jira_spec.rb
290
305
  - spec/integration/juniper_spec.rb
306
+ - spec/integration/marketo_spec.rb
291
307
  - spec/integration/namespaced_actions_spec.rb
292
308
  - spec/integration/oracle_spec.rb
293
309
  - spec/integration/ratp_spec.rb
@@ -329,17 +345,17 @@ require_paths:
329
345
  - lib
330
346
  required_ruby_version: !ruby/object:Gem::Requirement
331
347
  requirements:
332
- - - '>='
348
+ - - ">="
333
349
  - !ruby/object:Gem::Version
334
- version: '0'
350
+ version: 1.9.3
335
351
  required_rubygems_version: !ruby/object:Gem::Requirement
336
352
  requirements:
337
- - - '>='
353
+ - - ">="
338
354
  - !ruby/object:Gem::Version
339
355
  version: '0'
340
356
  requirements: []
341
357
  rubyforge_project: sekken
342
- rubygems_version: 2.1.11
358
+ rubygems_version: 2.2.2
343
359
  signing_key:
344
360
  specification_version: 4
345
361
  summary: Next-Gen SOAP client