hessian2 2.0.5 → 2.0.6

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -10
  3. data/README.md +203 -199
  4. data/lib/hessian2.rb +14 -14
  5. data/lib/hessian2/client.rb +57 -57
  6. data/lib/hessian2/constants.rb +164 -164
  7. data/lib/hessian2/fault.rb +3 -3
  8. data/lib/hessian2/handler.rb +18 -18
  9. data/lib/hessian2/hessian_client.rb +3 -3
  10. data/lib/hessian2/parser.rb +619 -619
  11. data/lib/hessian2/type_wrapper.rb +49 -49
  12. data/lib/hessian2/version.rb +3 -3
  13. data/lib/hessian2/writer.rb +506 -504
  14. data/spec/binary_spec.rb +51 -51
  15. data/spec/boolean_spec.rb +26 -26
  16. data/spec/class_wrapper_spec.rb +52 -52
  17. data/spec/create_monkeys.rb +14 -14
  18. data/spec/date_spec.rb +45 -45
  19. data/spec/double_spec.rb +78 -78
  20. data/spec/int_spec.rb +54 -54
  21. data/spec/list_spec.rb +66 -66
  22. data/spec/long_spec.rb +68 -68
  23. data/spec/map_spec.rb +36 -36
  24. data/spec/null_spec.rb +17 -17
  25. data/spec/object_spec.rb +78 -78
  26. data/spec/ref_spec.rb +43 -43
  27. data/spec/spec_helper.rb +23 -23
  28. data/spec/string_spec.rb +61 -61
  29. data/spec/struct_wrapper_spec.rb +47 -47
  30. data/spec/type_wrapper_spec.rb +102 -102
  31. data/test/app.rb +24 -24
  32. data/test/async/em_http_asleep.rb +25 -25
  33. data/test/async/em_http_sleep.rb +25 -25
  34. data/test/async/monkey.asleep.rb +27 -27
  35. data/test/async/mysql2_aquery.rb +37 -37
  36. data/test/fault/monkey.undefined_method.rb +5 -5
  37. data/test/fault/monkey.wrong_arguments.rb +5 -5
  38. data/test/fiber_concurrency/em_http_asleep.rb +17 -17
  39. data/test/fiber_concurrency/em_http_sleep.rb +17 -17
  40. data/test/fiber_concurrency/monkey.asleep.fiber_aware.rb +18 -18
  41. data/test/fiber_concurrency/mysql2_query.rb +29 -29
  42. data/test/fiber_concurrency/net_http_asleep.rb +19 -19
  43. data/test/fiber_concurrency/net_http_sleep.rb +19 -19
  44. data/test/fibered_rainbows/Gemfile +15 -15
  45. data/test/fibered_rainbows/config.ru +11 -11
  46. data/test/fibered_rainbows/rainbows.rb +13 -13
  47. data/test/monkey_service.rb +16 -16
  48. data/test/prepare.rb +7 -7
  49. data/test/thread_concurrency/active_record_execute.rb +29 -29
  50. data/test/thread_concurrency/monkey.asleep.rb +22 -22
  51. data/test/thread_concurrency/net_http_asleep.rb +24 -24
  52. data/test/thread_concurrency/net_http_sleep.rb +24 -24
  53. data/test/threaded_rainbows/Gemfile +13 -13
  54. data/test/threaded_rainbows/config.ru +9 -9
  55. data/test/threaded_rainbows/rainbows.rb +13 -13
  56. metadata +46 -4
@@ -1,22 +1,22 @@
1
- require File.expand_path('../../prepare', __FILE__)
2
- require 'thread/pool'
3
-
4
- thread_pool = Thread.pool(@concurrency)
5
- client = Hessian2::Client.new('http://127.0.0.1:8080/')
6
-
7
- @number_of.times do |i|
8
- thread_pool.process do
9
- puts i
10
- begin
11
- @results << client.asleep
12
- rescue RuntimeError => e
13
- puts "#{e.message}"
14
- end
15
- end
16
- end
17
-
18
- puts "results.size #{@results.size}"
19
- thread_pool.shutdown
20
-
21
- puts @results.inspect
22
- puts "results.size #{@results.size}"
1
+ require File.expand_path('../../prepare', __FILE__)
2
+ require 'thread/pool'
3
+
4
+ thread_pool = Thread.pool(@concurrency)
5
+ client = Hessian2::Client.new('http://127.0.0.1:8080/')
6
+
7
+ @number_of.times do |i|
8
+ thread_pool.process do
9
+ puts i
10
+ begin
11
+ @results << client.asleep
12
+ rescue RuntimeError => e
13
+ puts "#{e.message}"
14
+ end
15
+ end
16
+ end
17
+
18
+ puts "results.size #{@results.size}"
19
+ thread_pool.shutdown
20
+
21
+ puts @results.inspect
22
+ puts "results.size #{@results.size}"
@@ -1,24 +1,24 @@
1
- require File.expand_path('../../prepare', __FILE__)
2
- require 'net/http'
3
- require 'thread/pool'
4
-
5
- thread_pool = Thread.pool(@concurrency)
6
-
7
- @number_of.times do |i|
8
- thread_pool.process do
9
- puts i
10
- begin
11
- Net::HTTP.new('127.0.0.1', 8080).start do |http|
12
- @results << http.request(Net::HTTP::Post.new('/asleep')).body
13
- end
14
- rescue RuntimeError => e
15
- puts "#{e.message}"
16
- end
17
- end
18
- end
19
-
20
- puts "results.size #{@results.size}"
21
- thread_pool.shutdown
22
-
23
- puts @results.inspect
24
- puts "results.size #{@results.size}"
1
+ require File.expand_path('../../prepare', __FILE__)
2
+ require 'net/http'
3
+ require 'thread/pool'
4
+
5
+ thread_pool = Thread.pool(@concurrency)
6
+
7
+ @number_of.times do |i|
8
+ thread_pool.process do
9
+ puts i
10
+ begin
11
+ Net::HTTP.new('127.0.0.1', 8080).start do |http|
12
+ @results << http.request(Net::HTTP::Post.new('/asleep')).body
13
+ end
14
+ rescue RuntimeError => e
15
+ puts "#{e.message}"
16
+ end
17
+ end
18
+ end
19
+
20
+ puts "results.size #{@results.size}"
21
+ thread_pool.shutdown
22
+
23
+ puts @results.inspect
24
+ puts "results.size #{@results.size}"
@@ -1,24 +1,24 @@
1
- require File.expand_path('../../prepare', __FILE__)
2
- require 'net/http'
3
- require 'thread/pool'
4
-
5
- thread_pool = Thread.pool(@concurrency)
6
-
7
- @number_of.times do |i|
8
- thread_pool.process do
9
- puts i
10
- begin
11
- Net::HTTP.new('127.0.0.1', 8080).start do |http|
12
- @results << http.request(Net::HTTP::Post.new('/sleep')).body
13
- end
14
- rescue RuntimeError => e
15
- puts "#{e.message}"
16
- end
17
- end
18
- end
19
-
20
- puts "results.size #{@results.size}"
21
- thread_pool.shutdown
22
-
23
- puts @results.inspect
24
- puts "results.size #{@results.size}"
1
+ require File.expand_path('../../prepare', __FILE__)
2
+ require 'net/http'
3
+ require 'thread/pool'
4
+
5
+ thread_pool = Thread.pool(@concurrency)
6
+
7
+ @number_of.times do |i|
8
+ thread_pool.process do
9
+ puts i
10
+ begin
11
+ Net::HTTP.new('127.0.0.1', 8080).start do |http|
12
+ @results << http.request(Net::HTTP::Post.new('/sleep')).body
13
+ end
14
+ rescue RuntimeError => e
15
+ puts "#{e.message}"
16
+ end
17
+ end
18
+ end
19
+
20
+ puts "results.size #{@results.size}"
21
+ thread_pool.shutdown
22
+
23
+ puts @results.inspect
24
+ puts "results.size #{@results.size}"
@@ -1,13 +1,13 @@
1
- source 'http://ruby.taobao.org'
2
-
3
- gem 'em-synchrony', require: ['em-synchrony']
4
-
5
- gem 'activerecord'
6
-
7
- gem 'bigdecimal'
8
-
9
- gem 'rainbows'
10
-
11
- gem 'sinatra'
12
-
13
- gem 'sinatra-contrib'
1
+ source 'http://ruby.taobao.org'
2
+
3
+ gem 'em-synchrony', require: ['em-synchrony']
4
+
5
+ gem 'activerecord'
6
+
7
+ gem 'bigdecimal'
8
+
9
+ gem 'rainbows'
10
+
11
+ gem 'sinatra'
12
+
13
+ gem 'sinatra-contrib'
@@ -1,9 +1,9 @@
1
- lib_path = File.expand_path('../../../lib', __FILE__)
2
- $:.unshift(lib_path)
3
-
4
- require 'hessian2'
5
- require 'bundler'
6
- Bundler.require
7
-
8
- require ::File.expand_path('../../app', __FILE__)
9
- run Sinatra::Application
1
+ lib_path = File.expand_path('../../../lib', __FILE__)
2
+ $:.unshift(lib_path)
3
+
4
+ require 'hessian2'
5
+ require 'bundler'
6
+ Bundler.require
7
+
8
+ require ::File.expand_path('../../app', __FILE__)
9
+ run Sinatra::Application
@@ -1,13 +1,13 @@
1
- Rainbows! do
2
- use :ThreadSpawn
3
- end
4
-
5
- worker_processes 1
6
-
7
- timeout 30
8
-
9
- pid '/tmp/monkey.pid'
10
-
11
- preload_app true
12
- GC.respond_to?(:copy_on_write_friendly=) and
13
- GC.copy_on_write_friendly = true
1
+ Rainbows! do
2
+ use :ThreadSpawn
3
+ end
4
+
5
+ worker_processes 1
6
+
7
+ timeout 30
8
+
9
+ pid '/tmp/monkey.pid'
10
+
11
+ preload_app true
12
+ GC.respond_to?(:copy_on_write_friendly=) and
13
+ GC.copy_on_write_friendly = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hessian2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - takafan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -125,8 +125,50 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project: hessian2
128
- rubygems_version: 2.2.2
128
+ rubygems_version: 2.6.8
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Hessian2
132
- test_files: []
132
+ test_files:
133
+ - spec/binary_spec.rb
134
+ - spec/boolean_spec.rb
135
+ - spec/class_wrapper_spec.rb
136
+ - spec/create_monkeys.rb
137
+ - spec/date_spec.rb
138
+ - spec/double_spec.rb
139
+ - spec/int_spec.rb
140
+ - spec/list_spec.rb
141
+ - spec/long_spec.rb
142
+ - spec/map_spec.rb
143
+ - spec/null_spec.rb
144
+ - spec/object_spec.rb
145
+ - spec/ref_spec.rb
146
+ - spec/spec_helper.rb
147
+ - spec/string_spec.rb
148
+ - spec/struct_wrapper_spec.rb
149
+ - spec/type_wrapper_spec.rb
150
+ - test/app.rb
151
+ - test/async/em_http_asleep.rb
152
+ - test/async/em_http_sleep.rb
153
+ - test/async/monkey.asleep.rb
154
+ - test/async/mysql2_aquery.rb
155
+ - test/fault/monkey.undefined_method.rb
156
+ - test/fault/monkey.wrong_arguments.rb
157
+ - test/fiber_concurrency/em_http_asleep.rb
158
+ - test/fiber_concurrency/em_http_sleep.rb
159
+ - test/fiber_concurrency/monkey.asleep.fiber_aware.rb
160
+ - test/fiber_concurrency/mysql2_query.rb
161
+ - test/fiber_concurrency/net_http_asleep.rb
162
+ - test/fiber_concurrency/net_http_sleep.rb
163
+ - test/fibered_rainbows/Gemfile
164
+ - test/fibered_rainbows/config.ru
165
+ - test/fibered_rainbows/rainbows.rb
166
+ - test/monkey_service.rb
167
+ - test/prepare.rb
168
+ - test/thread_concurrency/active_record_execute.rb
169
+ - test/thread_concurrency/monkey.asleep.rb
170
+ - test/thread_concurrency/net_http_asleep.rb
171
+ - test/thread_concurrency/net_http_sleep.rb
172
+ - test/threaded_rainbows/Gemfile
173
+ - test/threaded_rainbows/config.ru
174
+ - test/threaded_rainbows/rainbows.rb