insouciant 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44be29413cb2a1c1843296ff6c187912c7543db9
4
- data.tar.gz: 246a4b9a0203752dc522f872002d46a40ed07c27
3
+ metadata.gz: 225842d7d9bd44f4745ca2aedf6316055d402a67
4
+ data.tar.gz: a90c7b6c989debf8981125433dba108f23b7c14c
5
5
  SHA512:
6
- metadata.gz: bf0ddda1495377c89d5b72ace1ae65fc0808a9d4e9c269f8909d5c93e053dc7282967e3f8c22cd73d294af67eb83411ffeb34cfc0ea334602f99f4c7ad961d39
7
- data.tar.gz: d02db638d0f2562196a76fad8347759c2e722127e7112409aa451eb52e9cf65e90935a9e853af06477179862f62bf5694a77016d98574509ced9fdee81a4a2ba
6
+ metadata.gz: d334d1731c841c70ba17b5f32a9630bdc0ab5f7dd4330dbeeb2c66246636644f82cbcef8bfa4652edf59c91385bad2f45e01b478f5425c2a2a915646d1b0c766
7
+ data.tar.gz: 4711af644842610fa4dd953356a95660a0fcce05123c4585fbae0c01f81d949ec5f1baf05645709cf2d819f17a4f3e63a0423026948bbd8df8a60333a8ad3d82
@@ -1,5 +1,5 @@
1
1
  module Insouciant
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
 
4
4
  DESCRIPTION = "insouciant: Run code with no worries.".freeze
5
5
  end
data/lib/insouciant.rb CHANGED
@@ -6,9 +6,13 @@ private
6
6
 
7
7
  # Run some code with (almost) no worries.
8
8
  def insouciant(error_value = :insouciant_default)
9
+ old_verbose = $VERBOSE
10
+ $VERBOSE = nil
9
11
  yield
10
12
  rescue => err
11
13
  (error_value == :insouciant_default) ? err.to_s : error_value
14
+ ensure
15
+ $VERBOSE = old_verbose
12
16
  end
13
17
 
14
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insouciant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PeterCamilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-02 00:00:00.000000000 Z
11
+ date: 2019-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler