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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ad46c90ce8784592d592a271d295debb10e67ba
4
- data.tar.gz: 19a2e9c9b1620a83c5c75481a92f4fe2bb1975e3
3
+ metadata.gz: b252794553b802b276a7f319b90a77ae7ace0040
4
+ data.tar.gz: 53db2d2e32dc391742b186516ea3e9c55e3b149e
5
5
  SHA512:
6
- metadata.gz: 0a1577d9bcd4f38e5ef794b9e6b712c3426754f0b05fb8291581f7c970efdd9f52decce6f68e718cd503a8d6f31139d03f5f6da26bee457355654377355f64dd
7
- data.tar.gz: 693b9e91e3aeba1bacc07a38923cab6158985f75f9f6178def48d490ef444d1a202a4dedbeb965ca82bb2e904859c4430b24e997fa7d94a5fc1efe2533f81bb4
6
+ metadata.gz: 4b3f1b4037c772df3ece38701c2016e4799fda81f9b858fa874938fe197a38776f9dc1b1ddc43c95f1fa71716cfad407a690a87a7bcf7ed9c807f026c9a50708
7
+ data.tar.gz: 57d310b7668069b31bb9335eedcd4b06d1c68ff4bde4974e9e4c79f53668cd4fe9bea3f58c719da32e0dbfc753e0b15b964b39880d66158c8fa83bd817479f0e
@@ -1,44 +1,4 @@
1
- AccessorMethodName:
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
- ColonMethodCall:
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
- EachWithObject:
12
+ Style/GuardClause:
68
13
  Enabled: true
69
14
 
70
- EmptyLiteral:
15
+ Style/IfUnlessModifier:
71
16
  Enabled: true
72
17
 
73
- Encoding:
74
- Enabled: false
75
-
76
- EvenOdd:
18
+ Style/PercentLiteralDelimiters:
77
19
  Enabled: true
78
20
 
79
- ExtraSpacing:
80
- Enabled: false
81
-
82
- FileName:
21
+ Style/SignalException:
83
22
  Enabled: true
84
23
 
85
- FlipFlop:
24
+ Style/SingleLineBlockParams:
86
25
  Enabled: true
87
26
 
88
- FormatString:
27
+ Style/SingleLineMethods:
89
28
  Enabled: true
90
29
 
91
- GlobalVars:
30
+ Style/TrailingCommaInArguments:
92
31
  Enabled: true
93
32
 
94
- GuardClause:
33
+ Style/TrailingCommaInLiteral:
95
34
  Enabled: true
96
35
 
97
- IfUnlessModifier:
36
+ Metrics/AbcSize:
98
37
  Enabled: true
99
38
 
100
- IfWithSemicolon:
39
+ Metrics/ClassLength:
101
40
  Enabled: true
102
41
 
103
- InlineComment:
104
- Enabled: false
105
-
106
- Lambda:
42
+ Metrics/ModuleLength:
107
43
  Enabled: true
108
44
 
109
- LambdaCall:
45
+ Metrics/CyclomaticComplexity:
110
46
  Enabled: true
111
47
 
112
- LineEndConcatenation:
48
+ Metrics/MethodLength:
113
49
  Enabled: true
114
50
 
115
- MethodLength:
51
+ Metrics/ParameterLists:
116
52
  Enabled: true
117
53
 
118
- ModuleFunction:
54
+ Metrics/PerceivedComplexity:
119
55
  Enabled: true
120
56
 
121
- NegatedIf:
57
+ Lint/AssignmentInCondition:
122
58
  Enabled: true
123
59
 
124
- NegatedWhile:
60
+ Style/AccessorMethodName:
125
61
  Enabled: true
126
62
 
127
- Next:
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
- AmbiguousRegexpLiteral:
67
+ Style/Documentation:
205
68
  Enabled: true
206
69
 
207
- AssignmentInCondition:
70
+ Style/DoubleNegation:
208
71
  Enabled: true
209
72
 
210
- ConditionPosition:
73
+ Style/EachWithObject:
211
74
  Enabled: true
212
75
 
213
- DeprecatedClassMethods:
76
+ Style/EmptyLiteral:
214
77
  Enabled: true
215
78
 
216
- ElseLayout:
79
+ Style/ModuleFunction:
217
80
  Enabled: true
218
81
 
219
- HandleExceptions:
82
+ Style/OneLineConditional:
220
83
  Enabled: true
221
84
 
222
- InvalidCharacterLiteral:
85
+ Style/PerlBackrefs:
223
86
  Enabled: true
224
87
 
225
- LiteralInCondition:
88
+ Style/SpecialGlobalVars:
226
89
  Enabled: true
227
90
 
228
- LiteralInInterpolation:
91
+ Style/VariableInterpolation:
229
92
  Enabled: true
230
93
 
231
- Loop:
94
+ Style/WhenThen:
232
95
  Enabled: true
233
96
 
234
- ParenthesesAsGroupedExpression:
97
+ Lint/EachWithObjectArgument:
235
98
  Enabled: true
236
99
 
237
- RequireParentheses:
100
+ Lint/HandleExceptions:
238
101
  Enabled: true
239
102
 
240
- UnderscorePrefixedVariableName:
103
+ Lint/LiteralInCondition:
104
+ Description: Checks of literals used in conditions.
241
105
  Enabled: true
242
106
 
243
- Void:
107
+ Lint/LiteralInInterpolation:
108
+ Description: Checks for literals used in interpolation.
244
109
  Enabled: true
@@ -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
 
@@ -1,8 +1,9 @@
1
1
  sudo: required
2
2
  language: ruby
3
3
  rvm:
4
- - 2.1.7
5
- - 2.2.3
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 update bundler
17
+ - gem install bundler
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coursemology-evaluator (0.0.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.25.0)
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.14)
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.3)
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.4.2)
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.1)
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.0)
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.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.10.6
114
+ 1.11.2
data/Procfile CHANGED
@@ -1 +1 @@
1
- evaluator: ruby bin/evaluator --host=$HOST --api-token=$API_TOKEN --api-user-email=$API_USER_EMAIL
1
+ evaluator: evaluator --host=$HOST --api-token=$API_TOKEN --api-user-email=$API_USER_EMAIL
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require 'bundler/setup'
3
2
  require 'coursemology/evaluator'
4
3
 
5
4
  Coursemology::Evaluator.eager_load!
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_support/all'
2
3
  require 'flexirest'
3
4
  require 'faraday_middleware'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'optparse'
2
3
 
3
4
  class Coursemology::Evaluator::CLI
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Client
2
3
  def self.initialize(host, api_user_email, api_token)
3
4
  Coursemology::Evaluator::Models::Base.base_url = host
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::DockerContainer < Docker::Container
2
3
  class << self
3
4
  def create(image, argv: nil)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Coursemology::Evaluator::Logging
2
3
  extend ActiveSupport::Autoload
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Logging::ClientLogSubscriber < ActiveSupport::LogSubscriber
2
3
  def publish(name, *args)
3
4
  send(name.split('.').first, *args)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Logging::DockerLogSubscriber < ActiveSupport::LogSubscriber
2
3
  def pull(event)
3
4
  info "#{color("Docker Pull (#{event.duration.round(1)}ms)", GREEN)} #{event.payload[:image]}"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Coursemology::Evaluator::Models
2
3
  extend ActiveSupport::Autoload
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Models::Base < Flexirest::Base
2
3
  class << self
3
4
  attr_accessor :api_user_email
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Models::ProgrammingEvaluation < Coursemology::Evaluator::Models::Base
2
3
  extend ActiveSupport::Autoload
3
4
  autoload :Package
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Models::ProgrammingEvaluation::Package
2
3
  # The stream comprising the package.
3
4
  attr_reader :stream
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Coursemology::Evaluator::Services
2
3
  extend ActiveSupport::Autoload
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Evaluator::Services::EvaluateProgrammingPackageService
2
3
  Result = Struct.new(:stdout, :stderr, :test_report, :exit_code)
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Adapter for StringIO for compatibility with RubyZip.
2
3
  #
3
4
  # StringIO does not inherit from IO, so RubyZip does not accept StringIO in place of IO.
@@ -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))
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
1
2
  module Coursemology; end
2
3
  module Coursemology::Evaluator
3
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'.freeze
4
5
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  # This augments the base polyglot library with methods needed for the evaluator.
2
3
  Dir[File.join(__dir__, '**/*.rb')].each { |f| require f }
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Coursemology::Polyglot::Language
2
3
  # Finds the language class with the specified name.
3
4
  #
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.0
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-27 00:00:00.000000000 Z
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.4.5.1
270
+ rubygems_version: 2.5.1
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: Coursemology programming package evaluator