soybean 2.4.3 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -1
- data/Gemfile.lock +7 -2
- data/VERSION +1 -1
- data/config.ru +8 -0
- data/lib/soybean.rb +13 -2
- data/lib/soybean/application.rb +59 -0
- data/lib/soybean/{middleware.rb → engine.rb} +78 -8
- data/lib/soybean/generators/class_generator.rb +2 -2
- data/lib/soybean/generators/{middleware_generator.rb → engine_generator.rb} +4 -4
- data/lib/soybean/generators/service_generator.rb +7 -3
- data/lib/soybean/generators/templates/engine.rb +6 -0
- data/lib/soybean/generators/wsdl_generator.rb +34 -0
- data/lib/soybean/interface.rb +13 -0
- data/lib/{core_ext/module.rb → soybean/soap_attribute.rb} +0 -0
- data/soybean.gemspec +19 -9
- data/soybean.log +1353 -0
- metadata +58 -32
- data/lib/soybean/generators/templates/middleware.rb +0 -39
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soybean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-17 00:00:00.000000000 +04:00
|
13
13
|
default_executable: soybean
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
17
|
-
requirement: &
|
17
|
+
requirement: &9910460 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *9910460
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activesupport
|
28
|
-
requirement: &
|
28
|
+
requirement: &9909600 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '3.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *9909600
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: i18n
|
39
|
-
requirement: &
|
39
|
+
requirement: &9908300 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,43 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *9908300
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: nokogiri
|
50
|
+
requirement: &9906820 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *9906820
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: rack
|
61
|
+
requirement: &9905820 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
type: :runtime
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: *9905820
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rack-mount
|
72
|
+
requirement: &9904140 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: *9904140
|
48
81
|
- !ruby/object:Gem::Dependency
|
49
82
|
name: rspec
|
50
|
-
requirement: &
|
83
|
+
requirement: &9896180 !ruby/object:Gem::Requirement
|
51
84
|
none: false
|
52
85
|
requirements:
|
53
86
|
- - ~>
|
@@ -55,10 +88,10 @@ dependencies:
|
|
55
88
|
version: 2.3.0
|
56
89
|
type: :development
|
57
90
|
prerelease: false
|
58
|
-
version_requirements: *
|
91
|
+
version_requirements: *9896180
|
59
92
|
- !ruby/object:Gem::Dependency
|
60
93
|
name: yard
|
61
|
-
requirement: &
|
94
|
+
requirement: &9892520 !ruby/object:Gem::Requirement
|
62
95
|
none: false
|
63
96
|
requirements:
|
64
97
|
- - ~>
|
@@ -66,10 +99,10 @@ dependencies:
|
|
66
99
|
version: 0.6.0
|
67
100
|
type: :development
|
68
101
|
prerelease: false
|
69
|
-
version_requirements: *
|
102
|
+
version_requirements: *9892520
|
70
103
|
- !ruby/object:Gem::Dependency
|
71
104
|
name: bundler
|
72
|
-
requirement: &
|
105
|
+
requirement: &9890940 !ruby/object:Gem::Requirement
|
73
106
|
none: false
|
74
107
|
requirements:
|
75
108
|
- - ~>
|
@@ -77,10 +110,10 @@ dependencies:
|
|
77
110
|
version: 1.0.0
|
78
111
|
type: :development
|
79
112
|
prerelease: false
|
80
|
-
version_requirements: *
|
113
|
+
version_requirements: *9890940
|
81
114
|
- !ruby/object:Gem::Dependency
|
82
115
|
name: jeweler
|
83
|
-
requirement: &
|
116
|
+
requirement: &9883880 !ruby/object:Gem::Requirement
|
84
117
|
none: false
|
85
118
|
requirements:
|
86
119
|
- - ~>
|
@@ -88,18 +121,7 @@ dependencies:
|
|
88
121
|
version: 1.6.4
|
89
122
|
type: :development
|
90
123
|
prerelease: false
|
91
|
-
version_requirements: *
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: rcov
|
94
|
-
requirement: &20706420 !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
|
-
requirements:
|
97
|
-
- - ! '>='
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0'
|
100
|
-
type: :development
|
101
|
-
prerelease: false
|
102
|
-
version_requirements: *20706420
|
124
|
+
version_requirements: *9883880
|
103
125
|
description: ! 'Generate soap web-services from you wsdl. Generate: all classes from
|
104
126
|
xsd, and other.'
|
105
127
|
email: a.sozontov@gmail.com
|
@@ -119,27 +141,31 @@ files:
|
|
119
141
|
- Rakefile
|
120
142
|
- VERSION
|
121
143
|
- bin/soybean
|
122
|
-
-
|
144
|
+
- config.ru
|
123
145
|
- lib/soybean.rb
|
146
|
+
- lib/soybean/application.rb
|
124
147
|
- lib/soybean/cli.rb
|
125
148
|
- lib/soybean/complex_type.rb
|
126
149
|
- lib/soybean/encoded_mapping_registry_creator.rb
|
150
|
+
- lib/soybean/engine.rb
|
127
151
|
- lib/soybean/generators/base_generator.rb
|
128
152
|
- lib/soybean/generators/class_generator.rb
|
153
|
+
- lib/soybean/generators/engine_generator.rb
|
129
154
|
- lib/soybean/generators/interface_generator.rb
|
130
155
|
- lib/soybean/generators/mapping_generator.rb
|
131
|
-
- lib/soybean/generators/middleware_generator.rb
|
132
156
|
- lib/soybean/generators/model_generator.rb
|
133
157
|
- lib/soybean/generators/model_spec_generator.rb
|
134
158
|
- lib/soybean/generators/service_generator.rb
|
135
|
-
- lib/soybean/generators/templates/
|
159
|
+
- lib/soybean/generators/templates/engine.rb
|
136
160
|
- lib/soybean/generators/templates/model_spec.rb
|
137
161
|
- lib/soybean/generators/types_generator.rb
|
162
|
+
- lib/soybean/generators/wsdl_generator.rb
|
138
163
|
- lib/soybean/interface.rb
|
139
164
|
- lib/soybean/interface_builder.rb
|
140
165
|
- lib/soybean/literal_mapping_registry_creator.rb
|
141
|
-
- lib/soybean/
|
166
|
+
- lib/soybean/soap_attribute.rb
|
142
167
|
- soybean.gemspec
|
168
|
+
- soybean.log
|
143
169
|
- spec/soybean_spec.rb
|
144
170
|
- spec/spec_helper.rb
|
145
171
|
- vendor/soap4r/soap/attachment.rb
|
@@ -317,7 +343,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
317
343
|
version: '0'
|
318
344
|
segments:
|
319
345
|
- 0
|
320
|
-
hash:
|
346
|
+
hash: 281022003700655804
|
321
347
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
348
|
none: false
|
323
349
|
requirements:
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module Middlewares
|
2
|
-
class <%= class_name %> < Soybean::Middleware
|
3
|
-
setup do
|
4
|
-
self.endpoint = %r(^/<%= model_class_name %>)
|
5
|
-
service = <%= model_class_name %>.new
|
6
|
-
<%= model_interface_name %>::Methods.each do |definitions|
|
7
|
-
opt = definitions.last
|
8
|
-
if opt[:request_style] == :document
|
9
|
-
self.router.add_document_operation(service, *definitions)
|
10
|
-
else
|
11
|
-
self.router.add_rpc_operation(service, *definitions)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
self.mapping_registry = Mappings::EncodedRegistry
|
15
|
-
self.literal_mapping_registry = Mappings::LiteralRegistry
|
16
|
-
end
|
17
|
-
|
18
|
-
def call(env)
|
19
|
-
begin
|
20
|
-
if env['PATH_INFO'].match(self.class.endpoint)
|
21
|
-
handle(env)
|
22
|
-
else
|
23
|
-
# we can act as both a middleware and an app
|
24
|
-
@app ?
|
25
|
-
@app.call(env) :
|
26
|
-
[404, {"Content-Type" => "text/plain"}, ["404 - Not Found"]]
|
27
|
-
end
|
28
|
-
rescue => e
|
29
|
-
puts e.message
|
30
|
-
xml = Nokogiri::XML(e.message)
|
31
|
-
|
32
|
-
#xml.search('faultactor, detail, ivars, item').each { |elem| elem.remove }
|
33
|
-
|
34
|
-
[200, {'Allow' => 'POST',
|
35
|
-
'Content-Type' => 'text/xml'}, [xml.to_s]]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|