misfit 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ = 0.0.4
2
+ * #inspect shows data if present
3
+
1
4
  = 0.0.3
2
5
  * #inspect shows the included misfits
3
6
 
@@ -64,7 +64,10 @@ module Misfit
64
64
  end
65
65
 
66
66
  def inspect
67
- super.sub(/:/," (#{misfits.map(&:name).join(', ')}):")
67
+ representation = super
68
+ representation.sub!(/:/, " (#{misfits.map(&:name).join(', ')}):")
69
+ representation.sub!(/>$/, ", #{data.inspect}>") if data
70
+ representation
68
71
  end
69
72
 
70
73
  # this is here solely because of the way rspec instantiates exception objects in stubs
@@ -1,3 +1,3 @@
1
1
  module Misfit
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -164,6 +164,11 @@ module MisfitSpec
164
164
  let(:error) { FazError.new('message') }
165
165
  it { should == '#<IOError (MisfitSpec::FazError, MisfitSpec::FooError, MisfitSpec::Error): message>' }
166
166
  end
167
+
168
+ context "when error has data `Error.new('message', some: 'data')`" do
169
+ let(:error) { Error.new('message', some: "data") }
170
+ it { should == '#<StandardError (MisfitSpec::Error): message, {:some=>"data"}>' }
171
+ end
167
172
  end
168
173
  end
169
174
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: misfit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70355146669340 !ruby/object:Gem::Requirement
16
+ requirement: &70269637622120 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70355146669340
24
+ version_requirements: *70269637622120
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70355146637840 !ruby/object:Gem::Requirement
27
+ requirement: &70269637621340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70355146637840
35
+ version_requirements: *70269637621340
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70355146636660 !ruby/object:Gem::Requirement
38
+ requirement: &70269637620160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70355146636660
46
+ version_requirements: *70269637620160
47
47
  description: Flexible approach to handling exceptions in ruby (for library writers,
48
48
  or consumers). Ispired by Avdi Grimm's excellent book 'Exceptional Ruby'.
49
49
  email:
@@ -74,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  segments:
76
76
  - 0
77
- hash: 2488164774415568640
77
+ hash: 2702096235783570169
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  none: false
80
80
  requirements:
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  segments:
85
85
  - 0
86
- hash: 2488164774415568640
86
+ hash: 2702096235783570169
87
87
  requirements: []
88
88
  rubyforge_project:
89
89
  rubygems_version: 1.8.15