fixme 4.1.0 → 5.0.0

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: 542218a87018613a2dc76f20bcdd28b66f40ea6a
4
- data.tar.gz: ed4c8ed714fa465784188e8378aaad038ef06c41
3
+ metadata.gz: 92e0825cac58243fb2c3ce48aa71479b2c11a789
4
+ data.tar.gz: 129bba3a82f2e7a34cc7b2314698595d3376367f
5
5
  SHA512:
6
- metadata.gz: deb1c1a6d45e97291628ed1ad53b3ad590a0f7bbc4c39cba97a62dc7e4c4d65806bbfa509f262a1c9045f42b5a0bce0257852b37fe704d17c73e6b592d22280e
7
- data.tar.gz: 52c1ed22af9e8a1b5b7b1c0ea8b62ba090a6b72f7fffac5f6d8d99fd511abb3bddef0b667b5c742968aca0415c9d6f8e5d666db6e4929d23ffbb3d486ad42801
6
+ metadata.gz: 8f1a393618b27bb77ce171afa39de54e0d3096d9f4c73a54177291de1190b6b59428488e5b0f6b0e92523900eeadb8be58aa338e3bab95b3144718f08d3059ac
7
+ data.tar.gz: 97ad061f1c4edd245e5d4e299e59d24b3441b14e51b342763b2b2381075cc1a34ca0135fd0d80c1c9bf99b95f1565aa310160a1a337be134d6f5762e8363ae81
@@ -2,7 +2,8 @@ require "fixme/version"
2
2
  require "date"
3
3
 
4
4
  module Fixme
5
- UnfixedError = Class.new(StandardError)
5
+ # We intentionally do NOT inherit from StandardError, because we don't want these errors caught by a blanket "rescue".
6
+ UnfixedError = Class.new(Exception)
6
7
 
7
8
  Details = Struct.new(:full_message, :backtrace, :date, :message) do
8
9
  def due_days_ago
@@ -1,3 +1,3 @@
1
1
  module Fixme
2
- VERSION = "4.1.0"
2
+ VERSION = "5.0.0"
3
3
  end
@@ -29,7 +29,7 @@ describe Fixme, "#FIXME" do
29
29
  it "truncates the backtrace to exclude the library itself" do
30
30
  begin
31
31
  FIXME "2013-12-31: Remove this stuff."
32
- rescue => e
32
+ rescue Fixme::UnfixedError => e
33
33
  expect(e.backtrace.first).to include("fixme_spec.rb:")
34
34
  end
35
35
  end
@@ -55,6 +55,15 @@ describe Fixme, "#FIXME" do
55
55
  }.to raise_error(Fixme::UnfixedError)
56
56
  end
57
57
 
58
+ it "is not caught by a blanket 'rescue'" do
59
+ expect {
60
+ begin
61
+ FIXME "2000-01-01: Don't be caught."
62
+ rescue
63
+ end
64
+ }.to raise_error(Fixme::UnfixedError)
65
+ end
66
+
58
67
  it "is not fooled by the Timecop gem" do
59
68
  future_date = Date.today + 2
60
69
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixme
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-30 00:00:00.000000000 Z
11
+ date: 2015-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler