et 0.6.2 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 557d084a9e50c2ea5f497bb5e2c06fe1c4959ee7
4
- data.tar.gz: c78fbfce283ffd5c9eaa8d8e100c3c81cca39bf5
2
+ SHA256:
3
+ metadata.gz: 14c8827508f274f3055a4d79b2d65bbb3d530ab7e47b66a5f9bdf2ebc9eded23
4
+ data.tar.gz: e26d93b96439f78c4c721a4a6a2193763575a71b6b2e28b4c412463760ae0461
5
5
  SHA512:
6
- metadata.gz: 756d0e1ae868537836fe2789d1810155a073edffe5764fed89841f65e8d77f3b9e1295cc58c1ea45480e0fe7d7466e3d6ab9c5b1bc45e8078475cbadcf5793a5
7
- data.tar.gz: 6b1fbe98de3198e7ac40f3744bf5b78ff9f4b24890fbd6ba3ac3de77ff6dacb8eb7018ecff61ecf7df26ae658276eaa4735a4a0bccc8c56289c875b3c744e3d2
6
+ metadata.gz: acebf4e72972c2ddf75bd184c152a86ad28caa8a8c4c91eeb27f08f1c3eb6227c87ef9c19f21f1505247d4843ceec7791485f11604205c55009afe128c8025ee
7
+ data.tar.gz: 22da208518289aa04817da787607d32f80926859c7d8d8656f76013f9aa1b968194ad62180b474e3ea0e7e43010fd64233b8a6b8a0d12ea726cce166032a1269
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
@@ -0,0 +1,456 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-05-15 13:21:23 -0400 using RuboCop version 0.83.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'et.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Cop supports --auto-correct.
19
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
20
+ # SupportedStyles: with_first_argument, with_fixed_indentation
21
+ Layout/ArgumentAlignment:
22
+ Exclude:
23
+ - 'lib/et/api.rb'
24
+
25
+ # Offense count: 3
26
+ # Cop supports --auto-correct.
27
+ # Configuration parameters: EnforcedStyleAlignWith.
28
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
29
+ Layout/BlockAlignment:
30
+ Exclude:
31
+ - 'spec/cli/get_lesson_spec.rb'
32
+ - 'spec/cli/submit_lesson_spec.rb'
33
+
34
+ # Offense count: 1
35
+ # Cop supports --auto-correct.
36
+ Layout/ClosingHeredocIndentation:
37
+ Exclude:
38
+ - 'et.gemspec'
39
+
40
+ # Offense count: 12
41
+ # Cop supports --auto-correct.
42
+ # Configuration parameters: EnforcedStyle.
43
+ # SupportedStyles: leading, trailing
44
+ Layout/DotPosition:
45
+ Exclude:
46
+ - 'spec/cli/get_lesson_spec.rb'
47
+ - 'spec/cli/list_lessons_spec.rb'
48
+ - 'spec/cli/submit_lesson_spec.rb'
49
+ - 'spec/lib/api_spec.rb'
50
+ - 'spec/lib/fallback_connection_spec.rb'
51
+
52
+ # Offense count: 1
53
+ # Cop supports --auto-correct.
54
+ Layout/EmptyLineAfterGuardClause:
55
+ Exclude:
56
+ - 'lib/et/formatter.rb'
57
+
58
+ # Offense count: 4
59
+ # Cop supports --auto-correct.
60
+ # Configuration parameters: EnforcedStyle.
61
+ # SupportedStyles: around, only_before
62
+ Layout/EmptyLinesAroundAccessModifier:
63
+ Exclude:
64
+ - 'lib/et/api.rb'
65
+ - 'lib/et/fallback_connection.rb'
66
+ - 'lib/et/operating_system.rb'
67
+ - 'lib/et/submission_file_list.rb'
68
+
69
+ # Offense count: 1
70
+ # Cop supports --auto-correct.
71
+ # Configuration parameters: EnforcedStyle.
72
+ # SupportedStyles: empty_lines, no_empty_lines
73
+ Layout/EmptyLinesAroundBlockBody:
74
+ Exclude:
75
+ - 'spec/lib/operating_system_spec.rb'
76
+
77
+ # Offense count: 2
78
+ # Cop supports --auto-correct.
79
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
80
+ Layout/ExtraSpacing:
81
+ Exclude:
82
+ - 'spec/lib/api_spec.rb'
83
+ - 'spec/lib/archive_manager_spec.rb'
84
+
85
+ # Offense count: 1
86
+ # Cop supports --auto-correct.
87
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
88
+ # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
89
+ Layout/FirstArgumentIndentation:
90
+ Exclude:
91
+ - 'spec/lib/submission_file_list_spec.rb'
92
+
93
+ # Offense count: 1
94
+ # Cop supports --auto-correct.
95
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
96
+ # SupportedHashRocketStyles: key, separator, table
97
+ # SupportedColonStyles: key, separator, table
98
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
99
+ Layout/HashAlignment:
100
+ Exclude:
101
+ - 'spec/cli/get_lesson_spec.rb'
102
+
103
+ # Offense count: 1
104
+ # Cop supports --auto-correct.
105
+ # Configuration parameters: EnforcedStyle.
106
+ # SupportedStyles: squiggly, active_support, powerpack, unindent
107
+ Layout/HeredocIndentation:
108
+ Exclude:
109
+ - 'et.gemspec'
110
+
111
+ # Offense count: 3
112
+ # Cop supports --auto-correct.
113
+ # Configuration parameters: EnforcedStyle.
114
+ # SupportedStyles: normal, indented_internal_methods
115
+ Layout/IndentationConsistency:
116
+ Exclude:
117
+ - 'spec/cli/get_lesson_spec.rb'
118
+ - 'spec/cli/submit_lesson_spec.rb'
119
+
120
+ # Offense count: 3
121
+ # Cop supports --auto-correct.
122
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
123
+ Layout/LeadingCommentSpace:
124
+ Exclude:
125
+ - 'lib/et/operating_system.rb'
126
+ - 'spec/lib/fallback_connection_spec.rb'
127
+
128
+ # Offense count: 3
129
+ # Cop supports --auto-correct.
130
+ # Configuration parameters: EnforcedStyle.
131
+ # SupportedStyles: symmetrical, new_line, same_line
132
+ Layout/MultilineMethodCallBraceLayout:
133
+ Exclude:
134
+ - 'et.gemspec'
135
+ - 'spec/lib/lesson_spec.rb'
136
+ - 'spec/lib/submission_file_list_spec.rb'
137
+
138
+ # Offense count: 2
139
+ # Cop supports --auto-correct.
140
+ # Configuration parameters: EnforcedStyleInsidePipes.
141
+ # SupportedStylesInsidePipes: space, no_space
142
+ Layout/SpaceAroundBlockParameters:
143
+ Exclude:
144
+ - 'lib/et/submission_file_list.rb'
145
+
146
+ # Offense count: 1
147
+ # Cop supports --auto-correct.
148
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
149
+ # SupportedStylesForExponentOperator: space, no_space
150
+ Layout/SpaceAroundOperators:
151
+ Exclude:
152
+ - 'spec/lib/archive_manager_spec.rb'
153
+
154
+ # Offense count: 1
155
+ # Cop supports --auto-correct.
156
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
157
+ # SupportedStyles: space, no_space
158
+ # SupportedStylesForEmptyBraces: space, no_space
159
+ Layout/SpaceBeforeBlockBraces:
160
+ Exclude:
161
+ - 'spec/lib/fallback_connection_spec.rb'
162
+
163
+ # Offense count: 1
164
+ # Cop supports --auto-correct.
165
+ # Configuration parameters: AllowForAlignment.
166
+ Layout/SpaceBeforeFirstArg:
167
+ Exclude:
168
+ - 'spec/lib/api_spec.rb'
169
+
170
+ # Offense count: 3
171
+ # Cop supports --auto-correct.
172
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
173
+ # SupportedStyles: space, no_space
174
+ # SupportedStylesForEmptyBraces: space, no_space
175
+ Layout/SpaceInsideBlockBraces:
176
+ Exclude:
177
+ - 'lib/et/submission_file_list.rb'
178
+ - 'spec/lib/fallback_connection_spec.rb'
179
+
180
+ # Offense count: 3
181
+ # Cop supports --auto-correct.
182
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
183
+ # SupportedStyles: space, no_space, compact
184
+ # SupportedStylesForEmptyBraces: space, no_space
185
+ Layout/SpaceInsideHashLiteralBraces:
186
+ Exclude:
187
+ - 'lib/et/api.rb'
188
+ - 'lib/et/fallback_connection.rb'
189
+
190
+ # Offense count: 1
191
+ # Cop supports --auto-correct.
192
+ Lint/AmbiguousRegexpLiteral:
193
+ Exclude:
194
+ - 'spec/lib/archive_manager_spec.rb'
195
+
196
+ # Offense count: 4
197
+ # Cop supports --auto-correct.
198
+ Lint/DeprecatedClassMethods:
199
+ Exclude:
200
+ - 'lib/et/config.rb'
201
+ - 'lib/et/lesson.rb'
202
+ - 'spec/lib/config_spec.rb'
203
+
204
+ # Offense count: 1
205
+ Lint/IneffectiveAccessModifier:
206
+ Exclude:
207
+ - 'lib/et/formatter.rb'
208
+
209
+ # Offense count: 1
210
+ # Cop supports --auto-correct.
211
+ Lint/NonDeterministicRequireOrder:
212
+ Exclude:
213
+ - 'spec/spec_helper.rb'
214
+
215
+ # Offense count: 2
216
+ Lint/ShadowingOuterLocalVariable:
217
+ Exclude:
218
+ - 'lib/et/formatter.rb'
219
+ - 'lib/et/lesson.rb'
220
+
221
+ # Offense count: 1
222
+ # Cop supports --auto-correct.
223
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
224
+ Lint/UselessAccessModifier:
225
+ Exclude:
226
+ - 'lib/et/formatter.rb'
227
+
228
+ # Offense count: 3
229
+ # Configuration parameters: IgnoredMethods.
230
+ Metrics/AbcSize:
231
+ Max: 67
232
+
233
+ # Offense count: 11
234
+ # Configuration parameters: CountComments, ExcludedMethods.
235
+ # ExcludedMethods: refine
236
+ Metrics/BlockLength:
237
+ Max: 79
238
+
239
+ # Offense count: 1
240
+ # Configuration parameters: CountComments.
241
+ Metrics/ClassLength:
242
+ Max: 119
243
+
244
+ # Offense count: 6
245
+ # Configuration parameters: CountComments, ExcludedMethods.
246
+ Metrics/MethodLength:
247
+ Max: 66
248
+
249
+ # Offense count: 1
250
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
251
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
252
+ Naming/MemoizedInstanceVariableName:
253
+ Exclude:
254
+ - 'lib/et/fallback_connection.rb'
255
+
256
+ # Offense count: 1
257
+ Security/Open:
258
+ Exclude:
259
+ - 'lib/et/api.rb'
260
+
261
+ # Offense count: 2
262
+ # Cop supports --auto-correct.
263
+ Security/YAMLLoad:
264
+ Exclude:
265
+ - 'lib/et/config.rb'
266
+ - 'spec/cli/init_spec.rb'
267
+
268
+ # Offense count: 1
269
+ # Cop supports --auto-correct.
270
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
271
+ # SupportedStyles: nested, compact
272
+ Style/ClassAndModuleChildren:
273
+ Exclude:
274
+ - 'lib/et/archive_manager.rb'
275
+
276
+ # Offense count: 1
277
+ # Cop supports --auto-correct.
278
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
279
+ # SupportedStyles: assign_to_condition, assign_inside_condition
280
+ Style/ConditionalAssignment:
281
+ Exclude:
282
+ - 'lib/et/runner.rb'
283
+
284
+ # Offense count: 11
285
+ Style/Documentation:
286
+ Exclude:
287
+ - 'spec/**/*'
288
+ - 'test/**/*'
289
+ - 'lib/et/api.rb'
290
+ - 'lib/et/archive_manager.rb'
291
+ - 'lib/et/challenge.rb'
292
+ - 'lib/et/config.rb'
293
+ - 'lib/et/exercise.rb'
294
+ - 'lib/et/fallback_connection.rb'
295
+ - 'lib/et/formatter.rb'
296
+ - 'lib/et/lesson.rb'
297
+ - 'lib/et/operating_system.rb'
298
+ - 'lib/et/runner.rb'
299
+ - 'lib/et/submission_file_list.rb'
300
+
301
+ # Offense count: 2
302
+ # Cop supports --auto-correct.
303
+ # Configuration parameters: EnforcedStyle.
304
+ # SupportedStyles: empty, nil, both
305
+ Style/EmptyElse:
306
+ Exclude:
307
+ - 'lib/et/api.rb'
308
+ - 'lib/et/lesson.rb'
309
+
310
+ # Offense count: 1
311
+ # Cop supports --auto-correct.
312
+ # Configuration parameters: EnforcedStyle.
313
+ # SupportedStyles: format, sprintf, percent
314
+ Style/FormatString:
315
+ Exclude:
316
+ - 'lib/et/formatter.rb'
317
+
318
+ # Offense count: 40
319
+ # Cop supports --auto-correct.
320
+ # Configuration parameters: EnforcedStyle.
321
+ # SupportedStyles: always, always_true, never
322
+ Style/FrozenStringLiteralComment:
323
+ Enabled: false
324
+
325
+ # Offense count: 7
326
+ # Configuration parameters: MinBodyLength.
327
+ Style/GuardClause:
328
+ Exclude:
329
+ - 'lib/et/archive_manager.rb'
330
+ - 'lib/et/fallback_connection.rb'
331
+ - 'lib/et/operating_system.rb'
332
+ - 'lib/et/runner.rb'
333
+ - 'spec/lib/fallback_connection_spec.rb'
334
+
335
+ # Offense count: 9
336
+ # Cop supports --auto-correct.
337
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
338
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
339
+ Style/HashSyntax:
340
+ Exclude:
341
+ - 'lib/et/api.rb'
342
+ - 'lib/et/fallback_connection.rb'
343
+ - 'spec/lib/fallback_connection_spec.rb'
344
+
345
+ # Offense count: 4
346
+ # Cop supports --auto-correct.
347
+ Style/IfUnlessModifier:
348
+ Exclude:
349
+ - 'lib/et/operating_system.rb'
350
+ - 'spec/lib/challenge_spec.rb'
351
+ - 'spec/support/helpers/sample_files.rb'
352
+
353
+ # Offense count: 1
354
+ # Cop supports --auto-correct.
355
+ Style/LineEndConcatenation:
356
+ Exclude:
357
+ - 'lib/et/runner.rb'
358
+
359
+ # Offense count: 2
360
+ # Cop supports --auto-correct.
361
+ # Configuration parameters: EnforcedStyle.
362
+ # SupportedStyles: literals, strict
363
+ Style/MutableConstant:
364
+ Exclude:
365
+ - 'lib/et/submission_file_list.rb'
366
+ - 'lib/et/version.rb'
367
+
368
+ # Offense count: 1
369
+ # Cop supports --auto-correct.
370
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
371
+ # SupportedStyles: skip_modifier_ifs, always
372
+ Style/Next:
373
+ Exclude:
374
+ - 'lib/et/runner.rb'
375
+
376
+ # Offense count: 2
377
+ # Cop supports --auto-correct.
378
+ # Configuration parameters: EnforcedOctalStyle.
379
+ # SupportedOctalStyles: zero_with_o, zero_only
380
+ Style/NumericLiteralPrefix:
381
+ Exclude:
382
+ - 'lib/et/lesson.rb'
383
+
384
+ # Offense count: 1
385
+ # Cop supports --auto-correct.
386
+ Style/ParallelAssignment:
387
+ Exclude:
388
+ - 'lib/et/operating_system.rb'
389
+
390
+ # Offense count: 5
391
+ # Cop supports --auto-correct.
392
+ # Configuration parameters: .
393
+ # SupportedStyles: compact, exploded
394
+ Style/RaiseArgs:
395
+ EnforcedStyle: compact
396
+
397
+ # Offense count: 1
398
+ # Cop supports --auto-correct.
399
+ Style/RedundantBegin:
400
+ Exclude:
401
+ - 'lib/et/fallback_connection.rb'
402
+
403
+ # Offense count: 264
404
+ # Cop supports --auto-correct.
405
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
406
+ # SupportedStyles: single_quotes, double_quotes
407
+ Style/StringLiterals:
408
+ Enabled: false
409
+
410
+ # Offense count: 2
411
+ # Cop supports --auto-correct.
412
+ # Configuration parameters: EnforcedStyle.
413
+ # SupportedStyles: single_quotes, double_quotes
414
+ Style/StringLiteralsInInterpolation:
415
+ Exclude:
416
+ - 'lib/et/exercise.rb'
417
+
418
+ # Offense count: 3
419
+ # Cop supports --auto-correct.
420
+ # Configuration parameters: MinSize.
421
+ # SupportedStyles: percent, brackets
422
+ Style/SymbolArray:
423
+ EnforcedStyle: brackets
424
+
425
+ # Offense count: 2
426
+ # Cop supports --auto-correct.
427
+ # Configuration parameters: IgnoredMethods.
428
+ # IgnoredMethods: respond_to, define_method
429
+ Style/SymbolProc:
430
+ Exclude:
431
+ - 'spec/support/helpers/archive_helper.rb'
432
+
433
+ # Offense count: 7
434
+ # Cop supports --auto-correct.
435
+ # Configuration parameters: AllowNamedUnderscoreVariables.
436
+ Style/TrailingUnderscoreVariable:
437
+ Exclude:
438
+ - 'spec/cli/get_lesson_spec.rb'
439
+ - 'spec/cli/init_spec.rb'
440
+ - 'spec/cli/list_lessons_spec.rb'
441
+ - 'spec/cli/run_exercise_test_suite_spec.rb'
442
+ - 'spec/cli/submit_lesson_spec.rb'
443
+
444
+ # Offense count: 1
445
+ # Cop supports --auto-correct.
446
+ # Configuration parameters: MinSize, WordRegex.
447
+ # SupportedStyles: percent, brackets
448
+ Style/WordArray:
449
+ EnforcedStyle: brackets
450
+
451
+ # Offense count: 13
452
+ # Cop supports --auto-correct.
453
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
454
+ # URISchemes: http, https
455
+ Layout/LineLength:
456
+ Max: 97
@@ -1 +1 @@
1
- 2.2.3
1
+ 2.6.3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et (0.6.0)
4
+ et (0.6.2)
5
5
  faraday (~> 0.9)
6
6
  faraday_middleware (~> 0.10)
7
7
  gli (= 2.11.0)
@@ -13,34 +13,32 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- coderay (1.1.1)
17
- diff-lcs (1.2.5)
18
- faraday (0.9.2)
16
+ coderay (1.1.2)
17
+ diff-lcs (1.3)
18
+ faraday (0.17.3)
19
19
  multipart-post (>= 1.2, < 3)
20
- faraday_middleware (0.10.0)
21
- faraday (>= 0.7.4, < 0.10)
20
+ faraday_middleware (0.14.0)
21
+ faraday (>= 0.7.4, < 1.0)
22
22
  gli (2.11.0)
23
- method_source (0.8.2)
24
- multipart-post (2.0.0)
25
- pry (0.10.3)
26
- coderay (~> 1.1.0)
27
- method_source (~> 0.8.1)
28
- slop (~> 3.4)
23
+ method_source (1.0.0)
24
+ multipart-post (2.1.1)
25
+ pry (0.13.1)
26
+ coderay (~> 1.1)
27
+ method_source (~> 1.0)
29
28
  rake (10.5.0)
30
- rspec (3.5.0)
31
- rspec-core (~> 3.5.0)
32
- rspec-expectations (~> 3.5.0)
33
- rspec-mocks (~> 3.5.0)
34
- rspec-core (3.5.4)
35
- rspec-support (~> 3.5.0)
36
- rspec-expectations (3.5.0)
29
+ rspec (3.9.0)
30
+ rspec-core (~> 3.9.0)
31
+ rspec-expectations (~> 3.9.0)
32
+ rspec-mocks (~> 3.9.0)
33
+ rspec-core (3.9.2)
34
+ rspec-support (~> 3.9.3)
35
+ rspec-expectations (3.9.2)
37
36
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.5.0)
39
- rspec-mocks (3.5.0)
37
+ rspec-support (~> 3.9.0)
38
+ rspec-mocks (3.9.1)
40
39
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.5.0)
42
- rspec-support (3.5.0)
43
- slop (3.6.0)
40
+ rspec-support (~> 3.9.0)
41
+ rspec-support (3.9.3)
44
42
 
45
43
  PLATFORMS
46
44
  ruby
@@ -50,4 +48,4 @@ DEPENDENCIES
50
48
  pry (~> 0)
51
49
 
52
50
  BUNDLED WITH
53
- 1.13.5
51
+ 1.17.2
data/et.gemspec CHANGED
@@ -15,7 +15,6 @@ DESC
15
15
 
16
16
  s.files = `git ls-files`.split("\n")
17
17
  s.require_paths << "lib"
18
- s.has_rdoc = false
19
18
  s.bindir = "bin"
20
19
  s.executables << "et"
21
20
  s.license = "MIT"
@@ -5,7 +5,7 @@ module ET
5
5
  include Enumerable
6
6
  DEFAULT_IGNORE_GLOBS = [
7
7
  '.lesson.yml',
8
- 'node_modules/**/*'
8
+ 'node_modules/'
9
9
  ]
10
10
 
11
11
  def initialize(path)
@@ -14,9 +14,15 @@ module ET
14
14
 
15
15
  def files
16
16
  unless @files
17
- @files = Rake::FileList[File.join(@path, "**/*")]
17
+ @files = Rake::FileList[File.join(@path, "**/*"), File.join(@path, ".etignore")]
18
18
  ignore_globs.each do |glob|
19
- @files = @files.exclude(File.join(@path, glob))
19
+ filename = File.join(@path, glob)
20
+
21
+ if File.directory?(filename)
22
+ filename += glob.end_with?("/") ? "**/*" : "/**/*"
23
+ end
24
+
25
+ @files = @files.exclude(filename)
20
26
  end
21
27
  @files = @files.sub(File.join(@path, "/"), "")
22
28
  end
@@ -32,19 +38,20 @@ module ET
32
38
 
33
39
  protected
34
40
  def ignore_globs
35
- lesson_ignore_globs + [] + DEFAULT_IGNORE_GLOBS
41
+ etignore_globs + [] + DEFAULT_IGNORE_GLOBS
36
42
  end
37
43
 
38
- def lesson_ignore_globs
39
- unless @lesson_ignore_globs
40
- lesson_yml = File.join(@path, '.lesson.yml')
41
- if FileTest.exists?(lesson_yml)
42
- @lesson_ignore_globs = YAML.load_file(lesson_yml)['ignore'] || []
44
+ def etignore_globs
45
+ unless @etignore_globs
46
+ etignore = File.join(@path, '.etignore')
47
+ if FileTest.exists?(etignore)
48
+ @etignore_globs = File.read(etignore).split(/\n/)
49
+ @etignore_globs.delete_if { | string | string.start_with?("#") || string.empty?}
43
50
  else
44
- @lesson_ignore_globs = []
51
+ @etignore_globs = []
45
52
  end
46
53
  end
47
- @lesson_ignore_globs
54
+ @etignore_globs
48
55
  end
49
56
  end
50
57
  end
@@ -1,3 +1,3 @@
1
1
  module ET
2
- VERSION = "0.6.2"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -0,0 +1,4 @@
1
+ bloated-challenge.md
2
+
3
+ # Here's a comment
4
+ /rando_folder
@@ -1,7 +1,3 @@
1
- ---
2
1
  title: "Bloated Challenge"
3
2
  type: "challenge"
4
3
  description: "Some description."
5
- ignore:
6
- - "bloated-challenge.md"
7
- - "rando_folder/**/*"
@@ -0,0 +1 @@
1
+ sample-challenge.md
@@ -2,5 +2,3 @@
2
2
  title: "Sample Challenge"
3
3
  type: "challenge"
4
4
  description: "Some description."
5
- ignore:
6
- - "sample-challenge.md"
@@ -0,0 +1 @@
1
+ sample-exercise.md
@@ -2,5 +2,3 @@
2
2
  title: "Sample Exercise"
3
3
  type: "exercise"
4
4
  description: "Some description here."
5
- ignore:
6
- - "sample-exercise.md"
@@ -9,6 +9,10 @@ describe ET::SubmissionFileList do
9
9
  expect(file_list).to include('problem.rb')
10
10
  end
11
11
 
12
+ it 'includes .etignore' do
13
+ expect(file_list).to include('.etignore')
14
+ end
15
+
12
16
  it 'ignores a standard file' do
13
17
  expect(file_list).to_not include('sample-challenge.md')
14
18
  end
@@ -21,7 +25,7 @@ describe ET::SubmissionFileList do
21
25
  expect(file_list).to_not include('node_modules/boo/somefile.js')
22
26
  end
23
27
 
24
- it 'ignores a file included in the lesson.yml ignore' do
28
+ it 'ignores a file included in .etignore' do
25
29
  expect(file_list).to_not include('rando_folder/rando_file.js')
26
30
  end
27
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Sheehan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-02 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -133,6 +133,8 @@ extra_rdoc_files: []
133
133
  files:
134
134
  - ".gitignore"
135
135
  - ".rspec"
136
+ - ".rubocop.yml"
137
+ - ".rubocop_todo.yml"
136
138
  - ".ruby-gemset"
137
139
  - ".ruby-version"
138
140
  - ".travis.yml"
@@ -160,6 +162,7 @@ files:
160
162
  - spec/cli/list_lessons_spec.rb
161
163
  - spec/cli/run_exercise_test_suite_spec.rb
162
164
  - spec/cli/submit_lesson_spec.rb
165
+ - spec/data/bloated-challenge/.etignore
163
166
  - spec/data/bloated-challenge/.lesson.yml
164
167
  - spec/data/bloated-challenge/bloated-challenge.md
165
168
  - spec/data/bloated-challenge/node_modules/boo/somefile.js
@@ -167,9 +170,11 @@ files:
167
170
  - spec/data/bloated-challenge/rando_folder/rando_file.js
168
171
  - spec/data/challenge.json
169
172
  - spec/data/lessons.json
173
+ - spec/data/sample-challenge/.etignore
170
174
  - spec/data/sample-challenge/.lesson.yml
171
175
  - spec/data/sample-challenge/problem.rb
172
176
  - spec/data/sample-challenge/sample-challenge.md
177
+ - spec/data/sample-exercise/.etignore
173
178
  - spec/data/sample-exercise/.lesson.yml
174
179
  - spec/data/sample-exercise/lib/sample_exercise.rb
175
180
  - spec/data/sample-exercise/sample-exercise.md
@@ -209,8 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
214
  - !ruby/object:Gem::Version
210
215
  version: '0'
211
216
  requirements: []
212
- rubyforge_project:
213
- rubygems_version: 2.4.5.1
217
+ rubygems_version: 3.0.3
214
218
  signing_key:
215
219
  specification_version: 4
216
220
  summary: Command-line interface for the event horizon.