wash_out 0.9.2 → 0.10.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9149b2f9a1a04ad8d6ba859ef68f2dbf9db6d585
4
- data.tar.gz: 55936871f904cf8d45517312b4479a39a5a5e5d5
3
+ metadata.gz: a23248a1bd38c14fe7eae75c2589b4eb945687f6
4
+ data.tar.gz: 5f806cadfebf37d0b46ee2d7f69d00266f0bae53
5
5
  SHA512:
6
- metadata.gz: 5e2798c550e16322bb72de0dfa08c0e3a18ec3d292b481fc905d36f72d4b51a60bd889a583b723fc54081a484520c260a07e8b28dab1bb9babfa10f115e76e4b
7
- data.tar.gz: 08821de12b76c9fc9f4c79ddc381279ebddfa7c42d6a197e9a7b7528f94044b46927edffab4bf9bb7dfcb090e4678effe80ef1e61cfd4cdee6c339dd0ed64090
6
+ metadata.gz: 5879036aca9ca31804573e45c5cc3aa4f7ffdb5303c27ea195c322c9246afd1ecde6d518783cd6e13dcd49ccb7a29c99f7017bc28a8feb43fbb45afeb2988063
7
+ data.tar.gz: d791bece6a7eb059ff83dbac5bce07ccd6e7dfc95c761579ff53ff97776dae4c7a5156b76997131f8de931b5263ba846545ec5018daa75eeb66faf985bbb2a6e
data/.gitignore CHANGED
@@ -11,7 +11,7 @@ pkg/
11
11
  spec/dummy/db/*.sqlite3
12
12
  spec/dummy/log/*.log
13
13
  spec/dummy/tmp/
14
- gemfiles
14
+ gemfiles/*.lock
15
15
  coverage
16
16
  tags
17
17
  Gemfile.lock
data/.travis.yml CHANGED
@@ -1,7 +1,26 @@
1
- before_install:
2
- - gem install bundler
1
+ script: bundle exec rspec
2
+ gemfile:
3
+ - gemfiles/rails_3.1.3.gemfile
4
+ - gemfiles/rails_3.2.12.gemfile
5
+ - gemfiles/rails_4.0.0.gemfile
6
+ - gemfiles/rails_4.1.0.gemfile
7
+ - gemfiles/rails_4.2.0.gemfile
3
8
  rvm:
4
9
  - 1.9.3
5
- - jruby-19mode
6
10
  - 2.0.0
7
- - 2.1.0
11
+ - 2.1.8
12
+ - 2.2.4
13
+ - 2.3.0
14
+ - jruby
15
+ matrix:
16
+ exclude:
17
+ - rvm: 2.2.4
18
+ gemfile: gemfiles/rails_3.1.3.gemfile
19
+ - rvm: 2.2.4
20
+ gemfile: gemfiles/rails_3.2.12.gemfile
21
+ - rvm: 2.3.0
22
+ gemfile: gemfiles/rails_3.1.3.gemfile
23
+ - rvm: 2.3.0
24
+ gemfile: gemfiles/rails_3.2.12.gemfile
25
+ before_install:
26
+ - gem update bundler
data/Appraisals CHANGED
@@ -1,13 +1,11 @@
1
- appraise "rails-3.2.8" do
2
- gem "rails", "3.2.8"
3
- end
4
-
5
1
  appraise "rails-3.1.3" do
6
2
  gem "rails", "3.1.3"
3
+ gem "test-unit"
7
4
  end
8
5
 
9
6
  appraise "rails-3.2.12" do
10
7
  gem "rails", "3.2.12"
8
+ gem "test-unit"
11
9
  end
12
10
 
13
11
  appraise "rails-4.0.0" do
data/Gemfile CHANGED
@@ -14,4 +14,4 @@ gem 'appraisal'
14
14
  gem 'tzinfo'
15
15
  gem 'pry'
16
16
  gem 'simplecov'
17
- gem 'simplecov-summary'
17
+ gem 'simplecov-summary'
data/README.md CHANGED
@@ -78,6 +78,44 @@ class RumbasController < ApplicationController
78
78
  render :soap => params[:data].map{|x| x ? 1 : 0}
79
79
  end
80
80
 
81
+ # Params from XML attributes;
82
+ # e.g. for a request to the 'AddCircle' action:
83
+ # <soapenv:Envelope>
84
+ # <soapenv:Body>
85
+ # <AddCircle>
86
+ # <Circle radius="5.0">
87
+ # <Center x="10" y="12" />
88
+ # </Circle>
89
+ # </AddCircle>
90
+ # </soapenv:Body>
91
+ # </soapenv:Envelope>
92
+ soap_action "AddCircle",
93
+ :args => { :circle => { :center => { :@x => :integer,
94
+ :@y => :integer },
95
+ :@radius => :double } },
96
+ :return => nil, # [] for wash_out below 0.3.0
97
+ :to => :add_circle
98
+ def add_circle
99
+ circle = params[:circle]
100
+ Circle.new(circle[:center][:x], circle[:center][:y], circle[:radius])
101
+
102
+ render :soap => nil
103
+ end
104
+
105
+ # With a customised input tag name, in case params are wrapped;
106
+ # e.g. for a request to the 'IntegersToBoolean' action:
107
+ # <soapenv:Envelope>
108
+ # <soapenv:Body>
109
+ # <MyRequest> <!-- not <IntegersToBoolean> -->
110
+ # <Data>...</Data>
111
+ # </MyRequest>
112
+ # </soapenv:Body>
113
+ # </soapenv:Envelope>
114
+ soap_action "integers_to_boolean",
115
+ :args => { :my_request => { :data => [:integer] } },
116
+ :as => 'MyRequest',
117
+ :return => [:boolean]
118
+
81
119
  # You can use all Rails features like filtering, too. A SOAP controller
82
120
  # is just like a normal controller with a special routing.
83
121
  before_filter :dump_parameters
data/Rakefile CHANGED
@@ -5,10 +5,9 @@ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- desc "Default: run the unit tests."
9
- task :default => [:all]
10
-
11
- desc 'Test the plugin under all supported Rails versions.'
12
- task :all => ["appraisal:install"] do |t|
13
- exec('rake appraisal spec')
14
- end
8
+ task :console do
9
+ require "action_controller/railtie"
10
+ require "rails/test_unit/railtie"
11
+ Bundler.require
12
+ binding.pry
13
+ end
@@ -9,31 +9,47 @@ module WashOutHelper
9
9
  end
10
10
  end
11
11
 
12
+ def wsdl_data_attrs(param)
13
+ param.map.reduce({}) do |memo, p|
14
+ if p.respond_to?(:attribute?) && p.attribute?
15
+ memo.merge p.attr_name => p.value
16
+ else
17
+ memo
18
+ end
19
+ end
20
+ end
21
+
12
22
  def wsdl_data(xml, params)
13
23
  params.each do |param|
24
+ next if param.attribute?
25
+
14
26
  tag_name = param.name
15
27
  param_options = wsdl_data_options(param)
28
+ param_options.merge! wsdl_data_attrs(param)
16
29
 
17
- if !param.struct?
18
- if !param.multiplied
19
- xml.tag! tag_name, param.value, param_options
30
+ if param.struct?
31
+ if param.multiplied
32
+ param.map.each do |p|
33
+ attrs = wsdl_data_attrs p
34
+ if p.is_a?(Array) || p.map.size > attrs.size
35
+ blk = proc { wsdl_data(xml, p.map) }
36
+ end
37
+ attrs.reject! { |_, v| v.nil? }
38
+ xml.tag! tag_name, param_options.merge(attrs), &blk
39
+ end
20
40
  else
21
- param.value = [] unless param.value.is_a?(Array)
22
- param.value.each do |v|
23
- xml.tag! tag_name, v, param_options
41
+ xml.tag! tag_name, param_options do
42
+ wsdl_data(xml, param.map)
24
43
  end
25
44
  end
26
45
  else
27
- if !param.multiplied
28
- xml.tag! tag_name, param_options do
29
- wsdl_data(xml, param.map)
46
+ if param.multiplied
47
+ param.value = [] unless param.value.is_a?(Array)
48
+ param.value.each do |v|
49
+ xml.tag! tag_name, v, param_options
30
50
  end
31
51
  else
32
- param.map.each do |p|
33
- xml.tag! tag_name, param_options do
34
- wsdl_data(xml, p.map)
35
- end
36
- end
52
+ xml.tag! tag_name, param.value, param_options
37
53
  end
38
54
  end
39
55
  end
@@ -45,12 +61,27 @@ module WashOutHelper
45
61
  if param.struct?
46
62
  if !defined.include?(param.basic_type)
47
63
  xml.tag! "xsd:complexType", :name => param.basic_type do
48
- xml.tag! "xsd:sequence" do
49
- param.map.each do |value|
50
- more << value if value.struct?
51
- xml.tag! "xsd:element", wsdl_occurence(value, false, :name => value.name, :type => value.namespaced_type)
64
+ attrs, elems = [], []
65
+ param.map.each do |value|
66
+ more << value if value.struct?
67
+ if value.attribute?
68
+ attrs << value
69
+ else
70
+ elems << value
71
+ end
72
+ end
73
+
74
+ if elems.any?
75
+ xml.tag! "xsd:sequence" do
76
+ elems.each do |value|
77
+ xml.tag! "xsd:element", wsdl_occurence(value, false, :name => value.name, :type => value.namespaced_type)
78
+ end
52
79
  end
53
80
  end
81
+
82
+ attrs.each do |value|
83
+ xml.tag! "xsd:attribute", wsdl_occurence(value, false, :name => value.attr_name, :type => value.namespaced_type)
84
+ end
54
85
  end
55
86
 
56
87
  defined << param.basic_type
@@ -19,6 +19,19 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/',
19
19
  end
20
20
  end
21
21
 
22
+ @map.each do |operation, formats|
23
+ xml.message :name => "#{operation}" do
24
+ formats[:in].each do |p|
25
+ xml.part wsdl_occurence(p, false, :name => p.name, :type => p.namespaced_type)
26
+ end
27
+ end
28
+ xml.message :name => formats[:response_tag] do
29
+ formats[:out].each do |p|
30
+ xml.part wsdl_occurence(p, false, :name => p.name, :type => p.namespaced_type)
31
+ end
32
+ end
33
+ end
34
+
22
35
  xml.portType :name => "#{@name}_port" do
23
36
  @map.each do |operation, formats|
24
37
  xml.operation :name => operation do
@@ -52,17 +65,4 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/',
52
65
  xml.tag! "soap:address", :location => send("#{@name}_action_url")
53
66
  end
54
67
  end
55
-
56
- @map.each do |operation, formats|
57
- xml.message :name => "#{operation}" do
58
- formats[:in].each do |p|
59
- xml.part wsdl_occurence(p, false, :name => p.name, :type => p.namespaced_type)
60
- end
61
- end
62
- xml.message :name => formats[:response_tag] do
63
- formats[:out].each do |p|
64
- xml.part wsdl_occurence(p, false, :name => p.name, :type => p.namespaced_type)
65
- end
66
- end
67
- end
68
68
  end
@@ -19,6 +19,19 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/',
19
19
  end
20
20
  end
21
21
 
22
+ @map.each do |operation, formats|
23
+ xml.message :name => "#{operation}" do
24
+ formats[:in].each do |p|
25
+ xml.part wsdl_occurence(p, true, :name => p.name, :type => p.namespaced_type)
26
+ end
27
+ end
28
+ xml.message :name => formats[:response_tag] do
29
+ formats[:out].each do |p|
30
+ xml.part wsdl_occurence(p, true, :name => p.name, :type => p.namespaced_type)
31
+ end
32
+ end
33
+ end
34
+
22
35
  xml.portType :name => "#{@name}_port" do
23
36
  @map.each do |operation, formats|
24
37
  xml.operation :name => operation do
@@ -52,17 +65,4 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/',
52
65
  xml.tag! "soap:address", :location => send("#{@name}_action_url")
53
66
  end
54
67
  end
55
-
56
- @map.each do |operation, formats|
57
- xml.message :name => "#{operation}" do
58
- formats[:in].each do |p|
59
- xml.part wsdl_occurence(p, true, :name => p.name, :type => p.namespaced_type)
60
- end
61
- end
62
- xml.message :name => formats[:response_tag] do
63
- formats[:out].each do |p|
64
- xml.part wsdl_occurence(p, true, :name => p.name, :type => p.namespaced_type)
65
- end
66
- end
67
- end
68
- end
68
+ end
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon", ">= 2.0.0"
7
+ gem "httpi"
8
+ gem "rspec-rails"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "rb-fsevent"
12
+ gem "appraisal"
13
+ gem "tzinfo"
14
+ gem "pry"
15
+ gem "simplecov"
16
+ gem "simplecov-summary"
17
+ gem "rails", "3.1.3"
18
+ gem "test-unit"
19
+
20
+ gemspec :path => "../"
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon", ">= 2.0.0"
7
+ gem "httpi"
8
+ gem "rspec-rails"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "rb-fsevent"
12
+ gem "appraisal"
13
+ gem "tzinfo"
14
+ gem "pry"
15
+ gem "simplecov"
16
+ gem "simplecov-summary"
17
+ gem "rails", "3.2.12"
18
+ gem "test-unit"
19
+
20
+ gemspec :path => "../"
@@ -0,0 +1,19 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon", ">= 2.0.0"
7
+ gem "httpi"
8
+ gem "rspec-rails"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "rb-fsevent"
12
+ gem "appraisal"
13
+ gem "tzinfo"
14
+ gem "pry"
15
+ gem "simplecov"
16
+ gem "simplecov-summary"
17
+ gem "rails", "4.0.0"
18
+
19
+ gemspec :path => "../"
@@ -0,0 +1,19 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon", ">= 2.0.0"
7
+ gem "httpi"
8
+ gem "rspec-rails"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "rb-fsevent"
12
+ gem "appraisal"
13
+ gem "tzinfo"
14
+ gem "pry"
15
+ gem "simplecov"
16
+ gem "simplecov-summary"
17
+ gem "rails", "4.1.0"
18
+
19
+ gemspec :path => "../"
@@ -0,0 +1,19 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon", ">= 2.0.0"
7
+ gem "httpi"
8
+ gem "rspec-rails"
9
+ gem "guard"
10
+ gem "guard-rspec"
11
+ gem "rb-fsevent"
12
+ gem "appraisal"
13
+ gem "tzinfo"
14
+ gem "pry"
15
+ gem "simplecov"
16
+ gem "simplecov-summary"
17
+ gem "rails", "4.2.0"
18
+
19
+ gemspec :path => "../"
@@ -32,22 +32,27 @@ module WashOut
32
32
  end
33
33
 
34
34
  def _map_soap_parameters
35
- strip_empty_nodes = lambda{|hash|
36
- hash.keys.each do |key|
37
- if hash[key].is_a? Hash
38
- value = hash[key].delete_if{|k, v| k.to_s[0] == '@'}
35
+ @_params = _load_params action_spec[:in],
36
+ _strip_empty_nodes(action_spec[:in], xml_data)
37
+ end
39
38
 
40
- if value.length > 0
41
- hash[key] = strip_empty_nodes.call(value)
42
- else
43
- hash[key] = nil
44
- end
45
- end
39
+ def _strip_empty_nodes(params, hash)
40
+ hash.keys.each do |key|
41
+ param = params.detect { |a| a.raw_name.to_s == key.to_s }
42
+ next if !(param && hash[key].is_a?(Hash))
43
+
44
+ value = hash[key].delete_if do |k, _|
45
+ k.to_s[0] == '@' && !param.map.detect { |a| a.raw_name.to_s == k.to_s }
46
46
  end
47
47
 
48
- hash
49
- }
50
- @_params = _load_params(action_spec[:in], strip_empty_nodes.call(xml_data))
48
+ if value.length > 0
49
+ hash[key] = _strip_empty_nodes param.map, value
50
+ else
51
+ hash[key] = nil
52
+ end
53
+ end
54
+
55
+ hash
51
56
  end
52
57
 
53
58
  # Creates the final parameter hash based on the request spec and xml_data from the request
@@ -69,7 +74,7 @@ module WashOut
69
74
  @namespace = soap_config.namespace
70
75
  @name = controller_path.gsub('/', '_')
71
76
 
72
- render :template => "wash_with_soap/#{soap_config.wsdl_style}/wsdl", :layout => false,
77
+ render :template => "wash_out/#{soap_config.wsdl_style}/wsdl", :layout => false,
73
78
  :content_type => 'text/xml'
74
79
  end
75
80
 
@@ -124,7 +129,7 @@ module WashOut
124
129
  return result_spec
125
130
  }
126
131
 
127
- render :template => "wash_with_soap/#{soap_config.wsdl_style}/response",
132
+ render :template => "wash_out/#{soap_config.wsdl_style}/response",
128
133
  :layout => false,
129
134
  :locals => { :result => inject.call(result, @action_spec[:out]) },
130
135
  :content_type => 'text/xml'
@@ -146,7 +151,7 @@ module WashOut
146
151
  # Rails do not support sequental rescue_from handling, that is, rescuing an
147
152
  # exception from a rescue_from handler. Hence this function is a public API.
148
153
  def render_soap_error(message, code=nil)
149
- render :template => "wash_with_soap/#{soap_config.wsdl_style}/error", :status => 500,
154
+ render :template => "wash_out/#{soap_config.wsdl_style}/error", :status => 500,
150
155
  :layout => false,
151
156
  :locals => { :error_message => message, :error_code => (code || 'Server') },
152
157
  :content_type => 'text/xml'
@@ -188,14 +193,19 @@ module WashOut
188
193
  self.class.soap_actions[soap_action]
189
194
  end
190
195
 
196
+ def request_input_tag
197
+ action_spec[:request_tag]
198
+ end
199
+
191
200
  def soap_action
192
201
  request.env['wash_out.soap_action']
193
202
  end
194
203
 
195
204
  def xml_data
196
205
  xml_data = env['wash_out.soap_data'].values_at(:envelope, :Envelope).compact.first
197
- xml_data = xml_data.values_at(:body, :Body).compact.first
198
- xml_data = xml_data.values_at(soap_action.underscore.to_sym, soap_action.to_sym).compact.first || {}
206
+ xml_data = xml_data.values_at(:body, :Body).compact.first || {}
207
+ return xml_data if soap_config.wsdl_style == "document"
208
+ xml_data = xml_data.values_at(soap_action.underscore.to_sym, soap_action.to_sym, request_input_tag.to_sym).compact.first || {}
199
209
  end
200
210
 
201
211
  end
@@ -7,6 +7,7 @@ module WashOut
7
7
  attr_accessor :multiplied
8
8
  attr_accessor :value
9
9
  attr_accessor :source_class
10
+ attr_accessor :soap_config
10
11
 
11
12
  # Defines a WSDL parameter with name +name+ and type specifier +type+.
12
13
  # The type specifier format is described in #parse_def.
@@ -63,6 +64,7 @@ module WashOut
63
64
  operation = case type
64
65
  when 'string'; :to_s
65
66
  when 'integer'; :to_i
67
+ when 'long'; :to_i
66
68
  when 'double'; :to_f
67
69
  when 'boolean'; lambda{|dat| dat === "0" ? false : !!dat}
68
70
  when 'date'; :to_date
@@ -160,10 +162,19 @@ module WashOut
160
162
  def flat_copy
161
163
  copy = self.class.new(@soap_config, @name, @type.to_sym, @multiplied)
162
164
  copy.raw_name = raw_name
163
- copy.source_class = copy.source_class
165
+ copy.source_class = source_class
164
166
  copy
165
167
  end
166
168
 
169
+ def attribute?
170
+ name[0] == "@"
171
+ end
172
+
173
+ def attr_name
174
+ raise 'Not attribute' unless attribute?
175
+ name[1..-1]
176
+ end
177
+
167
178
  private
168
179
 
169
180
  # Used to load an entire structure.
@@ -178,7 +189,8 @@ module WashOut
178
189
  # RUBY18 Enumerable#each_with_object is better, but 1.9 only.
179
190
  @map.map do |param|
180
191
  if data.has_key? param.raw_name
181
- struct[param.raw_name] = yield param, data, param.raw_name
192
+ param_name = param.attribute? ? param.attr_name : param.raw_name
193
+ struct[param_name] = yield param, data, param.raw_name
182
194
  end
183
195
  end
184
196
 
@@ -52,11 +52,11 @@ module WashOut
52
52
  end
53
53
 
54
54
  def soap_body(env)
55
- # Don't let nobody intercept us ^_^
56
- env['rack.input'].rewind if env['rack.input'].respond_to?(:rewind)
57
-
58
- env['rack.input'].respond_to?(:string) ? env['rack.input'].string
59
- : env['rack.input'].read
55
+ body = env['rack.input']
56
+ body.rewind if body.respond_to? :rewind
57
+ body.respond_to?(:string) ? body.string : body.read
58
+ ensure
59
+ body.rewind if body.respond_to? :rewind
60
60
  end
61
61
 
62
62
  def parse_soap_parameters(env)
data/lib/wash_out/soap.rb CHANGED
@@ -30,6 +30,7 @@ module WashOut
30
30
 
31
31
  self.soap_actions[action] = options.merge(
32
32
  :in => WashOut::Param.parse_def(soap_config, options[:args]),
33
+ :request_tag => options[:as] || action,
33
34
  :out => WashOut::Param.parse_def(soap_config, options[:return]),
34
35
  :to => options[:to] || action,
35
36
  :response_tag => options[:response_tag] || default_response_tag
@@ -1,3 +1,3 @@
1
1
  module WashOut
2
- VERSION = "0.9.2"
2
+ VERSION = "0.10.0"
3
3
  end
data/lib/wash_out/wsse.rb CHANGED
@@ -49,8 +49,8 @@ module WashOut
49
49
  def matches_expected_digest?(password)
50
50
  nonce = @username_token.values_at(:nonce, :Nonce).compact.first
51
51
  timestamp = @username_token.values_at(:created, :Created).compact.first
52
-
53
52
  return false if nonce.nil? || timestamp.nil?
53
+ timestamp = timestamp.to_datetime
54
54
 
55
55
  # Token should not be accepted if timestamp is older than 5 minutes ago
56
56
  # http://www.oasis-open.org/committees/download.php/16782/wss-v1.1-spec-os-UsernameTokenProfile.pdf
@@ -62,11 +62,11 @@ module WashOut
62
62
  flavors = Array.new
63
63
 
64
64
  # Ruby / Savon
65
- token = nonce + timestamp.to_s + expected_password
65
+ token = nonce + timestamp.strftime("%Y-%m-%dT%H:%M:%SZ") + expected_password
66
66
  flavors << Base64.encode64(Digest::SHA1.hexdigest(token)).chomp!
67
67
 
68
68
  # Java
69
- token = Base64.decode64(nonce) + timestamp.to_s + expected_password
69
+ token = Base64.decode64(nonce) + timestamp.strftime("%Y-%m-%dT%H:%M:%SZ") + expected_password
70
70
  flavors << Base64.encode64(Digest::SHA1.digest(token)).chomp!
71
71
 
72
72
  flavors.each do |f|
data/lib/wash_out.rb CHANGED
@@ -11,6 +11,12 @@ require 'wash_out/model'
11
11
  require 'wash_out/wsse'
12
12
  require 'wash_out/middleware'
13
13
 
14
+ module WashOut
15
+ def self.root
16
+ File.expand_path '../..', __FILE__
17
+ end
18
+ end
19
+
14
20
  module ActionDispatch::Routing
15
21
  class Mapper
16
22
  # Adds the routes for a SOAP endpoint at +controller+.
@@ -26,4 +26,5 @@ Dummy::Application.configure do
26
26
 
27
27
  # Print deprecation notices to the stderr
28
28
  config.active_support.deprecation = :stderr
29
+ config.active_support.test_order = :random
29
30
  end