coursemology-evaluator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.unhound.yml +37 -172
- data/.rubocop.yml +20 -0
- data/.travis.yml +4 -3
- data/Gemfile.lock +10 -10
- data/Procfile +1 -1
- data/bin/evaluator +0 -1
- data/lib/coursemology/evaluator.rb +1 -0
- data/lib/coursemology/evaluator/cli.rb +1 -0
- data/lib/coursemology/evaluator/client.rb +1 -0
- data/lib/coursemology/evaluator/docker_container.rb +1 -0
- data/lib/coursemology/evaluator/logging.rb +1 -0
- data/lib/coursemology/evaluator/logging/client_log_subscriber.rb +1 -0
- data/lib/coursemology/evaluator/logging/docker_log_subscriber.rb +1 -0
- data/lib/coursemology/evaluator/models.rb +1 -0
- data/lib/coursemology/evaluator/models/base.rb +1 -0
- data/lib/coursemology/evaluator/models/programming_evaluation.rb +1 -0
- data/lib/coursemology/evaluator/models/programming_evaluation/package.rb +1 -0
- data/lib/coursemology/evaluator/services.rb +1 -0
- data/lib/coursemology/evaluator/services/evaluate_programming_package_service.rb +1 -0
- data/lib/coursemology/evaluator/string_io.rb +1 -0
- data/lib/coursemology/evaluator/utils.rb +2 -1
- data/lib/coursemology/evaluator/version.rb +2 -1
- data/lib/coursemology/polyglot/extensions.rb +1 -0
- data/lib/coursemology/polyglot/extensions/language.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b252794553b802b276a7f319b90a77ae7ace0040
|
4
|
+
data.tar.gz: 53db2d2e32dc391742b186516ea3e9c55e3b149e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b3f1b4037c772df3ece38701c2016e4799fda81f9b858fa874938fe197a38776f9dc1b1ddc43c95f1fa71716cfad407a690a87a7bcf7ed9c807f026c9a50708
|
7
|
+
data.tar.gz: 57d310b7668069b31bb9335eedcd4b06d1c68ff4bde4974e9e4c79f53668cd4fe9bea3f58c719da32e0dbfc753e0b15b964b39880d66158c8fa83bd817479f0e
|
data/.rubocop.unhound.yml
CHANGED
@@ -1,44 +1,4 @@
|
|
1
|
-
|
2
|
-
Enabled: true
|
3
|
-
|
4
|
-
ActionFilter:
|
5
|
-
Enabled: true
|
6
|
-
|
7
|
-
Alias:
|
8
|
-
Enabled: true
|
9
|
-
|
10
|
-
ArrayJoin:
|
11
|
-
Enabled: true
|
12
|
-
|
13
|
-
AsciiComments:
|
14
|
-
Enabled: true
|
15
|
-
|
16
|
-
AsciiIdentifiers:
|
17
|
-
Enabled: true
|
18
|
-
|
19
|
-
Attr:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
BlockNesting:
|
23
|
-
Enabled: true
|
24
|
-
|
25
|
-
CaseEquality:
|
26
|
-
Enabled: true
|
27
|
-
|
28
|
-
CharacterLiteral:
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
ClassAndModuleChildren:
|
32
|
-
Enabled: true
|
33
|
-
EnforcedStyle: compact
|
34
|
-
|
35
|
-
ClassLength:
|
36
|
-
Enabled: true
|
37
|
-
|
38
|
-
ClassVars:
|
39
|
-
Enabled: true
|
40
|
-
|
41
|
-
CollectionMethods:
|
1
|
+
Style/CollectionMethods:
|
42
2
|
Enabled: true
|
43
3
|
PreferredMethods:
|
44
4
|
reduce:
|
@@ -46,199 +6,104 @@ CollectionMethods:
|
|
46
6
|
find:
|
47
7
|
detect: 'find'
|
48
8
|
|
49
|
-
|
50
|
-
Enabled: true
|
51
|
-
|
52
|
-
CommentAnnotation:
|
53
|
-
Enabled: true
|
54
|
-
|
55
|
-
CyclomaticComplexity:
|
56
|
-
Enabled: true
|
57
|
-
|
58
|
-
Delegate:
|
59
|
-
Enabled: true
|
60
|
-
|
61
|
-
DeprecatedHashMethods:
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
DoubleNegation:
|
9
|
+
Style/FileName:
|
65
10
|
Enabled: true
|
66
11
|
|
67
|
-
|
12
|
+
Style/GuardClause:
|
68
13
|
Enabled: true
|
69
14
|
|
70
|
-
|
15
|
+
Style/IfUnlessModifier:
|
71
16
|
Enabled: true
|
72
17
|
|
73
|
-
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
EvenOdd:
|
18
|
+
Style/PercentLiteralDelimiters:
|
77
19
|
Enabled: true
|
78
20
|
|
79
|
-
|
80
|
-
Enabled: false
|
81
|
-
|
82
|
-
FileName:
|
21
|
+
Style/SignalException:
|
83
22
|
Enabled: true
|
84
23
|
|
85
|
-
|
24
|
+
Style/SingleLineBlockParams:
|
86
25
|
Enabled: true
|
87
26
|
|
88
|
-
|
27
|
+
Style/SingleLineMethods:
|
89
28
|
Enabled: true
|
90
29
|
|
91
|
-
|
30
|
+
Style/TrailingCommaInArguments:
|
92
31
|
Enabled: true
|
93
32
|
|
94
|
-
|
33
|
+
Style/TrailingCommaInLiteral:
|
95
34
|
Enabled: true
|
96
35
|
|
97
|
-
|
36
|
+
Metrics/AbcSize:
|
98
37
|
Enabled: true
|
99
38
|
|
100
|
-
|
39
|
+
Metrics/ClassLength:
|
101
40
|
Enabled: true
|
102
41
|
|
103
|
-
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
Lambda:
|
42
|
+
Metrics/ModuleLength:
|
107
43
|
Enabled: true
|
108
44
|
|
109
|
-
|
45
|
+
Metrics/CyclomaticComplexity:
|
110
46
|
Enabled: true
|
111
47
|
|
112
|
-
|
48
|
+
Metrics/MethodLength:
|
113
49
|
Enabled: true
|
114
50
|
|
115
|
-
|
51
|
+
Metrics/ParameterLists:
|
116
52
|
Enabled: true
|
117
53
|
|
118
|
-
|
54
|
+
Metrics/PerceivedComplexity:
|
119
55
|
Enabled: true
|
120
56
|
|
121
|
-
|
57
|
+
Lint/AssignmentInCondition:
|
122
58
|
Enabled: true
|
123
59
|
|
124
|
-
|
60
|
+
Style/AccessorMethodName:
|
125
61
|
Enabled: true
|
126
62
|
|
127
|
-
|
128
|
-
Enabled: true
|
129
|
-
|
130
|
-
NilComparison:
|
131
|
-
Enabled: true
|
132
|
-
|
133
|
-
Not:
|
134
|
-
Enabled: true
|
135
|
-
|
136
|
-
NumericLiterals:
|
137
|
-
Enabled: true
|
138
|
-
|
139
|
-
OneLineConditional:
|
140
|
-
Enabled: true
|
141
|
-
|
142
|
-
OpMethod:
|
143
|
-
Enabled: true
|
144
|
-
|
145
|
-
ParameterLists:
|
146
|
-
Enabled: true
|
147
|
-
|
148
|
-
PercentLiteralDelimiters:
|
149
|
-
Enabled: true
|
150
|
-
|
151
|
-
PerlBackrefs:
|
152
|
-
Enabled: true
|
153
|
-
|
154
|
-
PredicateName:
|
155
|
-
NamePrefixBlacklist: []
|
156
|
-
|
157
|
-
Proc:
|
158
|
-
Enabled: true
|
159
|
-
|
160
|
-
RaiseArgs:
|
161
|
-
Enabled: true
|
162
|
-
|
163
|
-
RegexpLiteral:
|
164
|
-
Enabled: true
|
165
|
-
|
166
|
-
SelfAssignment:
|
167
|
-
Enabled: true
|
168
|
-
|
169
|
-
SingleLineBlockParams:
|
170
|
-
Enabled: true
|
171
|
-
|
172
|
-
SingleLineMethods:
|
173
|
-
Enabled: true
|
174
|
-
|
175
|
-
SignalException:
|
176
|
-
Enabled: true
|
177
|
-
|
178
|
-
SpecialGlobalVars:
|
179
|
-
Enabled: true
|
180
|
-
|
181
|
-
VariableInterpolation:
|
182
|
-
Enabled: true
|
183
|
-
|
184
|
-
TrailingComma:
|
185
|
-
Enabled: true
|
186
|
-
|
187
|
-
TrivialAccessors:
|
188
|
-
Enabled: true
|
189
|
-
|
190
|
-
VariableInterpolation:
|
191
|
-
Enabled: true
|
192
|
-
|
193
|
-
WhenThen:
|
194
|
-
Enabled: true
|
195
|
-
|
196
|
-
WhileUntilModifier:
|
197
|
-
Enabled: true
|
198
|
-
|
199
|
-
# Lint
|
200
|
-
|
201
|
-
AmbiguousOperator:
|
63
|
+
Style/Alias:
|
202
64
|
Enabled: true
|
65
|
+
EnforcedStyle: prefer_alias_method
|
203
66
|
|
204
|
-
|
67
|
+
Style/Documentation:
|
205
68
|
Enabled: true
|
206
69
|
|
207
|
-
|
70
|
+
Style/DoubleNegation:
|
208
71
|
Enabled: true
|
209
72
|
|
210
|
-
|
73
|
+
Style/EachWithObject:
|
211
74
|
Enabled: true
|
212
75
|
|
213
|
-
|
76
|
+
Style/EmptyLiteral:
|
214
77
|
Enabled: true
|
215
78
|
|
216
|
-
|
79
|
+
Style/ModuleFunction:
|
217
80
|
Enabled: true
|
218
81
|
|
219
|
-
|
82
|
+
Style/OneLineConditional:
|
220
83
|
Enabled: true
|
221
84
|
|
222
|
-
|
85
|
+
Style/PerlBackrefs:
|
223
86
|
Enabled: true
|
224
87
|
|
225
|
-
|
88
|
+
Style/SpecialGlobalVars:
|
226
89
|
Enabled: true
|
227
90
|
|
228
|
-
|
91
|
+
Style/VariableInterpolation:
|
229
92
|
Enabled: true
|
230
93
|
|
231
|
-
|
94
|
+
Style/WhenThen:
|
232
95
|
Enabled: true
|
233
96
|
|
234
|
-
|
97
|
+
Lint/EachWithObjectArgument:
|
235
98
|
Enabled: true
|
236
99
|
|
237
|
-
|
100
|
+
Lint/HandleExceptions:
|
238
101
|
Enabled: true
|
239
102
|
|
240
|
-
|
103
|
+
Lint/LiteralInCondition:
|
104
|
+
Description: Checks of literals used in conditions.
|
241
105
|
Enabled: true
|
242
106
|
|
243
|
-
|
107
|
+
Lint/LiteralInInterpolation:
|
108
|
+
Description: Checks for literals used in interpolation.
|
244
109
|
Enabled: true
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,20 @@
|
|
1
1
|
inherit_from:
|
2
2
|
- .rubocop.unhound.yml
|
3
3
|
|
4
|
+
AllCops:
|
5
|
+
Include:
|
6
|
+
- '**/Gemfile'
|
7
|
+
- '**/Rakefile'
|
8
|
+
Exclude:
|
9
|
+
- 'vendor/bundle/**/*'
|
10
|
+
TargetRubyVersion: 2.1
|
11
|
+
|
4
12
|
Metrics/LineLength:
|
5
13
|
Max: 100
|
6
14
|
|
15
|
+
Style/ClassAndModuleChildren:
|
16
|
+
EnforcedStyle: compact
|
17
|
+
|
7
18
|
Style/DotPosition:
|
8
19
|
EnforcedStyle: trailing
|
9
20
|
|
@@ -13,9 +24,18 @@ Style/Documentation:
|
|
13
24
|
Style/IndentHash:
|
14
25
|
EnforcedStyle: consistent
|
15
26
|
|
27
|
+
Style/IfUnlessModifier:
|
28
|
+
MaxLineLength: 100
|
29
|
+
|
30
|
+
Style/ParallelAssignment:
|
31
|
+
Enabled: false
|
32
|
+
|
16
33
|
Style/StringLiterals:
|
17
34
|
EnforcedStyle: single_quotes
|
18
35
|
|
36
|
+
Style/WhileUntilModifier:
|
37
|
+
MaxLineLength: 100
|
38
|
+
|
19
39
|
Style/WordArray:
|
20
40
|
Enabled: false
|
21
41
|
|
data/.travis.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
sudo: required
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.1.
|
5
|
-
- 2.2.
|
4
|
+
- 2.1.8
|
5
|
+
- 2.2.4
|
6
|
+
- 2.3.0
|
6
7
|
- ruby-head
|
7
8
|
matrix:
|
8
9
|
allow_failures:
|
@@ -13,4 +14,4 @@ bundler_args: "--jobs=3 --retry=3 --deployment"
|
|
13
14
|
cache: bundler
|
14
15
|
|
15
16
|
before_install:
|
16
|
-
- gem
|
17
|
+
- gem install bundler
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
coursemology-evaluator (0.
|
4
|
+
coursemology-evaluator (0.1.0)
|
5
5
|
activesupport (~> 4.2.0)
|
6
6
|
coursemology-polyglot (>= 0.0.3)
|
7
7
|
docker-api (>= 1.2.5)
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (4.2.5)
|
15
|
+
activesupport (4.2.5.1)
|
16
16
|
i18n (~> 0.7)
|
17
17
|
json (~> 1.7, >= 1.7.7)
|
18
18
|
minitest (~> 5.1)
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
safe_yaml (~> 1.0.0)
|
34
34
|
diff-lcs (1.2.5)
|
35
35
|
docile (1.1.5)
|
36
|
-
docker-api (1.
|
36
|
+
docker-api (1.26.0)
|
37
37
|
excon (>= 0.38.0)
|
38
38
|
json
|
39
39
|
domain_name (0.5.25)
|
@@ -45,7 +45,7 @@ GEM
|
|
45
45
|
multipart-post (>= 1.2, < 3)
|
46
46
|
faraday_middleware (0.10.0)
|
47
47
|
faraday (>= 0.7.4, < 0.10)
|
48
|
-
flexirest (1.2.
|
48
|
+
flexirest (1.2.15)
|
49
49
|
activesupport
|
50
50
|
crack
|
51
51
|
faraday
|
@@ -55,11 +55,11 @@ GEM
|
|
55
55
|
i18n (0.7.0)
|
56
56
|
json (1.8.3)
|
57
57
|
mime-types (2.99)
|
58
|
-
minitest (5.8.
|
58
|
+
minitest (5.8.4)
|
59
59
|
multi_json (1.11.2)
|
60
60
|
multipart-post (2.0.0)
|
61
61
|
netrc (0.11.0)
|
62
|
-
rake (10.
|
62
|
+
rake (10.5.0)
|
63
63
|
rest-client (1.8.0)
|
64
64
|
http-cookie (>= 1.0.2, < 2.0)
|
65
65
|
mime-types (>= 1.16, < 3.0)
|
@@ -68,12 +68,12 @@ GEM
|
|
68
68
|
rspec-core (~> 3.4.0)
|
69
69
|
rspec-expectations (~> 3.4.0)
|
70
70
|
rspec-mocks (~> 3.4.0)
|
71
|
-
rspec-core (3.4.
|
71
|
+
rspec-core (3.4.2)
|
72
72
|
rspec-support (~> 3.4.0)
|
73
73
|
rspec-expectations (3.4.0)
|
74
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
75
|
rspec-support (~> 3.4.0)
|
76
|
-
rspec-mocks (3.4.
|
76
|
+
rspec-mocks (3.4.1)
|
77
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
78
|
rspec-support (~> 3.4.0)
|
79
79
|
rspec-support (3.4.1)
|
@@ -94,7 +94,7 @@ GEM
|
|
94
94
|
unf (0.1.4)
|
95
95
|
unf_ext
|
96
96
|
unf_ext (0.0.7.1)
|
97
|
-
vcr (3.0.
|
97
|
+
vcr (3.0.1)
|
98
98
|
|
99
99
|
PLATFORMS
|
100
100
|
mswin64
|
@@ -111,4 +111,4 @@ DEPENDENCIES
|
|
111
111
|
vcr
|
112
112
|
|
113
113
|
BUNDLED WITH
|
114
|
-
1.
|
114
|
+
1.11.2
|
data/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
evaluator:
|
1
|
+
evaluator: evaluator --host=$HOST --api-token=$API_TOKEN --api-user-email=$API_USER_EMAIL
|
data/bin/evaluator
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Coursemology::Evaluator::Utils
|
2
3
|
# Represents one block of the Docker Attach protocol.
|
3
4
|
DockerAttachBlock = Struct.new(:stream, :length, :bytes)
|
@@ -11,7 +12,7 @@ module Coursemology::Evaluator::Utils
|
|
11
12
|
# @param [String] string The input stream to parse.
|
12
13
|
# @return [Array<(String, String, String)>] The stdin, stdout, and stderr output.
|
13
14
|
def self.parse_docker_stream(string)
|
14
|
-
result = ['', '', '']
|
15
|
+
result = [''.dup, ''.dup, ''.dup]
|
15
16
|
stream = StringIO.new(string)
|
16
17
|
|
17
18
|
while (block = parse_docker_stream_read_block(stream))
|
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.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: 2016-01-
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
269
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.
|
270
|
+
rubygems_version: 2.5.1
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Coursemology programming package evaluator
|