sus-fixtures-async-http 0.7.0 → 0.8.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/fixtures/async/http/server_context.rb +8 -6
- data/lib/sus/fixtures/async/http/version.rb +2 -2
- data/license.md +2 -1
- data/readme.md +1 -1
- data.tar.gz.sig +0 -0
- metadata +8 -33
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df078bbaa8b6c50c55f0377a2cb1147d7e58171d4a8eda76c0d15b03bc14a650
|
4
|
+
data.tar.gz: bfc47968b18f18401542766d273e9b4701236713d8ab50d3ffe53f82dbbee965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e61109a5cd4f88e633bd68433602fa8e309cbb86e4bf86818b99057c3281ad157c9b5870a16a0cc86800c44ffc37e0875dd9ca8a5b907651ce6da83bf3c9c9a7
|
7
|
+
data.tar.gz: 3089c1e739fd5b5dfa0281d1c046eac58ff8b576aff298271e28755d2529061f0740a089b1de50f755c306d9ed3688d05be1e8264bd5e1c496aebef7f3179209
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2022-
|
4
|
+
# Copyright, 2022-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'sus/fixtures/async/reactor_context'
|
7
7
|
|
8
8
|
require 'async/http/server'
|
9
9
|
require 'async/http/client'
|
10
10
|
require 'async/http/endpoint'
|
11
|
-
require 'async/io/shared_endpoint'
|
12
11
|
|
13
12
|
module Sus::Fixtures
|
14
13
|
module Async
|
@@ -100,7 +99,7 @@ module Sus::Fixtures
|
|
100
99
|
super
|
101
100
|
|
102
101
|
# We bind the endpoint before running the server so that we know incoming connections will be accepted:
|
103
|
-
@bound_endpoint =
|
102
|
+
@bound_endpoint = endpoint.bound
|
104
103
|
|
105
104
|
@server_endpoint = make_server_endpoint(@bound_endpoint)
|
106
105
|
mock(@server_endpoint) do |wrapper|
|
@@ -128,9 +127,12 @@ module Sus::Fixtures
|
|
128
127
|
end
|
129
128
|
|
130
129
|
def after
|
131
|
-
|
132
|
-
|
133
|
-
|
130
|
+
# We add a timeout here, to avoid hanging in `@client.close`:
|
131
|
+
::Async::Task.current.with_timeout(1) do
|
132
|
+
@client&.close
|
133
|
+
@server_task&.stop
|
134
|
+
@bound_endpoint&.close
|
135
|
+
end
|
134
136
|
|
135
137
|
super
|
136
138
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2022-
|
4
|
+
# Copyright, 2022-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
module Sus
|
7
7
|
module Fixtures
|
8
8
|
module Async
|
9
9
|
module HTTP
|
10
|
-
VERSION = "0.
|
10
|
+
VERSION = "0.8.1"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/license.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2022-
|
3
|
+
Copyright, 2022-2024, by Samuel Williams.
|
4
|
+
Copyright, 2023, by Felix Yan.
|
4
5
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Provides a convenient fixture for running a web server.
|
4
4
|
|
5
|
-
[](https://github.com/sus-rb/sus-fixtures-async-http/actions?workflow=Test)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sus-fixtures-async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
+
- Felix Yan
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain:
|
@@ -37,7 +38,7 @@ cert_chain:
|
|
37
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
40
|
-----END CERTIFICATE-----
|
40
|
-
date:
|
41
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
41
42
|
dependencies:
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: async-http
|
@@ -53,20 +54,6 @@ dependencies:
|
|
53
54
|
- - "~>"
|
54
55
|
- !ruby/object:Gem::Version
|
55
56
|
version: '0.54'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: async-io
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - "~>"
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '1.34'
|
63
|
-
type: :runtime
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '1.34'
|
70
57
|
- !ruby/object:Gem::Dependency
|
71
58
|
name: sus
|
72
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,20 +82,6 @@ dependencies:
|
|
95
82
|
- - "~>"
|
96
83
|
- !ruby/object:Gem::Version
|
97
84
|
version: '0.1'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: covered
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - "~>"
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0.20'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0.20'
|
112
85
|
description:
|
113
86
|
email:
|
114
87
|
executables: []
|
@@ -120,11 +93,13 @@ files:
|
|
120
93
|
- lib/sus/fixtures/async/http/version.rb
|
121
94
|
- license.md
|
122
95
|
- readme.md
|
123
|
-
homepage: https://github.com/
|
96
|
+
homepage: https://github.com/sus-rb/sus-fixtures-async-http
|
124
97
|
licenses:
|
125
98
|
- MIT
|
126
99
|
metadata:
|
100
|
+
documentation_uri: https://sus-rb.github.io/sus-fixtures-async-http/
|
127
101
|
funding_uri: https://github.com/sponsors/ioquatix/
|
102
|
+
source_code_uri: https://github.com/sus-rb/sus-fixtures-async-http.git
|
128
103
|
post_install_message:
|
129
104
|
rdoc_options: []
|
130
105
|
require_paths:
|
@@ -133,14 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
108
|
requirements:
|
134
109
|
- - ">="
|
135
110
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
111
|
+
version: '3.1'
|
137
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
113
|
requirements:
|
139
114
|
- - ">="
|
140
115
|
- !ruby/object:Gem::Version
|
141
116
|
version: '0'
|
142
117
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.5.11
|
144
119
|
signing_key:
|
145
120
|
specification_version: 4
|
146
121
|
summary: Test fixtures for running in Async::HTTP.
|
metadata.gz.sig
CHANGED
Binary file
|