wash_out 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon"
7
+ gem "httpi", :git=>"git://github.com/savonrb/httpi.git"
8
+ gem "bundler", "~> 1.3.0"
9
+ gem "rspec-rails"
10
+ gem "guard"
11
+ gem "guard-rspec"
12
+ gem "rb-fsevent"
13
+ gem "appraisal"
14
+ gem "tzinfo"
15
+ gem "pry"
16
+ gem "simplecov"
17
+ gem "simplecov-summary"
18
+ gem "rails", "3.2.8"
19
+
20
+ gemspec :path=>"../"
@@ -0,0 +1,184 @@
1
+ GIT
2
+ remote: git://github.com/savonrb/httpi.git
3
+ revision: 6536d498160ecb0e969bb161ad091c49493f6bc2
4
+ specs:
5
+ httpi (2.0.0)
6
+ rack
7
+
8
+ PATH
9
+ remote: /Users/inossidabile/Repos/wash_out
10
+ specs:
11
+ wash_out (0.6.1)
12
+ nori (~> 2.0.0)
13
+
14
+ GEM
15
+ remote: http://rubygems.org/
16
+ specs:
17
+ actionmailer (3.2.8)
18
+ actionpack (= 3.2.8)
19
+ mail (~> 2.4.4)
20
+ actionpack (3.2.8)
21
+ activemodel (= 3.2.8)
22
+ activesupport (= 3.2.8)
23
+ builder (~> 3.0.0)
24
+ erubis (~> 2.7.0)
25
+ journey (~> 1.0.4)
26
+ rack (~> 1.4.0)
27
+ rack-cache (~> 1.2)
28
+ rack-test (~> 0.6.1)
29
+ sprockets (~> 2.1.3)
30
+ activemodel (3.2.8)
31
+ activesupport (= 3.2.8)
32
+ builder (~> 3.0.0)
33
+ activerecord (3.2.8)
34
+ activemodel (= 3.2.8)
35
+ activesupport (= 3.2.8)
36
+ arel (~> 3.0.2)
37
+ tzinfo (~> 0.3.29)
38
+ activeresource (3.2.8)
39
+ activemodel (= 3.2.8)
40
+ activesupport (= 3.2.8)
41
+ activesupport (3.2.8)
42
+ i18n (~> 0.6)
43
+ multi_json (~> 1.0)
44
+ akami (1.2.0)
45
+ gyoku (>= 0.4.0)
46
+ nokogiri (>= 1.4.0)
47
+ appraisal (0.5.1)
48
+ bundler
49
+ rake
50
+ arel (3.0.2)
51
+ builder (3.0.4)
52
+ coderay (1.0.8)
53
+ colored (1.2)
54
+ diff-lcs (1.1.3)
55
+ erubis (2.7.0)
56
+ guard (1.6.1)
57
+ listen (>= 0.6.0)
58
+ lumberjack (>= 1.0.2)
59
+ pry (>= 0.9.10)
60
+ thor (>= 0.14.6)
61
+ guard-rspec (2.3.3)
62
+ guard (>= 1.1)
63
+ rspec (~> 2.11)
64
+ gyoku (1.0.0)
65
+ builder (>= 2.1.2)
66
+ hike (1.2.1)
67
+ i18n (0.6.1)
68
+ journey (1.0.4)
69
+ json (1.7.6)
70
+ json (1.7.6-java)
71
+ listen (0.7.0)
72
+ lumberjack (1.0.2)
73
+ mail (2.4.4)
74
+ i18n (>= 0.4.0)
75
+ mime-types (~> 1.16)
76
+ treetop (~> 1.4.8)
77
+ method_source (0.8.1)
78
+ mime-types (1.19)
79
+ multi_json (1.5.0)
80
+ nokogiri (1.5.6)
81
+ nokogiri (1.5.6-java)
82
+ nori (2.0.0)
83
+ polyglot (0.3.3)
84
+ pry (0.9.10)
85
+ coderay (~> 1.0.5)
86
+ method_source (~> 0.8)
87
+ slop (~> 3.3.1)
88
+ pry (0.9.10-java)
89
+ coderay (~> 1.0.5)
90
+ method_source (~> 0.8)
91
+ slop (~> 3.3.1)
92
+ spoon (~> 0.0)
93
+ rack (1.4.1)
94
+ rack-cache (1.2)
95
+ rack (>= 0.4)
96
+ rack-ssl (1.3.2)
97
+ rack
98
+ rack-test (0.6.2)
99
+ rack (>= 1.0)
100
+ rails (3.2.8)
101
+ actionmailer (= 3.2.8)
102
+ actionpack (= 3.2.8)
103
+ activerecord (= 3.2.8)
104
+ activeresource (= 3.2.8)
105
+ activesupport (= 3.2.8)
106
+ bundler (~> 1.0)
107
+ railties (= 3.2.8)
108
+ railties (3.2.8)
109
+ actionpack (= 3.2.8)
110
+ activesupport (= 3.2.8)
111
+ rack-ssl (~> 1.3.2)
112
+ rake (>= 0.8.7)
113
+ rdoc (~> 3.4)
114
+ thor (>= 0.14.6, < 2.0)
115
+ rake (10.0.3)
116
+ rb-fsevent (0.9.3)
117
+ rdoc (3.12)
118
+ json (~> 1.4)
119
+ rspec (2.12.0)
120
+ rspec-core (~> 2.12.0)
121
+ rspec-expectations (~> 2.12.0)
122
+ rspec-mocks (~> 2.12.0)
123
+ rspec-core (2.12.2)
124
+ rspec-expectations (2.12.1)
125
+ diff-lcs (~> 1.1.3)
126
+ rspec-mocks (2.12.1)
127
+ rspec-rails (2.12.0)
128
+ actionpack (>= 3.0)
129
+ activesupport (>= 3.0)
130
+ railties (>= 3.0)
131
+ rspec-core (~> 2.12.0)
132
+ rspec-expectations (~> 2.12.0)
133
+ rspec-mocks (~> 2.12.0)
134
+ savon (2.0.2)
135
+ akami (~> 1.2.0)
136
+ builder (>= 2.1.2)
137
+ gyoku (~> 1.0.0)
138
+ httpi (~> 2.0.0)
139
+ nokogiri (>= 1.4.0)
140
+ nori (~> 2.0.0)
141
+ wasabi (~> 3.0.0)
142
+ simplecov (0.7.1)
143
+ multi_json (~> 1.0)
144
+ simplecov-html (~> 0.7.1)
145
+ simplecov-html (0.7.1)
146
+ simplecov-summary (0.0.4)
147
+ colored
148
+ simplecov
149
+ slop (3.3.3)
150
+ spoon (0.0.1)
151
+ sprockets (2.1.3)
152
+ hike (~> 1.2)
153
+ rack (~> 1.0)
154
+ tilt (~> 1.1, != 1.3.0)
155
+ thor (0.16.0)
156
+ tilt (1.3.3)
157
+ treetop (1.4.12)
158
+ polyglot
159
+ polyglot (>= 0.3.1)
160
+ tzinfo (0.3.35)
161
+ wasabi (3.0.0)
162
+ httpi (~> 2.0)
163
+ nokogiri (>= 1.4.0)
164
+
165
+ PLATFORMS
166
+ java
167
+ ruby
168
+
169
+ DEPENDENCIES
170
+ appraisal
171
+ bundler (~> 1.3.0)
172
+ guard
173
+ guard-rspec
174
+ httpi!
175
+ pry
176
+ rails (= 3.2.8)
177
+ rb-fsevent
178
+ rspec-rails
179
+ savon
180
+ simplecov
181
+ simplecov-summary
182
+ tzinfo
183
+ wasabi
184
+ wash_out!
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "wasabi"
6
+ gem "savon"
7
+ gem "httpi", :git=>"git://github.com/savonrb/httpi.git"
8
+ gem "bundler", "~> 1.3.0"
9
+ gem "rspec-rails"
10
+ gem "guard"
11
+ gem "guard-rspec"
12
+ gem "rb-fsevent"
13
+ gem "appraisal"
14
+ gem "tzinfo"
15
+ gem "pry"
16
+ gem "simplecov"
17
+ gem "simplecov-summary"
18
+ gem "rails", "4.0.0.beta1"
19
+
20
+ gemspec :path=>"../"
@@ -0,0 +1,189 @@
1
+ GIT
2
+ remote: git://github.com/savonrb/httpi.git
3
+ revision: 1cf3cf2e92f109921d7b41843a56bdaa2314443f
4
+ specs:
5
+ httpi (2.0.2)
6
+ rack
7
+ rubyntlm
8
+
9
+ PATH
10
+ remote: /Users/inossidabile/Repos/wash_out
11
+ specs:
12
+ wash_out (0.6.1)
13
+ nori (~> 2.0.0)
14
+
15
+ GEM
16
+ remote: http://rubygems.org/
17
+ specs:
18
+ actionmailer (4.0.0.beta1)
19
+ actionpack (= 4.0.0.beta1)
20
+ mail (~> 2.5.3)
21
+ actionpack (4.0.0.beta1)
22
+ activesupport (= 4.0.0.beta1)
23
+ builder (~> 3.1.0)
24
+ erubis (~> 2.7.0)
25
+ rack (~> 1.5.2)
26
+ rack-test (~> 0.6.2)
27
+ activemodel (4.0.0.beta1)
28
+ activesupport (= 4.0.0.beta1)
29
+ builder (~> 3.1.0)
30
+ activerecord (4.0.0.beta1)
31
+ activemodel (= 4.0.0.beta1)
32
+ activerecord-deprecated_finders (~> 0.0.3)
33
+ activesupport (= 4.0.0.beta1)
34
+ arel (~> 4.0.0.beta1)
35
+ activerecord-deprecated_finders (0.0.3)
36
+ activesupport (4.0.0.beta1)
37
+ i18n (~> 0.6.2)
38
+ minitest (~> 4.2)
39
+ multi_json (~> 1.3)
40
+ thread_safe (~> 0.1)
41
+ tzinfo (~> 0.3.33)
42
+ akami (1.2.0)
43
+ gyoku (>= 0.4.0)
44
+ nokogiri (>= 1.4.0)
45
+ appraisal (0.5.1)
46
+ bundler
47
+ rake
48
+ arel (4.0.0.beta1)
49
+ atomic (1.0.1)
50
+ atomic (1.0.1-java)
51
+ builder (3.1.4)
52
+ coderay (1.0.9)
53
+ colored (1.2)
54
+ diff-lcs (1.2.1)
55
+ erubis (2.7.0)
56
+ guard (1.6.2)
57
+ listen (>= 0.6.0)
58
+ lumberjack (>= 1.0.2)
59
+ pry (>= 0.9.10)
60
+ terminal-table (>= 1.4.3)
61
+ thor (>= 0.14.6)
62
+ guard-rspec (2.5.0)
63
+ guard (>= 1.1)
64
+ rspec (~> 2.11)
65
+ gyoku (1.0.0)
66
+ builder (>= 2.1.2)
67
+ hike (1.2.1)
68
+ i18n (0.6.4)
69
+ json (1.7.7)
70
+ json (1.7.7-java)
71
+ listen (0.7.3)
72
+ lumberjack (1.0.2)
73
+ mail (2.5.3)
74
+ i18n (>= 0.4.0)
75
+ mime-types (~> 1.16)
76
+ treetop (~> 1.4.8)
77
+ method_source (0.8.1)
78
+ mime-types (1.21)
79
+ minitest (4.6.2)
80
+ multi_json (1.6.1)
81
+ nokogiri (1.5.6)
82
+ nokogiri (1.5.6-java)
83
+ nori (2.0.4)
84
+ polyglot (0.3.3)
85
+ pry (0.9.12)
86
+ coderay (~> 1.0.5)
87
+ method_source (~> 0.8)
88
+ slop (~> 3.4)
89
+ pry (0.9.12-java)
90
+ coderay (~> 1.0.5)
91
+ method_source (~> 0.8)
92
+ slop (~> 3.4)
93
+ spoon (~> 0.0)
94
+ rack (1.5.2)
95
+ rack-test (0.6.2)
96
+ rack (>= 1.0)
97
+ rails (4.0.0.beta1)
98
+ actionmailer (= 4.0.0.beta1)
99
+ actionpack (= 4.0.0.beta1)
100
+ activerecord (= 4.0.0.beta1)
101
+ activesupport (= 4.0.0.beta1)
102
+ bundler (>= 1.3.0, < 2.0)
103
+ railties (= 4.0.0.beta1)
104
+ sprockets-rails (~> 2.0.0.rc3)
105
+ railties (4.0.0.beta1)
106
+ actionpack (= 4.0.0.beta1)
107
+ activesupport (= 4.0.0.beta1)
108
+ rake (>= 0.8.7)
109
+ rdoc (~> 3.4)
110
+ thor (>= 0.17.0, < 2.0)
111
+ rake (10.0.3)
112
+ rb-fsevent (0.9.3)
113
+ rdoc (3.12.2)
114
+ json (~> 1.4)
115
+ rspec (2.13.0)
116
+ rspec-core (~> 2.13.0)
117
+ rspec-expectations (~> 2.13.0)
118
+ rspec-mocks (~> 2.13.0)
119
+ rspec-core (2.13.0)
120
+ rspec-expectations (2.13.0)
121
+ diff-lcs (>= 1.1.3, < 2.0)
122
+ rspec-mocks (2.13.0)
123
+ rspec-rails (2.13.0)
124
+ actionpack (>= 3.0)
125
+ activesupport (>= 3.0)
126
+ railties (>= 3.0)
127
+ rspec-core (~> 2.13.0)
128
+ rspec-expectations (~> 2.13.0)
129
+ rspec-mocks (~> 2.13.0)
130
+ rubyntlm (0.1.1)
131
+ savon (2.1.0)
132
+ akami (~> 1.2.0)
133
+ builder (>= 2.1.2)
134
+ gyoku (~> 1.0.0)
135
+ httpi (~> 2.0.2)
136
+ nokogiri (>= 1.4.0)
137
+ nori (~> 2.0.3)
138
+ wasabi (~> 3.0.0)
139
+ simplecov (0.7.1)
140
+ multi_json (~> 1.0)
141
+ simplecov-html (~> 0.7.1)
142
+ simplecov-html (0.7.1)
143
+ simplecov-summary (0.0.4)
144
+ colored
145
+ simplecov
146
+ slop (3.4.3)
147
+ spoon (0.0.1)
148
+ sprockets (2.9.0)
149
+ hike (~> 1.2)
150
+ multi_json (~> 1.0)
151
+ rack (~> 1.0)
152
+ tilt (~> 1.1, != 1.3.0)
153
+ sprockets-rails (2.0.0.rc3)
154
+ actionpack (>= 3.0)
155
+ activesupport (>= 3.0)
156
+ sprockets (~> 2.8)
157
+ terminal-table (1.4.5)
158
+ thor (0.17.0)
159
+ thread_safe (0.1.0)
160
+ atomic
161
+ tilt (1.3.4)
162
+ treetop (1.4.12)
163
+ polyglot
164
+ polyglot (>= 0.3.1)
165
+ tzinfo (0.3.36)
166
+ wasabi (3.0.0)
167
+ httpi (~> 2.0)
168
+ nokogiri (>= 1.4.0)
169
+
170
+ PLATFORMS
171
+ java
172
+ ruby
173
+
174
+ DEPENDENCIES
175
+ appraisal
176
+ bundler (~> 1.3.0)
177
+ guard
178
+ guard-rspec
179
+ httpi!
180
+ pry
181
+ rails (= 4.0.0.beta1)
182
+ rb-fsevent
183
+ rspec-rails
184
+ savon
185
+ simplecov
186
+ simplecov-summary
187
+ tzinfo
188
+ wasabi
189
+ wash_out!
@@ -16,7 +16,7 @@ module ActionDispatch::Routing
16
16
  controller_class_name = [options[:module], controller_name].compact.join("/")
17
17
 
18
18
  match "#{controller_name}/wsdl" => "#{controller_name}#_generate_wsdl", :via => :get, :format => false
19
- match "#{controller_name}/action" => WashOut::Router.new(controller_class_name), :defaults => { :controller => controller_class_name, :action => '_action' }, :format => false
19
+ match "#{controller_name}/action" => WashOut::Router.new(controller_class_name), :via => [:get, :post], :defaults => { :controller => controller_class_name, :action => '_action' }, :format => false
20
20
  end
21
21
  end
22
22
  end
@@ -74,7 +74,6 @@ module WashOut
74
74
 
75
75
  action_spec[:in].each do |param|
76
76
  key = param.raw_name.to_sym
77
-
78
77
  if xml_data.has_key? key
79
78
  @_params[param.raw_name] = param.load(xml_data, key)
80
79
  end
@@ -157,7 +156,7 @@ module WashOut
157
156
  # Rails do not support sequental rescue_from handling, that is, rescuing an
158
157
  # exception from a rescue_from handler. Hence this function is a public API.
159
158
  def render_soap_error(message)
160
- render :template => 'wash_with_soap/error', :status => 500,
159
+ render :template => 'wash_with_soap/error', :status => 422,
161
160
  :layout => false,
162
161
  :locals => { :error_message => message },
163
162
  :content_type => 'text/xml'
@@ -70,14 +70,18 @@ module WashOut
70
70
  else raise RuntimeError, "Invalid WashOut simple type: #{type}"
71
71
  end
72
72
 
73
- if operation.nil? || data.nil?
74
- data
75
- elsif @multiplied
76
- data.map{|x| x.send(operation)}
77
- elsif operation.is_a? Symbol
78
- data.send(operation)
79
- else
80
- operation.call(data)
73
+ begin
74
+ if operation.nil? || data.nil?
75
+ data
76
+ elsif @multiplied
77
+ data.map{|x| x.send(operation)}
78
+ elsif operation.is_a? Symbol
79
+ data.send(operation)
80
+ else
81
+ operation.call(data)
82
+ end
83
+ rescue
84
+ raise WashOut::Dispatcher::SOAPError, "Invalid SOAP parameter '#{key}' format"
81
85
  end
82
86
  end
83
87
  end