h1p 0.3 → 0.4

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: 3c4b5a2d00d0bb28e75e75a1bb5c5c0bf4ef060d837e33606408d92bcb70deca
4
- data.tar.gz: 73332efbff1047e8f5e3a65b6a718a187b332b405f943f6d53fc9acdf6b55b7e
3
+ metadata.gz: a27a3323482c8a0cec845e60962516b755338ccc54d0ba76bf6716bbb449a8ff
4
+ data.tar.gz: 22613ade68e261e3fca56cafcab410b1bed4587efe8c1da4ef52d1d335bc7efd
5
5
  SHA512:
6
- metadata.gz: 5b1616a34cf1f43c1dece307cabccd882f4805824a54e58a70e476fc37db0738542f260cf22a88a8c8d7e8fb310cdc3a67d3f4e50a22285ecdd4a08b43fbb46c
7
- data.tar.gz: ca10eb8b6c764f15c5f816068e84719cb7b242d6e5cd521fb941995cc2b8fca7c48abe5e0791ba0d06d7331a3601adbf860373a550a132a13fb073c6684c66f8
6
+ metadata.gz: 36cb9020745437627ad3dca5f83de6f81f8ad6e04075909db192a509b9f022960c5a7768c1f1ab8fdb807ae0d7b54e6febbc76581e68475c5f27057ff5b7aeb5
7
+ data.tar.gz: 20943cfead5e0236e60cb3a0d70057c69a91bbde45973f0f4ff87f38a1866523c1a02132254eebc13b8c5e2c4f75cd8e5791246257a792f63391cff88a6e1011
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4 2022-02-28
2
+
3
+ - Rename `__parser_read_method__` to `__read_method__`
4
+
1
5
  ## 0.3 2022-02-03
2
6
 
3
7
  - Add support for parsing HTTP responses (#1)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- h1p (0.3)
4
+ h1p (0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -166,7 +166,7 @@ expected (based on the received headers).
166
166
  The H1P parser was built to read from any arbitrary transport or source, as long
167
167
  as they conform to one of two alternative interfaces:
168
168
 
169
- - An object implementing a `__parser_read_method__` method, which returns any of
169
+ - An object implementing a `__read_method__` method, which returns any of
170
170
  the following values:
171
171
 
172
172
  - `:stock_readpartial` - to be used for instances of `IO`, `Socket`,
data/ext/h1p/h1p.c CHANGED
@@ -20,7 +20,7 @@ ID ID_call;
20
20
  ID ID_downcase;
21
21
  ID ID_eof_p;
22
22
  ID ID_eq;
23
- ID ID_parser_read_method;
23
+ ID ID_read_method;
24
24
  ID ID_read;
25
25
  ID ID_readpartial;
26
26
  ID ID_to_i;
@@ -123,8 +123,8 @@ static inline void get_polyphony() {
123
123
  }
124
124
 
125
125
  enum read_method detect_read_method(VALUE io) {
126
- if (rb_respond_to(io, ID_parser_read_method)) {
127
- VALUE method = rb_funcall(io, ID_parser_read_method, 0);
126
+ if (rb_respond_to(io, ID_read_method)) {
127
+ VALUE method = rb_funcall(io, ID_read_method, 0);
128
128
  if (method == SYM_stock_readpartial) return method_stock_readpartial;
129
129
 
130
130
  get_polyphony();
@@ -137,7 +137,7 @@ enum read_method detect_read_method(VALUE io) {
137
137
  return method_call;
138
138
  }
139
139
  else
140
- rb_raise(rb_eRuntimeError, "Provided reader should be a callable or respond to #__parser_read_method__");
140
+ rb_raise(rb_eRuntimeError, "Provided reader should be a callable or respond to #__read_method__");
141
141
  }
142
142
 
143
143
  enum parser_mode parse_parser_mode(VALUE mode) {
@@ -978,7 +978,7 @@ void Init_H1P() {
978
978
  ID_downcase = rb_intern("downcase");
979
979
  ID_eof_p = rb_intern("eof?");
980
980
  ID_eq = rb_intern("==");
981
- ID_parser_read_method = rb_intern("__parser_read_method__");
981
+ ID_read_method = rb_intern("__read_method__");
982
982
  ID_read = rb_intern("read");
983
983
  ID_readpartial = rb_intern("readpartial");
984
984
  ID_to_i = rb_intern("to_i");
data/lib/h1p/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module H1P
4
- VERSION = '0.3'
4
+ VERSION = '0.4'
5
5
  end
data/lib/h1p.rb CHANGED
@@ -4,7 +4,7 @@ require_relative './h1p_ext'
4
4
 
5
5
  unless Object.const_defined?('Polyphony')
6
6
  class IO
7
- def __parser_read_method__
7
+ def __read_method__
8
8
  :stock_readpartial
9
9
  end
10
10
  end
@@ -12,19 +12,19 @@ unless Object.const_defined?('Polyphony')
12
12
  require 'socket'
13
13
 
14
14
  class Socket
15
- def __parser_read_method__
15
+ def __read_method__
16
16
  :stock_readpartial
17
17
  end
18
18
  end
19
19
 
20
20
  class TCPSocket
21
- def __parser_read_method__
21
+ def __read_method__
22
22
  :stock_readpartial
23
23
  end
24
24
  end
25
25
 
26
26
  class UNIXSocket
27
- def __parser_read_method__
27
+ def __read_method__
28
28
  :stock_readpartial
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h1p
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-03 00:00:00.000000000 Z
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 5.14.4
55
- description:
55
+ description:
56
56
  email: sharon@noteflakes.com
57
57
  executables: []
58
58
  extensions:
@@ -89,7 +89,7 @@ licenses:
89
89
  - MIT
90
90
  metadata:
91
91
  source_code_uri: https://github.com/digital-fabric/h1p
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options:
94
94
  - "--title"
95
95
  - h1p
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.3.3
112
- signing_key:
111
+ rubygems_version: 3.1.6
112
+ signing_key:
113
113
  specification_version: 4
114
114
  summary: H1P is a blocking HTTP/1 parser for Ruby
115
115
  test_files: []