plezi 0.10.5 → 0.10.6

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
  SHA1:
3
- metadata.gz: 30ce27c545c142e3ac9b36123deb9f7dd167e6aa
4
- data.tar.gz: 03cf566bee417f4bb9ca4e101840260b5ff2e2da
3
+ metadata.gz: 86970dabaa35cafd7bdae2e7dc5233816f108247
4
+ data.tar.gz: 3e304fb54b25fa57cf03b56c0290a27baa0f76cc
5
5
  SHA512:
6
- metadata.gz: 2df896e3f2bd70c9f00da38e59a5d035ede89fabf3563c048bd5e8ee0f7c278df7d94c0ddb9177d60c75802b917f85086e97b2df7a2be1304a83b971d751f055
7
- data.tar.gz: ddbec3cb3f873661f5cbed31038d94b210c144de3f7b756c8a61016922988c8582e21cbe09d06213230b7d77d4f93531a9249b8153dcd37e2efd61649e2a4b95
6
+ metadata.gz: f66fbaefd4333b7400d25576b85a1f9444bcf1db176ae981ed4c6512130f8903999a863b8d72d7e608da8dcf3f01f4211a32327867130f7bc58b3e9df88727a3
7
+ data.tar.gz: 9f31d2ee28fcce84f1fbba07a6e559ac966743ffa03a0b98210a077a29aee81105ec49436b65f7754b679ef145a5512a09c0ff8e9c0d925549cc3f808af104ad
@@ -2,7 +2,13 @@
2
2
 
3
3
  ***
4
4
 
5
- Change log v.0.10.4
5
+ Change log v.0.10.6
6
+
7
+ **Performance Boost**: updated the GRHttp server version, to leverage the new Websocket engine, which offers a significant performance boost and allows for larger data to be transmitted over the websocket connection (tested with more than 250MB of data).
8
+
9
+ ***
10
+
11
+ Change log v.0.10.5
6
12
 
7
13
  **Fix**: updated the server version to fix socket status code issues on Debian OS (resolve socket disconnection issues).
8
14
 
data/Rakefile CHANGED
@@ -5,9 +5,3 @@ desc "Tests most of the basic features for the Plezi framework."
5
5
  task :test do
6
6
  load "./test/plezi_tests.rb"
7
7
  end
8
- desc "Leaves the testing server open for 1 minute after most of the tests are complete, delaying shutdown testing."
9
- task :slowtest do
10
- PLEZI_TEST_TIME = 60
11
- load "./test/plezi_tests.rb"
12
- end
13
-
@@ -10,7 +10,7 @@ module Plezi
10
10
  end
11
11
  # Defers any missing methods to the GReactor Library.
12
12
  def respond_to_missing?(name, include_private = false)
13
- REACTOR_METHODS.include?(name) or super
13
+ REACTOR_METHODS.include?(name) || super
14
14
  end
15
15
 
16
16
  protected
@@ -1,3 +1,3 @@
1
1
  module Plezi
2
- VERSION = "0.10.5"
2
+ VERSION = "0.10.6"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "grhttp", "~> 0.0.8"
21
+ spec.add_dependency "grhttp", "~> 0.0.9"
22
22
  spec.add_development_dependency "bundler", "~> 1.7"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
 
@@ -313,11 +313,13 @@ module PleziTestTasks
313
313
  end
314
314
  str = 'a'
315
315
  time_now = Time.now
316
- 6.times {|i| str = str * 2**i;puts " * Websocket message size test: sending #{str.bytesize} bytes"; ws << str; sleep 0.2 }
317
- sleep (Time.now - time_now + 1)
316
+ 8.times {|i| str = str * 2**i;puts " * Websocket message size test: sending #{str.bytesize} bytes"; ws << str; }
317
+ to_sleep = (Time.now - time_now)*2 + 1
318
+ puts "will now sleep for #{to_sleep} seconds, waiting allowing the server to respond"
319
+ sleep to_sleep rescue true
318
320
  should_disconnect = true
319
321
  Plezi::Settings.ws_message_size_limit = 1024
320
- ws << str
322
+ ws << ('0123'*258)
321
323
  end
322
324
  def test_404
323
325
  puts " * 404 not found and router continuity tests: #{RESULTS[ Net::HTTP.get_response(URI.parse "http://localhost:3000/get404" ).code == '404' ]}"
@@ -358,23 +360,24 @@ shared_route '/some/:multi{path|another_path}/(:option){route|test}/(:id)/(:opti
358
360
  shared_route '/', TestCtrl
359
361
 
360
362
 
361
- GRHttp.start Plezi::Settings.max_threads
363
+ GReactor.run_async do
364
+ puts " --- Starting tests"
365
+ puts " --- Failed tests should read: #{PleziTestTasks::RESULTS[false]}"
366
+ PleziTestTasks.run_tests
367
+ puts "\n --- Press ^C to complete tests."
368
+ end
362
369
 
363
370
  # start_services
364
371
 
365
372
  shoutdown_test = false
373
+ # GReactor::Settings.set_forking 4
366
374
  Plezi.on_shutdown { shoutdown_test = true }
367
375
 
368
- puts " --- Starting tests"
369
- puts " --- Failed tests should read: #{PleziTestTasks::RESULTS[false]}"
370
- PleziTestTasks.run_tests
371
-
372
376
 
377
+ Plezi.start
373
378
  # Plezi::EventMachine.clear_timers
374
379
 
375
- sleep PLEZI_TEST_TIME if defined? PLEZI_TEST_TIME
376
-
377
- Plezi.stop
380
+ # sleep PLEZI_TEST_TIME if defined? PLEZI_TEST_TIME
378
381
 
379
382
 
380
383
  puts " * Shutdown test: #{ PleziTestTasks::RESULTS[shoutdown_test] }"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plezi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-19 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grhttp
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.8
19
+ version: 0.0.9
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.8
26
+ version: 0.0.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement