washout_builder 0.15.5 → 0.15.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3a7e076b8c2fd92d9d0a3460b6c0a32aa526137
4
- data.tar.gz: de260d94e4fde3a2b85ee69b29e24d424c418d72
3
+ metadata.gz: d919b2510e76675de1fff4f01f24054ea68a9523
4
+ data.tar.gz: 892e4bd42e766fd5aa745452e6fdaaa12b8578e1
5
5
  SHA512:
6
- metadata.gz: c912a50fbdae3d27af8e038b6dba9b086c22d322443536f84a0dcfc74f7ee710c2b51835e4bc5ef3f0e4570586a5e094d156772175273ec3e256d404f4a99929
7
- data.tar.gz: 5067c0aa90bd1dc0634b34a7e16c84cb428ba4dae9600df7d90d387e69d8d7f36489cddc0a43e79c3ea7dfc3cf9fd396183905516aca55faf00d81ef362d9da9
6
+ metadata.gz: c8c66851699a73fccfd5b3dfaa9eccb7fdcf183d7737a4992c28f95ceb63c6171c335d3f813116d1449fa0ad879d448d03715677086558e043ee5b10cb673c49
7
+ data.tar.gz: 8de3e81ba51afa325a7a351ece58bf389a1ec33eb2d42d99009964e0b9b726e7aa0e11a3cd0479e4a31f28dea5844fb6f490b8449cc582692320a1c1b7e28f34
@@ -1,6 +1,6 @@
1
1
  = washout_builder {<img src="https://badge.fury.io/rb/washout_builder.png" alt="Gem Version" />}[http://badge.fury.io/rb/washout_builder]
2
2
  {<img src="https://travis-ci.org/bogdanRada/washout_builder.png?branch=master,develop" />}[https://travis-ci.org/bogdanRada/washout_builder]
3
- {<img src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.svg?style=flat" alt="Dependency Status" />}[https://www.versioneye.com/user/projects/52fc7297ec1375346600007d]
3
+ {<img src="https://gemnasium.com/bogdanRada/washout_builder.svg" alt="Dependency Status" />}[https://gemnasium.com/bogdanRada/washout_builder]
4
4
  {<img src="https://coveralls.io/repos/bogdanRada/washout_builder/badge.png?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/bogdanRada/washout_builder?branch=master]
5
5
  {<img src="https://codeclimate.com/github/bogdanRada/washout_builder.png" />}[https://codeclimate.com/github/bogdanRada/washout_builder]
6
6
  {<img src="https://reposs.herokuapp.com/?path=bogdanRada/washout_builder" alt="Repo Size"/>}[https://github.com/bogdanRada/washout_builder]
data/Rakefile CHANGED
@@ -39,10 +39,10 @@ task default: [:all]
39
39
  desc 'Test the plugin under all supported Rails versions.'
40
40
  task :all do |_t|
41
41
  if ENV['TRAVIS']
42
- exec(' bundle exec phare && bundle exec appraisal install && bundle exec rake appraisal spec && bundle exec rake coveralls:push')
42
+ exec(' bundle exec appraisal install && bundle exec rake appraisal spec && bundle exec rake coveralls:push')
43
43
  else
44
- # exec(' bundle exec rubocop -a . && bundle exec phare && ')
45
- exec ('bundle exec appraisal install && bundle exec rake appraisal spec')
44
+ #exec(' bundle exec rubocop -a . && bundle exec phare &&')
45
+ exec ('bundle exec appraisal install && bundle exec rake appraisal spec')
46
46
  end
47
47
  end
48
48
 
@@ -6,7 +6,7 @@ module WashoutBuilder # Returns the version of the currently loaded Rails as a <
6
6
  module VERSION
7
7
  MAJOR = 0
8
8
  MINOR = 15
9
- TINY = 5
9
+ TINY = 6
10
10
  PRE = nil
11
11
 
12
12
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -43,6 +43,6 @@ describe WashoutBuilder::WashoutBuilderController, type: :controller do
43
43
  controller.expects(:controller_is_a_service?).with(params[:name]).returns(route)
44
44
  WashoutBuilder::Document::Generator.expects(:new).with(route.defaults[:controller])
45
45
  get :all, params
46
- expect(response).to render_template 'wash_with_html/doc'
46
+ expect(response).to render_template 'wash_with_html/doc'
47
47
  end
48
48
  end
@@ -46,7 +46,7 @@ describe WashoutBuilderFaultTypeHelper, type: :helper do
46
46
  it 'returns false' do
47
47
  attr_details = { primitive: 'STRING' }
48
48
  WashoutBuilder::Type::BASIC_TYPES.expects(:include?).with(attr_details[:primitive].to_s.downcase).returns(false)
49
- expect(helper.primitive_type_is_basic?(attr_details)).to eq(false)
49
+ expect(helper.primitive_type_is_basic?(attr_details)).to eq(false)
50
50
  end
51
51
  end
52
52
 
@@ -54,14 +54,14 @@ describe WashoutBuilderFaultTypeHelper, type: :helper do
54
54
  %w(NILCLASS nilclass).each do |primitive|
55
55
  it 'returns string in case of nilclass' do
56
56
  attr_details = { primitive: primitive }
57
- expect(helper.get_primitive_type_string(attr_details)).to eq('string')
57
+ expect(helper.get_primitive_type_string(attr_details)).to eq('string')
58
58
  end
59
59
  end
60
60
 
61
61
  %w(BLA bla).each do |primitive|
62
62
  it 'returns the primitive if not niclass' do
63
63
  attr_details = { primitive: primitive }
64
- expect(helper.get_primitive_type_string(attr_details)).to eq(primitive.to_s.downcase)
64
+ expect(helper.get_primitive_type_string(attr_details)).to eq(primitive.to_s.downcase)
65
65
  end
66
66
  end
67
67
  end
@@ -71,14 +71,14 @@ describe WashoutBuilderFaultTypeHelper, type: :helper do
71
71
  it 'checks the member type to be basic if primitive type array' do
72
72
  attr_details = { primitive: primitive }
73
73
  helper.expects(:member_type_is_basic?).with(attr_details).returns(true)
74
- expect(helper.get_member_type_string(attr_details) ).to eq(true)
74
+ expect(helper.get_member_type_string(attr_details)).to eq(true)
75
75
  end
76
76
  end
77
77
 
78
78
  %w(BLA Bla bla).each do |primitive|
79
79
  it 'returns the primitive type as it is if not array' do
80
80
  attr_details = { primitive: primitive }
81
- expect( helper.get_member_type_string(attr_details) ).to eq(primitive)
81
+ expect(helper.get_member_type_string(attr_details)).to eq(primitive)
82
82
  end
83
83
  end
84
84
  end
@@ -120,7 +120,7 @@ describe WashoutBuilderFaultTypeHelper, type: :helper do
120
120
  helper.expects(:get_member_type_string).with(attr_details).returns(member_type)
121
121
  helper.expects(:create_fault_model_complex_element_type).with(pre, member_type, attribute, true).returns(expected)
122
122
  result = helper.create_html_fault_model_element_type(pre, attribute, attr_details)
123
- expect(result).to eq(expected)
123
+ expect(result).to eq(expected)
124
124
  end
125
125
  end
126
126
  end
@@ -44,20 +44,20 @@ describe WashoutBuilder::Document::ExceptionModel do
44
44
  specify { expect(subject.get_fault_type_method('backtrace')).to eq('string') }
45
45
 
46
46
  it 'gets the strcuture' do
47
- expect(subject.remove_fault_type_inheritable_elements(['code'])).to eq('message' => { primitive: 'string', member_type: nil }, 'backtrace' => { primitive: 'string', member_type: nil })
47
+ expect(subject.remove_fault_type_inheritable_elements(['code'])).to eq('message' => { primitive: 'string', member_type: nil }, 'backtrace' => { primitive: 'string', member_type: nil })
48
48
  end
49
49
 
50
50
  it 'fault_ancestor_hash' do
51
- expect(subject.fault_ancestor_hash(structure, ancestors)).to eq(fault_ancestor_hash(subject, structure, ancestors))
51
+ expect(subject.fault_ancestor_hash(structure, ancestors)).to eq(fault_ancestor_hash(subject, structure, ancestors))
52
52
  end
53
53
 
54
54
  it 'gets the fault_ancestors' do
55
55
  subject.expects(:get_complex_type_ancestors).with(subject, ['ActiveRecord::Base', 'Object', 'BasicObject', 'Exception']).returns(ancestors)
56
- expect(subject.fault_ancestors).to eq ancestors
56
+ expect(subject.fault_ancestors).to eq ancestors
57
57
  end
58
58
 
59
59
  it 'gets the attribute type' do
60
- expect(subject.get_fault_type_method('some_name')).to eq 'string'
60
+ expect(subject.get_fault_type_method('some_name')).to eq 'string'
61
61
  end
62
62
 
63
63
  it 'gets the fault_without_inheritable_elements' do
@@ -70,7 +70,7 @@ describe WashoutBuilder::Document::ExceptionModel do
70
70
  subject.expects(:fault_ancestors).returns(nil)
71
71
  subject.expects(:find_fault_model_structure).returns(structure)
72
72
  subject.expects(:fault_ancestor_hash).with(structure, []).returns(fault_ancestor_hash(subject, structure, ancestors))
73
- expect(subject.get_fault_class_ancestors([])).to eq(nil)
73
+ expect(subject.get_fault_class_ancestors([])).to eq(nil)
74
74
  end
75
75
 
76
76
  it 'gets the ancestors' do
@@ -39,25 +39,25 @@ describe WashoutBuilder::Document::Generator do
39
39
  end
40
40
 
41
41
  context 'endpoint' do
42
- specify { expect(@document.endpoint).to eq(soap_config.namespace.gsub('/wsdl', '/action')) }
42
+ specify { expect(@document.endpoint).to eq(soap_config.namespace.gsub('/wsdl', '/action')) }
43
43
  end
44
44
 
45
45
  context 'service' do
46
- specify { expect(@document.service).to eq(service_class.name.underscore.gsub('_controller', '').camelize) }
46
+ specify { expect(@document.service).to eq(service_class.name.underscore.gsub('_controller', '').camelize) }
47
47
  end
48
48
 
49
49
  context 'description' do
50
- specify { expect(@document.service_description).to eq(soap_config.description) }
50
+ specify { expect(@document.service_description).to eq(soap_config.description) }
51
51
  end
52
52
 
53
53
  context 'operations' do
54
- specify { expect(@document.operations).to eq(service_class.soap_actions.map { |operation, _formats| operation }) }
54
+ specify { expect(@document.operations).to eq(service_class.soap_actions.map { |operation, _formats| operation }) }
55
55
  end
56
56
 
57
57
  context 'sorted_operations' do
58
58
  it 'returns sorted operations' do
59
59
  expected = service_class.soap_actions.sort_by { |operation, _formats| operation.downcase }.uniq
60
- expect(@document.sorted_operations).to eq expected
60
+ expect(@document.sorted_operations).to eq expected
61
61
  end
62
62
  end
63
63
 
@@ -75,11 +75,11 @@ describe WashoutBuilder::Document::Generator do
75
75
  end
76
76
 
77
77
  context 'input types' do
78
- specify { expect(@document.input_types).to eq(argument_types('input')) }
78
+ specify { expect(@document.input_types).to eq(argument_types('input')) }
79
79
  end
80
80
 
81
81
  context 'output types' do
82
- specify { expect(@document.output_types).to eq(argument_types('output')) }
82
+ specify { expect(@document.output_types).to eq(argument_types('output')) }
83
83
  end
84
84
 
85
85
  context 'operation exceptions' do
@@ -95,7 +95,7 @@ describe WashoutBuilder::Document::Generator do
95
95
 
96
96
  it 'returns nil on empty soap actions' do
97
97
  @document.stubs(:soap_actions).returns(nil)
98
- expect(@document.all_soap_action_names).to eq(nil)
98
+ expect(@document.all_soap_action_names).to eq(nil)
99
99
  end
100
100
  end
101
101
 
@@ -112,13 +112,13 @@ describe WashoutBuilder::Document::Generator do
112
112
  WashoutBuilder::Type.stubs(:all_fault_classes).returns([base_exception])
113
113
  @document.expects(:get_complex_fault_types).with([base_exception]).returns([base_exception])
114
114
  @document.expects(:sort_complex_types).with([base_exception], 'fault').returns([base_exception])
115
- expect(@document.fault_types).to eq([base_exception])
115
+ expect(@document.fault_types).to eq([base_exception])
116
116
  end
117
117
 
118
118
  it 'returns complex fault types' do
119
119
  base_exception.expects(:get_fault_class_ancestors).with([], true).returns(nil)
120
120
  @document.expects(:filter_exceptions_raised).returns(nil)
121
- expect(@document.get_complex_fault_types([base_exception])).to eq([])
121
+ expect(@document.get_complex_fault_types([base_exception])).to eq([])
122
122
  end
123
123
  end
124
124
 
@@ -128,13 +128,13 @@ describe WashoutBuilder::Document::Generator do
128
128
 
129
129
  it 'returns nil on empty soap actions' do
130
130
  @document.stubs(:soap_actions).returns(nil)
131
- expect(@document.complex_types).to eq(nil)
131
+ expect(@document.complex_types).to eq(nil)
132
132
  end
133
133
 
134
134
  it 'returns nil if no complex types detected' do
135
135
  WashOut::Param.any_instance.expects(:get_nested_complex_types).returns([])
136
136
  @document.expects(:sort_complex_types).with([], 'class').returns(nil)
137
- expect( @document.complex_types).to eq(nil)
137
+ expect(@document.complex_types).to eq(nil)
138
138
  end
139
139
  end
140
140
  end
@@ -7,11 +7,11 @@ describe WashoutBuilder::Type do
7
7
  let(:fault_classes) { [exception] }
8
8
 
9
9
  it 'defines a list of types' do
10
- expect(WashoutBuilder::Type::BASIC_TYPES).to eq(%w(string integer double boolean date datetime float time int))
10
+ expect(WashoutBuilder::Type::BASIC_TYPES).to eq(%w(string integer double boolean date datetime float time int))
11
11
  end
12
12
 
13
13
  it 'gets the fault classes defined' do
14
- expect(WashoutBuilder::Type.all_fault_classes).to eq([base_exception])
14
+ expect(WashoutBuilder::Type.all_fault_classes).to eq([base_exception])
15
15
  end
16
16
 
17
17
  context 'exception' do
@@ -20,11 +20,11 @@ describe WashoutBuilder::Type do
20
20
  end
21
21
 
22
22
  it 'checks if exception has ancestor' do
23
- expect(WashoutBuilder::Type.ancestor_fault?(exception)).to eq(true)
23
+ expect(WashoutBuilder::Type.ancestor_fault?(exception)).to eq(true)
24
24
  end
25
25
 
26
26
  it 'checks if exception valid' do
27
- expect(WashoutBuilder::Type.valid_fault_class?(exception)).to eq(true)
27
+ expect(WashoutBuilder::Type.valid_fault_class?(exception)).to eq(true)
28
28
  end
29
29
  end
30
30
  end
@@ -36,21 +36,23 @@ describe WashoutBuilder do
36
36
 
37
37
  describe 'Module' do
38
38
  it 'includes' do
39
- expect { lambda do
40
- mock_controller do
41
- # nothing
39
+ expect do
40
+ lambda do
41
+ mock_controller do
42
+ # nothing
43
+ end
42
44
  end
43
- end
44
- }.to_not raise_exception
45
+ end.to_not raise_exception
45
46
  end
46
47
 
47
48
  it 'allows definition of a simple action' do
48
- expect { lambda do
49
- mock_controller do
50
- soap_action 'answer', args: nil, return: :integer
49
+ expect do
50
+ lambda do
51
+ mock_controller do
52
+ soap_action 'answer', args: nil, return: :integer
53
+ end
51
54
  end
52
- end
53
- }.to_not raise_exception
55
+ end.to_not raise_exception
54
56
  end
55
57
  end
56
58
 
@@ -78,13 +80,13 @@ describe WashoutBuilder do
78
80
 
79
81
  it 'lists operations' do
80
82
  operations = xml[:definitions][:binding][:operation]
81
- expect(operations).to be_a_kind_of(Array)
83
+ expect(operations).to be_a_kind_of(Array)
82
84
 
83
- expect(operations.map { |e| e[:'@name'] }.sort ).to eq %w(Result getArea rocky).sort
85
+ expect(operations.map { |e| e[:'@name'] }.sort).to eq %w(Result getArea rocky).sort
84
86
  end
85
87
 
86
88
  it 'defines complex types' do
87
- expect(wsdl.include?('<xsd:complexType name="Circle1">')).to eq true
89
+ expect(wsdl.include?('<xsd:complexType name="Circle1">')).to eq true
88
90
  end
89
91
 
90
92
  it 'defines arrays' do
@@ -92,7 +94,7 @@ describe WashoutBuilder do
92
94
  .find { |inneer_x| inneer_x[:'@name'] == 'Center' }[:sequence][:element]
93
95
  .find { |inneer_x| inneer_x[:'@name'] == 'X' }
94
96
 
95
- expect(x[:'@min_occurs']).to eq('0')
97
+ expect(x[:'@min_occurs']).to eq('0')
96
98
  expect(x[:'@max_occurs']).to eq('unbounded')
97
99
  end
98
100
  end
@@ -118,7 +120,7 @@ describe WashoutBuilder do
118
120
  </env:Envelope>
119
121
  XML
120
122
 
121
- expect( HTTPI.post('http://app/api/action', request).body).to eq( <<-XML
123
+ expect(HTTPI.post('http://app/api/action', request).body).to eq(<<-XML
122
124
  <?xml version="1.0" encoding="UTF-8"?>
123
125
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="false">
124
126
  <soap:Body>
@@ -128,7 +130,7 @@ describe WashoutBuilder do
128
130
  </soap:Body>
129
131
  </soap:Envelope>
130
132
  XML
131
- )
133
+ )
132
134
  end
133
135
 
134
136
  it 'accept no parameters' do
@@ -139,8 +141,8 @@ describe WashoutBuilder do
139
141
  end
140
142
  end
141
143
 
142
- expect(savon(:answer)[:answer_response][:value]
143
- ).to eq '42'
144
+ expect(savon(:answer)[:answer_response][:value]
145
+ ).to eq '42'
144
146
  end
145
147
 
146
148
  it 'accept insufficient parameters' do
@@ -151,8 +153,8 @@ describe WashoutBuilder do
151
153
  end
152
154
  end
153
155
 
154
- expect(savon(:answer)[:answer_response][:value]
155
- ).to eq '42'
156
+ expect(savon(:answer)[:answer_response][:value]
157
+ ).to eq '42'
156
158
  end
157
159
 
158
160
  it 'accept empty parameter' do
@@ -162,8 +164,7 @@ describe WashoutBuilder do
162
164
  render soap: { a: params[:a] }
163
165
  end
164
166
  end
165
- expect(savon(:answer, a: '')[:answer_response][:a]
166
- ).to eq ({ :"@xsi:type" => 'xsd:string' })
167
+ expect(savon(:answer, a: '')[:answer_response][:a]).to eq("@xsi:type": 'xsd:string')
167
168
  end
168
169
 
169
170
  it 'accept one parameter' do
@@ -174,8 +175,8 @@ describe WashoutBuilder do
174
175
  end
175
176
  end
176
177
 
177
- expect(savon(:check_answer, 42)[:check_answer_response][:value]).to eq true
178
- expect(savon(:check_answer, 13)[:check_answer_response][:value]).to eq false
178
+ expect(savon(:check_answer, 42)[:check_answer_response][:value]).to eq true
179
+ expect(savon(:check_answer, 13)[:check_answer_response][:value]).to eq false
179
180
  end
180
181
 
181
182
  it 'accept two parameters' do
@@ -186,7 +187,7 @@ describe WashoutBuilder do
186
187
  end
187
188
  end
188
189
 
189
- expect(savon(:funky, a: 42, b: 'k')[:funky_response][:value]).to eq '420k'
190
+ expect(savon(:funky, a: 42, b: 'k')[:funky_response][:value]).to eq '420k'
190
191
  end
191
192
  end
192
193
 
@@ -209,8 +210,8 @@ describe WashoutBuilder do
209
210
  message = { circle: { center: { x: 3, y: 4 },
210
211
  radius: 5 } }
211
212
 
212
- expect(savon(:find_area, message)[:find_area_response]
213
- ).to eq ({ area: (Math::PI * 25).to_s, distance_from_o: (5.0).to_s })
213
+ expect(savon(:find_area, message)[:find_area_response]
214
+ ).to eq(area: (Math::PI * 25).to_s, distance_from_o: (5.0).to_s)
214
215
  end
215
216
 
216
217
  it 'accept arrays' do
@@ -300,8 +301,8 @@ describe WashoutBuilder do
300
301
  end
301
302
  end
302
303
 
303
- expect(savon(:gogogo)[:gogogo_response]
304
- ).to eq ({ zoo: 'zoo', boo: { moo: 'moo', doo: 'doo', :"@xsi:type" => 'tns:Boo' } })
304
+ expect(savon(:gogogo)[:gogogo_response]
305
+ ).to eq(zoo: 'zoo', boo: { moo: 'moo', doo: 'doo', "@xsi:type": 'tns:Boo' })
305
306
  end
306
307
 
307
308
  it 'respond with arrays' do
@@ -314,7 +315,7 @@ describe WashoutBuilder do
314
315
  end
315
316
  end
316
317
 
317
- expect(savon(:rumba)[:rumba_response]).to eq ({ value: %w(1 2 3) })
318
+ expect(savon(:rumba)[:rumba_response]).to eq(value: %w(1 2 3))
318
319
  end
319
320
 
320
321
  it 'respond with complex structures inside arrays' do
@@ -333,12 +334,10 @@ describe WashoutBuilder do
333
334
  end
334
335
  end
335
336
 
336
- expect(savon(:rumba)[:rumba_response]).to eq ({
337
- rumbas: [
338
- { zombies: 'suck1', puppies: 'rock1', :"@xsi:type" => 'tns:Rumbas' },
339
- { zombies: 'suck2', puppies: 'rock2', :"@xsi:type" => 'tns:Rumbas' }
340
- ]
341
- })
337
+ expect(savon(:rumba)[:rumba_response]).to eq(rumbas: [
338
+ { zombies: 'suck1', puppies: 'rock1', "@xsi:type": 'tns:Rumbas' },
339
+ { zombies: 'suck2', puppies: 'rock2', "@xsi:type": 'tns:Rumbas' }
340
+ ])
342
341
  end
343
342
 
344
343
  it 'respond with structs in structs in arrays' do
@@ -352,24 +351,22 @@ describe WashoutBuilder do
352
351
  end
353
352
  end
354
353
 
355
- expect(savon(:rumba)[:rumba_response]).to eq ({
356
- value: [
357
- {
358
- rumbas: {
359
- zombies: '100000',
360
- :"@xsi:type" => 'tns:Rumbas'
361
- },
362
- :"@xsi:type" => 'tns:Value'
354
+ expect(savon(:rumba)[:rumba_response]).to eq(value: [
355
+ {
356
+ rumbas: {
357
+ zombies: '100000',
358
+ "@xsi:type": 'tns:Rumbas'
363
359
  },
364
- {
365
- rumbas: {
366
- zombies: '2',
367
- :"@xsi:type"=> 'tns:Rumbas'
368
- },
369
- :"@xsi:type"=> 'tns:Value'
370
- }
371
- ]
372
- })
360
+ "@xsi:type": 'tns:Value'
361
+ },
362
+ {
363
+ rumbas: {
364
+ zombies: '2',
365
+ "@xsi:type": 'tns:Rumbas'
366
+ },
367
+ "@xsi:type": 'tns:Value'
368
+ }
369
+ ])
373
370
  end
374
371
 
375
372
  context 'with arrays missing' do
@@ -382,7 +379,7 @@ describe WashoutBuilder do
382
379
  end
383
380
  end
384
381
 
385
- expect( savon(:rocknroll)[:rocknroll_response]).to be_nil
382
+ expect(savon(:rocknroll)[:rocknroll_response]).to be_nil
386
383
  end
387
384
 
388
385
  it 'respond with complext definition' do
@@ -394,7 +391,7 @@ describe WashoutBuilder do
394
391
  end
395
392
  end
396
393
 
397
- expect(savon(:rocknroll)[:rocknroll_response]).to be_nil
394
+ expect(savon(:rocknroll)[:rocknroll_response]).to be_nil
398
395
  end
399
396
 
400
397
  it 'respond with nested simple definition' do
@@ -406,8 +403,8 @@ describe WashoutBuilder do
406
403
  end
407
404
  end
408
405
 
409
- expect(savon(:rocknroll)[:rocknroll_response][:my_value]
410
- ).to eq ({ :"@xsi:type" => 'tns:MyValue' })
406
+ expect(savon(:rocknroll)[:rocknroll_response][:my_value]
407
+ ).to eq("@xsi:type": 'tns:MyValue')
411
408
  end
412
409
 
413
410
  it 'handles incomplete array response' do
@@ -450,7 +447,7 @@ describe WashoutBuilder do
450
447
  mock_controller do
451
448
  soap_action 'date', args: :date, return: :nil
452
449
  def date
453
- raise Exception if params[:value].present? && params[:value] != Date.parse('2000-12-30')
450
+ raise Exception if params[:value].present? && params[:value] != Date.parse('2000-12-30')
454
451
  render soap: nil
455
452
  end
456
453
  end
@@ -463,7 +460,7 @@ describe WashoutBuilder do
463
460
  mock_controller do
464
461
  soap_action 'base64', args: :base64Binary, return: :nil
465
462
  def base64
466
- raise Exception if params[:value].present? && params[:value] != 'test'
463
+ raise Exception if params[:value].present? && params[:value] != 'test'
467
464
  render soap: nil
468
465
  end
469
466
  end
@@ -484,9 +481,9 @@ describe WashoutBuilder do
484
481
  end
485
482
  end
486
483
 
487
- expect {
484
+ expect do
488
485
  savon(:duty, bad: 42, good: nil)
489
- }.to raise_exception(Savon::SOAPFault)
486
+ end.to raise_exception(Savon::SOAPFault)
490
487
  end
491
488
 
492
489
  it 'raise for date in incorrect format' do
@@ -496,9 +493,9 @@ describe WashoutBuilder do
496
493
  render soap: nil
497
494
  end
498
495
  end
499
- expect {
496
+ expect do
500
497
  savon(:date, value: 'incorrect format')
501
- }.to raise_exception(Savon::SOAPFault)
498
+ end.to raise_exception(Savon::SOAPFault)
502
499
  end
503
500
 
504
501
  it 'raise to report SOAP errors', fails: true do
@@ -586,8 +583,8 @@ describe WashoutBuilder do
586
583
 
587
584
  expect { savon(:bad) }.to raise_exception{ |error|
588
585
  error_hash = error.to_hash
589
- expect(error_hash[:fault][:faultcode]).to eq(error_code.to_s)
590
- expect(error_hash[:fault][:faultstring]).to eq(error_message)
586
+ expect(error_hash[:fault][:faultcode]).to eq(error_code.to_s)
587
+ expect(error_hash[:fault][:faultstring]).to eq(error_message)
591
588
  expect(error).to be_a(Savon::SOAPFault)
592
589
  }
593
590
  end
@@ -600,16 +597,15 @@ describe WashoutBuilder do
600
597
  raise_runtime_exception = raise_exception(RuntimeError)
601
598
 
602
599
  mock_controller do
603
- soap_action 'rumba',
604
- args: :integer,
605
- return: nil
600
+ soap_action 'rumba',
601
+ args: :integer,
602
+ return: nil
606
603
  def rumba
607
604
  raise RuntimeError
608
- render soap: nil
609
605
  end
610
606
  end
611
-
612
- expect { savon(:rumba) }.to raise_runtime_exception
607
+
608
+ expect { savon(:rumba) }.to raise_runtime_exception
613
609
  end
614
610
  end
615
611
 
@@ -624,7 +620,7 @@ describe WashoutBuilder do
624
620
  end
625
621
 
626
622
  expect(savon(name.underscore.to_sym)["#{name.underscore}_response".to_sym][:value]
627
- ).to eq 'forty two'
623
+ ).to eq 'forty two'
628
624
  end
629
625
 
630
626
  it 'respects :response_tag option' do
@@ -635,7 +631,7 @@ describe WashoutBuilder do
635
631
  end
636
632
  end
637
633
 
638
- expect(savon(:specific)).to eq({ test: { value: 'test' } })
634
+ expect(savon(:specific)).to eq(test: { value: 'test' })
639
635
  end
640
636
 
641
637
  it 'handles snakecase option properly' do
@@ -70,7 +70,7 @@ RSpec.configure do |config|
70
70
  namespace: false
71
71
  }
72
72
  end
73
- #config.expect_with(:rspec) { |c| c.syntax = :should }
73
+ # config.expect_with(:rspec) { |c| c.syntax = :should }
74
74
 
75
75
  config.after(:suite) do
76
76
  if SimpleCov.running
@@ -6,16 +6,16 @@ module FIxMinitest
6
6
  override_minitest_unit_run
7
7
  end
8
8
 
9
- # rubocop:disable NestedMethodDefinition
9
+ # rubocop:disable all
10
10
  def self.override_minitest_run
11
11
  Minitest.instance_eval do
12
12
  def run(*)
13
13
  FIxMinitest.run_mininitest
14
- end
14
+ end
15
15
  end if defined?(Minitest)
16
16
  end
17
-
18
- # rubocop:disable NestedMethodDefinition
17
+
18
+ # rubocop:disable NestedMethodDefinition
19
19
  def self.run_mininitest
20
20
  case $ERROR_INFO
21
21
  when SystemExit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: washout_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada