diff --git a/Gemfile b/Gemfile index 02789f5b..84da2b1a 100644 --- a/Gemfile +++ b/Gemfile @@ -37,7 +37,7 @@ gem 'rest-client' gem 'rubyzip' gem 'mnemosyne-ruby' gem 'faraday' -gem 'proforma', path: '../proforma' #, git: 'git://github.com/openHPI/proforma.git' # use version not master +gem 'proforma', git: 'https://github.com/openHPI/proforma.git', tag: 'v0.3.2' gem 'whenever', require: false gem 'rails-timeago' diff --git a/Gemfile.lock b/Gemfile.lock index 862b636c..42a75329 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,10 +7,12 @@ GIT rack (>= 1.5.0) websocket (>= 1.1.0) -PATH - remote: ../proforma +GIT + remote: https://github.com/openHPI/proforma.git + revision: 6784ace5bb4449fd53f419fa1eb40dfc04e8f086 + tag: v0.3.2 specs: - proforma (0.1.0) + proforma (0.3.2) activemodel (~> 5.2.3) activesupport (~> 5.2.3) nokogiri (~> 1.10.2) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 77f35ba4..1687f4ab 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -177,11 +177,10 @@ class ExercisesController < ApplicationController exercise.save! return render json: {}, status: 201 end - # logger.info(exercise.errors.full_messages) - # render json: {}, status: 400 rescue Proforma::ProformaError render json: t('exercises.export_codeharbor.export_errors.invalid'), status: 400 rescue StandardError + logger.info(exercise.errors.full_messages) render json: t('exercises.export_codeharbor.export_errors.internal_error'), status: 500 end