riddl 0.122 → 0.124
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/simulate/test.rb +10 -0
- data/lib/ruby/riddl/protocols/http/generator.rb +2 -2
- data/lib/ruby/riddl/protocols/http/parser.rb +2 -1
- data/riddl.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68cd6fdf0237b4acf425a65539a83f6c0d880ae481d6bd380fd08b8a7358dfa7
|
4
|
+
data.tar.gz: 37c59d7beb831a035d7d6dbc13027e635ad63b1b2449c0429457777ba056ef07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46531d2606cbdb123ca07a75cf38e2b8e01ec254a03c9ec64f6520629e4fde002f5b18434719a8c25859c54dc7af5e51388031b62cc885ee7e4060f905f97795
|
7
|
+
data.tar.gz: 03ddf4801ff992a520b2e97e24af3d0c3f77fc49b2790f6532a17c8ea0d481df0d54220878720dcd80cf73ac0120806810815c254b350a96a58b44677443349e
|
@@ -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
|
@@ -95,7 +95,7 @@ module Riddl
|
|
95
95
|
tmp.write '--' + BOUNDARY + EOL
|
96
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? ? '; filename=""' : "; filename=\"#{r.filename}\"" + EOL
|
98
|
+
tmp.write r.filename.nil? ? '; filename=""' + EOL : "; filename=\"#{r.filename}\"" + EOL
|
99
99
|
tmp.write 'Content-Transfer-Encoding: binary' + EOL
|
100
100
|
tmp.write 'Content-Type: ' + r.mimetype + r.mimextra + EOL
|
101
101
|
tmp.write EOL
|
@@ -103,7 +103,7 @@ module Riddl
|
|
103
103
|
tmp.write EOL
|
104
104
|
end
|
105
105
|
end
|
106
|
-
tmp.write '--' + BOUNDARY +
|
106
|
+
tmp.write '--' + BOUNDARY + EOL
|
107
107
|
end
|
108
108
|
end
|
109
109
|
tmp.flush
|
@@ -103,6 +103,7 @@ module Riddl
|
|
103
103
|
c = input.read(bufsize < content_length ? bufsize : content_length)
|
104
104
|
raise EOFError, "bad content body" if c.nil? || c.empty?
|
105
105
|
content_length -= c.size
|
106
|
+
|
106
107
|
buf << c
|
107
108
|
end
|
108
109
|
|
@@ -113,7 +114,7 @@ module Riddl
|
|
113
114
|
content_length = -1 if $1 == "--"
|
114
115
|
end
|
115
116
|
|
116
|
-
add_to_params(name,body,filename,ctype,head)
|
117
|
+
add_to_params(name,body,filename == '' ? nil : filename,ctype,head)
|
117
118
|
|
118
119
|
break if buf.empty? || content_length == -1
|
119
120
|
end
|
data/riddl.gemspec
CHANGED
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.
|
4
|
+
version: '0.124'
|
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-
|
13
|
+
date: 2023-02-13 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
|