diff --git a/Gemfile b/Gemfile index 1d1b9451f2..c88829a9c1 100644 --- a/Gemfile +++ b/Gemfile @@ -74,9 +74,9 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git" gem "omniauth-saml", "~> 2.0", ">= 2.2.1" # Media Access & Transcoding -gem 'active_encode', '>= 1.2.2' +gem 'active_encode', git: "https://github.com/samvera-labs/active_encode.git", branch: 'output_label_parsing' gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform' -gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.4-avalon' +gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'sharepoint_integration' gem 'fastimage' gem 'rest-client', '~> 2.0' gem 'roo' diff --git a/Gemfile.lock b/Gemfile.lock index c209366efe..44b22df43a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,8 +33,8 @@ GIT GIT remote: https://github.com/avalonmediasystem/browse-everything.git - revision: 8fe3f9150fbc17ae84a36888f70f37fbd48f6e44 - branch: v1.4-avalon + revision: be4bbdf47df0090a40bbce7bf5678e7c8fe68130 + branch: sharepoint_integration specs: browse-everything (1.4.0) addressable (~> 2.5) @@ -67,6 +67,15 @@ GIT ims-lti omniauth +GIT + remote: https://github.com/samvera-labs/active_encode.git + revision: 49ab76ab6b2593ed250530aa3659dd5c8f5adb25 + branch: output_label_parsing + specs: + active_encode (1.2.2) + addressable (~> 2.8) + rails + GIT remote: https://github.com/samvera-labs/samvera-persona.git revision: ce6ada95684fe1c5487e8ee5d698b8529c69bf75 @@ -152,9 +161,6 @@ GEM active_elastic_job (3.3.0) aws-sdk-sqs (~> 1) rails (>= 5.2.6, < 8) - active_encode (1.2.2) - addressable (~> 2.8) - rails active_fedora-datastreams (0.5.0) active-fedora (>= 11.0.0.pre) activemodel (>= 5.2) @@ -216,13 +222,13 @@ GEM autoprefixer-rails (10.4.19.0) execjs (~> 2) aws-eventstream (1.3.0) - aws-partitions (1.968.0) + aws-partitions (1.976.0) aws-record (2.13.2) aws-sdk-dynamodb (~> 1, >= 1.85.0) aws-sdk-cloudfront (1.96.0) aws-sdk-core (~> 3, >= 3.201.0) aws-sigv4 (~> 1.5) - aws-sdk-core (3.202.0) + aws-sdk-core (3.206.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) @@ -233,8 +239,8 @@ GEM aws-sdk-elastictranscoder (1.57.0) aws-sdk-core (~> 3, >= 3.201.0) aws-sigv4 (~> 1.5) - aws-sdk-kms (1.88.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-kms (1.91.0) + aws-sdk-core (~> 3, >= 3.205.0) aws-sigv4 (~> 1.5) aws-sdk-rails (4.0.3) actionmailbox (>= 7.0.0) @@ -247,8 +253,8 @@ GEM aws-sessionstore-dynamodb (~> 2) concurrent-ruby (~> 1.3, >= 1.3.1) railties (>= 7.0.0) - aws-sdk-s3 (1.159.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-s3 (1.162.0) + aws-sdk-core (~> 3, >= 3.205.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sdk-ses (1.69.0) @@ -267,7 +273,7 @@ GEM aws-sdk-dynamodb (~> 1, >= 1.85.0) rack (>= 2, < 4) rack-session (>= 1, < 3) - aws-sigv4 (1.9.1) + aws-sigv4 (1.10.0) aws-eventstream (~> 1, >= 1.0.2) babel-source (5.8.35) babel-transpiler (0.7.0) @@ -423,8 +429,9 @@ GEM fakefs (2.5.0) faker (3.4.2) i18n (>= 1.8.11, < 2) - faraday (2.11.0) + faraday (2.12.0) faraday-net_http (>= 2.0, < 3.4) + json logger faraday-encoding (0.0.6) faraday @@ -453,11 +460,11 @@ GEM mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - google-apis-drive_v3 (0.55.0) + google-apis-drive_v3 (0.57.0) google-apis-core (>= 0.15.0, < 2.a) - google-cloud-env (2.2.0) + google-cloud-env (2.2.1) faraday (>= 1.0, < 3.a) - googleauth (1.11.0) + googleauth (1.11.1) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.1) jwt (>= 1.4, < 3.0) @@ -497,7 +504,7 @@ GEM hydra-access-controls (= 13.0.0) hydra-core (= 13.0.0) rails (>= 6.1, < 8.0) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) iconv (1.0.8) iiif_manifest (1.6.0) @@ -530,7 +537,7 @@ GEM rack (>= 2.2, < 4) rdf (~> 3.3) rexml (~> 3.2) - jwt (2.8.2) + jwt (2.9.3) base64 kaminari (1.2.2) activesupport (>= 4.1.0) @@ -564,7 +571,7 @@ GEM llhttp-ffi (0.5.0) ffi-compiler (~> 1.0) rake (~> 13.0) - logger (1.6.0) + logger (1.6.1) lograge (0.14.0) actionpack (>= 4) activesupport (>= 4) @@ -601,7 +608,7 @@ GEM mysql2 (0.5.6) net-http (0.4.1) uri - net-imap (0.4.15) + net-imap (0.4.16) date net-protocol net-ldap (0.19.0) @@ -785,7 +792,7 @@ GEM redlock (2.0.6) redis-client (>= 0.14.1, < 1.0.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) @@ -949,7 +956,7 @@ GEM rdf (~> 3.3) terser (1.2.3) execjs (>= 0.3.0, < 3) - thor (1.3.1) + thor (1.3.2) tilt (2.4.0) timeout (0.4.1) trailblazer-option (0.1.2) @@ -997,7 +1004,7 @@ GEM rexml xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.17) + zeitwerk (2.6.18) zk (1.10.0) zookeeper (~> 1.5.0) zookeeper (1.5.5) @@ -1011,7 +1018,7 @@ DEPENDENCIES active-fedora (~> 15.0) active_annotations! active_elastic_job - active_encode (>= 1.2.2) + active_encode! active_fedora-datastreams (~> 0.5) activejob-traffic_control activejob-uniqueness diff --git a/app/services/file_locator.rb b/app/services/file_locator.rb index 6b6740c079..25a6410611 100644 --- a/app/services/file_locator.rb +++ b/app/services/file_locator.rb @@ -118,7 +118,7 @@ def reader when 'file' File.open(location,'r') else - Kernel::open(uri.to_s, 'r') + URI.open(uri, 'r') end end diff --git a/config/browse_everything_providers.yml b/config/browse_everything_providers.yml index 4ac85e22f4..ad16b6f646 100644 --- a/config/browse_everything_providers.yml +++ b/config/browse_everything_providers.yml @@ -18,3 +18,9 @@ file_system: # sky_drive: # :client_id: YOUR_MS_LIVE_CONNECT_CLIENT_ID # :client_secret: YOUR_MS_LIVE_CONNECT_CLIENT_SECRET +# sharepoint: +# client_id: YOUR_MICROSOFT_GRAPH_CLIENT_ID +# client_secret: YOUR_MICROSOFT_GRAPH_CLIENT_SECRET +# tenant_id: YOUR_MICROSOFT_GRAPH_TENANT_ID +# scope: offline_access https://graph.microsoft.com/.default +# redirect_uri: https://example.com/browse/connect \ No newline at end of file diff --git a/config/initializers/browse_everything.rb b/config/initializers/browse_everything.rb index cb838dd3d3..14747ecfac 100644 --- a/config/initializers/browse_everything.rb +++ b/config/initializers/browse_everything.rb @@ -11,5 +11,14 @@ else settings['file_system'] = { name: 'File Dropbox', home: Settings.dropbox.path } end + if Settings.dropbox.sharepoint + settings['sharepoint'] = { client_id: Settings.dropbox.sharepoint.client_id, + client_secret: Settings.dropbox.sharepoint.client_secret, + tenant_id: Settings.dropbox.sharepoint.tenant_id, + grant_type: Settings.dropbox.sharepoint.grant_type, + scope: Settings.dropbox.sharepoint.scope, + redirect_uri: Settings.dropbox.sharepoint.redirect_uri + } + end BrowseEverything.configure(settings) end