sus-fixtures-console 0.2.0 → 0.3.0
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 +6 -6
- 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: 69305106d7c6e8321664a3ea8f8a30c95699e4ab01a6d620a59300ba5c990980
|
4
|
+
data.tar.gz: d4951bd83195be5cc001d2f1580a6d9b356a782d38ef50bc29ea51cee4f4dad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ee6e5089fcfd9c9b287a281384a068a986b055933dded04b24e65577f293b2d6aee8e582f1493d97e6f6544b1249597c091a1830c3cef1293b5ae34bc5f7492
|
7
|
+
data.tar.gz: c47d11911df531b80c918364f8cf7fb23512c9af36ea655fddc5aecc3f20c76448e263c1943c0cffe01c74ebbe095bdec84e27a12b6538198d199a4ec7701907
|
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
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Provides a convenient fixture for capturing or ignoring [console](https://github.com/socketry/console) logging.
|
4
4
|
|
5
|
-
[![Development Status](https://github.com/
|
5
|
+
[![Development Status](https://github.com/sus-rb/sus-fixtures-console/workflows/Test/badge.svg)](https://github.com/sus-rb/sus-fixtures-console/actions?workflow=Test)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -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://sus-rb.github.io/sus-fixtures-console/) for more details.
|
16
16
|
|
17
|
-
- [Getting Started](https://
|
17
|
+
- [Getting Started](https://sus-rb.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.0
|
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-07-17 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/sus-rb/sus-fixtures-console
|
83
83
|
licenses:
|
84
84
|
- MIT
|
85
85
|
metadata:
|
86
|
-
documentation_uri: https://
|
86
|
+
documentation_uri: https://sus-rb.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/sus-rb/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
|