subelsky_power_tools 1.3.2 → 1.3.3

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: d02b1f4e2640136f0a9cd083c3f1c779b83b9840
4
- data.tar.gz: fad110b76716bd28f2cd9c286ad06ddb8bd7f79a
3
+ metadata.gz: 7c27fd47fa9847c7cc2bef1defca3ffc73b826c6
4
+ data.tar.gz: a837d3a02e6b69ab1143932afecf0f28c58aceb4
5
5
  SHA512:
6
- metadata.gz: 0b8149aac16838afd811a431aceec4476f66bcc849802d29d2ca79b7b42b53bd5ae98219fce8ba35c73d8b90834fb2b31e060981a8728531c5073643fde4b4fe
7
- data.tar.gz: 9c67b6ef0c94b215badb25d217208ad88e8024a5fb4417594430834fdfd1e06774e207f131ca47e967b978502b60fe1f73616ba7a4bd8bb715c440f6c5049dcd
6
+ metadata.gz: cb465667a864089bb31aaaf3a9e2527c921d0a75c04d0422f0882e6879d1bef3628caddb8f8dfd47b553eec117e7091eb9dcc2a3d6b7999ac0d9ec3b865b37b2
7
+ data.tar.gz: 128a9dfd469a2e13ce48c57ea55ef4bfa57f54ec3494a5804b39f59509a70bc09b3093342b986ee8eb774ead13586ee08b8f7c3f3052043ca2ac1743cfa11848
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.0.0
1
+ 2.0.0-p576
@@ -12,8 +12,13 @@ class Exception
12
12
  #
13
13
  # CREDIT: George Moschovitis
14
14
 
15
+ # @return [String] long description of the error including backtrace
15
16
  def detail
16
17
  return %{#{self.class.name}: #{message}\n#{backtrace.join("\n ")}\n LOGGED FROM: #{caller[0]}}
17
18
  end
18
19
 
20
+ # @return [String] exception class and message, useful for logging
21
+ def summary
22
+ "#{self.class.name}: #{message}"
23
+ end
19
24
  end
@@ -1,3 +1,3 @@
1
1
  module SubelskyPowerTools
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.3"
3
3
  end
@@ -2,11 +2,19 @@ require "spec_helper"
2
2
  require "subelsky_power_tools/ext/exception"
3
3
 
4
4
  describe Exception do
5
+ let(:exception) do
6
+ StandardError.new("something bad happened")
7
+ end
8
+
5
9
  it "reports details" do
6
10
  begin
7
- raise StandardError.new("something bad happened")
11
+ raise exception
8
12
  rescue StandardError => e
9
13
  expect(e.detail).to match(/StandardError: something bad happened\n/)
10
14
  end
11
15
  end
16
+
17
+ it "reports a summary" do
18
+ expect(exception.summary).to eq("StandardError: something bad happened")
19
+ end
12
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subelsky_power_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Subelsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.2.2
83
+ rubygems_version: 2.4.2
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: This is a collection of Ruby extensions and utilities I've been carting around