coursemology-polyglot 0.2.9.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.unhound.yml +6 -3
- data/.rubocop.yml +2 -8
- data/.travis.yml +1 -2
- data/README.md +16 -2
- data/coursemology-polyglot.gemspec +2 -2
- data/lib/coursemology/polyglot/language/java.rb +8 -1
- data/lib/coursemology/polyglot/language/python.rb +8 -0
- data/lib/coursemology/polyglot/version.rb +1 -1
- metadata +11 -12
- data/.idea/Coursemology Polyglot.iml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 29e7d07cd6e687c8e701bc975418597f2324900316ff0d020666de3a83e55704
|
4
|
+
data.tar.gz: 9b43b41e22faaf224ba75d4f9489abb19735057b4474b2f1007e462d8dd7ef51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5d42126affe862d1f585d0b61cef014671b218d17b7e4ac1cbfc54654bfa6d692072af18ba6f509a504917e0bfb76e2786ea80eb7900d37d193f86343e75039
|
7
|
+
data.tar.gz: ea2c89c3b31f6eb5c6a7c0e2bc7e622e6d224f261bce3de49ac62711337dc7ab111095ad43e432bbf3b1fc8c7ed02844a256b5c843f702778f6104b282b578cc
|
data/.rubocop.unhound.yml
CHANGED
@@ -6,7 +6,7 @@ Style/CollectionMethods:
|
|
6
6
|
find:
|
7
7
|
detect: 'find'
|
8
8
|
|
9
|
-
|
9
|
+
Naming/FileName:
|
10
10
|
Enabled: true
|
11
11
|
|
12
12
|
Style/GuardClause:
|
@@ -30,7 +30,10 @@ Style/SingleLineMethods:
|
|
30
30
|
Style/TrailingCommaInArguments:
|
31
31
|
Enabled: true
|
32
32
|
|
33
|
-
Style/
|
33
|
+
Style/TrailingCommaInArrayLiteral:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Style/TrailingCommaInHashLiteral:
|
34
37
|
Enabled: true
|
35
38
|
|
36
39
|
Metrics/AbcSize:
|
@@ -57,7 +60,7 @@ Metrics/PerceivedComplexity:
|
|
57
60
|
Lint/AssignmentInCondition:
|
58
61
|
Enabled: true
|
59
62
|
|
60
|
-
|
63
|
+
Naming/AccessorMethodName:
|
61
64
|
Enabled: true
|
62
65
|
|
63
66
|
Style/Alias:
|
data/.rubocop.yml
CHANGED
@@ -15,27 +15,21 @@ Metrics/LineLength:
|
|
15
15
|
Style/ClassAndModuleChildren:
|
16
16
|
EnforcedStyle: compact
|
17
17
|
|
18
|
-
|
18
|
+
Layout/DotPosition:
|
19
19
|
EnforcedStyle: trailing
|
20
20
|
|
21
21
|
Style/Documentation:
|
22
22
|
Enabled: false
|
23
23
|
|
24
|
-
|
24
|
+
Layout/IndentHash:
|
25
25
|
EnforcedStyle: consistent
|
26
26
|
|
27
|
-
Style/IfUnlessModifier:
|
28
|
-
MaxLineLength: 100
|
29
|
-
|
30
27
|
Style/ParallelAssignment:
|
31
28
|
Enabled: false
|
32
29
|
|
33
30
|
Style/StringLiterals:
|
34
31
|
EnforcedStyle: single_quotes
|
35
32
|
|
36
|
-
Style/WhileUntilModifier:
|
37
|
-
MaxLineLength: 100
|
38
|
-
|
39
33
|
Style/WordArray:
|
40
34
|
Enabled: false
|
41
35
|
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Coursemology Polyglot [![Build Status](https://travis-ci.org/Coursemology/polyglot.svg?branch=master)](https://travis-ci.org/Coursemology/polyglot)
|
2
2
|
[![Code Climate](https://codeclimate.com/github/Coursemology/polyglot/badges/gpa.svg)](https://codeclimate.com/github/Coursemology/polyglot) [![Coverage Status](https://coveralls.io/repos/Coursemology/polyglot/badge.svg?branch=master&service=github)](https://coveralls.io/github/Coursemology/polyglot?branch=master) [![Security](https://hakiri.io/github/Coursemology/polyglot/master.svg)](https://hakiri.io/github/Coursemology/polyglot/master) [![Inline docs](http://inch-ci.org/github/coursemology/polyglot.svg?branch=master)](http://inch-ci.org/github/coursemology/polyglot) [![Gem Version](https://badge.fury.io/rb/coursemology-polyglot.svg)](https://badge.fury.io/rb/coursemology-polyglot)
|
3
3
|
|
4
|
-
This is the library common between the web application and the evaluator for determining the
|
4
|
+
This is the library common between the web application and the evaluator for determining the
|
5
5
|
programming languages supported in Coursemology.
|
6
6
|
|
7
7
|
## Usage
|
@@ -28,5 +28,19 @@ Then, in your application:
|
|
28
28
|
Coursemology::Polyglot.eager_load!
|
29
29
|
```
|
30
30
|
|
31
|
-
The Polyglot library needs to be eager loaded so that it knows which languages are defined.
|
31
|
+
The Polyglot library needs to be eager loaded so that it knows which languages are defined.
|
32
32
|
Otherwise, the list of `concrete_languages` will be empty.
|
33
|
+
|
34
|
+
## Version 0.3 upgrade
|
35
|
+
### Breaking changes
|
36
|
+
Before version 0.3, Coursemology polyglot only supported Java 8, using docker image `coursemology/evaluator-image-java:latest`.
|
37
|
+
|
38
|
+
Version 0.3 adds support for Java 11.
|
39
|
+
|
40
|
+
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.
|
41
|
+
|
42
|
+
The SQL command below summarizes the necessary changes, to be run *right before* upgrading to version 3.0:
|
43
|
+
|
44
|
+
```
|
45
|
+
UPDATE polyglot_languages SET type = 'Coursemology::Polyglot::Language::Java::Java8', name = 'Java 8' where type = 'Coursemology::Polyglot::Language::Java';
|
46
|
+
```
|
@@ -28,9 +28,9 @@ programming languages supported in Coursemology.
|
|
28
28
|
spec.add_development_dependency 'coveralls'
|
29
29
|
spec.add_development_dependency 'codeclimate-test-reporter'
|
30
30
|
|
31
|
-
spec.add_dependency 'activesupport', '>= 4.2', '
|
31
|
+
spec.add_dependency 'activesupport', '>= 4.2', '< 6'
|
32
32
|
|
33
33
|
# For autoloading in Rails applications, as well as the Ace modes inclusion. Keep this as the
|
34
34
|
# same as ActiveSupport version.
|
35
|
-
spec.add_development_dependency 'railties', '>= 4.2', '
|
35
|
+
spec.add_development_dependency 'railties', '>= 4.2', '< 6'
|
36
36
|
end
|
@@ -1,4 +1,11 @@
|
|
1
1
|
class Coursemology::Polyglot::Language::Java < Coursemology::Polyglot::Language
|
2
2
|
syntax_highlighter 'java'
|
3
|
-
|
3
|
+
|
4
|
+
class Java8 < Coursemology::Polyglot::Language::Java
|
5
|
+
concrete_language 'Java 8', docker_image: 'java:8'
|
6
|
+
end
|
7
|
+
|
8
|
+
class Java11 < Coursemology::Polyglot::Language::Java
|
9
|
+
concrete_language 'Java 11', docker_image: 'java:11'
|
10
|
+
end
|
4
11
|
end
|
@@ -17,4 +17,12 @@ class Coursemology::Polyglot::Language::Python < Coursemology::Polyglot::Languag
|
|
17
17
|
class Python3Point6 < Coursemology::Polyglot::Language::Python
|
18
18
|
concrete_language 'Python 3.6', docker_image: 'python:3.6'
|
19
19
|
end
|
20
|
+
|
21
|
+
class Python3Point7 < Coursemology::Polyglot::Language::Python
|
22
|
+
concrete_language 'Python 3.7', docker_image: 'python:3.7'
|
23
|
+
end
|
24
|
+
|
25
|
+
class Python3Point7 < Coursemology::Polyglot::Language::Python
|
26
|
+
concrete_language 'Python 3.9', docker_image: 'python:3.9'
|
27
|
+
end
|
20
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursemology-polyglot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Low
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,9 +101,9 @@ dependencies:
|
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '4.2'
|
104
|
-
- - "
|
104
|
+
- - "<"
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: '
|
106
|
+
version: '6'
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -111,9 +111,9 @@ dependencies:
|
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '4.2'
|
114
|
-
- - "
|
114
|
+
- - "<"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '6'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: railties
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,9 +121,9 @@ dependencies:
|
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '4.2'
|
124
|
-
- - "
|
124
|
+
- - "<"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
126
|
+
version: '6'
|
127
127
|
type: :development
|
128
128
|
prerelease: false
|
129
129
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -131,9 +131,9 @@ dependencies:
|
|
131
131
|
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '4.2'
|
134
|
-
- - "
|
134
|
+
- - "<"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
136
|
+
version: '6'
|
137
137
|
description: |
|
138
138
|
Common definitions shared between the web application and the evaluator for determining the
|
139
139
|
programming languages supported in Coursemology.
|
@@ -145,7 +145,6 @@ extra_rdoc_files: []
|
|
145
145
|
files:
|
146
146
|
- ".gitignore"
|
147
147
|
- ".hound.yml"
|
148
|
-
- ".idea/Coursemology Polyglot.iml"
|
149
148
|
- ".rspec"
|
150
149
|
- ".rubocop.unhound.yml"
|
151
150
|
- ".rubocop.yml"
|
@@ -185,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
184
|
version: '0'
|
186
185
|
requirements: []
|
187
186
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.6
|
187
|
+
rubygems_version: 2.7.6
|
189
188
|
signing_key:
|
190
189
|
specification_version: 4
|
191
190
|
summary: Coursemology polyglot definitions
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
|
-
<exclude-output />
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
6
|
-
<orderEntry type="inheritedJdk" />
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
8
|
-
</component>
|
9
|
-
</module>
|