kennel 1.96.0 → 1.96.1
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/version.rb +1 -1
- data/lib/kennel.rb +20 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aca7576bcde423ec1f4e559d88f13ee64ed5efb116a212f49e67ac6b792ddb16
|
4
|
+
data.tar.gz: a6b60f7d6a73ca82d2478f565435e0ebb95a79f7d3bd5bcebfd6712a3e9c8cfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1767ebe1e61ea9a314b99f14a2cd15a31dc09419dafa2a9100244c83acfc40cd9eba0ccf1e9ad6c4cf9c3026cd1493e6b62cdc6a867b18720ed517908e702768
|
7
|
+
data.tar.gz: 382486fbfb3c52346262ad43c63ed21164676189a880d405914de54539907a0a193960f173daa9aa16f41d847959b140a9c60cee886f85d63473d599bd00b807
|
data/lib/kennel/version.rb
CHANGED
data/lib/kennel.rb
CHANGED
@@ -138,10 +138,29 @@ module Kennel
|
|
138
138
|
Dir.exist?("parts") && loader.push_dir("parts")
|
139
139
|
loader.setup
|
140
140
|
|
141
|
-
# TODO: also do projects
|
141
|
+
# TODO: also do projects and update expected path too
|
142
142
|
["projects"].each do |folder|
|
143
143
|
Dir["#{folder}/**/*.rb"].sort.each { |f| require "./#{f}" }
|
144
144
|
end
|
145
|
+
rescue NameError => e
|
146
|
+
message = e.message
|
147
|
+
raise unless klass = message[/uninitialized constant (.*)/, 1]
|
148
|
+
|
149
|
+
# inverse of zeitwerk lib/zeitwerk/inflector.rb
|
150
|
+
path = klass.gsub("::", "/").gsub(/([a-z])([A-Z])/, "\\1_\\2").downcase + ".rb"
|
151
|
+
expected_path = (path.start_with?("teams/") ? path : "parts/#{path}")
|
152
|
+
|
153
|
+
# TODO: prefer to raise a new exception with the old backtrace attacked
|
154
|
+
e.define_singleton_method(:message) do
|
155
|
+
"\n" + <<~MSG.gsub(/^/, " ")
|
156
|
+
#{message}
|
157
|
+
Unable to load #{klass} from #{expected_path}
|
158
|
+
- Option 1: rename the constant or the file it lives in, to make them match
|
159
|
+
- Option 2: Use `require` or `require_relative` to load the constant
|
160
|
+
MSG
|
161
|
+
end
|
162
|
+
|
163
|
+
raise
|
145
164
|
end
|
146
165
|
end
|
147
166
|
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: 1.96.
|
4
|
+
version: 1.96.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|