protocol-http 0.25.0 → 0.26.0

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: 6354e91389524cbc79fb186bb3d5f3a3bc87ff3a904fc1540635ec8bf89db448
4
- data.tar.gz: f83f86976e9dfb6ed8f8adab3f587acf0359377f6254627099ecbc504a3145db
3
+ metadata.gz: 6401497cd3f38196e5a3144d558cf78de63f078910be38a62424178d9602fe16
4
+ data.tar.gz: b8c117fc812d042322c0dec7cf40e3d6e52b0920935ab1ddde954ac7caed94f0
5
5
  SHA512:
6
- metadata.gz: 72fdbf93d17bf20fae9591620b0c64a99f02026e677311486a0e7ee94d6b2fdce62063b3bbd31a0e6941ba3f324acc99a0957edba610d659fce1e1e9247ad34e
7
- data.tar.gz: 3280e4a0d39fa6a4ab58ab08c1dfeb2cad6e5ddbddc73906f00552a6c32dab3669e67c86d22f92dafa236745f11d8d75961c398f932cf4790cbe67deeb6807d0
6
+ metadata.gz: 7fe7771ac9a21b2724b6f037dcce2eeb4bcae573d61634aabfa631304a70bbc661635221cf10371c755fa06d6d4ab1dac926a3ca342422aa380b529954ad941f
7
+ data.tar.gz: 05cd0d1cf17525d9c525158e76687440f607fc34c23e25a055e4f97f1fe20b4af0c8b0e4bedd91ef8bd705c3a1711ee365bdc3cc539fa9f85638cc66040c2ea9
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2023, by Genki Takiuchi.
6
6
 
7
7
  require_relative 'buffered'
@@ -98,6 +98,10 @@ module Protocol
98
98
  return buffer
99
99
  end
100
100
 
101
+ def readpartial(length)
102
+ read_partial(length) or raise EOFError, "End of file reached!"
103
+ end
104
+
101
105
  def read_nonblock(length, buffer = nil)
102
106
  @buffer ||= read_next
103
107
  chunk = nil
@@ -22,7 +22,7 @@ module Protocol
22
22
  end
23
23
 
24
24
  def keep_alive?
25
- self.include?(KEEP_ALIVE)
25
+ self.include?(KEEP_ALIVE) && !close?
26
26
  end
27
27
 
28
28
  def close?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2020-2023, by Samuel Williams.
4
+ # Copyright, 2023, by Samuel Williams.
5
5
 
6
6
  require 'time'
7
7
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP
8
- VERSION = "0.25.0"
8
+ VERSION = "0.26.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2018-2023, by Samuel Williams.
3
+ Copyright, 2018-2024, by Samuel Williams.
4
4
  Copyright, 2019, by Yuta Iwama.
5
5
  Copyright, 2020, by Olle Jonsson.
6
6
  Copyright, 2020, by Bryan Powell.
@@ -9,6 +9,7 @@ Copyright, 2022, by Herrick Fang.
9
9
  Copyright, 2022, by Dan Olson.
10
10
  Copyright, 2023, by Genki Takiuchi.
11
11
  Copyright, 2023, by Thomas Morgan.
12
+ Copyright, 2023, by Marcelo Junior.
12
13
 
13
14
  Permission is hereby granted, free of charge, to any person obtaining a copy
14
15
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -8,18 +8,15 @@ Provides abstractions for working with the HTTP protocol.
8
8
 
9
9
  - General abstractions for HTTP requests and responses.
10
10
  - Symmetrical interfaces for client and server.
11
- - Light-weight middlewar model for building applications.
11
+ - Light-weight middleware model for building applications.
12
12
 
13
13
  ## Usage
14
14
 
15
- Please see the [project documentation](https://github.com/socketry/protocol-http) for more details.
15
+ Please see the [project documentation](https://socketry.github.io/protocol-http/) for more details.
16
16
 
17
- - [Getting Started](https://github.com/socketry/protocol-httpguides/getting-started/index) - This guide explains how
18
- to use `protocol-http` for building abstract HTTP interfaces.
17
+ - [Getting Started](https://socketry.github.io/protocol-http/guides/getting-started/index) - This guide explains how to use `protocol-http` for building abstract HTTP interfaces.
19
18
 
20
- - [Design Overview](https://github.com/socketry/protocol-httpguides/design-overview/index) - The interfaces provided
21
- by <code class="language-ruby">Protocol::HTTP</code> underpin all downstream implementations. Therefore, we provide
22
- some justification for the design choices.
19
+ - [Design Overview](https://socketry.github.io/protocol-http/guides/design-overview/index) - This guide explains the high level design of `protocol-http` in the context of wider design patterns that can be used to implement HTTP clients and servers.
23
20
 
24
21
  ## Contributing
25
22
 
@@ -37,7 +34,7 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
37
34
 
38
35
  ### Contributor Covenant
39
36
 
40
- This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
37
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
41
38
 
42
39
  ## See Also
43
40
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,15 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  - Bruno Sutic
9
9
  - Herrick Fang
10
+ - Thomas Morgan
10
11
  - Bryan Powell
11
12
  - Dan Olson
12
13
  - Genki Takiuchi
14
+ - Marcelo Junior
13
15
  - Olle Jonsson
14
16
  - Yuta Iwama
15
17
  autorequire:
@@ -44,8 +46,22 @@ cert_chain:
44
46
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
45
47
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
46
48
  -----END CERTIFICATE-----
47
- date: 2023-09-12 00:00:00.000000000 Z
48
- dependencies: []
49
+ date: 2024-01-26 00:00:00.000000000 Z
50
+ dependencies:
51
+ - !ruby/object:Gem::Dependency
52
+ name: base64
53
+ requirement: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
49
65
  description:
50
66
  email:
51
67
  executables: []
@@ -94,7 +110,8 @@ files:
94
110
  homepage: https://github.com/socketry/protocol-http
95
111
  licenses:
96
112
  - MIT
97
- metadata: {}
113
+ metadata:
114
+ documentation_uri: https://socketry.github.io/protocol-http/
98
115
  post_install_message:
99
116
  rdoc_options: []
100
117
  require_paths:
@@ -103,14 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
120
  requirements:
104
121
  - - ">="
105
122
  - !ruby/object:Gem::Version
106
- version: 2.7.6
123
+ version: '3.0'
107
124
  required_rubygems_version: !ruby/object:Gem::Requirement
108
125
  requirements:
109
126
  - - ">="
110
127
  - !ruby/object:Gem::Version
111
128
  version: '0'
112
129
  requirements: []
113
- rubygems_version: 3.4.10
130
+ rubygems_version: 3.5.3
114
131
  signing_key:
115
132
  specification_version: 4
116
133
  summary: Provides abstractions to handle HTTP protocols.
metadata.gz.sig CHANGED
Binary file