rhebok 0.9.2 → 0.9.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cf21a4ceaeeaf1c6e72a19f59555508984ee6c6
4
- data.tar.gz: 29b1d23eebdd7837be2af68adb2b6dabefea2590
3
+ metadata.gz: af16d4fa2ab9899851800cf75b3d16c5143435d4
4
+ data.tar.gz: 08c761f99f0b0e9993c804c8598ec77284ca9bb6
5
5
  SHA512:
6
- metadata.gz: ce57b5d0c2dc1f2c880f81255f2424f5157ffab68eff12bb2c898c4acfd5b478e4dc23b0cfe38ea9157cce6214c6e68ec28a597afe13eb887aa5446d2b18ef57
7
- data.tar.gz: d590aec96108ede772c81176c385c3bb4a15d98b8ea41a527e5316cc9bfb86dbc954ca2fffc62bf4be2af931739e63b746ec0569e0aa369d644eabce558af940
6
+ metadata.gz: 60b6eb3edc8a8cc6e0792a4d2448f779ad2ffe8c51b6d39c2542ae999d0db5ce81402faf6dde1752f0eee14c7c82fab1f0f00d797282058638d413c15d5fa7d9
7
+ data.tar.gz: fb8e2129867eaa88a2dea1c598a3c0aecdfb2c711480e7edeaefe02c0cc2151cc3b8544303cd8459a5f7e23f95d71e727f1af18570ef88e78a262f99d1576bcc
@@ -5,6 +5,5 @@ install:
5
5
  - gem install bundler
6
6
  - bundle install --jobs=3 --retry=3
7
7
  rvm:
8
- - 2.0.0
9
- - 2.1.5
10
8
  - 2.2.3
9
+ - 2.3.1
data/Changes CHANGED
@@ -1,3 +1,9 @@
1
+ 0.9.3 2016-09-13T11:05:00
2
+
3
+ - bugfix about timeout by wrong Operator Precedence #7
4
+ - Optimize by avoiding function call #8
5
+ - fix rack deps
6
+
1
7
  0.9.2 2015-12-24T00:31:23
2
8
 
3
9
  - optimize a bit
@@ -325,7 +325,7 @@ ssize_t _writev_timeout(const int fileno, const double timeout, struct iovec *io
325
325
  while (1) {
326
326
  wfds[0].fd = fileno;
327
327
  wfds[0].events = POLLOUT;
328
- nfound = poll(wfds, 1, (int)timeout*1000);
328
+ nfound = poll(wfds, 1, (int)(timeout*1000));
329
329
  if ( nfound == 1 ) {
330
330
  break;
331
331
  }
@@ -353,7 +353,7 @@ ssize_t _read_timeout(const int fileno, const double timeout, char * read_buf, c
353
353
  return rv;
354
354
  }
355
355
  while (1) {
356
- nfound = poll(rfds, 1, (int)timeout*1000);
356
+ nfound = poll(rfds, 1, (int)(timeout*1000));
357
357
  if ( nfound == 1 ) {
358
358
  break;
359
359
  }
@@ -391,7 +391,7 @@ ssize_t _write_timeout(const int fileno, const double timeout, char * write_buf,
391
391
  while (1) {
392
392
  wfds[0].fd = fileno;
393
393
  wfds[0].events = POLLOUT;
394
- nfound = poll(wfds, 1, (int)timeout*1000);
394
+ nfound = poll(wfds, 1, (int)(timeout*1000));
395
395
  if ( nfound == 1 ) {
396
396
  break;
397
397
  }
@@ -593,7 +593,7 @@ VALUE rhe_accept(VALUE self, VALUE fileno, VALUE timeoutv, VALUE tcp, VALUE env)
593
593
  if ( tcp == Qtrue ) {
594
594
  setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int));
595
595
  rb_hash_aset(env, remote_addr_key, rb_str_new2(inet_ntoa(cliaddr.sin_addr)));
596
- rb_hash_aset(env, remote_port_key, rb_String(rb_int_new(ntohs(cliaddr.sin_port))));
596
+ rb_hash_aset(env, remote_port_key, rb_fix2str(INT2FIX(ntohs(cliaddr.sin_port)),10));
597
597
  }
598
598
  else {
599
599
  rb_hash_aset(env, remote_addr_key, vacant_string_val);
@@ -649,7 +649,7 @@ VALUE rhe_accept(VALUE self, VALUE fileno, VALUE timeoutv, VALUE tcp, VALUE env)
649
649
  }
650
650
 
651
651
  req = rb_ary_new2(2);
652
- rb_ary_push(req, rb_int_new(fd));
652
+ rb_ary_push(req, INT2NUM(fd));
653
653
  rb_ary_push(req, rb_str_new(&read_buf[reqlen],buf_len - reqlen));
654
654
  return req;
655
655
  badexit:
@@ -676,7 +676,7 @@ VALUE rhe_read_timeout(VALUE self, VALUE filenov, VALUE rbuf, VALUE lenv, VALUE
676
676
  rb_str_cat(rbuf, d, rv);
677
677
  }
678
678
  xfree(d);
679
- return rb_int_new(rv);
679
+ return SSIZET2NUM(rv);
680
680
  }
681
681
 
682
682
  static
@@ -689,7 +689,7 @@ VALUE rhe_write_timeout(VALUE self, VALUE fileno, VALUE buf, VALUE len, VALUE of
689
689
  if ( rv < 0 ) {
690
690
  return Qnil;
691
691
  }
692
- return rb_int_new(rv);
692
+ return SSIZET2NUM(rv);
693
693
  }
694
694
 
695
695
 
@@ -715,7 +715,7 @@ VALUE rhe_write_all(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE ti
715
715
  if (rv < 0) {
716
716
  return Qnil;
717
717
  }
718
- return rb_int_new(written);
718
+ return SSIZET2NUM(written);
719
719
  }
720
720
 
721
721
  static
@@ -733,7 +733,7 @@ VALUE rhe_write_chunk(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE
733
733
  buf_len = RSTRING_LEN(buf);
734
734
 
735
735
  if ( buf_len == 0 ){
736
- return rb_int_new(0);
736
+ return INT2FIX(0);
737
737
  }
738
738
 
739
739
  {
@@ -773,7 +773,7 @@ VALUE rhe_write_chunk(VALUE self, VALUE fileno, VALUE buf, VALUE offsetv, VALUE
773
773
  if ( rv < 0 ) {
774
774
  return Qnil;
775
775
  }
776
- return rb_int_new(written);
776
+ return SSIZET2NUM(written);
777
777
  }
778
778
 
779
779
  static
@@ -1021,7 +1021,7 @@ VALUE rhe_write_response(VALUE self, VALUE filenov, VALUE timeoutv, VALUE status
1021
1021
  if ( rv < 0 ) {
1022
1022
  return Qnil;
1023
1023
  }
1024
- return rb_int_new(written);
1024
+ return SSIZET2NUM(written);
1025
1025
  }
1026
1026
 
1027
1027
  void Init_rhebok()
@@ -1,3 +1,3 @@
1
1
  class Rhebok
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.0'
22
+ spec.required_ruby_version = '>= 2.2.2'
23
23
  spec.add_development_dependency "bundler", "~> 1.7"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "bacon"
26
26
  spec.add_dependency "rack"
27
- spec.add_dependency "prefork_engine", ">= 0.0.6"
27
+ spec.add_dependency "prefork_engine", ">= 0.0.7"
28
28
 
29
29
  # get an array of submodule dirs by executing 'pwd' inside each submodule
30
30
  `git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
@@ -118,7 +118,7 @@ class TestRequest
118
118
  header[key.to_s] = val.to_s
119
119
  next
120
120
  end
121
- line.sub!(/\* Closing connection #0\n/,"")
121
+ line.sub!(/\* Closing connection #?0\n/,"")
122
122
  body += line
123
123
  end
124
124
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhebok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Nagano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.0.6
75
+ version: 0.0.7
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.0.6
82
+ version: 0.0.7
83
83
  description: High Performance and Optimized Preforked Rack Handler
84
84
  email:
85
85
  - kazeburo@gmail.com
@@ -135,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '2.0'
138
+ version: 2.2.2
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.4.5.1
146
+ rubygems_version: 2.5.1
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: High Performance Preforked Rack Handler