canvas_link_migrator 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 814327ff4502ff2b1187f0b817659cff573bb272ee7e85ae32685297f985ce55
|
4
|
+
data.tar.gz: e8fa4255d9200988f052ddc9b6a4087b72709ce5443c9bbff4558279be38c4c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc23256c7587decc42dfe9b5677f6299c7ba31cc4aa14e2bda8aca60233ba5ffdc143b205419f4d9fd101b13a52e54a2de896dbd1f038a3d25a44e7d631f54cf
|
7
|
+
data.tar.gz: fd8ac04adf9829f958297818be79bff39910259cb9e8bb233689b117deb22cbce21df0c875c8d756e9dfa5c4dafb1ab4b5aaba717cfb10aa1a22d8b9574b52a5
|
@@ -93,6 +93,7 @@ module CanvasLinkMigrator
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def convert_migration_id(type, migration_id)
|
96
|
+
type = "modules" if type == "context_modules"
|
96
97
|
id = if CanvasLinkMigrator::LinkParser::KNOWN_REFERENCE_TYPES.include? type
|
97
98
|
resources.dig(type, migration_id, "destination", "id")
|
98
99
|
end
|
@@ -69,6 +69,12 @@ describe CanvasLinkMigrator::LinkResolver do
|
|
69
69
|
expect(link[:new_value]).to eq("/courses/2/discussion_topics/10?foo=bar")
|
70
70
|
end
|
71
71
|
|
72
|
+
it "converts module links" do
|
73
|
+
link = { link_type: :object, type: "modules", migration_id: "J", query: "?foo=bar" }
|
74
|
+
resolver.resolve_link!(link)
|
75
|
+
expect(link[:new_value]).to eq("/courses/2/modules/36?foo=bar")
|
76
|
+
end
|
77
|
+
|
72
78
|
it "converters other links" do
|
73
79
|
link = { link_type: :object, type: "assignments", migration_id: "I", query: "#fie" }
|
74
80
|
resolver.resolve_link!(link)
|
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: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mysti Lilla
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-07-
|
12
|
+
date: 2023-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|