hometown 0.2.0 → 0.2.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: ad8a4766d74b2ef331b68288522bdcd94bb3bd2b
4
- data.tar.gz: 26cd517beece08a45ce5047b0d601812133b645a
3
+ metadata.gz: 6faccd91b19c91bb38e978cae748c863bb1997c0
4
+ data.tar.gz: c7d57e8b40777dbadfa4c6e7171c0a7ff240e74b
5
5
  SHA512:
6
- metadata.gz: 6a6666c297ec7089fc96fee85f0deed49952dfa9b58d0604daf4aeffa3626b6ef11240b609df089794a210c5eb46ede866dd1c9602c3e3e45e297b02cd19b9dc
7
- data.tar.gz: 8253b5cbb7f6a95423274dfad3621e2fdf9659a6d7c4af8df89ffabcfabfeaa8ae590d3cae84e18730c4a535d54517ed5a0350b56289654c3051c9db414342ef
6
+ metadata.gz: 7cde03cef004ca7e1121d7cc6e15cfdb51753fe663f66e63239ab45ac0315866d3b293bf70565f647102faaf608a48394efc163cdb68906bec87cdee56fa654d
7
+ data.tar.gz: df5d5a65aaa19c4efd14f6a9da712ad699c477d223551ffc901247ffa634587a5c752a53980776dd87ebdd89d74138429fb2767202524d21f0c8c061927601ce
@@ -46,10 +46,15 @@ module Hometown
46
46
  HOMETOWN_TRACE_ON_INSTANCE = :@__hometown_creation_backtrace
47
47
 
48
48
  def add_trace_for(instance)
49
- trace = Hometown::Trace.new(instance.class, caller[4..-1])
49
+ trace = Hometown::Trace.new(instance.class, scrubbed_caller)
50
50
  instance.instance_variable_set(HOMETOWN_TRACE_ON_INSTANCE, trace)
51
51
  end
52
52
 
53
+ def scrubbed_caller
54
+ backtrace = caller.dup
55
+ backtrace.reject { |line| %r{/lib/hometown/creation_tracer.rb}.match(line) }
56
+ end
57
+
53
58
  def find_trace_for(instance)
54
59
  instance.instance_variable_get(HOMETOWN_TRACE_ON_INSTANCE)
55
60
  end
@@ -1,3 +1,3 @@
1
1
  module Hometown
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hometown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason R. Clark