thincloud-postmark 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,652 @@
1
+ # These are all the cops that are enabled in the default configuration.
2
+
3
+ AccessModifierIndentation:
4
+ Description: Check indentation of private/protected visibility modifiers.
5
+ Enabled: true
6
+
7
+ AccessorMethodName:
8
+ Description: Check the naming of accessor methods for get_/set_.
9
+ Enabled: true
10
+
11
+ Alias:
12
+ Description: 'Use alias_method instead of alias.'
13
+ Enabled: true
14
+
15
+ AlignArray:
16
+ Description: >-
17
+ Align the elements of an array literal if they span more than
18
+ one line.
19
+ Enabled: true
20
+
21
+ AlignHash:
22
+ Description: >-
23
+ Align the elements of a hash literal if they span more than
24
+ one line.
25
+ Enabled: true
26
+
27
+ AlignParameters:
28
+ Description: >-
29
+ Align the parameters of a method call if they span more
30
+ than one line.
31
+ Enabled: true
32
+
33
+ AndOr:
34
+ Description: 'Use &&/|| instead of and/or.'
35
+ Enabled: true
36
+
37
+ AsciiComments:
38
+ Description: 'Use only ascii symbols in comments.'
39
+ Enabled: true
40
+
41
+ AsciiIdentifiers:
42
+ Description: 'Use only ascii symbols in identifiers.'
43
+ Enabled: true
44
+
45
+ Attr:
46
+ Description: 'Checks for uses of Module#attr.'
47
+ Enabled: true
48
+
49
+ BeginBlock:
50
+ Description: 'Avoid the use of BEGIN blocks.'
51
+ Enabled: true
52
+
53
+ BlockComments:
54
+ Description: 'Do not use block comments.'
55
+ Enabled: true
56
+
57
+ BlockNesting:
58
+ Description: 'Avoid excessive block nesting'
59
+ Enabled: true
60
+
61
+ Blocks:
62
+ Description: >-
63
+ Avoid using {...} for multi-line blocks (multiline chaining is
64
+ always ugly).
65
+ Prefer {...} over do...end for single-line blocks.
66
+ Enabled: true
67
+
68
+ BracesAroundHashParameters:
69
+ Description: 'Enforce braces style inside hash parameters.'
70
+ Enabled: true
71
+
72
+ CaseEquality:
73
+ Description: 'Avoid explicit use of the case equality operator(===).'
74
+ Enabled: true
75
+
76
+ CaseIndentation:
77
+ Description: 'Indentation of when in a case/when/[else/]end.'
78
+ Enabled: true
79
+
80
+ CharacterLiteral:
81
+ Description: 'Checks for uses of character literals.'
82
+ Enabled: true
83
+
84
+ ClassAndModuleCamelCase:
85
+ Description: 'Use CamelCase for classes and modules.'
86
+ Enabled: true
87
+
88
+ ClassLength:
89
+ Description: 'Avoid classes longer than 100 lines of code.'
90
+ Enabled: true
91
+
92
+ ClassMethods:
93
+ Description: 'Use self when defining module/class methods.'
94
+ Enabled: true
95
+
96
+ ClassVars:
97
+ Description: 'Avoid the use of class variables.'
98
+ Enabled: true
99
+
100
+ CollectionMethods:
101
+ Description: 'Preferred collection methods.'
102
+ Enabled: true
103
+
104
+ ColonMethodCall:
105
+ Description: 'Do not use :: for method call.'
106
+ Enabled: true
107
+
108
+ CommentAnnotation:
109
+ Description: >-
110
+ Checks formatting of special comments
111
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
112
+ Enabled: true
113
+
114
+ ConstantName:
115
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
116
+ Enabled: true
117
+
118
+ CyclomaticComplexity:
119
+ Description: 'Avoid complex methods.'
120
+ Enabled: true
121
+
122
+ DefWithParentheses:
123
+ Description: 'Use def with parentheses when there are arguments.'
124
+ Enabled: true
125
+
126
+ Documentation:
127
+ Description: 'Document classes and non-namespace modules.'
128
+ Enabled: true
129
+
130
+ DotPosition:
131
+ Description: 'Checks the position of the dot in multi-line method calls.'
132
+ Enabled: true
133
+
134
+ EmptyLineBetweenDefs:
135
+ Description: 'Use empty lines between defs.'
136
+ Enabled: true
137
+
138
+ EmptyLines:
139
+ Description: "Don't use several empty lines in a row."
140
+ Enabled: true
141
+
142
+ EmptyLinesAroundAccessModifier:
143
+ Description: "Keep blank lines around access modifiers."
144
+ Enabled: true
145
+
146
+ EmptyLinesAroundBody:
147
+ Description: "Keeps track of empty lines around expression bodies."
148
+ Enabled: true
149
+
150
+ EmptyLiteral:
151
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
152
+ Enabled: true
153
+
154
+ EndBlock:
155
+ Description: 'Avoid the use of END blocks.'
156
+ Enabled: true
157
+
158
+ EndOfLine:
159
+ Description: 'Use Unix-style line endings.'
160
+ Enabled: true
161
+
162
+ EvenOdd:
163
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
164
+ Enabled: true
165
+
166
+ FavorJoin:
167
+ Description: 'Use Array#join instead of Array#*.'
168
+ Enabled: true
169
+
170
+ FavorUnlessOverNegatedIf:
171
+ Description: >-
172
+ Favor unless over if for negative conditions
173
+ (or control flow or).
174
+ Enabled: true
175
+
176
+ FavorUntilOverNegatedWhile:
177
+ Description: 'Favor until over while for negative conditions.'
178
+ Enabled: true
179
+
180
+ FileName:
181
+ Description: 'Use snake_case for source file names.'
182
+ Enabled: true
183
+
184
+ FinalNewline:
185
+ Description: 'Checks for a final newline in a source file.'
186
+ Enabled: true
187
+
188
+ FlipFlop:
189
+ Description: 'Checks for flip flops'
190
+ Enabled: true
191
+
192
+ For:
193
+ Description: 'Checks use of for or each in multiline loops.'
194
+ Enabled: true
195
+
196
+ FormatString:
197
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
198
+ Enabled: true
199
+
200
+ GlobalVars:
201
+ Description: 'Do not introduce global variables.'
202
+ Enabled: true
203
+
204
+ HashMethods:
205
+ Description: 'Checks for use of deprecated Hash methods.'
206
+ Enabled: true
207
+
208
+ HashSyntax:
209
+ Description: >-
210
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
211
+ { :a => 1, :b => 2 }.
212
+ Enabled: true
213
+
214
+ IfUnlessModifier:
215
+ Description: >-
216
+ Favor modifier if/unless usage when you have a
217
+ single-line body.
218
+ Enabled: true
219
+
220
+ IfWithSemicolon:
221
+ Description: 'Never use if x; .... Use the ternary operator instead.'
222
+ Enabled: true
223
+
224
+ IndentationConsistency:
225
+ Description: 'Keep indentation straight.'
226
+ Enabled: true
227
+
228
+ IndentationWidth:
229
+ Description: 'Use 2 spaces for indentation.'
230
+ Enabled: true
231
+
232
+ IndentArray:
233
+ Description: >-
234
+ Checks the indentation of the first element in an array
235
+ literal.
236
+ Enabled: true
237
+
238
+ IndentHash:
239
+ Description: 'Checks the indentation of the first key in a hash literal.'
240
+ Enabled: true
241
+
242
+ Lambda:
243
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
244
+ Enabled: true
245
+
246
+ LambdaCall:
247
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
248
+ Enabled: true
249
+
250
+ LeadingCommentSpace:
251
+ Description: 'Comments should start with a space.'
252
+ Enabled: true
253
+
254
+ LineEndConcatenation:
255
+ Description: 'Use \\ instead of + to concatenate two string literals at line end.'
256
+ Enabled: true
257
+
258
+ LineLength:
259
+ Description: 'Limit lines to 79 characters.'
260
+ Enabled: true
261
+
262
+ MethodCalledOnDoEndBlock:
263
+ Description: 'Avoid chaining a method call on a do...end block.'
264
+ Enabled: true
265
+
266
+ MethodCallParentheses:
267
+ Description: 'Do not use parentheses for method calls with no arguments.'
268
+ Enabled: true
269
+
270
+ MethodDefParentheses:
271
+ Description: >-
272
+ Checks if the method definitions have or don't have
273
+ parentheses.
274
+ Enabled: true
275
+
276
+ MethodLength:
277
+ Description: 'Avoid methods longer than 10 lines of code.'
278
+ Enabled: true
279
+
280
+ MethodName:
281
+ Description: 'Use the configured style when naming methods.'
282
+ Enabled: true
283
+
284
+ ModuleFunction:
285
+ Description: 'Checks for usage of `extend self` in modules.'
286
+ Enabled: true
287
+
288
+ MultilineBlockChain:
289
+ Description: 'Avoid multi-line chains of blocks.'
290
+ Enabled: true
291
+
292
+ MultilineIfThen:
293
+ Description: 'Never use then for multi-line if/unless.'
294
+ Enabled: true
295
+
296
+ MultilineTernaryOperator:
297
+ Description: >-
298
+ Avoid multi-line ?: (the ternary operator);
299
+ use if/unless instead.
300
+ Enabled: true
301
+
302
+ NestedTernaryOperator:
303
+ Description: 'Use one expression per branch in a ternary operator.'
304
+ Enabled: true
305
+
306
+ NilComparison:
307
+ Description: 'Prefer x.nil? to x == nil.'
308
+ Enabled: true
309
+
310
+ Not:
311
+ Description: 'Use ! instead of not.'
312
+ Enabled: true
313
+
314
+ NumericLiterals:
315
+ Description: >-
316
+ Add underscores to large numeric literals to improve their
317
+ readability.
318
+ Enabled: true
319
+
320
+ OneLineConditional:
321
+ Description: >-
322
+ Favor the ternary operator(?:) over
323
+ if/then/else/end constructs.
324
+ Enabled: true
325
+
326
+ OpMethod:
327
+ Description: 'When defining binary operators, name the argument other.'
328
+ Enabled: true
329
+
330
+ ParameterLists:
331
+ Description: 'Avoid parameter lists longer than three or four parameters.'
332
+ Enabled: true
333
+
334
+ ParenthesesAroundCondition:
335
+ Description: >-
336
+ Don't use parentheses around the condition of an
337
+ if/unless/while.
338
+ Enabled: true
339
+
340
+ PerlBackrefs:
341
+ Description: 'Avoid Perl-style regex back references.'
342
+ Enabled: true
343
+
344
+ PredicateName:
345
+ Description: 'Check the names of predicate methods.'
346
+ Enabled: true
347
+
348
+ Proc:
349
+ Description: 'Use proc instead of Proc.new.'
350
+ Enabled: true
351
+
352
+ RaiseArgs:
353
+ Description: 'Checks the arguments passed to raise/fail.'
354
+ Enabled: true
355
+
356
+ RedundantBegin:
357
+ Description: "Don't use begin blocks when they are not needed."
358
+ Enabled: true
359
+
360
+ RedundantException:
361
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
362
+ Enabled: true
363
+
364
+ RedundantReturn:
365
+ Description: "Don't use return where it's not required."
366
+ Enabled: true
367
+
368
+ RedundantSelf:
369
+ Description: "Don't use self where it's not needed."
370
+ Enabled: true
371
+
372
+ RegexpLiteral:
373
+ Description: >-
374
+ Use %r for regular expressions matching more than
375
+ `MaxSlashes` '/' characters.
376
+ Use %r only for regular expressions matching more than
377
+ `MaxSlashes` '/' character.
378
+ Enabled: true
379
+
380
+ RescueModifier:
381
+ Description: 'Avoid using rescue in its modifier form.'
382
+ Enabled: true
383
+
384
+ Semicolon:
385
+ Description: "Don't use semicolons to terminate expressions."
386
+ Enabled: true
387
+
388
+ SignalException:
389
+ Description: 'Checks for proper usage of fail and raise.'
390
+ Enabled: true
391
+
392
+ SingleLineBlockParams:
393
+ Description: 'Enforces the names of some block params.'
394
+ Enabled: true
395
+
396
+ SingleLineMethods:
397
+ Description: 'Avoid single-line methods.'
398
+ Enabled: true
399
+
400
+ SpaceAfterColon:
401
+ Description: 'Use spaces after colons.'
402
+ Enabled: true
403
+
404
+ SpaceAfterComma:
405
+ Description: 'Use spaces after commas.'
406
+ Enabled: true
407
+
408
+ SpaceAfterControlKeyword:
409
+ Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
410
+ Enabled: true
411
+
412
+ SpaceAfterMethodName:
413
+ Description: >-
414
+ Never put a space between a method name and the opening
415
+ parenthesis.
416
+ Enabled: true
417
+
418
+ SpaceAfterNot:
419
+ Description: Tracks redundant space after the ! operator.
420
+ Enabled: true
421
+
422
+ SpaceAfterSemicolon:
423
+ Description: 'Use spaces after semicolons.'
424
+ Enabled: true
425
+
426
+ SpaceAroundBlockBraces:
427
+ Description: >-
428
+ Checks that block braces have or don't have surrounding space.
429
+ For blocks taking parameters, checks that the left brace has
430
+ or doesn't have trailing space.
431
+ Enabled: true
432
+
433
+ SpaceAroundEqualsInParameterDefault:
434
+ Description: >-
435
+ Use spaces around the = operator when assigning default
436
+ values in def params.
437
+ Enabled: true
438
+
439
+ SpaceAroundOperators:
440
+ Description: 'Use spaces around operators.'
441
+ Enabled: true
442
+
443
+ SpaceBeforeModifierKeyword:
444
+ Description: 'Put a space before the modifier keyword.'
445
+ Enabled: true
446
+
447
+ SpaceInsideBrackets:
448
+ Description: 'No spaces after [ or before ].'
449
+ Enabled: true
450
+
451
+ SpaceInsideHashLiteralBraces:
452
+ Description: "Use spaces inside hash literal braces - or don't."
453
+ Enabled: true
454
+
455
+ SpaceInsideParens:
456
+ Description: 'No spaces after ( or before ).'
457
+ Enabled: true
458
+
459
+ SpecialGlobalVars:
460
+ Description: 'Avoid Perl-style global variables.'
461
+ Enabled: true
462
+
463
+ StringLiterals:
464
+ Description: 'Checks if uses of quotes match the configured preference.'
465
+ Enabled: true
466
+
467
+ Tab:
468
+ Description: 'No hard tabs.'
469
+ Enabled: true
470
+
471
+ TrailingBlankLines:
472
+ Description: 'Checks for superfluous trailing blank lines.'
473
+ Enabled: true
474
+
475
+ TrailingComma:
476
+ Description: 'Checks for trailing comma in parameter lists and literals.'
477
+ Enabled: true
478
+
479
+ TrailingWhitespace:
480
+ Description: 'Avoid trailing whitespace.'
481
+ Enabled: true
482
+
483
+ TrivialAccessors:
484
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
485
+ Enabled: true
486
+
487
+ UnlessElse:
488
+ Description: >-
489
+ Never use unless with else. Rewrite these with the positive
490
+ case first.
491
+ Enabled: true
492
+
493
+ VariableInterpolation:
494
+ Description: >-
495
+ Don't interpolate global, instance and class variables
496
+ directly in strings.
497
+ Enabled: true
498
+
499
+ VariableName:
500
+ Description: 'Use the configured style when naming variables.'
501
+ Enabled: true
502
+
503
+ WhenThen:
504
+ Description: 'Use when x then ... for one-line cases.'
505
+ Enabled: true
506
+
507
+ WhileUntilDo:
508
+ Description: 'Checks for redundant do after while or until.'
509
+ Enabled: true
510
+
511
+ WhileUntilModifier:
512
+ Description: >-
513
+ Favor modifier while/until usage when you have a
514
+ single-line body.
515
+ Enabled: true
516
+
517
+ WordArray:
518
+ Description: 'Use %w or %W for arrays of words.'
519
+ Enabled: true
520
+
521
+ #################### Lint ################################
522
+ ### Warnings
523
+
524
+ AmbiguousOperator:
525
+ Description: >-
526
+ Checks for ambiguous operators in the first argument of a
527
+ method invocation without parentheses.
528
+ Enabled: true
529
+
530
+ AmbiguousRegexpLiteral:
531
+ Description: >-
532
+ Checks for ambiguous regexp literals in the first argument of
533
+ a method invocation without parenthesis.
534
+ Enabled: true
535
+
536
+ AssignmentInCondition:
537
+ Description: "Don't use assignment in conditions."
538
+ Enabled: true
539
+
540
+ BlockAlignment:
541
+ Description: 'Align block ends correctly.'
542
+ Enabled: true
543
+
544
+ ConditionPosition:
545
+ Description: 'Checks for condition placed in a confusing position relative to the keyword.'
546
+ Enabled: true
547
+
548
+ Debugger:
549
+ Description: 'Check for debugger calls.'
550
+ Enabled: true
551
+
552
+ DeprecatedClassMethods:
553
+ Description: 'Check for deprecated class method calls.'
554
+ Enabled: true
555
+
556
+ ElseLayout:
557
+ Description: 'Check for odd code arrangement in an else block.'
558
+ Enabled: true
559
+
560
+ EmptyEnsure:
561
+ Description: 'Checks for empty ensure block.'
562
+ Enabled: true
563
+
564
+ EndAlignment:
565
+ Description: 'Align ends correctly.'
566
+ Enabled: true
567
+
568
+ EndInMethod:
569
+ Description: 'END blocks should not be placed inside method definitions.'
570
+ Enabled: true
571
+
572
+ EnsureReturn:
573
+ Description: 'Never use return in an ensure block.'
574
+ Enabled: true
575
+
576
+ Eval:
577
+ Description: 'The use of eval represents a serious security risk.'
578
+ Enabled: true
579
+
580
+ HandleExceptions:
581
+ Description: "Don't suppress exception."
582
+ Enabled: true
583
+
584
+ InvalidCharacterLiteral:
585
+ Description: >-
586
+ Checks for invalid character literals with a non-escaped
587
+ whitespace character.
588
+ Enabled: true
589
+
590
+ LiteralInCondition:
591
+ Description: 'Checks of literals used in conditions.'
592
+ Enabled: true
593
+
594
+ LiteralInInterpolation:
595
+ Description: 'Checks for literals used in interpolation.'
596
+ Enabled: true
597
+
598
+ Loop:
599
+ Description: >-
600
+ Use Kernel#loop with break rather than begin/end/until or
601
+ begin/end/while for post-loop tests.
602
+ Enabled: true
603
+
604
+ ParenthesesAsGroupedExpression:
605
+ Description: >-
606
+ Checks for method calls with a space before the opening
607
+ parenthesis.
608
+ Enabled: true
609
+
610
+ RequireParentheses:
611
+ Description: >-
612
+ Use parentheses in the method call to avoid confusion
613
+ about precedence.
614
+ Enabled: true
615
+
616
+ RescueException:
617
+ Description: 'Avoid rescuing the Exception class.'
618
+ Enabled: true
619
+
620
+ ShadowingOuterLocalVariable:
621
+ Description: >-
622
+ Do not use the same name as outer local variable
623
+ for block arguments or block local variables.
624
+ Enabled: true
625
+
626
+ StringConversionInInterpolation:
627
+ Description: 'Checks for Object#to_s usage in string interpolation.'
628
+ Enabled: true
629
+
630
+ UnreachableCode:
631
+ Description: 'Unreachable code.'
632
+ Enabled: true
633
+
634
+ UselessAssignment:
635
+ Description: 'Checks for useless assignment to a local variable.'
636
+ Enabled: true
637
+
638
+ UselessComparison:
639
+ Description: 'Checks for comparison of something with itself.'
640
+ Enabled: true
641
+
642
+ UselessElseWithoutRescue:
643
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
644
+ Enabled: true
645
+
646
+ UselessSetterCall:
647
+ Description: 'Checks for useless setter call to a local variable.'
648
+ Enabled: true
649
+
650
+ Void:
651
+ Description: 'Possible use of operator/literal/variable in void context.'
652
+ Enabled: true
@@ -1,7 +1,5 @@
1
1
  require "minitest_helper"
2
2
 
3
3
  describe Thincloud::Postmark do
4
- it "exists" do
5
- Thincloud::Postmark.must_be_kind_of Module
6
- end
4
+ specify { Thincloud::Postmark.must_be_kind_of Module }
7
5
  end
@@ -10,14 +10,18 @@ Gem::Specification.new do |gem|
10
10
  gem.summary = "Postmark configuration for Rails apps."
11
11
  gem.homepage = "http://newleaders.github.com/thincloud-postmark"
12
12
 
13
- gem.files = `git ls-files`.split($\)
14
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
+ gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
14
+ gem.executables = gem.files.grep(/^bin\//).map { |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(/^(test|spec|features)\//)
16
16
  gem.name = "thincloud-postmark"
17
17
  gem.require_paths = ["lib"]
18
18
  gem.version = Thincloud::Postmark::VERSION
19
+ gem.licenses = ["MIT"]
19
20
 
20
- gem.add_development_dependency "thincloud-test", "~> 0.3.2"
21
+ gem.add_dependency "postmark-rails", "~> 0.8.0"
21
22
 
22
- gem.add_dependency "postmark-rails", "~> 0.4.1"
23
+ gem.add_development_dependency "thincloud-test-rails"
24
+ gem.add_development_dependency "rails", "~> 3.2.19"
25
+ gem.add_development_dependency "rubocop"
26
+ gem.add_development_dependency "sqlite3"
23
27
  end