did_resolver 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86109d4a0d26208bc869581200d970c63baf2a97fc644d91e0c4f8a0a39d0d0a
4
- data.tar.gz: 1213c3cc1835582a866f44e3aaced58981ce93a04c27510dbfd102c17f42ea6f
3
+ metadata.gz: cc35726a7175752b36fd922d71d8a5155e726eb0fbcab7988423ba4350c081b2
4
+ data.tar.gz: 97e147766d8910e298329bb78997ab8de6d62da6d13ebe5576f76428a0bfb05b
5
5
  SHA512:
6
- metadata.gz: 98ef49e8ee4c985e7f1a3b04837d92fe998475167501d8edc2aa909ed6f253b1fb03d9da2b8b507fcd004624d027c2bfdbaf90f1e42d59383c664bfb6c9246ef
7
- data.tar.gz: 0c37c7a1b05402ef9e8e149f51b9059ac4c35d19cec8850eebda9232a29ae2448684f008e1a57c9899979ba5df9f8a4735ae48e7f9f84b28ae20534bf16935d2
6
+ metadata.gz: 2436b491b7685e3bc8e0eb42e240a6298f85615ac20ae74bdca855943e9ad254ed9da4f1fecfb9ff520a89dcd73b52e814ca35c70ec6ecdac0993b3bd363181e
7
+ data.tar.gz: 470034d44b5eb5a99caf71f34443a369774e5f85234d23022b98f4e0e9d3cfbc7c34bae75c5afedbabfde89128953afc1ed850630bdcac078fa6c053b1ae31d0
data/CHANGELOG.md CHANGED
@@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.1.0] - 2024-12-XX
8
+ ## [0.1.1] - 2026-02-02
9
+
10
+ ### Fixed
11
+
12
+ - Fixed `find_verification_method` to match keys stored with fragment-only IDs (e.g., `#key-1` instead of `did:web:example.com#key-1`)
13
+ - Improved key lookup to handle various DID document formats where verification method IDs may be stored as relative references
14
+
15
+ ## [0.1.0] - 2026-02-02
9
16
 
10
17
  ### Added
11
18
 
@@ -43,8 +43,13 @@ module DidResolver
43
43
  def find_verification_method(id_or_ref)
44
44
  # Normalize reference - could be full ID or just fragment
45
45
  target_id = id_or_ref.start_with?("#") ? "#{@id}#{id_or_ref}" : id_or_ref
46
+ # Also extract just the fragment for comparison
47
+ fragment = id_or_ref.include?("#") ? "##{id_or_ref.split('#').last}" : nil
46
48
 
47
- verification_method.find { |vm| vm[:id] == target_id || vm["id"] == target_id }
49
+ verification_method.find do |vm|
50
+ vm_id = vm[:id] || vm["id"]
51
+ vm_id == target_id || vm_id == id_or_ref || (fragment && vm_id == fragment)
52
+ end
48
53
  end
49
54
 
50
55
  # Get verification methods for a specific purpose
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DidResolver
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: did_resolver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean De Block