battle_boats 0.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 791eea6114618f5ef11931fe82adba7e2ffe7dec
4
+ data.tar.gz: 63d52864d51536b2f37f64a3399db55f7d158ccf
5
+ SHA512:
6
+ metadata.gz: 9c33a5b0d4ccee4a9c7a87cc3bd914aa83e9090dab4de4e2fd231c7f37eef205c966ad02ba1d48eff61425e5b931f2f9216609a928efb4e29e7e6790795ec377
7
+ data.tar.gz: 4b5eda31f0bf537dd288d7f990da0e644ee4d86c3b645b4e4dd9f576440af41587aa36de0da5bbb99d4ec7581200117ad92e2f4521a53ea8060bffe25940be4f
data/.codeclimate.yml ADDED
@@ -0,0 +1,9 @@
1
+ version: "2"
2
+ plugins:
3
+ rubocop:
4
+ enable: true
5
+ exclude_patterns:
6
+ - 'spec/*'
7
+ - 'Gemfile'
8
+ - 'Rakefile'
9
+ - '*.gemspec'
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .DS_Store
13
+ *.swp
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,607 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'spec/*'
4
+ - 'Gemfile'
5
+ - 'Rakefile'
6
+ - '*.gemspec'
7
+ - 'bin/*'
8
+ - '**/version.rb'
9
+
10
+ Naming/AccessorMethodName:
11
+ Description: Check the naming of accessor methods for get_/set_.
12
+ Enabled: false
13
+
14
+ Style/Alias:
15
+ Description: 'Use alias_method instead of alias.'
16
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
17
+ Enabled: false
18
+
19
+ Style/ArrayJoin:
20
+ Description: 'Use Array#join instead of Array#*.'
21
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
22
+ Enabled: false
23
+
24
+ Style/AsciiComments:
25
+ Description: 'Use only ascii symbols in comments.'
26
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
27
+ Enabled: false
28
+
29
+ Naming/AsciiIdentifiers:
30
+ Description: 'Use only ascii symbols in identifiers.'
31
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
32
+ Enabled: false
33
+
34
+ Style/Attr:
35
+ Description: 'Checks for uses of Module#attr.'
36
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
37
+ Enabled: false
38
+
39
+ Metrics/BlockNesting:
40
+ Description: 'Avoid excessive block nesting'
41
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
42
+ Enabled: false
43
+
44
+ Style/CaseEquality:
45
+ Description: 'Avoid explicit use of the case equality operator(===).'
46
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
47
+ Enabled: false
48
+
49
+ Style/CharacterLiteral:
50
+ Description: 'Checks for uses of character literals.'
51
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
52
+ Enabled: false
53
+
54
+ Style/ClassAndModuleChildren:
55
+ Description: 'Checks style of children classes and modules.'
56
+ Enabled: true
57
+ EnforcedStyle: nested
58
+
59
+ Metrics/ClassLength:
60
+ Description: 'Avoid classes longer than 100 lines of code.'
61
+ Enabled: false
62
+
63
+ Metrics/ModuleLength:
64
+ Description: 'Avoid modules longer than 100 lines of code.'
65
+ Enabled: false
66
+
67
+ Style/ClassVars:
68
+ Description: 'Avoid the use of class variables.'
69
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
70
+ Enabled: false
71
+
72
+ Style/CollectionMethods:
73
+ Enabled: true
74
+ PreferredMethods:
75
+ find: detect
76
+ inject: reduce
77
+ collect: map
78
+ find_all: select
79
+
80
+ Style/ColonMethodCall:
81
+ Description: 'Do not use :: for method call.'
82
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
83
+ Enabled: false
84
+
85
+ Style/CommentAnnotation:
86
+ Description: >-
87
+ Checks formatting of special comments
88
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
89
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
90
+ Enabled: false
91
+
92
+ Metrics/AbcSize:
93
+ Description: >-
94
+ A calculated magnitude based on number of assignments,
95
+ branches, and conditions.
96
+ Enabled: false
97
+
98
+ Metrics/BlockLength:
99
+ CountComments: true # count full line comments?
100
+ Max: 25
101
+ ExcludedMethods: []
102
+ Exclude:
103
+ - "spec/**/*"
104
+
105
+ Metrics/CyclomaticComplexity:
106
+ Description: >-
107
+ A complexity metric that is strongly correlated to the number
108
+ of test cases needed to validate a method.
109
+ Enabled: false
110
+
111
+ Rails/Delegate:
112
+ Description: 'Prefer delegate method for delegations.'
113
+ Enabled: false
114
+
115
+ Style/PreferredHashMethods:
116
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
117
+ StyleGuide: '#hash-key'
118
+ Enabled: false
119
+
120
+ Style/Documentation:
121
+ Description: 'Document classes and non-namespace modules.'
122
+ Enabled: false
123
+
124
+ Style/DoubleNegation:
125
+ Description: 'Checks for uses of double negation (!!).'
126
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
127
+ Enabled: false
128
+
129
+ Style/EachWithObject:
130
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
131
+ Enabled: false
132
+
133
+ Style/EmptyLiteral:
134
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
135
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
136
+ Enabled: false
137
+
138
+ # Checks whether the source file has a utf-8 encoding comment or not
139
+ # AutoCorrectEncodingComment must match the regex
140
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
141
+ Style/Encoding:
142
+ Enabled: false
143
+
144
+ Style/EvenOdd:
145
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
146
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
147
+ Enabled: false
148
+
149
+ Naming/FileName:
150
+ Description: 'Use snake_case for source file names.'
151
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
152
+ Enabled: false
153
+
154
+ Style/FrozenStringLiteralComment:
155
+ Description: >-
156
+ Add the frozen_string_literal comment to the top of files
157
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
158
+ Enabled: false
159
+
160
+ Style/FlipFlop:
161
+ Description: 'Checks for flip flops'
162
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
163
+ Enabled: false
164
+
165
+ Style/FormatString:
166
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
167
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
168
+ Enabled: false
169
+
170
+ Style/GlobalVars:
171
+ Description: 'Do not introduce global variables.'
172
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
173
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
174
+ Enabled: false
175
+
176
+ Style/GuardClause:
177
+ Description: 'Check for conditionals that can be replaced with guard clauses'
178
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
179
+ Enabled: false
180
+
181
+ Style/IfUnlessModifier:
182
+ Description: >-
183
+ Favor modifier if/unless usage when you have a
184
+ single-line body.
185
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
186
+ Enabled: false
187
+
188
+ Style/IfWithSemicolon:
189
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
190
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
191
+ Enabled: false
192
+
193
+ Style/InlineComment:
194
+ Description: 'Avoid inline comments.'
195
+ Enabled: false
196
+
197
+ Style/Lambda:
198
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
199
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
200
+ Enabled: false
201
+
202
+ Style/LambdaCall:
203
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
204
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
205
+ Enabled: false
206
+
207
+ Style/LineEndConcatenation:
208
+ Description: >-
209
+ Use \ instead of + or << to concatenate two string literals at
210
+ line end.
211
+ Enabled: false
212
+
213
+ Metrics/LineLength:
214
+ Description: 'Limit lines to 80 characters.'
215
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
216
+ Max: 80
217
+
218
+ Metrics/MethodLength:
219
+ Description: 'Avoid methods longer than 10 lines of code.'
220
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
221
+ Enabled: false
222
+
223
+ Style/ModuleFunction:
224
+ Description: 'Checks for usage of `extend self` in modules.'
225
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
226
+ Enabled: false
227
+
228
+ Style/MultilineBlockChain:
229
+ Description: 'Avoid multi-line chains of blocks.'
230
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
231
+ Enabled: false
232
+
233
+ Style/NegatedIf:
234
+ Description: >-
235
+ Favor unless over if for negative conditions
236
+ (or control flow or).
237
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
238
+ Enabled: false
239
+
240
+ Style/NegatedWhile:
241
+ Description: 'Favor until over while for negative conditions.'
242
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
243
+ Enabled: false
244
+
245
+ Style/Next:
246
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
247
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
248
+ Enabled: false
249
+
250
+ Style/NilComparison:
251
+ Description: 'Prefer x.nil? to x == nil.'
252
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
253
+ Enabled: false
254
+
255
+ Style/Not:
256
+ Description: 'Use ! instead of not.'
257
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
258
+ Enabled: false
259
+
260
+ Style/NumericLiterals:
261
+ Description: >-
262
+ Add underscores to large numeric literals to improve their
263
+ readability.
264
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
265
+ Enabled: false
266
+
267
+ Style/OneLineConditional:
268
+ Description: >-
269
+ Favor the ternary operator(?:) over
270
+ if/then/else/end constructs.
271
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
272
+ Enabled: false
273
+
274
+ Naming/BinaryOperatorParameterName:
275
+ Description: 'When defining binary operators, name the argument other.'
276
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
277
+ Enabled: false
278
+
279
+ Metrics/ParameterLists:
280
+ Description: 'Avoid parameter lists longer than three or four parameters.'
281
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
282
+ Enabled: false
283
+
284
+ Style/PercentLiteralDelimiters:
285
+ Description: 'Use `%`-literal delimiters consistently'
286
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
287
+ Enabled: false
288
+
289
+ Style/PerlBackrefs:
290
+ Description: 'Avoid Perl-style regex back references.'
291
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
292
+ Enabled: false
293
+
294
+ Naming/PredicateName:
295
+ Description: 'Check the names of predicate methods.'
296
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
297
+ NamePrefixBlacklist:
298
+ - is_
299
+ Exclude:
300
+ - spec/**/*
301
+
302
+ Style/Proc:
303
+ Description: 'Use proc instead of Proc.new.'
304
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
305
+ Enabled: false
306
+
307
+ Style/RaiseArgs:
308
+ Description: 'Checks the arguments passed to raise/fail.'
309
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
310
+ Enabled: false
311
+
312
+ Style/RegexpLiteral:
313
+ Description: 'Use / or %r around regular expressions.'
314
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
315
+ Enabled: false
316
+
317
+ Style/SelfAssignment:
318
+ Description: >-
319
+ Checks for places where self-assignment shorthand should have
320
+ been used.
321
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
322
+ Enabled: false
323
+
324
+ Style/SingleLineBlockParams:
325
+ Description: 'Enforces the names of some block params.'
326
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
327
+ Enabled: false
328
+
329
+ Style/SingleLineMethods:
330
+ Description: 'Avoid single-line methods.'
331
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
332
+ Enabled: false
333
+
334
+ Style/SignalException:
335
+ Description: 'Checks for proper usage of fail and raise.'
336
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
337
+ Enabled: false
338
+
339
+ Style/SpecialGlobalVars:
340
+ Description: 'Avoid Perl-style global variables.'
341
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
342
+ Enabled: false
343
+
344
+ Style/StringLiterals:
345
+ Description: 'Checks if uses of quotes match the configured preference.'
346
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
347
+ EnforcedStyle: double_quotes
348
+ Enabled: true
349
+
350
+ Style/TrailingCommaInArguments:
351
+ Description: 'Checks for trailing comma in argument lists.'
352
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
353
+ EnforcedStyleForMultiline: comma
354
+ SupportedStylesForMultiline:
355
+ - comma
356
+ - consistent_comma
357
+ - no_comma
358
+ Enabled: true
359
+
360
+ Style/TrailingCommaInArrayLiteral:
361
+ Description: 'Checks for trailing comma in array literals.'
362
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
363
+ EnforcedStyleForMultiline: comma
364
+ SupportedStylesForMultiline:
365
+ - comma
366
+ - consistent_comma
367
+ - no_comma
368
+ Enabled: true
369
+
370
+ Style/TrailingCommaInHashLiteral:
371
+ Description: 'Checks for trailing comma in hash literals.'
372
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
373
+ EnforcedStyleForMultiline: comma
374
+ SupportedStylesForMultiline:
375
+ - comma
376
+ - consistent_comma
377
+ - no_comma
378
+ Enabled: true
379
+
380
+ Style/TrivialAccessors:
381
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
382
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
383
+ Enabled: false
384
+
385
+ Style/VariableInterpolation:
386
+ Description: >-
387
+ Don't interpolate global, instance and class variables
388
+ directly in strings.
389
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
390
+ Enabled: false
391
+
392
+ Style/WhenThen:
393
+ Description: 'Use when x then ... for one-line cases.'
394
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
395
+ Enabled: false
396
+
397
+ Style/WhileUntilModifier:
398
+ Description: >-
399
+ Favor modifier while/until usage when you have a
400
+ single-line body.
401
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
402
+ Enabled: false
403
+
404
+ Style/WordArray:
405
+ Description: 'Use %w or %W for arrays of words.'
406
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
407
+ Enabled: false
408
+
409
+ # Layout
410
+
411
+ Layout/AlignParameters:
412
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
413
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
414
+ Enabled: false
415
+
416
+ Layout/ConditionPosition:
417
+ Description: >-
418
+ Checks for condition placed in a confusing position relative to
419
+ the keyword.
420
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
421
+ Enabled: false
422
+
423
+ Layout/DotPosition:
424
+ Description: 'Checks the position of the dot in multi-line method calls.'
425
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
426
+ EnforcedStyle: trailing
427
+
428
+ Layout/ExtraSpacing:
429
+ Description: 'Do not use unnecessary spacing.'
430
+ Enabled: true
431
+
432
+ Layout/MultilineOperationIndentation:
433
+ Description: >-
434
+ Checks indentation of binary operations that span more than
435
+ one line.
436
+ Enabled: true
437
+ EnforcedStyle: indented
438
+
439
+ Layout/MultilineMethodCallIndentation:
440
+ Description: >-
441
+ Checks indentation of method calls with the dot operator
442
+ that span more than one line.
443
+ Enabled: true
444
+ EnforcedStyle: indented
445
+
446
+ Layout/InitialIndentation:
447
+ Description: >-
448
+ Checks the indentation of the first non-blank non-comment line in a file.
449
+ Enabled: false
450
+
451
+ # Lint
452
+
453
+ Lint/AmbiguousOperator:
454
+ Description: >-
455
+ Checks for ambiguous operators in the first argument of a
456
+ method invocation without parentheses.
457
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
458
+ Enabled: false
459
+
460
+ Lint/AmbiguousRegexpLiteral:
461
+ Description: >-
462
+ Checks for ambiguous regexp literals in the first argument of
463
+ a method invocation without parenthesis.
464
+ Enabled: false
465
+
466
+ Lint/AssignmentInCondition:
467
+ Description: "Don't use assignment in conditions."
468
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
469
+ Enabled: false
470
+
471
+ Lint/CircularArgumentReference:
472
+ Description: "Don't refer to the keyword argument in the default value."
473
+ Enabled: false
474
+
475
+ Lint/DeprecatedClassMethods:
476
+ Description: 'Check for deprecated class method calls.'
477
+ Enabled: false
478
+
479
+ Lint/DuplicatedKey:
480
+ Description: 'Check for duplicate keys in hash literals.'
481
+ Enabled: false
482
+
483
+ Lint/EachWithObjectArgument:
484
+ Description: 'Check for immutable argument given to each_with_object.'
485
+ Enabled: false
486
+
487
+ Lint/ElseLayout:
488
+ Description: 'Check for odd code arrangement in an else block.'
489
+ Enabled: false
490
+
491
+ Lint/FormatParameterMismatch:
492
+ Description: 'The number of parameters to format/sprint must match the fields.'
493
+ Enabled: false
494
+
495
+ Lint/HandleExceptions:
496
+ Description: "Don't suppress exception."
497
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
498
+ Enabled: false
499
+
500
+ Lint/LiteralAsCondition:
501
+ Description: 'Checks of literals used in conditions.'
502
+ Enabled: false
503
+
504
+ Lint/LiteralInInterpolation:
505
+ Description: 'Checks for literals used in interpolation.'
506
+ Enabled: false
507
+
508
+ Lint/Loop:
509
+ Description: >-
510
+ Use Kernel#loop with break rather than begin/end/until or
511
+ begin/end/while for post-loop tests.
512
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
513
+ Enabled: false
514
+
515
+ Lint/NestedMethodDefinition:
516
+ Description: 'Do not use nested method definitions.'
517
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
518
+ Enabled: false
519
+
520
+ Lint/NonLocalExitFromIterator:
521
+ Description: 'Do not use return in iterator to cause non-local exit.'
522
+ Enabled: false
523
+
524
+ Lint/ParenthesesAsGroupedExpression:
525
+ Description: >-
526
+ Checks for method calls with a space before the opening
527
+ parenthesis.
528
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
529
+ Enabled: false
530
+
531
+ Lint/RequireParentheses:
532
+ Description: >-
533
+ Use parentheses in the method call to avoid confusion
534
+ about precedence.
535
+ Enabled: false
536
+
537
+ Lint/UnderscorePrefixedVariableName:
538
+ Description: 'Do not use prefix `_` for a variable that is used.'
539
+ Enabled: false
540
+
541
+ Lint/UnneededCopDisableDirective:
542
+ Description: >-
543
+ Checks for rubocop:disable comments that can be removed.
544
+ Note: this cop is not disabled when disabling all cops.
545
+ It must be explicitly disabled.
546
+ Enabled: false
547
+
548
+ Lint/Void:
549
+ Description: 'Possible use of operator/literal/variable in void context.'
550
+ Enabled: false
551
+
552
+ # Performance
553
+
554
+ Performance/CaseWhenSplat:
555
+ Description: >-
556
+ Place `when` conditions that use splat at the end
557
+ of the list of `when` branches.
558
+ Enabled: false
559
+
560
+ Performance/Count:
561
+ Description: >-
562
+ Use `count` instead of `select...size`, `reject...size`,
563
+ `select...count`, `reject...count`, `select...length`,
564
+ and `reject...length`.
565
+ Enabled: false
566
+
567
+ Performance/Detect:
568
+ Description: >-
569
+ Use `detect` instead of `select.first`, `find_all.first`,
570
+ `select.last`, and `find_all.last`.
571
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
572
+ Enabled: false
573
+
574
+ Performance/FlatMap:
575
+ Description: >-
576
+ Use `Enumerable#flat_map`
577
+ instead of `Enumerable#map...Array#flatten(1)`
578
+ or `Enumberable#collect..Array#flatten(1)`
579
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
580
+ Enabled: false
581
+
582
+ Performance/ReverseEach:
583
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
584
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
585
+ Enabled: false
586
+
587
+ Performance/Sample:
588
+ Description: >-
589
+ Use `sample` instead of `shuffle.first`,
590
+ `shuffle.last`, and `shuffle[Fixnum]`.
591
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
592
+ Enabled: false
593
+
594
+ Performance/Size:
595
+ Description: >-
596
+ Use `size` instead of `count` for counting
597
+ the number of elements in `Array` and `Hash`.
598
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
599
+ Enabled: false
600
+
601
+ Performance/StringReplacement:
602
+ Description: >-
603
+ Use `tr` instead of `gsub` when you are replacing the same
604
+ number of characters. Use `delete` instead of `gsub` when
605
+ you are deleting characters.
606
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
607
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,16 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.4.1
4
+ sudo: false
5
+ before_install: gem install bundler -v 1.16.1
6
+ install: bundle install
7
+ before_script:
8
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
9
+ - chmod +x ./cc-test-reporter
10
+ - ./cc-test-reporter before-build
11
+ script:
12
+ - bundle exec rspec --format documentation
13
+ after_script:
14
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
15
+ notifications:
16
+ email: false
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at thomascountz@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in battle_boats.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ battle_boats (0.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.3)
10
+ docile (1.3.0)
11
+ json (2.1.0)
12
+ rake (10.5.0)
13
+ rspec (3.7.0)
14
+ rspec-core (~> 3.7.0)
15
+ rspec-expectations (~> 3.7.0)
16
+ rspec-mocks (~> 3.7.0)
17
+ rspec-core (3.7.1)
18
+ rspec-support (~> 3.7.0)
19
+ rspec-expectations (3.7.0)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.7.0)
22
+ rspec-mocks (3.7.0)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.7.0)
25
+ rspec-support (3.7.1)
26
+ simplecov (0.16.1)
27
+ docile (~> 1.1)
28
+ json (>= 1.8, < 3)
29
+ simplecov-html (~> 0.10.0)
30
+ simplecov-html (0.10.2)
31
+
32
+ PLATFORMS
33
+ ruby
34
+
35
+ DEPENDENCIES
36
+ battle_boats!
37
+ bundler (~> 1.16)
38
+ rake (~> 10.0)
39
+ rspec (~> 3.0)
40
+ simplecov
41
+
42
+ BUNDLED WITH
43
+ 1.16.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Thomas Countz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Battle Boats
2
+
3
+ Battle Boats is a ruby library implementation of [Battleship](https://en.wikipedia.org/wiki/Battleship_%28game%29)!
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'battle_boats'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install battle_boats
20
+
21
+ ## Usage
22
+
23
+ TODO
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/thomascountz/battle_boats. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
38
+
39
+ ## Code of Conduct
40
+
41
+ Everyone interacting in the BattleBoats project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/battle_boats/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,35 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "battle_boats/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "battle_boats"
8
+ spec.version = BattleBoats::VERSION
9
+ spec.authors = ["Thomas Countz"]
10
+ spec.email = ["thomascountz@gmail.com"]
11
+
12
+ spec.summary = %q{Ruby gem implementation of the game, Battleship}
13
+ spec.description = %q{Battleship is a two-player guessing game. More details can be found here: https://en.wikipedia.org/wiki/Battleship_(game)}
14
+ spec.homepage = "https://www.github.com/thomascountz/battle_boats"
15
+ spec.license = "MIT"
16
+
17
+ if spec.respond_to?(:metadata)
18
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
19
+ else
20
+ raise "RubyGems 2.0 or newer is required to protect against " \
21
+ "public gem pushes."
22
+ end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
+ f.match(%r{^(test|spec|features)/})
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_development_dependency "bundler", "~> 1.16"
32
+ spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "rspec", "~> 3.0"
34
+ spec.add_development_dependency "simplecov"
35
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "battle_boats"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ module BattleBoats
2
+ VERSION = "0.0.0".freeze
3
+ end
@@ -0,0 +1,5 @@
1
+ require "battle_boats/version"
2
+
3
+ module BattleBoats
4
+ # Your code goes here...
5
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: battle_boats
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Thomas Countz
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-05-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: 'Battleship is a two-player guessing game. More details can be found
70
+ here: https://en.wikipedia.org/wiki/Battleship_(game)'
71
+ email:
72
+ - thomascountz@gmail.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".codeclimate.yml"
78
+ - ".gitignore"
79
+ - ".rspec"
80
+ - ".rubocop.yml"
81
+ - ".travis.yml"
82
+ - CODE_OF_CONDUCT.md
83
+ - Gemfile
84
+ - Gemfile.lock
85
+ - LICENSE.txt
86
+ - README.md
87
+ - Rakefile
88
+ - battle_boats.gemspec
89
+ - bin/console
90
+ - bin/setup
91
+ - lib/battle_boats.rb
92
+ - lib/battle_boats/version.rb
93
+ homepage: https://www.github.com/thomascountz/battle_boats
94
+ licenses:
95
+ - MIT
96
+ metadata:
97
+ allowed_push_host: https://rubygems.org
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.6.14
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: Ruby gem implementation of the game, Battleship
118
+ test_files: []