<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://bridgetownrb.com/" version="2.2.2">Bridgetown</generator><link href="https://peterboling.com/feed/silent_stream.xml" rel="self" type="application/atom+xml" /><link href="https://peterboling.com/" rel="alternate" type="text/html" /><updated>2026-11-15T23:03:36+00:00</updated><id>https://peterboling.com/feed/silent_stream.xml</id><title type="html">Peter Boling | Silent_stream</title><subtitle>Yet Another Paradigm by Peter Boling, featuring technical blog posts about Ruby, JavaScript, TypeScript, Go, Python, DevOps, and various open source projects. Ramblings, mumblings, cv/resume, technical blog, and documentation for many popular, and unpopular, RubyGems and other FLOSS projects, including oauth2, omniauth-identity, sanitize_email, debug_logging, flag_shih_tzu, gem_bench, etc. Semi-lifely state-of-the-petris updates.</subtitle><author><name>Peter Boling</name><email>floss@galtzo.com</email></author><entry><title type="html">silent_stream v1.0.11 released!</title><link href="https://peterboling.com/silent_stream/silent_stream-v1.0.11-released!/" rel="alternate" type="text/html" title="silent_stream v1.0.11 released!" /><published>2025-06-01T01:04:41+00:00</published><updated>2025-06-01T01:04:41+00:00</updated><id>https://peterboling.com/silent_stream/silent_stream-v1.0.11-released!/</id><content type="html" xml:base="https://peterboling.com/silent_stream/silent_stream-v1.0.11-released!/">&lt;h2 id=&quot;whats-changed&quot;&gt;What’s Changed&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Feat/old logger by @pboling in https://github.com/pboling/silent_stream/pull/8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Full Changelog&lt;/strong&gt;: https://github.com/pboling/silent_stream/compare/v1.0.10…v1.0.11&lt;/p&gt;</content><category term="release" /><category term="silent_stream" /><category term="v1.0.11" /></entry><entry><title type="html">Introducing silent_stream</title><link href="https://peterboling.com/silent_stream/introducing-silent_stream/" rel="alternate" type="text/html" title="Introducing silent_stream" /><published>2018-09-23T19:30:16+00:00</published><updated>2018-09-23T19:30:16+00:00</updated><id>https://peterboling.com/silent_stream/introducing-silent_stream/</id><content type="html" xml:base="https://peterboling.com/silent_stream/introducing-silent_stream/">&lt;h2 id=&quot;activesupports-stream-silencing---without-activesupport&quot;&gt;ActiveSupport’s Stream Silencing - Without ActiveSupport&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/pboling/silent_stream&quot;&gt;&lt;img src=&quot;https://img.shields.io/gem/rt/silent_stream.svg&quot; alt=&quot;Total Downloads&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://github.com/pboling/silent_stream&quot;&gt;&lt;img src=&quot;https://img.shields.io/gem/rd/silent_stream.svg&quot; alt=&quot;Downloads Today&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://github.com/pboling/silent_stream/network&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/forks/pboling/silent_stream.svg?style=social&quot; alt=&quot;Network&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://github.com/pboling/silent_stream/stargazers&quot;&gt;&lt;img src=&quot;https://img.shields.io/github/stars/pboling/silent_stream.svg?style=social&quot; alt=&quot;Stars&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://rubygems.org/gems/silent_stream&quot;&gt;&lt;img src=&quot;https://img.shields.io/gem/v/silent_stream.svg&quot; alt=&quot;Version&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://travis-ci.org/pboling/silent_stream&quot;&gt;&lt;img src=&quot;https://img.shields.io/travis/pboling/silent_stream.svg&quot; alt=&quot;Build&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://codeclimate.com/github/pboling/silent_stream/maintainability&quot;&gt;&lt;img src=&quot;https://api.codeclimate.com/v1/badges/ced7e39984dd9c27c528/maintainability&quot; alt=&quot;Maintainability&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://codeclimate.com/github/pboling/silent_stream/test_coverage&quot;&gt;&lt;img src=&quot;https://api.codeclimate.com/v1/badges/ced7e39984dd9c27c528/test_coverage&quot; alt=&quot;Test Coverage&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://depfu.com/github/pboling/silent_stream?project_id=5828&quot;&gt;&lt;img src=&quot;https://badges.depfu.com/badges/6633827ecc1ad3b5dd749b4ac822347b/count.svg&quot; alt=&quot;Depfu&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://www.codetriage.com/pboling/silent_stream&quot;&gt;&lt;img src=&quot;https://www.codetriage.com/pboling/silent_stream/badges/users.svg&quot; alt=&quot;Open Source Helpers&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://gitter.im/pboling/silent_stream&quot;&gt;&lt;img src=&quot;https://img.shields.io/gitter/room/pboling/silent_stream.svg&quot; alt=&quot;Chat&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;https://opensource.org/licenses/MIT&quot;&gt;&lt;img src=&quot;https://img.shields.io/badge/License-MIT-green.svg&quot; alt=&quot;License: MIT&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SilentStream is an extraction of some parts of ActiveSupport’s Kernel Reporting Core Extentions.&lt;/p&gt;

&lt;p&gt;Since July 2014 &lt;code class=&quot;highlighter-rouge&quot;&gt;silence_stream&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;silence_stderr&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;capture&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;silence&lt;/code&gt;, and &lt;code class=&quot;highlighter-rouge&quot;&gt;quietly&lt;/code&gt; have been deprecated because they are not thread safe.  See that discussion in the &lt;a href=&quot;https://github.com/rails/rails/pull/13392&quot;&gt;PR where it all went down&lt;/a&gt;. I rely on them a lot in &lt;em&gt;single threaded&lt;/em&gt; code, and so I plan to keep them alive.  With the exception of &lt;code class=&quot;highlighter-rouge&quot;&gt;silence&lt;/code&gt;, which was just an alias of &lt;code class=&quot;highlighter-rouge&quot;&gt;capture&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This gem was taken out of Rails but it is &lt;em&gt;not&lt;/em&gt; Rails dependent.  The extraction was total (&lt;strong&gt;even the tests&lt;/strong&gt;!), and this is now a pure Ruby library, which can be used in any Ruby project without encumbrances.&lt;/p&gt;

&lt;h2 id=&quot;note&quot;&gt;NOTE&lt;/h2&gt;

&lt;p&gt;One aspect of what this gem provides can be achieved with the Rails’ built-in &lt;a href=&quot;https://github.com/rails/rails/blob/5-2-stable/activesupport/lib/active_support/logger_silence.rb&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;LoggerSilence&lt;/code&gt;&lt;/a&gt;, which is thread safe.  You will have to decide what is right for you!&lt;/p&gt;

&lt;h2 id=&quot;doing-a-rails--4-to-rails--5-upgrade&quot;&gt;Doing a Rails &amp;lt;= 4 to Rails &amp;gt;= 5 Upgrade?&lt;/h2&gt;

&lt;p&gt;The reason for not keeping &lt;code class=&quot;highlighter-rouge&quot;&gt;silence&lt;/code&gt; as it was in Rails 4, i.e. an alias of &lt;code class=&quot;highlighter-rouge&quot;&gt;capture&lt;/code&gt;, is that the just mentioned &lt;code class=&quot;highlighter-rouge&quot;&gt;LoggerSilence&lt;/code&gt; now uses this term, and it is shipping with Rails 5. I don’t want to make this gem incompatible with Rails 5, so you will have to convert Rails &amp;lt;= 4 implementations that utilize &lt;code class=&quot;highlighter-rouge&quot;&gt;silence&lt;/code&gt; over to &lt;code class=&quot;highlighter-rouge&quot;&gt;capture&lt;/code&gt; when using this gem.  One further point of difference is this gem does not add the methods to &lt;code class=&quot;highlighter-rouge&quot;&gt;Kernel&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;Object&lt;/code&gt;.  You can do that if you like via &lt;code class=&quot;highlighter-rouge&quot;&gt;include&lt;/code&gt;.  By default this gem does not pollute anything, so you will need to &lt;code class=&quot;highlighter-rouge&quot;&gt;include SilentStream&lt;/code&gt; in any class using these methods.&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Add this line to your application’s Gemfile:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;silent_stream&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And then execute:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or install it yourself as:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem install silent_stream
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;p&gt;Usage:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Bogosity&lt;/span&gt;
  &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;SilentStream&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# allows use at instance or class level&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;silent&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;silence_all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;play that funky music&quot;&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;Rails&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;info&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;git jiggy with it&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;noise&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;silence_all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;play that funky music&quot;&lt;/span&gt;
        &lt;span class=&quot;no&quot;&gt;Rails&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;info&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;git jiggy with it&quot;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And run&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;gt;&amp;gt; Bogosity.new.silent # has no output
=&amp;gt; nil
&amp;gt;&amp;gt; Bogosity.noise # is noisy
play that funky music
=&amp;gt; nil
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;use-in-specs--tests&quot;&gt;Use in Specs / Tests&lt;/h2&gt;

&lt;p&gt;Make the methods avaialble:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;RSpec.configure do |conf|
  conf.include SilentStream
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then add a test on output:&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;it &apos;has output&apos; do
  output = capture(:stdout) { subject.request(:get, &apos;/success&apos;) }
  logs = [
      &apos;INFO -- request: GET https://api.example.com/success&apos;,
      &apos;INFO -- response: Status 200&apos;
  ]
  expect(output).to include(*logs)
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;See it in practice in the &lt;a href=&quot;https://github.com/oauth-xx/oauth2/blob/master/spec/oauth2/client_spec.rb#L193&quot;&gt;specs for the oauth2 gem&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;development&quot;&gt;Development&lt;/h2&gt;

&lt;p&gt;After checking out the repo, run &lt;code class=&quot;highlighter-rouge&quot;&gt;bin/setup&lt;/code&gt; to install dependencies. Then, run &lt;code class=&quot;highlighter-rouge&quot;&gt;rake spec&lt;/code&gt; to run the tests. You can also run &lt;code class=&quot;highlighter-rouge&quot;&gt;bin/console&lt;/code&gt; for an interactive prompt that will allow you to experiment.&lt;/p&gt;

&lt;p&gt;To install this gem onto your local machine, run &lt;code class=&quot;highlighter-rouge&quot;&gt;bundle exec rake install&lt;/code&gt;. To release a new version, update the version number in &lt;code class=&quot;highlighter-rouge&quot;&gt;version.rb&lt;/code&gt;, and then run &lt;code class=&quot;highlighter-rouge&quot;&gt;bundle exec rake release&lt;/code&gt;, which will create a git tag for the version, push git commits and tags, and push the &lt;code class=&quot;highlighter-rouge&quot;&gt;.gem&lt;/code&gt; file to &lt;a href=&quot;https://rubygems.org&quot;&gt;rubygems.org&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;contributing&quot;&gt;Contributing&lt;/h2&gt;

&lt;p&gt;Bug reports and pull requests are welcome on GitHub at https://github.com/pboling/silent_stream.&lt;/p&gt;

&lt;h2 id=&quot;code-of-conduct&quot;&gt;Code of Conduct&lt;/h2&gt;

&lt;p&gt;Everyone interacting in the AnonymousActiveRecord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the &lt;a href=&quot;https://github.com/pboling/silent_stream/blob/master/CODE_OF_CONDUCT.md&quot;&gt;code of conduct&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;versioning&quot;&gt;Versioning&lt;/h2&gt;

&lt;p&gt;This library aims to adhere to [Semantic Versioning 2.0.0][semver].
Violations of this scheme should be reported as bugs. Specifically,
if a minor or patch version is released that breaks backward
compatibility, a new version should be immediately released that
restores compatibility. Breaking changes to the public API will
only be introduced with new major versions.&lt;/p&gt;

&lt;p&gt;As a result of this policy, you can (and should) specify a
dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;add_dependency&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;silent_stream&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;~&amp;gt; 1.0&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;license&quot;&gt;License&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Copyright (c) 2018 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]&lt;/li&gt;
&lt;/ul&gt;</content><category term="development" /><category term="ruby" /><category term="rails" /><category term="rubygems" /><category term="silent_stream" /><category term="logging" /></entry><entry><title type="html">Introducing silent_stream</title><link href="https://peterboling.com/silent_stream/introducing-silent_stream/" rel="alternate" type="text/html" title="Introducing silent_stream" /><published>2018-09-23T00:00:00+00:00</published><updated>2018-09-23T00:00:00+00:00</updated><id>https://peterboling.com/silent_stream/introducing-silent_stream/</id><content type="html" xml:base="https://peterboling.com/silent_stream/introducing-silent_stream/">&lt;p&gt;&lt;a href=&quot;https://discord.gg/3qme4XHNKN&quot;&gt;&lt;img src=&quot;https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg&quot; alt=&quot;Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://www.ruby-lang.org/&quot;&gt;&lt;img src=&quot;https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg&quot; alt=&quot;ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;https://github.com/galtzo-floss/silent_stream&quot;&gt;&lt;img src=&quot;https://logos.galtzo.com/assets/images/galtzo-floss/silent_stream/avatar-192px.svg&quot; alt=&quot;silent_stream Logo by Aboling0, CC BY-SA 4.0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h3&gt;

&lt;p&gt;For more information and detailed examples, please visit the &lt;a href=&quot;https://github.com/galtzo-floss/silent_stream&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;supporting-this-project&quot;&gt;Supporting this Project&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://opencollective.com/galtzo-floss&quot;&gt;OpenCollective&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://gitlab.com/galtzo-floss/silent_stream&quot;&gt;GitLab&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://codeberg.org/galtzo-floss/silent_stream&quot;&gt;Codeberg&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://git.sr.ht/~galtzo/silent_stream&quot;&gt;SourceHut&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="introduction" /><category term="silent_stream" /></entry></feed>