kennel 2.22.1 → 2.22.2
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 +4 -4
- data/lib/kennel/models/project.rb +8 -1
- data/lib/kennel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 371dd82c75198714d213f7aae056198d110a862559e7c7f880aa3d94049590fa
|
|
4
|
+
data.tar.gz: b68693df3582c1c0344454af713c155210b9a477c311edff0278fd68134fc8f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56020b989084f93c418ac3afc2a03fafea9eb2e0b9d9d760c7b06a152556d67f884d523b38c9178b8777edc5c09faff5d465dffd846e2b56cbb5652b106fd53d
|
|
7
|
+
data.tar.gz: a10a1fb9a3b35bccde14f09a154b42f65f360d8887a0886df1fe73846d026df3a58f877ca247e7e7f572769cce0d0334a4a6f2e41edca26a98fdb0a11eb1d563
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
module Kennel
|
|
3
3
|
module Models
|
|
4
4
|
class Project < Base
|
|
5
|
+
class FileLocationNotFound < StandardError
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
GEM_LIB = File.expand_path("..", __dir__)
|
|
9
|
+
|
|
5
10
|
settings :team, :parts, :tags, :mention, :name, :kennel_id
|
|
6
11
|
defaults(
|
|
7
12
|
tags: -> { team.tags },
|
|
@@ -14,10 +19,12 @@ module Kennel
|
|
|
14
19
|
if methods.any?
|
|
15
20
|
@file_location = methods.detect do |method|
|
|
16
21
|
location = instance_method(method).source_location.first
|
|
22
|
+
# methods created by `settings` point inside this gem, which is not the project file
|
|
23
|
+
next if location.start_with?("#{GEM_LIB}/")
|
|
17
24
|
if (path = find_relative_path(location))
|
|
18
25
|
break path
|
|
19
26
|
end
|
|
20
|
-
end || raise("Unable to find file_location for #{name}")
|
|
27
|
+
end || raise(FileLocationNotFound, "Unable to find file_location for #{name}")
|
|
21
28
|
else
|
|
22
29
|
@file_location = nil # not sure if this is actually needed
|
|
23
30
|
end
|
data/lib/kennel/version.rb
CHANGED