riddl 0.99.120 → 0.99.121

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.
@@ -329,7 +329,7 @@ module Riddl
329
329
  :h => @riddl_headers,
330
330
  :p => @riddl_parameters,
331
331
  :r => @riddl_pinfo.sub(/\//,'').split('/').map{|e|Protocols::HTTP::Parser::unescape(e)},
332
- :s => @riddl_matching_path[0].sub(/\//,'').split('/').map{|e|Protocols::HTTP::Parser::unescape(e)},
332
+ :s => @riddl_matching_path[0].sub(/\//,'').split('/'),
333
333
  :m => @riddl_method,
334
334
  :env => Hash[@riddl_env.root.attributes.map{|a| [a.qname.name, a.value] }].merge({ 'riddl.transport' => 'xmpp' }),
335
335
  :match => []
@@ -390,7 +390,7 @@ module Riddl
390
390
  :h => @riddl_headers,
391
391
  :p => @riddl_parameters,
392
392
  :r => @riddl_pinfo.sub(/\//,'').split('/').map{|e|Protocols::HTTP::Parser::unescape(e)},
393
- :s => @riddl_matching_path[0].sub(/\//,'').split('/').map{|e|Protocols::HTTP::Parser::unescape(e)},
393
+ :s => @riddl_matching_path[0].sub(/\//,'').split('/'),
394
394
  :m => @riddl_method,
395
395
  :env => @riddl_env.reject{|k,v| k =~ /^rack\./}.merge({'riddl.transport' => 'xmpp'}),
396
396
  :match => []
@@ -13,7 +13,7 @@ module Riddl
13
13
  if File.exists?(path)
14
14
  __ERB_FILE__ = path
15
15
  rval = ERB.new(File.read(path), 0, "%<>")
16
- return Riddl::Parameter::Complex.new("data",MIME::Types.type_for(path).to_s,rval.result(binding))
16
+ return Riddl::Parameter::Complex.new("data",MIME::Types.type_for(path)[0].to_s,rval.result(binding))
17
17
  end
18
18
  @status = 404
19
19
  []
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.99.120"
3
+ s.version = "0.99.121"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "restful interface description and declaration language: tools and client/server libs"
@@ -0,0 +1,42 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/smartrunner.rb')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/riddl/client')
3
+ require 'xml/smart'
4
+ require 'pp'
5
+
6
+ class TestLibrary < MiniTest::Unit::TestCase
7
+ include ServerCase
8
+
9
+ SERVER = [
10
+ TestServerInfo.new(
11
+ File.expand_path(File.dirname(__FILE__) + '/../examples/library/server.rb'),
12
+ File.expand_path(File.dirname(__FILE__) + '/../examples/library/description.xml')
13
+ )
14
+ ]
15
+ NORUN = false
16
+
17
+ def test_library
18
+ ep = Riddl::Client.interface(SERVER[0].url,SERVER[0].schema)
19
+
20
+ test = ep.resource('/')
21
+ status, res = test.get
22
+ assert status == 200
23
+ assert res.length == 1
24
+ assert res[0].mimetype == 'text/plain'
25
+
26
+
27
+ test = ep.resource('/books')
28
+ status, res = test.request 'get' => [
29
+ Riddl::Header.new("Library",7),
30
+ Riddl::Parameter::Simple.new("author","Mangler"),
31
+ Riddl::Parameter::Simple.new("title","12 bottles of beer on the wall")
32
+ ]
33
+ assert status == 200
34
+ assert res.length == 1
35
+ assert res[0].mimetype == 'text/xml'
36
+
37
+ doc = XML::Smart.string(res[0].value.read)
38
+ assert doc.find('string(/books/book/title)') == '12 bottles of beer on the wall'
39
+ assert doc.find('string(/books/book/author[1])') == 'Agador'
40
+ assert doc.find('string(/books/book/author[2])') == 'Mangler'
41
+ end
42
+ end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.120
4
+ version: 0.99.121
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Juergen eTM Mangler
8
9
  autorequire:
9
10
  bindir: tools
10
11
  cert_chain: []
11
- date: 2013-08-14 00:00:00.000000000 Z
12
+ date: 2013-08-29 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: xml-smart
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rack
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: thin
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: eventmachine
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: em-websocket
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: em-websocket-client
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: mime-types
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ! '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: minitest
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - '='
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - '='
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: blather
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -145,87 +164,87 @@ extensions: []
145
164
  extra_rdoc_files:
146
165
  - README.rdoc
147
166
  files:
167
+ - lib/riddl/ns/declaration/1.0/declaration.rng
148
168
  - lib/riddl/ns/common/relaxng-modular.rng
149
169
  - lib/riddl/ns/common/relaxng.rng
150
170
  - lib/riddl/ns/common/datatypes-1_0.rng
151
171
  - lib/riddl/ns/description/1.0/description.rng
152
- - lib/riddl/ns/common-patterns/riddl-description/show.xml
153
- - lib/riddl/ns/common-patterns/riddl-description/resource-show.xml
154
172
  - lib/riddl/ns/common-patterns/properties/1.0/properties.xml
155
173
  - lib/riddl/ns/common-patterns/properties/1.0/properties.schema.xsl
156
174
  - lib/riddl/ns/common-patterns/properties/1.0/properties.schema.schema
157
175
  - lib/riddl/ns/common-patterns/notifications-producer/1.0/producer.xml
158
- - lib/riddl/ns/common-patterns/notifications-consumer/1.0/consumer.xml
159
176
  - lib/riddl/ns/common-patterns/addon-security/request.xml
160
177
  - lib/riddl/ns/common-patterns/addon-security/response.xml
161
178
  - lib/riddl/ns/common-patterns/downloadify/1.0/downloadify.xml
162
- - lib/riddl/ns/declaration/1.0/declaration.rng
179
+ - lib/riddl/ns/common-patterns/notifications-consumer/1.0/consumer.xml
180
+ - lib/riddl/ns/common-patterns/riddl-description/resource-show.xml
181
+ - lib/riddl/ns/common-patterns/riddl-description/show.xml
163
182
  - tools/riddlprocess-1_0
164
183
  - tools/flash-policy-server.rb
184
+ - tools/riddlprocess
165
185
  - tools/riddlcheck
166
186
  - tools/riddlcheck-1_0
167
- - tools/riddlprocess
187
+ - ns/declaration/1.0/declaration.rng
168
188
  - ns/common/relaxng-modular.rng
169
189
  - ns/common/relaxng.rng
170
190
  - ns/common/datatypes-1_0.rng
171
191
  - ns/description/1.0/description.rng
172
- - ns/common-patterns/riddl-description/show.xml
173
- - ns/common-patterns/riddl-description/resource-show.xml
174
192
  - ns/common-patterns/properties/1.0/properties.xml
175
193
  - ns/common-patterns/properties/1.0/properties.schema.xsl
176
194
  - ns/common-patterns/properties/1.0/properties.schema.schema
177
195
  - ns/common-patterns/notifications-producer/1.0/producer.xml
178
- - ns/common-patterns/notifications-consumer/1.0/consumer.xml
179
196
  - ns/common-patterns/addon-security/request.xml
180
197
  - ns/common-patterns/addon-security/response.xml
181
198
  - ns/common-patterns/downloadify/1.0/downloadify.xml
182
- - ns/declaration/1.0/declaration.rng
199
+ - ns/common-patterns/notifications-consumer/1.0/consumer.xml
200
+ - ns/common-patterns/riddl-description/resource-show.xml
201
+ - ns/common-patterns/riddl-description/show.xml
183
202
  - contrib/riddl.svg
184
- - contrib/riddl.png
185
203
  - contrib/riddl.jpg
186
- - lib/riddl/wrapper.rb
187
- - lib/riddl/header.rb
188
- - lib/riddl/option.rb
189
- - lib/riddl/commonlogger.rb
190
- - lib/riddl/protocols/websocket.rb
191
- - lib/riddl/protocols/xmpp/parser.rb
192
- - lib/riddl/protocols/xmpp/generator.rb
193
- - lib/riddl/protocols/http/parser.rb
194
- - lib/riddl/protocols/http/generator.rb
204
+ - contrib/riddl.png
205
+ - lib/riddl/parameter.rb
206
+ - lib/riddl/handlers/plain-type.rb
195
207
  - lib/riddl/handlers/oauth.rb
196
- - lib/riddl/handlers/xmlschema.rb
197
208
  - lib/riddl/handlers/relaxng.rb
198
- - lib/riddl/handlers/plain-type.rb
209
+ - lib/riddl/handlers/xmlschema.rb
199
210
  - lib/riddl/client.rb
211
+ - lib/riddl/option.rb
212
+ - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0/base.rb
213
+ - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb
214
+ - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Faccess_token.rb
215
+ - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Frequest_token.rb
200
216
  - lib/riddl/roles.rb
201
- - lib/riddl/implementation.rb
202
- - lib/riddl/utils/properties.rb
203
- - lib/riddl/utils/fileserve.rb
204
- - lib/riddl/utils/notifications_producer.rb
205
- - lib/riddl/utils/downloadify.rb
206
- - lib/riddl/utils/description.rb
207
- - lib/riddl/utils/xsloverlay.rb
208
- - lib/riddl/utils/erbserve.rb
209
- - lib/riddl/server.rb
210
217
  - lib/riddl/handlers.rb
218
+ - lib/riddl/server.rb
211
219
  - lib/riddl/constants.rb
220
+ - lib/riddl/wrapper.rb
221
+ - lib/riddl/implementation.rb
222
+ - lib/riddl/header.rb
212
223
  - lib/riddl/error.rb
213
- - lib/riddl/wrapper/description/resource.rb
214
- - lib/riddl/wrapper/description/access.rb
215
- - lib/riddl/wrapper/description/message_and_transformation.rb
216
- - lib/riddl/wrapper/layerchecker.rb
217
- - lib/riddl/wrapper/declaration.rb
218
- - lib/riddl/wrapper/resourcechecker.rb
219
- - lib/riddl/wrapper/declaration/interface.rb
220
224
  - lib/riddl/wrapper/declaration/tile.rb
221
225
  - lib/riddl/wrapper/declaration/facade.rb
226
+ - lib/riddl/wrapper/declaration/interface.rb
227
+ - lib/riddl/wrapper/layerchecker.rb
228
+ - lib/riddl/wrapper/declaration.rb
222
229
  - lib/riddl/wrapper/description.rb
230
+ - lib/riddl/wrapper/resourcechecker.rb
223
231
  - lib/riddl/wrapper/messageparser.rb
224
- - lib/riddl/parameter.rb
225
- - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb
226
- - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Faccess_token.rb
227
- - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Frequest_token.rb
228
- - lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0/base.rb
232
+ - lib/riddl/wrapper/description/message_and_transformation.rb
233
+ - lib/riddl/wrapper/description/access.rb
234
+ - lib/riddl/wrapper/description/resource.rb
235
+ - lib/riddl/utils/properties.rb
236
+ - lib/riddl/utils/xsloverlay.rb
237
+ - lib/riddl/utils/downloadify.rb
238
+ - lib/riddl/utils/notifications_producer.rb
239
+ - lib/riddl/utils/erbserve.rb
240
+ - lib/riddl/utils/description.rb
241
+ - lib/riddl/utils/fileserve.rb
242
+ - lib/riddl/commonlogger.rb
243
+ - lib/riddl/protocols/http/generator.rb
244
+ - lib/riddl/protocols/http/parser.rb
245
+ - lib/riddl/protocols/xmpp/generator.rb
246
+ - lib/riddl/protocols/xmpp/parser.rb
247
+ - lib/riddl/protocols/websocket.rb
229
248
  - COPYING
230
249
  - Rakefile
231
250
  - riddl.gemspec
@@ -233,43 +252,46 @@ files:
233
252
  - TODO
234
253
  - AUTHORS
235
254
  - INSTALL
236
- - test/tc_declaration-local.rb
255
+ - test/tc_declaration-distributed.rb
237
256
  - test/tc_properties.rb
257
+ - test/tc_library.rb
258
+ - test/tc_declaration-local.rb
259
+ - test/tc_declaration-hybrid.rb
238
260
  - test/tc_helloworld.rb
239
261
  - test/tc_producer.rb
240
- - test/tc_declaration-distributed.rb
241
- - test/tc_declaration-hybrid.rb
242
262
  - test/smartrunner.rb
243
263
  homepage: http://www.wst.univie.ac.at/communities/riddl/
244
264
  licenses:
245
265
  - LGPL-3
246
- metadata: {}
247
266
  post_install_message:
248
267
  rdoc_options: []
249
268
  require_paths:
250
269
  - lib
251
270
  required_ruby_version: !ruby/object:Gem::Requirement
271
+ none: false
252
272
  requirements:
253
273
  - - ! '>='
254
274
  - !ruby/object:Gem::Version
255
275
  version: 1.9.3
256
276
  required_rubygems_version: !ruby/object:Gem::Requirement
277
+ none: false
257
278
  requirements:
258
279
  - - ! '>='
259
280
  - !ruby/object:Gem::Version
260
281
  version: '0'
261
282
  requirements: []
262
283
  rubyforge_project:
263
- rubygems_version: 2.0.3
284
+ rubygems_version: 1.8.23
264
285
  signing_key:
265
- specification_version: 4
286
+ specification_version: 3
266
287
  summary: ! 'restful interface description and declaration language: tools and client/server
267
288
  libs'
268
289
  test_files:
269
- - test/tc_declaration-local.rb
290
+ - test/tc_declaration-distributed.rb
270
291
  - test/tc_properties.rb
292
+ - test/tc_library.rb
293
+ - test/tc_declaration-local.rb
294
+ - test/tc_declaration-hybrid.rb
271
295
  - test/tc_helloworld.rb
272
296
  - test/tc_producer.rb
273
- - test/tc_declaration-distributed.rb
274
- - test/tc_declaration-hybrid.rb
275
297
  - test/smartrunner.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 83b6b45a52b9d8f36e0513828dc2a9fab98340e4
4
- data.tar.gz: 4a12c4baeb158c3ffc56ced94020aeb18af4bcff
5
- SHA512:
6
- metadata.gz: 4e8c3a24baef2852681bd6e7e0ed22eea8d1785bb807e5220baff6799845468f4bff7486824c03420e08c3d1e098d28ae230778285755400491f268bd611e29d
7
- data.tar.gz: 66580459c566080ea9317e559f7d1b9bf8c79346b715bcd3d15c2fa39c4c3a36046fe2ab08c6574bf927d6a10fcb85582bdd9089dbc209f82fb74a077307e26e