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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29e6c973eca68278e4a99c59bd3f1c341ce12624ce1bba7b7be46a6c46dd47b6
4
- data.tar.gz: 3be96f388a8c5b77c593e40e819bcdc41a20cf0194b68546b23e77a07c17d4a7
3
+ metadata.gz: 980071302c992808e812a703ff9a203fca501336c00225dd8eeb045982975704
4
+ data.tar.gz: '04901d96e1717a09d736feccd2c21d31873ae32235362b0613476f508423373f'
5
5
  SHA512:
6
- metadata.gz: 2b3fb63bb507843d164d8ca8a3b703b94ecbac92c64e264da052b75c390807e424feeb156c234f2e9fa7fe9ca3f702a2817490c83b1a625e49a5b89cb0cd9f90
7
- data.tar.gz: 0efa35823a6a84ca6afb9726600fa2fdf708c922dbd87149811c0cfa38dd7f909f6c6832ab9c865fbd18a81fd05def6891b417033681fb037efcab5919b063f9
6
+ metadata.gz: cee4fbf405088f382583642aed0c40c55010249e346f6881608463ec37d8bd8fe378fe030adedc3c2c1534a89980ee475affa872e260e7e95dbad611411d84f8
7
+ data.tar.gz: 741ed3a774a1d92dacef4a640706b41764f10144d39b130eeaf032648a60d95b3d450830facd8334b346a1a2e07179b750899063e69ac3bb1e6862884a0bff64
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.0.106] - 2025-04-20
2
+
3
+ - Fix authenticator explanation that was coupled to pry
4
+
1
5
  # [0.0.105] - 2025-04-20
2
6
 
3
7
  - Support registering allowed_rule and authenticator on connectors and using them by symbol
@@ -566,17 +566,18 @@ module Foobara
566
566
  end
567
567
 
568
568
  if explanation.nil?
569
- source = begin
570
- allowed_rule.block.source
571
- rescue MethodSource::SourceNotFoundError
572
- # This path is hit if the way the source code is extracted
573
- # doesn't result in valid Ruby, for example, as part of a hash such as:
574
- # allowed_rule: -> () { whatever?(something) },
575
- # :nocov:
576
- allowed_rule.block.source_location.join(":")
577
- # :nocov:
578
- end
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.105
4
+ version: 0.0.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi