kennel 2.8.2 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec30baa34fa9cd6ea5ada65125548347ec92fa0b97a3c1e58ea4bb590850bf48
4
- data.tar.gz: 650ffef2c083b084a71e7c04083a2405be8d03da974e4c45374a56cfd5c3ac0b
3
+ metadata.gz: d9635f7b742f83290e0feaa0f3eb1a55ba4ad78ca7d95c38aaba6e0adfebc1f4
4
+ data.tar.gz: 984fd58f8cabb3303e5f9084eb90405d6cf39c23b9c42b304d1aa6a07afca24b
5
5
  SHA512:
6
- metadata.gz: 0053b7f8135a408f04db94cb055640c5dc5a928381e70736f41a5d79581fadd3071a1cdc1e7d3f8f6c867c972b18843204474d103b81377b5ed6b15183999aaa
7
- data.tar.gz: e32878d2a099fb1067f5af7f06c7f09bf69b41f82b1f407ceb5edce8d3ab5a3c50da97d7ce8df1b86ae1b225cef7c9d23fb038bf1c09c9fd698d254b93bff480
6
+ metadata.gz: ef77dd9a72a9577b0bf8eb78b300c41e098543422d7313a800693fbdc3e5a9ba5db82687cd0551eb362bb9cd8990e9cb943987ea442a3b99cdd52d02b30de3eb
7
+ data.tar.gz: 4d4e036cc03aec4619c6e407255189f263d9cd167406cd1bf7f0c131047417a65a777c8c449701622fed38e908d8c3f6aab7f9cd6f7514668371fc33bf0eabb4
@@ -11,7 +11,7 @@ module Kennel
11
11
  def self.file_location
12
12
  return @file_location if defined?(@file_location)
13
13
  if (location = instance_methods(false).first)
14
- @file_location = instance_method(location).source_location.first.sub("#{Bundler.root}/", "")
14
+ @file_location = force_relative_path(instance_method(location).source_location.first)
15
15
  else
16
16
  @file_location = nil
17
17
  end
@@ -29,6 +29,13 @@ module Kennel
29
29
 
30
30
  private
31
31
 
32
+ private_class_method def self.force_relative_path(path)
33
+ return path unless File.absolute_path?(path)
34
+ path.dup.sub!("#{Bundler.root}/", "") ||
35
+ path.dup.sub!("#{Dir.pwd}/", "") ||
36
+ raise("Unable to make path #{path} relative with bundler root #{Bundler.root} or pwd #{Dir.pwd}")
37
+ end
38
+
32
39
  # hook for users to add custom filtering via `prepend`
33
40
  def filter_parts(parts)
34
41
  parts
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "2.8.2"
3
+ VERSION = "2.9.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-19 00:00:00.000000000 Z
11
+ date: 2025-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs