protocol-http1 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of protocol-http1 might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a739005ea471dd8601ea3844e71a6437981bcd5e4cb3e7d5c85f7eb699d55a8
4
- data.tar.gz: 31c5dc038dceaa79552fb76bb56667f85e7e61ac568f06c564d426a9f6606784
3
+ metadata.gz: c7e52fddf7aecf5b02e7409c22602514f254f4c2a9a996ec3f6a756105264ff4
4
+ data.tar.gz: c935b95535f01ebc686bed3c4ada973cc6d7c3a7993e660fe4421fff1e16d6dd
5
5
  SHA512:
6
- metadata.gz: 7aebf8675b398d210cc4fb457d498ea4a682112a93f4d298ced3ed24709dd3d1532eaa6ba56ceeaeb1c521545b23a48f557ba8616aec2f6d3fb2a57937e5ccb7
7
- data.tar.gz: fcac06a0408e7bafede84eb1ab675bddfec3cc17605690fdc6f6111dc626412a65ff0f0dbefcd908d1c6b14068c4ac2adc03d0f9c717fb8ef9fef2b7f5d62f0e
6
+ metadata.gz: 548692d4ff0abdb92aeb40e6cd454ee59755ee78433ea4c273a9f0e2df8033f495095f38b7304c5d816ddce53a1387c3d7ef85924bd42fa38ec86eb9f48eaa5e
7
+ data.tar.gz: 340384e2f85326ae5a5dd38a87909ee33c2e5b346b07ab6f191f00ed1746104fe9f286b9fc5f5b6440b19b485ec1c7cd060979474ed082c61deaf6db4f573644
@@ -249,7 +249,7 @@ module Protocol
249
249
  chunk_length += chunk.bytesize
250
250
 
251
251
  if chunk_length > length
252
- raise ProtocolError, "Trying to write #{chunk_length} bytes, but content length was #{length} bytes!"
252
+ raise Error, "Trying to write #{chunk_length} bytes, but content length was #{length} bytes!"
253
253
  end
254
254
 
255
255
  @stream.write(chunk)
@@ -258,7 +258,7 @@ module Protocol
258
258
  @stream.flush
259
259
 
260
260
  if chunk_length != length
261
- raise ProtocolError, "Wrote #{chunk_length} bytes, but content length was #{length} bytes!"
261
+ raise Error, "Wrote #{chunk_length} bytes, but content length was #{length} bytes!"
262
262
  end
263
263
  end
264
264
 
@@ -22,10 +22,11 @@ require 'protocol/http/error'
22
22
 
23
23
  module Protocol
24
24
  module HTTP1
25
- class BadRequest < HTTP::BadRequest
25
+ class Error < HTTP::Error
26
26
  end
27
27
 
28
- class ProtocolError < HTTP::ProtocolError
28
+ # The request was parsed correctly, but was invalid for some other reason.
29
+ class BadRequest < Error
29
30
  end
30
31
  end
31
32
  end
@@ -1,5 +1,5 @@
1
1
  module Protocol
2
2
  module HTTP1
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -6,24 +6,22 @@ Gem::Specification.new do |spec|
6
6
  spec.version = Protocol::HTTP1::VERSION
7
7
  spec.authors = ["Samuel Williams"]
8
8
  spec.email = ["samuel.williams@oriontransfer.co.nz"]
9
-
9
+
10
10
  spec.summary = "A low level implementation of the HTTP/1 protocol."
11
11
  spec.homepage = "https://github.com/socketry/protocol-http1"
12
12
  spec.license = "MIT"
13
-
14
- # Specify which files should be added to the gem when it is released.
15
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
13
+
16
14
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
15
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
16
  end
19
-
17
+
20
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
19
  spec.require_paths = ["lib"]
22
-
23
- spec.add_dependency "protocol-http"
24
-
20
+
21
+ spec.add_dependency "protocol-http", "~> 0.2"
22
+
25
23
  spec.add_development_dependency "covered"
26
- spec.add_development_dependency "bundler", "~> 1.17"
24
+ spec.add_development_dependency "bundler"
27
25
  spec.add_development_dependency "rake", "~> 10.0"
28
26
  spec.add_development_dependency "rspec", "~> 3.0"
29
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -14,16 +14,16 @@ dependencies:
14
14
  name: protocol-http
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.2'
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'
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: covered
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.17'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.17'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement