simple-ui 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simple/ui.rb +11 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c18ccfabbea93ecbc590439a90bfc0aa09850598
4
- data.tar.gz: 3f2596b7ce3fb1d4f0baa1e12e133727665b0450
3
+ metadata.gz: 2ac6bc3e56fb7c20cddc7906d03f4835ba378323
4
+ data.tar.gz: 4a29f6251cad13b7383395957fef725a17bd9db6
5
5
  SHA512:
6
- metadata.gz: a65a08e6f3fcaec384df3eb8a14e29101047b01211019e927bec603ba197110cc9b4024ed2cae6878c4a4cb1402d6e2d7459c671fc158b34bdfdeeb61c394648
7
- data.tar.gz: 3486021a89eac2b3b2d0b24df83f2ecaa1463fbde371e2e88ed5cca722923b6b330d385f0e1195909a14dc3567e9fbb5c1d8a8434da76e36a59eb0c67d5d6c6c
6
+ metadata.gz: 13fe4bdcd7ee19bd6484a90f30ea7289f3dd9ad389a3da31c81d53829c5028b8c14efb72f07ebb1f7a785d2292a649793648df7aca62f8ae787e82a1aaadf1a3
7
+ data.tar.gz: d0f8c1b6258ce577852254d965949f8a3a29510cab1985cb57e914b08d4f05fc4025bd29dcf6160602fe76a7ee206b19204ab330c3b2343e5a88971358fb89ce
@@ -1,7 +1,7 @@
1
1
  module UI
2
2
  extend self
3
3
 
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
 
6
6
  def self.verbosity
7
7
  @verbosity ||= 1
@@ -77,10 +77,16 @@ module UI
77
77
  end
78
78
 
79
79
  start = Time.now
80
- yield.tap do
81
- msg += ": #{(1000 * (Time.now - start)).to_i} msecs."
82
- UI.log severity, msg, *args
83
- end
80
+ r = yield
81
+
82
+ msg += ": #{(1000 * (Time.now - start)).to_i} msecs."
83
+ UI.log severity, msg, *args
84
+
85
+ r
86
+ rescue StandardError
87
+ msg += "raises #{$!.class.name} after #{(1000 * (Time.now - start)).to_i} msecs."
88
+ UI.log severity, msg, *args
89
+ raise $!
84
90
  end
85
91
 
86
92
  def self.colored=(colored)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Simple code for simple things in the console
14
14
  email: eno@radiospiel.org