riddl 0.121 → 0.123

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a46cd6db2eec8456fcd7aaba057402bbe89f85a34ba6c09920b18c8905238f0
4
- data.tar.gz: e296f61e327887561525befa6a466eb6d9e77e4f76270c261515d0339ab27143
3
+ metadata.gz: 3e4a40c0d155ed607850d31b7f38afc6347619b59957c12702032c4c8efacb7a
4
+ data.tar.gz: 5c73d3e493203b67d1ddf127ad9a75905eed7443192bc964caf9eb216c1a1565
5
5
  SHA512:
6
- metadata.gz: 15dc0331f01d342112bbce69cc1ddf59bddd1a77bab8b54f470a713011a711611e5dab87b461ca95b8094292c86bb4b2cb4b4930ec71f54db31005337a44ac47
7
- data.tar.gz: c49cdd10df6667212c32862572cc206e8f66bb48f041363f20b1c7e8ba06b72154418eb06295a9cf8b512abff177cb449f3b0f78978e1a3cf19ded57279e136e
6
+ metadata.gz: 24ca973808cca46a49030f2951d7ed086ed264ed74c2ba2fe2fb5a65c4e7d46883cfbbb3ff2216f5a3a1221b782ed5294322bf3db842dce34b42a325779d3d22
7
+ data.tar.gz: 3a5ec7eb852d8047331e4126de08981193efae5a43fc5d808927ba3ca9124276e6326ae7c9f8707df1307c6b524bceac798ad8132bcd43a3e8eb72ef75ff6510
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/ruby
2
+ require '../../lib/ruby/riddl/client'
3
+
4
+ client = Riddl::Client.new('http://cpee.org')
5
+ puts client.simulate_put([
6
+ Riddl::Parameter::Simple::new('type','a'),
7
+ Riddl::Parameter::Simple::new('topic','b'),
8
+ Riddl::Parameter::Simple::new('event','c'),
9
+ Riddl::Parameter::Complex::new('notification','application/json',"15")
10
+ ]).read
@@ -85,25 +85,25 @@ module Riddl
85
85
  @params.each do |r|
86
86
  case r
87
87
  when Riddl::Parameter::Simple
88
- tmp.write "--" + BOUNDARY + EOL
89
- tmp.write "RIDDL-TYPE: simple" + EOL
88
+ tmp.write '--' + BOUNDARY + EOL
89
+ tmp.write 'RIDDL-TYPE: simple' + EOL
90
90
  tmp.write "Content-Disposition: #{mode == :input ? 'form-data' : 'riddl-data'}; name=\"#{r.name}\"" + EOL
91
91
  tmp.write EOL
92
92
  tmp.write r.value
93
93
  tmp.write EOL
94
94
  when Riddl::Parameter::Complex
95
- tmp.write "--" + BOUNDARY + EOL
96
- tmp.write "RIDDL-TYPE: complex" + EOL
95
+ tmp.write '--' + BOUNDARY + EOL
96
+ tmp.write 'RIDDL-TYPE: complex' + EOL
97
97
  tmp.write "Content-Disposition: #{mode == :input ? 'form-data' : 'riddl-data'}; name=\"#{r.name}\""
98
- tmp.write r.filename.nil? ? EOL : "; filename=\"#{r.filename}\"" + EOL
99
- tmp.write "Content-Transfer-Encoding: binary" + EOL
100
- tmp.write "Content-Type: " + r.mimetype + r.mimextra + EOL
98
+ tmp.write r.filename.nil? ? '; filename=""' + EOL : "; filename=\"#{r.filename}\"" + EOL
99
+ tmp.write 'Content-Transfer-Encoding: binary' + EOL
100
+ tmp.write 'Content-Type: ' + r.mimetype + r.mimextra + EOL
101
101
  tmp.write EOL
102
102
  tmp.write(r.value.respond_to?(:read) ? r.value.read : r.value)
103
103
  tmp.write EOL
104
104
  end
105
105
  end
106
- tmp.write "--" + BOUNDARY + EOL
106
+ tmp.write '--' + BOUNDARY + '--' + EOL
107
107
  end
108
108
  end
109
109
  tmp.flush
data/riddl.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "riddl"
3
- s.version = "0.121"
3
+ s.version = "0.123"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "restful interface description and declaration language: tools and client/server libs"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riddl
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.121'
4
+ version: '0.123'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen 'eTM' Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2023-01-19 00:00:00.000000000 Z
13
+ date: 2023-01-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemonite
@@ -405,6 +405,7 @@ files:
405
405
  - examples/propnew/server.properties.schema
406
406
  - examples/propnew/server.properties.xml
407
407
  - examples/propnew/test
408
+ - examples/simulate/test.rb
408
409
  - examples/sse/description.xml
409
410
  - examples/sse/sample.html
410
411
  - examples/sse/server.rb