Low commit activity in last 3 years
A long-lived project that still receives updates
Common definitions shared between the web application and the evaluator for determining the programming languages supported in Coursemology.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Coursemology Polyglot Build Status

Code Climate Coverage Status Security Inline docs Gem Version

This is the library common between the web application and the evaluator for determining the programming languages supported in Coursemology.

Usage

With Rails

The library works with Railties, so there is no special configuration.

The gem provides a JavaScript asset which can be used to require all Ace modes that are needed by all concrete languages. In your application manifest, include this:

//= require coursemology/polyglot/ace-modes

Ensure that Ace is found within the ace directory (i.e. ace/mode-python.js etc.)

Without Rails

In your Gemfile:

gem 'coursemology-polyglot'

Then, in your application:

Coursemology::Polyglot.eager_load!

The Polyglot library needs to be eager loaded so that it knows which languages are defined. Otherwise, the list of concrete_languages will be empty.

Version 0.3 upgrade

Breaking changes

Before version 0.3, Coursemology polyglot only supported Java 8, using docker image coursemology/evaluator-image-java:latest.

Version 0.3 adds support for Java 11.

To ensure old questions using Java continue to evaluate correctly, you need to run a migration to change Java's record in polyglot_languages table in your database.

The SQL command below summarizes the necessary changes, to be run right before upgrading to version 3.0:

UPDATE polyglot_languages SET type = 'Coursemology::Polyglot::Language::Java::Java8', name = 'Java 8'  where type = 'Coursemology::Polyglot::Language::Java';

Updating the gem

You will need the login credentials for coursemology to push the updated gem to rubygems.

gem build coursemology-polyglot
gem push coursemology-polyglot-<version>.gem
rm coursemology-polyglot-*.gem