fortschritt 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0148b750db1d646ff0a91fc491453e6ead105e27'
4
- data.tar.gz: 6274fb3fdce34e26b08fa5a158577f78a5648d1e
3
+ metadata.gz: 74932b8ccbd6ec7f920e178b7c7fa1a7ca599ea5
4
+ data.tar.gz: 641162f83d4244c035ef46327ce3e8a5af76fd0d
5
5
  SHA512:
6
- metadata.gz: 16b8407659a26de6ae5b57e672495f7e7b46d10dcd72f91c03d2e1a40f5b32fc4752250ec879e33bc8bdaef30e5c4071488961e4f6b3aa0afa505f4a7ff25724
7
- data.tar.gz: 7b969b16cf66a7487024f90b6c81b732f132fb781b0e97fe5f2818483e5262041b08353770c543cd9d3e819cbcf4f4f306af04dd33b72b068cf240a7582f5036
6
+ metadata.gz: a88d5d348cce61cd8c7d8f3a37bfc73ee695dcad70b305a1b6034921f96e38536cf94f88911194fda6e8118b068e971d2da1008be18a2cbbbb45b299dbf9bf48
7
+ data.tar.gz: b1a9468af741af3d734457ea62f7bfcfe723e27a6466e3cc4db9c496cf5815fb52090ad1d520177fb522aa5b9feae8a3700fab5754308c4cd69903ca0cf52f7c
@@ -17,7 +17,11 @@ if defined?(Rails)
17
17
 
18
18
  extend ActiveSupport::Concern
19
19
 
20
+ # Silence fortschritt in tests and in non-terminal context
20
21
  def with_fortschritt(opts = {})
22
+ unless opts.has_key?(:silent)
23
+ opts[:silent] = Rails.env.test? || !STDOUT.tty?
24
+ end
21
25
  Fortschritt.init(size, opts)
22
26
  self
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Fortschritt
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fortschritt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Opper