sus-fixtures-console 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9aa8518936e96db8c1dab52282efa4accd76a9c61b6056129dc3567b868f7f16
4
+ data.tar.gz: 4d8bf1c4cb832764b6ab426c13e45cea2329bc810243627011d5e1f5b748e4b2
5
+ SHA512:
6
+ metadata.gz: ecfc6a917e00758e0cbfc195eb82a73e47437a6ad72383e0122863b61e46b1adfe86c1bf8159f392766d2aab35ee877af475c4a3e3b4d1f6af2997bb5b860f6a
7
+ data.tar.gz: 57ea2d3fb0be0174fc1d6f2f1b222b695bff2d2b4525867b912a1be2bc33db20ac6708c5f2d03aca9a123caf17b91bf3804cebbb0d83fd2eef4ec3639acc3f22
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ require 'sus/shared'
7
+ require 'console'
8
+ require 'console/capture'
9
+ require 'console/logger'
10
+
11
+ module Sus
12
+ module Fixtures
13
+ module Console
14
+ CapturedLogger = Sus::Shared("captured logger") do
15
+ let(:capture) {::Console::Capture.new}
16
+ let(:logger) {::Console::Logger.new(capture, level: ::Console::Logger::DEBUG)}
17
+
18
+ def around
19
+ Fiber.new do
20
+ ::Console.logger = logger
21
+ super
22
+ end.resume
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ require 'sus/shared'
7
+ require 'console'
8
+ require 'console/capture'
9
+ require 'console/logger'
10
+
11
+ module Sus
12
+ module Fixtures
13
+ module Console
14
+ NullLogger = Sus::Shared("null logger") do
15
+ let(:logger) {::Console::Logger.new(::Console::Output::Null.new)}
16
+
17
+ def around
18
+ Fiber.new do
19
+ ::Console.logger = logger
20
+ super
21
+ end.resume
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ module Sus
7
+ module Fixtures
8
+ module Console
9
+ VERSION = "0.1.0"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ require_relative 'console/version'
7
+ require_relative 'console/captured_logger'
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright, 2024, by Samuel Williams.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,35 @@
1
+ # Sus::Fixtures::Console
2
+
3
+ Provides a convenient fixture for capturing or ignoring [console](https://github.com/socketry/console) logging.
4
+
5
+ [![Development Status](https://github.com/socketry/sus-fixtures-console/workflows/Test/badge.svg)](https://github.com/socketry/sus-fixtures-console/actions?workflow=Test)
6
+
7
+ ## Installation
8
+
9
+ ``` bash
10
+ $ bundle add sus-fixtures-console
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Please see the [project documentation](https://ioquatix.github.io/sus-fixtures-console/) for more details.
16
+
17
+ - [Getting Started](https://ioquatix.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
+
19
+ ## Contributing
20
+
21
+ We welcome contributions to this project.
22
+
23
+ 1. Fork it.
24
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
25
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
26
+ 4. Push to the branch (`git push origin my-new-feature`).
27
+ 5. Create new Pull Request.
28
+
29
+ ### Developer Certificate of Origin
30
+
31
+ This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
32
+
33
+ ### Contributor Covenant
34
+
35
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sus-fixtures-console
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Samuel Williams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
14
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
15
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
16
+ MjRaFw0zMjA4MDMwNDUzMjRaM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+VFok3CDpRqwXCl
32
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
33
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
34
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
35
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
36
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
37
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
+ -----END CERTIFICATE-----
40
+ date: 2024-05-03 00:00:00.000000000 Z
41
+ dependencies:
42
+ - !ruby/object:Gem::Dependency
43
+ name: console
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.25'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.25'
56
+ - !ruby/object:Gem::Dependency
57
+ name: sus
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.10'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.10'
70
+ description:
71
+ email:
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - lib/sus/fixtures/console.rb
77
+ - lib/sus/fixtures/console/captured_logger.rb
78
+ - lib/sus/fixtures/console/null_logger.rb
79
+ - lib/sus/fixtures/console/version.rb
80
+ - license.md
81
+ - readme.md
82
+ homepage: https://github.com/ioquatix/sus-fixtures-console
83
+ licenses:
84
+ - MIT
85
+ metadata:
86
+ documentation_uri: https://ioquatix.github.io/sus-fixtures-console/
87
+ funding_uri: https://github.com/sponsors/ioquatix/
88
+ source_code_uri: https://github.com/ioquatix/sus-fixtures-console.git
89
+ post_install_message:
90
+ rdoc_options: []
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '3.1'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubygems_version: 3.5.3
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: Test fixtures for capturing Console output.
108
+ test_files: []
metadata.gz.sig ADDED
Binary file