Skip to content

Commit fe1a4fd

Browse files
authored
Merge branch 'master' into github-ingestor
2 parents 18b415f + 3d70654 commit fe1a4fd

101 files changed

Lines changed: 28113 additions & 2224 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ gem 'kt-paperclip'
3434
gem 'linkeddata'
3535
gem 'maxmind-db'
3636
gem 'money-rails'
37+
gem 'oai'
3738
gem 'omniauth_openid_connect'
3839
gem 'omniauth-rails_csrf_protection'
3940
gem 'pg'

Gemfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ GEM
398398
mini_portile2 (~> 2.8.2)
399399
racc (~> 1.4)
400400
numerizer (0.1.1)
401+
oai (1.3.0)
402+
builder (>= 3.1.0)
403+
faraday (< 3)
404+
faraday-follow_redirects (>= 0.3.0, < 2)
405+
rexml
401406
omniauth (2.1.1)
402407
hashie (>= 3.4.6)
403408
rack (>= 2.2.3)
@@ -454,7 +459,7 @@ GEM
454459
pundit (2.3.1)
455460
activesupport (>= 3.0.0)
456461
racc (1.8.1)
457-
rack (2.2.18)
462+
rack (2.2.20)
458463
rack-cors (2.0.2)
459464
rack (>= 2.0.0)
460465
rack-oauth2 (2.2.0)
@@ -853,6 +858,7 @@ DEPENDENCIES
853858
minitest
854859
minitest-reporters
855860
money-rails
861+
oai
856862
omniauth-rails_csrf_protection
857863
omniauth_openid_connect
858864
pg
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
34.8 KB
Loading

app/assets/images/elixir/oscars-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

app/assets/javascripts/templates/google_analytics.js.erb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def handle_error(status_code = 500, message = nil)
4848
status_code = status_code.to_i
4949
@message = message
5050
respond_to do |format|
51-
format.html { render 'static/error', status: status_code }
51+
format.html { render 'static/error', status: status_code }
5252
format.json { render json: { error: { message: message, code: status_code } }, status: status_code }
5353
format.json_api { render json: { error: { message: message, code: status_code } }, status: status_code }
5454
format.any { head status_code }

app/controllers/collaborations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_resource
3838
if name.end_with?('_id')
3939
c = name.chomp('_id').classify.constantize rescue NameError
4040
if c.method_defined?(:collaborations)
41-
@resource = c.friendly.find(value)
41+
@resource = c.respond_to?(:friendly) ? c.friendly.find(value) : c.find(value)
4242
end
4343
end
4444
end

app/controllers/events_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def show
6767
format.json
6868
format.json_api { render json: @event }
6969
format.ics { send_data @event.to_ical, type: 'text/calendar', disposition: 'attachment', filename: "#{@event.slug}.ics" }
70+
format.jsonld { render plain: @bioschemas.first.to_json }
7071
end
7172
end
7273

@@ -236,7 +237,7 @@ def event_params
236237
:timezone, :content_provider_id, { collection_ids: [] }, { node_ids: [] },
237238
{ node_names: [] }, { target_audience: [] }, { eligibility: [] }, :visible,
238239
{ host_institutions: [] }, :capacity, :contact, :recognition, :learning_objectives,
239-
:prerequisites, :tech_requirements, :cost_basis, :cost_value, :cost_currency, :language,
240+
:prerequisites, :tech_requirements, :cost_basis, :cost_value, :cost_currency, :language, :presence,
240241
external_resources_attributes: %i[id url title _destroy],
241242
external_resources: %i[url title], material_ids: [],
242243
llm_interaction_attributes: %i[id scrape_or_process model prompt input output needs_processing _destroy],

0 commit comments

Comments
 (0)