foobara 0.0.105 → 0.0.106
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/CHANGELOG.md +4 -0
- data/projects/command/src/transformed_command.rb +11 -10
- 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: 980071302c992808e812a703ff9a203fca501336c00225dd8eeb045982975704
|
4
|
+
data.tar.gz: '04901d96e1717a09d736feccd2c21d31873ae32235362b0613476f508423373f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee4fbf405088f382583642aed0c40c55010249e346f6881608463ec37d8bd8fe378fe030adedc3c2c1534a89980ee475affa872e260e7e95dbad611411d84f8
|
7
|
+
data.tar.gz: 741ed3a774a1d92dacef4a640706b41764f10144d39b130eeaf032648a60d95b3d450830facd8334b346a1a2e07179b750899063e69ac3bb1e6862884a0bff64
|
data/CHANGELOG.md
CHANGED
@@ -566,17 +566,18 @@ module Foobara
|
|
566
566
|
end
|
567
567
|
|
568
568
|
if explanation.nil?
|
569
|
-
source =
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
569
|
+
source = if allowed_rule.block.respond_to?("source") && defined?(MethodSource)
|
570
|
+
begin
|
571
|
+
# This only works when pry is loaded
|
572
|
+
allowed_rule.block.source
|
573
|
+
rescue MethodSource::SourceNotFoundError
|
574
|
+
# This path is hit if the way the source code is extracted
|
575
|
+
# doesn't result in valid Ruby, for example, as part of a hash such as:
|
576
|
+
# allowed_rule: -> () { whatever?(something) },
|
577
|
+
end
|
578
|
+
end
|
579
579
|
|
580
|
+
source ||= allowed_rule.block.source_location.join(":")
|
580
581
|
explanation = source || "No explanation."
|
581
582
|
end
|
582
583
|
|