coursemology-evaluator 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +3 -3
- data/.gitignore +23 -22
- data/.hound.yml +8 -8
- data/.idea/Coursemology Evaluator.iml +8 -8
- data/.rspec +2 -2
- data/.rubocop.unhound.yml +109 -109
- data/.rubocop.yml +46 -46
- data/.travis.yml +17 -17
- data/Gemfile +4 -4
- data/Procfile +1 -1
- data/README.md +29 -29
- data/Rakefile +6 -6
- data/bin/evaluator +5 -5
- data/coursemology-evaluator.gemspec +37 -37
- data/lib/coursemology/evaluator.rb +36 -36
- data/lib/coursemology/evaluator/cli.rb +52 -52
- data/lib/coursemology/evaluator/client.rb +81 -75
- data/lib/coursemology/evaluator/docker_container.rb +59 -59
- data/lib/coursemology/evaluator/logging.rb +12 -12
- data/lib/coursemology/evaluator/logging/client_log_subscriber.rb +25 -25
- data/lib/coursemology/evaluator/logging/docker_log_subscriber.rb +18 -18
- data/lib/coursemology/evaluator/models.rb +7 -7
- data/lib/coursemology/evaluator/models/base.rb +50 -50
- data/lib/coursemology/evaluator/models/programming_evaluation.rb +55 -67
- data/lib/coursemology/evaluator/models/programming_evaluation/package.rb +12 -12
- data/lib/coursemology/evaluator/services.rb +6 -6
- data/lib/coursemology/evaluator/services/evaluate_programming_package_service.rb +151 -151
- data/lib/coursemology/evaluator/string_io.rb +14 -14
- data/lib/coursemology/evaluator/utils.rb +42 -42
- data/lib/coursemology/evaluator/version.rb +5 -5
- data/lib/coursemology/polyglot/extensions.rb +3 -3
- data/lib/coursemology/polyglot/extensions/language.rb +24 -24
- metadata +15 -4
- data/Gemfile.lock +0 -114
@@ -1,5 +1,5 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Coursemology; end
|
3
|
-
module Coursemology::Evaluator
|
4
|
-
VERSION = '0.1.
|
5
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Coursemology; end
|
3
|
+
module Coursemology::Evaluator
|
4
|
+
VERSION = '0.1.3'.freeze
|
5
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This augments the base polyglot library with methods needed for the evaluator.
|
3
|
-
Dir[File.join(__dir__, '**/*.rb')].each { |f| require f }
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This augments the base polyglot library with methods needed for the evaluator.
|
3
|
+
Dir[File.join(__dir__, '**/*.rb')].each { |f| require f }
|
@@ -1,24 +1,24 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
class Coursemology::Polyglot::Language
|
3
|
-
# Finds the language class with the specified name.
|
4
|
-
#
|
5
|
-
# @param [String] type The name of the class.
|
6
|
-
# @return [nil] If the type is not defined.
|
7
|
-
# @return [Class] If the type was found.
|
8
|
-
def self.find_by(type:)
|
9
|
-
class_ = concrete_languages.find { |language| language.name == type }
|
10
|
-
class_.new if class_
|
11
|
-
end
|
12
|
-
|
13
|
-
# Finds the language class with the specified name.
|
14
|
-
#
|
15
|
-
# @param [String] type The name of the class.
|
16
|
-
# @return [Class] If the type was found.
|
17
|
-
# @raise [ArgumentError] When the type was not found.
|
18
|
-
def self.find_by!(type:)
|
19
|
-
language = find_by(type: type)
|
20
|
-
fail ArgumentError, "Cannot find the language #{type}" unless language
|
21
|
-
|
22
|
-
language
|
23
|
-
end
|
24
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
class Coursemology::Polyglot::Language
|
3
|
+
# Finds the language class with the specified name.
|
4
|
+
#
|
5
|
+
# @param [String] type The name of the class.
|
6
|
+
# @return [nil] If the type is not defined.
|
7
|
+
# @return [Class] If the type was found.
|
8
|
+
def self.find_by(type:)
|
9
|
+
class_ = concrete_languages.find { |language| language.name == type }
|
10
|
+
class_.new if class_
|
11
|
+
end
|
12
|
+
|
13
|
+
# Finds the language class with the specified name.
|
14
|
+
#
|
15
|
+
# @param [String] type The name of the class.
|
16
|
+
# @return [Class] If the type was found.
|
17
|
+
# @raise [ArgumentError] When the type was not found.
|
18
|
+
def self.find_by!(type:)
|
19
|
+
language = find_by(type: type)
|
20
|
+
fail ArgumentError, "Cannot find the language #{type}" unless language
|
21
|
+
|
22
|
+
language
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursemology-evaluator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Low
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01
|
11
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,6 +129,9 @@ dependencies:
|
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 4.2.0
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 4.2.2
|
132
135
|
type: :runtime
|
133
136
|
prerelease: false
|
134
137
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -136,6 +139,9 @@ dependencies:
|
|
136
139
|
- - "~>"
|
137
140
|
- !ruby/object:Gem::Version
|
138
141
|
version: 4.2.0
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 4.2.2
|
139
145
|
- !ruby/object:Gem::Dependency
|
140
146
|
name: flexirest
|
141
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,6 +149,9 @@ dependencies:
|
|
143
149
|
- - "~>"
|
144
150
|
- !ruby/object:Gem::Version
|
145
151
|
version: '1.2'
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 1.2.6
|
146
155
|
type: :runtime
|
147
156
|
prerelease: false
|
148
157
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -150,6 +159,9 @@ dependencies:
|
|
150
159
|
- - "~>"
|
151
160
|
- !ruby/object:Gem::Version
|
152
161
|
version: '1.2'
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: 1.2.6
|
153
165
|
- !ruby/object:Gem::Dependency
|
154
166
|
name: faraday_middleware
|
155
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +235,6 @@ files:
|
|
223
235
|
- ".rubocop.yml"
|
224
236
|
- ".travis.yml"
|
225
237
|
- Gemfile
|
226
|
-
- Gemfile.lock
|
227
238
|
- Procfile
|
228
239
|
- README.md
|
229
240
|
- Rakefile
|
@@ -247,7 +258,7 @@ files:
|
|
247
258
|
- lib/coursemology/evaluator/version.rb
|
248
259
|
- lib/coursemology/polyglot/extensions.rb
|
249
260
|
- lib/coursemology/polyglot/extensions/language.rb
|
250
|
-
homepage:
|
261
|
+
homepage: https://github.com/Coursemology/evaluator-slave
|
251
262
|
licenses:
|
252
263
|
- MIT
|
253
264
|
metadata: {}
|
data/Gemfile.lock
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
coursemology-evaluator (0.1.0)
|
5
|
-
activesupport (~> 4.2.0)
|
6
|
-
coursemology-polyglot (>= 0.0.3)
|
7
|
-
docker-api (>= 1.2.5)
|
8
|
-
faraday_middleware
|
9
|
-
flexirest (~> 1.2)
|
10
|
-
rubyzip
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: https://rubygems.org/
|
14
|
-
specs:
|
15
|
-
activesupport (4.2.5.1)
|
16
|
-
i18n (~> 0.7)
|
17
|
-
json (~> 1.7, >= 1.7.7)
|
18
|
-
minitest (~> 5.1)
|
19
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
20
|
-
tzinfo (~> 1.1)
|
21
|
-
codeclimate-test-reporter (0.4.8)
|
22
|
-
simplecov (>= 0.7.1, < 1.0.0)
|
23
|
-
coursemology-polyglot (0.0.3)
|
24
|
-
activesupport (~> 4.2.0, >= 4.2.2)
|
25
|
-
coveralls (0.8.10)
|
26
|
-
json (~> 1.8)
|
27
|
-
rest-client (>= 1.6.8, < 2)
|
28
|
-
simplecov (~> 0.11.0)
|
29
|
-
term-ansicolor (~> 1.3)
|
30
|
-
thor (~> 0.19.1)
|
31
|
-
tins (~> 1.6.0)
|
32
|
-
crack (0.4.3)
|
33
|
-
safe_yaml (~> 1.0.0)
|
34
|
-
diff-lcs (1.2.5)
|
35
|
-
docile (1.1.5)
|
36
|
-
docker-api (1.26.0)
|
37
|
-
excon (>= 0.38.0)
|
38
|
-
json
|
39
|
-
domain_name (0.5.25)
|
40
|
-
unf (>= 0.0.5, < 1.0.0)
|
41
|
-
excon (0.45.4)
|
42
|
-
factory_girl (4.5.0)
|
43
|
-
activesupport (>= 3.0.0)
|
44
|
-
faraday (0.9.2)
|
45
|
-
multipart-post (>= 1.2, < 3)
|
46
|
-
faraday_middleware (0.10.0)
|
47
|
-
faraday (>= 0.7.4, < 0.10)
|
48
|
-
flexirest (1.2.15)
|
49
|
-
activesupport
|
50
|
-
crack
|
51
|
-
faraday
|
52
|
-
multi_json
|
53
|
-
http-cookie (1.0.2)
|
54
|
-
domain_name (~> 0.5)
|
55
|
-
i18n (0.7.0)
|
56
|
-
json (1.8.3)
|
57
|
-
mime-types (2.99)
|
58
|
-
minitest (5.8.4)
|
59
|
-
multi_json (1.11.2)
|
60
|
-
multipart-post (2.0.0)
|
61
|
-
netrc (0.11.0)
|
62
|
-
rake (10.5.0)
|
63
|
-
rest-client (1.8.0)
|
64
|
-
http-cookie (>= 1.0.2, < 2.0)
|
65
|
-
mime-types (>= 1.16, < 3.0)
|
66
|
-
netrc (~> 0.7)
|
67
|
-
rspec (3.4.0)
|
68
|
-
rspec-core (~> 3.4.0)
|
69
|
-
rspec-expectations (~> 3.4.0)
|
70
|
-
rspec-mocks (~> 3.4.0)
|
71
|
-
rspec-core (3.4.2)
|
72
|
-
rspec-support (~> 3.4.0)
|
73
|
-
rspec-expectations (3.4.0)
|
74
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.4.0)
|
76
|
-
rspec-mocks (3.4.1)
|
77
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
-
rspec-support (~> 3.4.0)
|
79
|
-
rspec-support (3.4.1)
|
80
|
-
rubyzip (1.1.7)
|
81
|
-
safe_yaml (1.0.4)
|
82
|
-
simplecov (0.11.1)
|
83
|
-
docile (~> 1.1.0)
|
84
|
-
json (~> 1.8)
|
85
|
-
simplecov-html (~> 0.10.0)
|
86
|
-
simplecov-html (0.10.0)
|
87
|
-
term-ansicolor (1.3.2)
|
88
|
-
tins (~> 1.0)
|
89
|
-
thor (0.19.1)
|
90
|
-
thread_safe (0.3.5)
|
91
|
-
tins (1.6.0)
|
92
|
-
tzinfo (1.2.2)
|
93
|
-
thread_safe (~> 0.1)
|
94
|
-
unf (0.1.4)
|
95
|
-
unf_ext
|
96
|
-
unf_ext (0.0.7.1)
|
97
|
-
vcr (3.0.1)
|
98
|
-
|
99
|
-
PLATFORMS
|
100
|
-
mswin64
|
101
|
-
|
102
|
-
DEPENDENCIES
|
103
|
-
bundler
|
104
|
-
codeclimate-test-reporter
|
105
|
-
coursemology-evaluator!
|
106
|
-
coveralls
|
107
|
-
factory_girl
|
108
|
-
rake
|
109
|
-
rspec
|
110
|
-
simplecov
|
111
|
-
vcr
|
112
|
-
|
113
|
-
BUNDLED WITH
|
114
|
-
1.11.2
|