protocol-http 0.26.0 → 0.26.2

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: 6401497cd3f38196e5a3144d558cf78de63f078910be38a62424178d9602fe16
4
- data.tar.gz: b8c117fc812d042322c0dec7cf40e3d6e52b0920935ab1ddde954ac7caed94f0
3
+ metadata.gz: 37ad7cebabada676314b89eb107ccd52dc5b4ca39ae06286189da63e48732020
4
+ data.tar.gz: b6d949c575e5beebe00e2fd3b88be34ea3600380ebb65a88ef95f206cc615de6
5
5
  SHA512:
6
- metadata.gz: 7fe7771ac9a21b2724b6f037dcce2eeb4bcae573d61634aabfa631304a70bbc661635221cf10371c755fa06d6d4ab1dac926a3ca342422aa380b529954ad941f
7
- data.tar.gz: 05cd0d1cf17525d9c525158e76687440f607fc34c23e25a055e4f97f1fe20b4af0c8b0e4bedd91ef8bd705c3a1711ee365bdc3cc539fa9f85638cc66040c2ea9
6
+ metadata.gz: 6b934b6150bef7f73a113720dd2091f84605f424ac6daf9591828c28890ddacc0cfe3a143674e3d1f9b399b9ecf59b566e117b8a89fa5f7198a931456fd8314c
7
+ data.tar.gz: 7e9cb8d0d7c1fa9fd39cb4adf1048cb88e284b8fb4513b27c8910ca5c7df4eabf277c2b1545ddc3da8054cacda2cb025c26944613a307900d4afb85dee836d3f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -25,24 +25,20 @@ module Protocol
25
25
  end
26
26
 
27
27
  def finish
28
- if @body
29
- result = super
30
-
31
- @callback.call
32
-
33
- @body = nil
34
-
35
- return result
28
+ super.tap do
29
+ if @callback
30
+ @callback.call
31
+ @callback = nil
32
+ end
36
33
  end
37
34
  end
38
35
 
39
36
  def close(error = nil)
40
- if @body
41
- super
42
-
43
- @callback.call(error)
44
-
45
- @body = nil
37
+ super.tap do
38
+ if @callback
39
+ @callback.call(error)
40
+ @callback = nil
41
+ end
46
42
  end
47
43
  end
48
44
  end
@@ -1,9 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
5
-
6
- require 'base64'
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
+ # Copyright, 2024, by Earlopain.
7
6
 
8
7
  module Protocol
9
8
  module HTTP
@@ -21,10 +20,10 @@ module Protocol
21
20
  end
22
21
 
23
22
  def self.basic(username, password)
24
- encoded = "#{username}:#{password}"
23
+ strict_base64_encoded = ["#{username}:#{password}"].pack('m0')
25
24
 
26
25
  self.new(
27
- "Basic #{Base64.strict_encode64(encoded)}"
26
+ "Basic #{strict_base64_encoded}"
28
27
  )
29
28
  end
30
29
  end
@@ -1,7 +1,8 @@
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
+ # Copyright, 2024, by Thomas Morgan.
5
6
 
6
7
  require_relative 'split'
7
8
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2023-2024, by Samuel Williams.
5
5
 
6
6
  require 'time'
7
7
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2023, by Samuel Williams.
4
+ # Copyright, 2018-2024, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module HTTP
8
- VERSION = "0.26.0"
8
+ VERSION = "0.26.2"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -8,8 +8,9 @@ Copyright, 2020-2023, by Bruno Sutic.
8
8
  Copyright, 2022, by Herrick Fang.
9
9
  Copyright, 2022, by Dan Olson.
10
10
  Copyright, 2023, by Genki Takiuchi.
11
- Copyright, 2023, by Thomas Morgan.
11
+ Copyright, 2023-2024, by Thomas Morgan.
12
12
  Copyright, 2023, by Marcelo Junior.
13
+ Copyright, 2024, by Earlopain.
13
14
 
14
15
  Permission is hereby granted, free of charge, to any person obtaining a copy
15
16
  of this software and associated documentation files (the "Software"), to deal
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Thomas Morgan
8
9
  - Bruno Sutic
9
10
  - Herrick Fang
10
- - Thomas Morgan
11
11
  - Bryan Powell
12
12
  - Dan Olson
13
+ - Earlopain
13
14
  - Genki Takiuchi
14
15
  - Marcelo Junior
15
16
  - Olle Jonsson
@@ -46,22 +47,8 @@ cert_chain:
46
47
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
47
48
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
48
49
  -----END CERTIFICATE-----
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'
50
+ date: 2024-04-09 00:00:00.000000000 Z
51
+ dependencies: []
65
52
  description:
66
53
  email:
67
54
  executables: []
metadata.gz.sig CHANGED
Binary file