Skip to content

Commit e190ee3

Browse files
authored
Merge pull request #2334 from openstax/update_openstax_content
Updated openstax_content to the latest version
2 parents 9e19bb0 + 86f0553 commit e190ee3

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ GEM
9797
execjs
9898
awesome_print (1.8.0)
9999
aws-eventstream (1.1.1)
100-
aws-partitions (1.466.0)
100+
aws-partitions (1.473.0)
101101
aws-sdk-autoscaling (1.53.0)
102102
aws-sdk-core (~> 3, >= 3.109.0)
103103
aws-sigv4 (~> 1.1)
104104
aws-sdk-cloudwatch (1.46.0)
105105
aws-sdk-core (~> 3, >= 3.109.0)
106106
aws-sigv4 (~> 1.1)
107-
aws-sdk-core (3.114.2)
107+
aws-sdk-core (3.115.0)
108108
aws-eventstream (~> 1, >= 1.0.2)
109109
aws-partitions (~> 1, >= 1.239.0)
110110
aws-sigv4 (~> 1.1)
111111
jmespath (~> 1.0)
112-
aws-sdk-kms (1.43.0)
112+
aws-sdk-kms (1.44.0)
113113
aws-sdk-core (~> 3, >= 3.112.0)
114114
aws-sigv4 (~> 1.1)
115115
aws-sdk-s3 (1.96.1)
@@ -481,7 +481,7 @@ GEM
481481
roar
482482
roar-rails
483483
uber
484-
openstax_content (0.0.2)
484+
openstax_content (0.2.0)
485485
aws-sdk-s3
486486
faraday
487487
nokogiri

app/subsystems/content/models/page.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,7 @@ def resolve_link(link)
197197
else
198198
# Link to a different book
199199
# The user might not have access to the book in Tutor, so it's safer to send them to REX
200-
object = uri.path.sub('./', '')
201-
book_id, page_id = object.split(':', 2)
202-
page_uuid = page_id.split('@', 2).first
203-
book_slug = book.archive.slug book_id
204-
page_slug = book.archive.slug object
205-
uri.path = "books/#{book_slug}/pages/#{page_slug}"
206-
Addressable::URI.join(
207-
"https://#{Rails.application.secrets.openstax[:content][:domain]}", uri
208-
).to_s
200+
book.archive.webview_uri_for(uri).to_s
209201
end
210202
else
211203
# Resource link or other unknown relative link

0 commit comments

Comments
 (0)