canvas_link_migrator 1.0.17 → 1.0.18

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: '08e4bb1b132305d9655e4f426f2685e6c524dff6f2e316ee4c32c4898e330e98'
4
- data.tar.gz: b000b72459dd32746f8aa31d662df81e180aaff36fd461a88cd6c4d17bfed661
3
+ metadata.gz: 949c23c7d951df591af05de644bc829ceada5889aed295bb8e8dee5b897054ee
4
+ data.tar.gz: 8418a95af9eca811bf3e3848987bbd83bef233ca7aadaf33455f277cecb759b0
5
5
  SHA512:
6
- metadata.gz: e731f7af1980e3a1b731b138ba551b921776834f4fe237a005ecf737ddd270ad286d508482c3dd3050b0414c758f2b707d2084fa97c1714a697660e2f1e5dbff
7
- data.tar.gz: 9a2100127f1aaf994360e18d6e0370cd67b60239caf9e1fab451bddfc1ae05a885a78abee63cf9d5f0c952b5add8789bf054f97667e0173617cdb7863009e3e7
6
+ metadata.gz: 0e886dbeaefd433185a7036739dba643c4c26add118b0dd737ee79db6e1dd7e384ba1a5389491023a857b72727055f494e2894746e5f55849ea13f11855c5b4b
7
+ data.tar.gz: 97f130e22876d639a79faf0b062442252df9392b8e2338a6bf6b46793a83d815b954b43e34f4e1ff1fce97f7e4856b4ca34e5085e1b212c58f653dc05ff89c9d
@@ -93,15 +93,15 @@ module CanvasLinkMigrator
93
93
  end
94
94
 
95
95
  def media_map
96
- @media_map ||= resources["files"].each_with_object({}) do |(_mig_id, file), map|
97
- media_id = file.dig("destination", "media_entry_id")
96
+ @media_map ||= resources["files"]&.each_with_object({}) do |(_mig_id, file), map|
97
+ media_id = file.dig("destination", "media_entry_id") if file.respond_to?(:dig)
98
98
  next unless media_id
99
99
  map[media_id] = file
100
100
  end
101
101
  end
102
102
 
103
103
  def convert_attachment_media_id(media_id)
104
- media_map.dig(media_id, "destination")&.slice("id", "uuid")&.values
104
+ media_map&.dig(media_id, "destination")&.slice("id", "uuid")&.values
105
105
  end
106
106
 
107
107
  def convert_migration_id(type, migration_id)
@@ -1,3 +1,3 @@
1
1
  module CanvasLinkMigrator
2
- VERSION = "1.0.17"
2
+ VERSION = "1.0.18"
3
3
  end
@@ -47,6 +47,7 @@
47
47
  }
48
48
  },
49
49
  "files": {
50
+ "3": "5",
50
51
  "E": {
51
52
  "destination": {
52
53
  "id": "5",
@@ -59,6 +60,7 @@
59
60
  "uuid": "u3"
60
61
  }
61
62
  },
63
+ "4":"6",
62
64
  "F": {
63
65
  "destination": {
64
66
  "id": "6",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_link_migrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mysti Lilla
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-03-05 00:00:00.000000000 Z
14
+ date: 2025-07-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport