sus-fixtures-console 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/fixtures/console/captured_logger.rb +11 -3
- data/lib/sus/fixtures/console/null_logger.rb +2 -2
- data/lib/sus/fixtures/console/version.rb +1 -1
- data/readme.md +5 -5
- data.tar.gz.sig +0 -0
- metadata +6 -6
- 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: 6c5226ba5f04c0aaa7a85face6d5d5ddaf0553369a5c90dbea7714b2a12d1aaf
|
4
|
+
data.tar.gz: 1f07009379ae5acd0630c692656b18b555d1d2c2d6924c290268ab95f30e1a50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f595232b9ce0f4b252345a77b574a4fa7b01a9bc76beca7cee0a7b7fc38fdffc3d3b183186fd20b10a4921bca00ef4b8862560cdb25ebd5d1caddcdfb36e0113
|
7
|
+
data.tar.gz: b4a4c3520d42adfa4a62828177b84d9d4fb69a1348d0b95da2121940ecd7ec32daa99b558097a16ee45a42e441b778fdae78bacdde4cb9f02d4b43c0773a1cb0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -12,15 +12,23 @@ module Sus
|
|
12
12
|
module Fixtures
|
13
13
|
module Console
|
14
14
|
CapturedLogger = Sus::Shared("captured logger") do
|
15
|
-
let(:
|
16
|
-
let(:
|
15
|
+
let(:console_capture) {::Console::Capture.new}
|
16
|
+
let(:console_logger) {::Console::Logger.new(console_capture, level: ::Console::Logger::DEBUG)}
|
17
17
|
|
18
18
|
def around
|
19
|
-
::Console.logger =
|
19
|
+
::Console.logger = console_logger
|
20
20
|
super
|
21
21
|
ensure
|
22
22
|
::Console.logger = nil
|
23
23
|
end
|
24
|
+
|
25
|
+
def expect_console
|
26
|
+
expect(console_capture)
|
27
|
+
end
|
28
|
+
|
29
|
+
def have_logged(**fields)
|
30
|
+
have_value(have_keys(**fields))
|
31
|
+
end
|
24
32
|
end
|
25
33
|
end
|
26
34
|
end
|
@@ -12,10 +12,10 @@ module Sus
|
|
12
12
|
module Fixtures
|
13
13
|
module Console
|
14
14
|
NullLogger = Sus::Shared("null logger") do
|
15
|
-
let(:
|
15
|
+
let(:console_logger) {::Console::Logger.new(::Console::Output::Null.new)}
|
16
16
|
|
17
17
|
def around
|
18
|
-
::Console.logger =
|
18
|
+
::Console.logger = console_logger
|
19
19
|
super
|
20
20
|
ensure
|
21
21
|
::Console.logger = nil
|
data/readme.md
CHANGED
@@ -12,9 +12,9 @@ $ bundle add sus-fixtures-console
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
Please see the [project documentation](https://
|
15
|
+
Please see the [project documentation](https://socketry.github.io/sus-fixtures-console/) for more details.
|
16
16
|
|
17
|
-
- [Getting Started](https://
|
17
|
+
- [Getting Started](https://socketry.github.io/sus-fixtures-console/guides/getting-started/index) - This guide explains how to use the `Sus::Fixtures::Console` gem to redirect console logging output during tests.
|
18
18
|
|
19
19
|
## Contributing
|
20
20
|
|
@@ -28,8 +28,8 @@ We welcome contributions to this project.
|
|
28
28
|
|
29
29
|
### Developer Certificate of Origin
|
30
30
|
|
31
|
-
|
31
|
+
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
32
32
|
|
33
|
-
###
|
33
|
+
### Community Guidelines
|
34
34
|
|
35
|
-
This project is
|
35
|
+
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sus-fixtures-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2024-
|
40
|
+
date: 2024-08-25 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: console
|
@@ -79,13 +79,13 @@ files:
|
|
79
79
|
- lib/sus/fixtures/console/version.rb
|
80
80
|
- license.md
|
81
81
|
- readme.md
|
82
|
-
homepage: https://github.com/
|
82
|
+
homepage: https://github.com/socketry/sus-fixtures-console
|
83
83
|
licenses:
|
84
84
|
- MIT
|
85
85
|
metadata:
|
86
|
-
documentation_uri: https://
|
86
|
+
documentation_uri: https://socketry.github.io/sus-fixtures-console/
|
87
87
|
funding_uri: https://github.com/sponsors/ioquatix/
|
88
|
-
source_code_uri: https://github.com/
|
88
|
+
source_code_uri: https://github.com/socketry/sus-fixtures-console.git
|
89
89
|
post_install_message:
|
90
90
|
rdoc_options: []
|
91
91
|
require_paths:
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
rubygems_version: 3.5.
|
104
|
+
rubygems_version: 3.5.11
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Test fixtures for capturing Console output.
|
metadata.gz.sig
CHANGED
Binary file
|