riddl 0.99.172 → 0.99.173

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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/examples/websocket/server.rb +15 -0
  3. data/lib/ruby/riddl/parameter.rb +6 -0
  4. data/riddl.gemspec +1 -1
  5. metadata +9 -35
  6. data/examples/declaration-server-distributed/declaration.pid +0 -1
  7. data/examples/declaration-server-distributed/main.pid +0 -1
  8. data/examples/declaration-server-distributed/properties.pid +0 -1
  9. data/examples/declaration-server-distributed/xsloverlay.pid +0 -1
  10. data/examples/declaration-server-hybrid/declaration.pid +0 -1
  11. data/examples/declaration-server-hybrid/xsloverlay.pid +0 -1
  12. data/examples/declaration-server-local/declaration.pid +0 -1
  13. data/examples/library/server.pid +0 -1
  14. data/examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/consumer-secret +0 -1
  15. data/examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/producer-secret +0 -1
  16. data/examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/subscription.xml +0 -9
  17. data/examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/consumer-secret +0 -1
  18. data/examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/producer-secret +0 -1
  19. data/examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/subscription.xml +0 -9
  20. data/examples/notifications/notifications/893edd178c053a011c09f253fa85092f/consumer-secret +0 -1
  21. data/examples/notifications/notifications/893edd178c053a011c09f253fa85092f/producer-secret +0 -1
  22. data/examples/notifications/notifications/893edd178c053a011c09f253fa85092f/subscription.xml +0 -9
  23. data/examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/consumer-secret +0 -1
  24. data/examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/producer-secret +0 -1
  25. data/examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/subscription.xml +0 -9
  26. data/examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/consumer-secret +0 -1
  27. data/examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/producer-secret +0 -1
  28. data/examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/subscription.xml +0 -9
  29. data/examples/notifications/producer.pid +0 -1
  30. data/examples/properties/description.pid +0 -1
  31. data/examples/websocket/server.pid +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 969b704ea7aa53f89d044e531adfe2567581de7a
4
- data.tar.gz: 0673eb75a9e8db9ba0a53a7a472920c64b773a48
3
+ metadata.gz: 2fca21fe199bf797a81050fe7aab8fa9604bd547
4
+ data.tar.gz: 823fcccf95a4f6c16dbab599956359c776599dc8
5
5
  SHA512:
6
- metadata.gz: d3cb36d81ba1b1e04c22e482b90fc8a0d604335bbf44f3929d2f3d581234ce5942150d753ddfa59783391cb6c725186897226f82b79cffd56139896515009bd6
7
- data.tar.gz: 65a3e8ebeeed9d9c378bc7792f41bc44d34c60d338b462a312e9e15939154d4ff0db454f7b7366ae452e51205d4229b796542fb79bbf822d3b74e9872fbbf9a3
6
+ metadata.gz: 929036192795261afc5bffae53fdf3204e71f27125deb8a2e32d05fed41bcbd365dbe6e086637b53a9c1b5b637e6ae7ebed8e6801fb57e52b8c3a2c51ee8b423
7
+ data.tar.gz: b9caa92cd15b94ae8a3d7cc54e08bae0406b0bed91fd6012ebae12384196a5b3019cdfd1c6502a500878b4dff5edc930990047cd31ce1ccd6d0f8db82315a1b4
@@ -8,8 +8,11 @@ class Bar < Riddl::Implementation
8
8
  end
9
9
  end
10
10
 
11
+ $socket = []
12
+
11
13
  class Echo < Riddl::WebSocketImplementation
12
14
  def onopen
15
+ $socket << self
13
16
  puts "Connection established"
14
17
  end
15
18
 
@@ -20,10 +23,22 @@ class Echo < Riddl::WebSocketImplementation
20
23
  end
21
24
 
22
25
  def onclose
26
+ $socket.delete(self)
23
27
  puts "Connection closed"
24
28
  end
25
29
  end
26
30
 
31
+ Thread.new do
32
+ i = 1
33
+ while true
34
+ $socket.each do |sock|
35
+ sock.send("oasch #{i}")
36
+ end
37
+ i+=1
38
+ sleep 2
39
+ end
40
+ end
41
+
27
42
  Riddl::Server.new(File.dirname(__FILE__) + '/description.xml', :port => 9292) do
28
43
  cross_site_xhr true
29
44
 
@@ -14,6 +14,9 @@ module Riddl
14
14
  end
15
15
  class Simple
16
16
  attr_accessor :name, :value, :type
17
+ def to_json(*)
18
+ "{\"name\": \"#{@name}\", \"value\": \"#{@value}\"}"
19
+ end
17
20
  def initialize(name,value,type=:body)
18
21
  @name = name
19
22
  @value = value
@@ -23,6 +26,9 @@ module Riddl
23
26
  class Complex
24
27
  attr_reader :mimetype, :filename, :value, :type, :additional, :mimextra
25
28
  attr_accessor :name
29
+ def to_json(*)
30
+ "{\"name\": \"#{@name}\", \"value\": \"#{@value}\"}"
31
+ end
26
32
  def initialize(name,mimetype,file=nil,filename=nil,additional=[])
27
33
  @name = name
28
34
  @mimetype = mimetype.gsub(/(;.*)/,'')
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.99.172"
3
+ s.version = "0.99.173"
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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.172
4
+ version: 0.99.173
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
8
8
  autorequire:
9
9
  bindir: tools
10
10
  cert_chain: []
11
- date: 2015-01-07 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-smart
@@ -185,22 +185,18 @@ files:
185
185
  - contrib/riddl.svg
186
186
  - examples/client/client.rb
187
187
  - examples/declaration-server-distributed/README
188
- - examples/declaration-server-distributed/declaration.pid
189
188
  - examples/declaration-server-distributed/declaration.rb
190
189
  - examples/declaration-server-distributed/declaration.xml
191
190
  - examples/declaration-server-distributed/instances/1/properties.xml
192
191
  - examples/declaration-server-distributed/instances/2/properties.xml
193
192
  - examples/declaration-server-distributed/instances/instances.xml
194
193
  - examples/declaration-server-distributed/instances/properties.schema
195
- - examples/declaration-server-distributed/main.pid
196
194
  - examples/declaration-server-distributed/main.rb
197
195
  - examples/declaration-server-distributed/main.xml
198
- - examples/declaration-server-distributed/properties.pid
199
196
  - examples/declaration-server-distributed/properties.rb
200
197
  - examples/declaration-server-distributed/properties.xml
201
198
  - examples/declaration-server-distributed/rngs/instance-info.rng
202
199
  - examples/declaration-server-distributed/rngs/instances.rng
203
- - examples/declaration-server-distributed/xsloverlay.pid
204
200
  - examples/declaration-server-distributed/xsloverlay.rb
205
201
  - examples/declaration-server-distributed/xsloverlay.xml
206
202
  - examples/declaration-server-distributed/xsls/info.xsl
@@ -209,7 +205,6 @@ files:
209
205
  - examples/declaration-server-distributed/xsls/test/properties.xsl
210
206
  - examples/declaration-server-distributed/xsls/values.xsl
211
207
  - examples/declaration-server-hybrid/README
212
- - examples/declaration-server-hybrid/declaration.pid
213
208
  - examples/declaration-server-hybrid/declaration.rb
214
209
  - examples/declaration-server-hybrid/declaration.xml
215
210
  - examples/declaration-server-hybrid/instances/1/properties.xml
@@ -220,14 +215,12 @@ files:
220
215
  - examples/declaration-server-hybrid/properties.xml
221
216
  - examples/declaration-server-hybrid/rngs/instance-info.rng
222
217
  - examples/declaration-server-hybrid/rngs/instances.rng
223
- - examples/declaration-server-hybrid/xsloverlay.pid
224
218
  - examples/declaration-server-hybrid/xsloverlay.rb
225
219
  - examples/declaration-server-hybrid/xsloverlay.xml
226
220
  - examples/declaration-server-hybrid/xsls/info.xsl
227
221
  - examples/declaration-server-hybrid/xsls/instances.xsl
228
222
  - examples/declaration-server-hybrid/xsls/properties.xsl
229
223
  - examples/declaration-server-hybrid/xsls/values.xsl
230
- - examples/declaration-server-local/declaration.pid
231
224
  - examples/declaration-server-local/declaration.rb
232
225
  - examples/declaration-server-local/declaration.xml
233
226
  - examples/declaration-server-local/properties.xml
@@ -295,37 +288,19 @@ files:
295
288
  - examples/library/rngs/list-of-books.rng
296
289
  - examples/library/rngs/list-of-customers.rng
297
290
  - examples/library/rngs/list-of-loans.rng
298
- - examples/library/server.pid
299
291
  - examples/library/server.rb
300
292
  - examples/library/static/info.txt
301
293
  - examples/notifications/implementation/index.html
302
294
  - examples/notifications/implementation/juergen.html
303
295
  - examples/notifications/implementation/oliver.html
304
- - examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/consumer-secret
305
- - examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/producer-secret
306
- - examples/notifications/notifications/39c3b39ec3e48a514948e4981f4459d2/subscription.xml
307
- - examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/consumer-secret
308
- - examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/producer-secret
309
- - examples/notifications/notifications/5d68b08a13e622aada13e3c182ea9390/subscription.xml
310
- - examples/notifications/notifications/893edd178c053a011c09f253fa85092f/consumer-secret
311
- - examples/notifications/notifications/893edd178c053a011c09f253fa85092f/producer-secret
312
- - examples/notifications/notifications/893edd178c053a011c09f253fa85092f/subscription.xml
313
- - examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/consumer-secret
314
- - examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/producer-secret
315
- - examples/notifications/notifications/9f5921176e6876aca3af4428b1ccafd1/subscription.xml
316
- - examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/consumer-secret
317
- - examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/producer-secret
318
- - examples/notifications/notifications/c457779f6e2c086d8cf1cd9b44d8950e/subscription.xml
319
296
  - examples/notifications/producer.declaration.xml
320
297
  - examples/notifications/producer.fluff.xml
321
298
  - examples/notifications/producer.main.xml
322
- - examples/notifications/producer.pid
323
299
  - examples/notifications/producer.rb
324
300
  - examples/notifications/topics.xml
325
301
  - examples/oauth/oauth.rb
326
302
  - examples/oauth/oauth.xml
327
303
  - examples/properties/description.conf
328
- - examples/properties/description.pid
329
304
  - examples/properties/description.rb
330
305
  - examples/properties/properties.xml
331
306
  - examples/properties/server.properties.schema
@@ -338,7 +313,6 @@ files:
338
313
  - examples/websocket/client.rb
339
314
  - examples/websocket/description.xml
340
315
  - examples/websocket/sample.html
341
- - examples/websocket/server.pid
342
316
  - examples/websocket/server.rb
343
317
  - examples/xmpp/client.rb
344
318
  - examples/xmpp/description.rb
@@ -460,18 +434,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
460
434
  version: '0'
461
435
  requirements: []
462
436
  rubyforge_project:
463
- rubygems_version: 2.4.5
437
+ rubygems_version: 2.2.2
464
438
  signing_key:
465
439
  specification_version: 4
466
440
  summary: 'restful interface description and declaration language: tools and client/server
467
441
  libs'
468
442
  test_files:
469
- - test/tc_declaration-distributed.rb
470
- - test/tc_properties.rb
471
- - test/tc_library.rb
472
443
  - test/tc_websocket.rb
473
- - test/tc_declaration-local.rb
474
- - test/tc_declaration-hybrid.rb
475
- - test/tc_helloworld.rb
444
+ - test/tc_library.rb
476
445
  - test/tc_producer.rb
446
+ - test/tc_declaration-distributed.rb
447
+ - test/tc_helloworld.rb
448
+ - test/tc_declaration-hybrid.rb
449
+ - test/tc_declaration-local.rb
450
+ - test/tc_properties.rb
477
451
  - test/smartrunner.rb
@@ -1 +0,0 @@
1
- 10900
@@ -1,9 +0,0 @@
1
- <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://test.org">
2
- <topic id="/oliver">
3
- <event>get</event>
4
- </topic>
5
- <topic id="/juergen">
6
- <event>praise</event>
7
- <event>adore</event>
8
- </topic>
9
- </subscription>
@@ -1,9 +0,0 @@
1
- <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://test.org">
2
- <topic id="/oliver">
3
- <event>get</event>
4
- </topic>
5
- <topic id="/juergen">
6
- <event>praise</event>
7
- <event>adore</event>
8
- </topic>
9
- </subscription>
@@ -1,9 +0,0 @@
1
- <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://test.org">
2
- <topic id="/oliver">
3
- <event>get</event>
4
- </topic>
5
- <topic id="/juergen">
6
- <event>praise</event>
7
- <event>adore</event>
8
- </topic>
9
- </subscription>
@@ -1,9 +0,0 @@
1
- <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://test.org">
2
- <topic id="/oliver">
3
- <event>get</event>
4
- </topic>
5
- <topic id="/juergen">
6
- <event>praise</event>
7
- <event>adore</event>
8
- </topic>
9
- </subscription>
@@ -1,9 +0,0 @@
1
- <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://test.org">
2
- <topic id="/oliver">
3
- <event>get</event>
4
- </topic>
5
- <topic id="/juergen">
6
- <event>praise</event>
7
- <event>adore</event>
8
- </topic>
9
- </subscription>
@@ -1 +0,0 @@
1
- 10920
@@ -1 +0,0 @@
1
- 10910
@@ -1 +0,0 @@
1
- 10860