digicert 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.hound.yml +3 -0
  4. data/.rspec +0 -1
  5. data/.rubocop.yml +629 -0
  6. data/.sample.env +4 -0
  7. data/.sample.pryrc +3 -0
  8. data/.travis.yml +5 -2
  9. data/LICENSE.txt +21 -0
  10. data/README.md +812 -9
  11. data/bin/console +2 -5
  12. data/bin/rspec +17 -0
  13. data/digicert.gemspec +7 -14
  14. data/lib/digicert.rb +40 -2
  15. data/lib/digicert/actions.rb +9 -0
  16. data/lib/digicert/actions/all.rb +27 -0
  17. data/lib/digicert/actions/base.rb +11 -0
  18. data/lib/digicert/actions/create.rb +25 -0
  19. data/lib/digicert/actions/fetch.rb +21 -0
  20. data/lib/digicert/actions/update.rb +25 -0
  21. data/lib/digicert/base.rb +35 -0
  22. data/lib/digicert/base_order.rb +39 -0
  23. data/lib/digicert/certificate.rb +43 -0
  24. data/lib/digicert/certificate_downloader.rb +137 -0
  25. data/lib/digicert/certificate_request.rb +19 -0
  26. data/lib/digicert/client_certificate/base.rb +17 -0
  27. data/lib/digicert/client_certificate/digital_signature_plus.rb +13 -0
  28. data/lib/digicert/client_certificate/email_security_plus.rb +13 -0
  29. data/lib/digicert/client_certificate/premium.rb +17 -0
  30. data/lib/digicert/config.rb +21 -0
  31. data/lib/digicert/configuration.rb +26 -0
  32. data/lib/digicert/container.rb +35 -0
  33. data/lib/digicert/container_template.rb +32 -0
  34. data/lib/digicert/csr_generator.rb +43 -0
  35. data/lib/digicert/debugger.rb +34 -0
  36. data/lib/digicert/domain.rb +59 -0
  37. data/lib/digicert/duplicate_certificate.rb +21 -0
  38. data/lib/digicert/duplicate_certificate_finder.rb +42 -0
  39. data/lib/digicert/email_validation.rb +35 -0
  40. data/lib/digicert/errors.rb +30 -0
  41. data/lib/digicert/errors/forbidden.rb +9 -0
  42. data/lib/digicert/errors/request_error.rb +37 -0
  43. data/lib/digicert/errors/server_error.rb +9 -0
  44. data/lib/digicert/errors/unauthorized.rb +9 -0
  45. data/lib/digicert/expiring_order.rb +21 -0
  46. data/lib/digicert/findable.rb +33 -0
  47. data/lib/digicert/order.rb +81 -0
  48. data/lib/digicert/order_cancellation.rb +25 -0
  49. data/lib/digicert/order_duplicator.rb +11 -0
  50. data/lib/digicert/order_manager.rb +39 -0
  51. data/lib/digicert/order_reissuer.rb +11 -0
  52. data/lib/digicert/organization.rb +43 -0
  53. data/lib/digicert/product.rb +14 -0
  54. data/lib/digicert/request.rb +123 -0
  55. data/lib/digicert/response.rb +30 -0
  56. data/lib/digicert/ssl_certificate/base.rb +9 -0
  57. data/lib/digicert/ssl_certificate/ssl_ev_plus.rb +13 -0
  58. data/lib/digicert/ssl_certificate/ssl_plus.rb +13 -0
  59. data/lib/digicert/ssl_certificate/ssl_wildcard.rb +13 -0
  60. data/lib/digicert/version.rb +23 -1
  61. data/spec/acceptance/certificate_download_spec.rb +68 -0
  62. data/spec/acceptance/duplicating_certificate_spec.rb +86 -0
  63. data/spec/acceptance/reissuing_certificate_spec.rb +104 -0
  64. data/spec/digicert/actions/all_spec.rb +26 -0
  65. data/spec/digicert/actions/create_spec.rb +47 -0
  66. data/spec/digicert/actions/fetch_spec.rb +28 -0
  67. data/spec/digicert/actions/update_spec.rb +39 -0
  68. data/spec/digicert/certificate_downloader_spec.rb +89 -0
  69. data/spec/digicert/certificate_request_spec.rb +49 -0
  70. data/spec/digicert/certificate_spec.rb +93 -0
  71. data/spec/digicert/client_certificate/digital_signature_plus_spec.rb +32 -0
  72. data/spec/digicert/client_certificate/email_security_plus_spec.rb +36 -0
  73. data/spec/digicert/client_certificate/premium_spec.rb +34 -0
  74. data/spec/digicert/config_spec.rb +39 -0
  75. data/spec/digicert/container_spec.rb +44 -0
  76. data/spec/digicert/container_template_spec.rb +32 -0
  77. data/spec/digicert/csr_generator_spec.rb +31 -0
  78. data/spec/digicert/domain_spec.rb +89 -0
  79. data/spec/digicert/duplicate_certificate_finder_spec.rb +27 -0
  80. data/spec/digicert/duplicate_certificate_spec.rb +15 -0
  81. data/spec/digicert/email_validation_spec.rb +26 -0
  82. data/spec/digicert/expiring_order_spec.rb +16 -0
  83. data/spec/digicert/findable_spec.rb +19 -0
  84. data/spec/digicert/order_cancellation_spec.rb +24 -0
  85. data/spec/digicert/order_duplicator_spec.rb +35 -0
  86. data/spec/digicert/order_reissuer_spec.rb +35 -0
  87. data/spec/digicert/order_spec.rb +134 -0
  88. data/spec/digicert/organization_spec.rb +61 -0
  89. data/spec/digicert/product_spec.rb +28 -0
  90. data/spec/digicert/request_spec.rb +47 -0
  91. data/spec/digicert/ssl_certificate/ssl_ev_plus_spec.rb +35 -0
  92. data/spec/digicert/ssl_certificate/ssl_plus_spec.rb +36 -0
  93. data/spec/digicert/ssl_certificate/ssl_wildcard_spec.rb +35 -0
  94. data/spec/fixtures/certificate.pem +79 -0
  95. data/spec/fixtures/certificate.zip +0 -0
  96. data/spec/fixtures/certificate_request.json +116 -0
  97. data/spec/fixtures/certificate_requests.json +59 -0
  98. data/spec/fixtures/certificate_revoked.json +13 -0
  99. data/spec/fixtures/container.json +15 -0
  100. data/spec/fixtures/container_created.json +3 -0
  101. data/spec/fixtures/container_template.json +15 -0
  102. data/spec/fixtures/container_templates.json +14 -0
  103. data/spec/fixtures/containers.json +14 -0
  104. data/spec/fixtures/domain.json +71 -0
  105. data/spec/fixtures/domain_created.json +3 -0
  106. data/spec/fixtures/domains.json +49 -0
  107. data/spec/fixtures/email_validations.json +17 -0
  108. data/spec/fixtures/empty.json +0 -0
  109. data/spec/fixtures/errors.json +6 -0
  110. data/spec/fixtures/expiring_orders.json +20 -0
  111. data/spec/fixtures/order.json +107 -0
  112. data/spec/fixtures/order_created.json +9 -0
  113. data/spec/fixtures/order_duplicated.json +8 -0
  114. data/spec/fixtures/order_duplications.json +57 -0
  115. data/spec/fixtures/order_reissued.json +8 -0
  116. data/spec/fixtures/orders.json +93 -0
  117. data/spec/fixtures/organization.json +35 -0
  118. data/spec/fixtures/organization_created.json +3 -0
  119. data/spec/fixtures/organizations.json +84 -0
  120. data/spec/fixtures/ping.json +3 -0
  121. data/spec/fixtures/product.json +71 -0
  122. data/spec/fixtures/products.json +100 -0
  123. data/spec/fixtures/rsa4096.key +51 -0
  124. data/spec/requests/certificate_duplication_spec.rb +41 -0
  125. data/spec/requests/certificate_generation_spec.rb +93 -0
  126. data/spec/requests/certificate_reissuing_spec.rb +38 -0
  127. data/spec/requests/container_management_spec.rb +36 -0
  128. data/spec/requests/domain_management_spec.rb +64 -0
  129. data/spec/requests/order_client_email_security_plus_spec.rb +38 -0
  130. data/spec/requests/order_management_spec.rb +24 -0
  131. data/spec/requests/order_ssl_ev_plus_spec.rb +57 -0
  132. data/spec/requests/order_ssl_wildcard_spec.rb +57 -0
  133. data/spec/requests/organization_management_spec.rb +22 -0
  134. data/spec/requests/product_management_spec.rb +24 -0
  135. data/spec/requests/request_management_spec.rb +24 -0
  136. data/spec/spec_helper.rb +35 -0
  137. data/spec/support/fake_digicert_api.rb +324 -0
  138. metadata +162 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e3e908ce0fb2f2fdf7bc39e0e19a283bd4ba8a4
4
- data.tar.gz: 76a18ee262919749ac95db833a29e2ac9ad79585
3
+ metadata.gz: 55bfc7916ddf2ce78f11cbbe178e6b7e0417778d
4
+ data.tar.gz: ae7b474592b1f669afe8df47cb58dd04ee61af8d
5
5
  SHA512:
6
- metadata.gz: c2a4fed9b68470736f196ace927528b57d598aaf31ffe62c7865e179636553d84b236e9c769878c4f22fa4fd0746ebc1aaa2785127a246d96df984e68c1d6b6c
7
- data.tar.gz: 02a5b33d57759e0f2f13d72f657ef73eac4b7c20aa8bfc0b99f5d73fc4cbc6e311a936b71514520eb608c65e41e76e4ba55fcae3eb75971727e5d08b40193c17
6
+ metadata.gz: 5adb81424d8b251143a7aef3711837044ae8aa51257fed7e16b4e4794676aa88ea1bd0a9cd598e80671883d057453da401519928b20744a5014371d2f71d7851
7
+ data.tar.gz: 4c4d35432a65cd9e0fbc862a4dd3b9df6541927fa78b3f5cdf77593b776d887aabca4d2bf1ada3729dd2dabec7dfadb702dbecf281ea3c663e76c889f7aff6db
data/.gitignore CHANGED
@@ -1,5 +1,8 @@
1
+ source_credentials.sh
2
+ .DS_Store
1
3
  /.bundle/
2
4
  /.yardoc
5
+ /.pryrc
3
6
  /Gemfile.lock
4
7
  /_yardoc/
5
8
  /coverage/
data/.hound.yml ADDED
@@ -0,0 +1,3 @@
1
+ ruby:
2
+ Enabled: true
3
+ config_file: .rubocop.yml
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/.rubocop.yml ADDED
@@ -0,0 +1,629 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+
5
+ Style/AccessorMethodName:
6
+ Description: Check the naming of accessor methods for get_/set_.
7
+ Enabled: false
8
+
9
+ Style/Alias:
10
+ Description: 'Use alias_method instead of alias.'
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
12
+ Enabled: false
13
+
14
+ Style/ArrayJoin:
15
+ Description: 'Use Array#join instead of Array#*.'
16
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
17
+ Enabled: false
18
+
19
+ Style/AsciiComments:
20
+ Description: 'Use only ascii symbols in comments.'
21
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
22
+ Enabled: false
23
+
24
+ Style/AsciiIdentifiers:
25
+ Description: 'Use only ascii symbols in identifiers.'
26
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
27
+ Enabled: false
28
+
29
+ Style/Attr:
30
+ Description: 'Checks for uses of Module#attr.'
31
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
32
+ Enabled: false
33
+
34
+ Metrics/BlockNesting:
35
+ Description: 'Avoid excessive block nesting'
36
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
37
+ Enabled: false
38
+
39
+ Style/CaseEquality:
40
+ Description: 'Avoid explicit use of the case equality operator(===).'
41
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
42
+ Enabled: false
43
+
44
+ Style/CharacterLiteral:
45
+ Description: 'Checks for uses of character literals.'
46
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
47
+ Enabled: false
48
+
49
+ Style/ClassAndModuleChildren:
50
+ Description: 'Checks style of children classes and modules.'
51
+ Enabled: true
52
+ EnforcedStyle: nested
53
+
54
+ Metrics/ClassLength:
55
+ Description: 'Avoid classes longer than 100 lines of code.'
56
+ Enabled: false
57
+
58
+ Metrics/ModuleLength:
59
+ Description: 'Avoid modules longer than 100 lines of code.'
60
+ Enabled: false
61
+
62
+ Style/ClassVars:
63
+ Description: 'Avoid the use of class variables.'
64
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
65
+ Enabled: false
66
+
67
+ Style/CollectionMethods:
68
+ Enabled: true
69
+ PreferredMethods:
70
+ find: detect
71
+ inject: reduce
72
+ collect: map
73
+ find_all: select
74
+
75
+ Style/ColonMethodCall:
76
+ Description: 'Do not use :: for method call.'
77
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
78
+ Enabled: false
79
+
80
+ Style/CommentAnnotation:
81
+ Description: >-
82
+ Checks formatting of special comments
83
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
84
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
85
+ Enabled: false
86
+
87
+ Metrics/AbcSize:
88
+ Description: >-
89
+ A calculated magnitude based on number of assignments,
90
+ branches, and conditions.
91
+ Enabled: false
92
+
93
+ Metrics/CyclomaticComplexity:
94
+ Description: >-
95
+ A complexity metric that is strongly correlated to the number
96
+ of test cases needed to validate a method.
97
+ Enabled: false
98
+
99
+ Rails/Delegate:
100
+ Description: 'Prefer delegate method for delegations.'
101
+ Enabled: false
102
+
103
+ Style/DeprecatedHashMethods:
104
+ Description: 'Checks for use of deprecated Hash methods.'
105
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
106
+ Enabled: false
107
+
108
+ Style/Documentation:
109
+ Description: 'Document classes and non-namespace modules.'
110
+ Enabled: false
111
+
112
+ Style/DotPosition:
113
+ Description: 'Checks the position of the dot in multi-line method calls.'
114
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
115
+ EnforcedStyle: trailing
116
+
117
+ Style/DoubleNegation:
118
+ Description: 'Checks for uses of double negation (!!).'
119
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
120
+ Enabled: false
121
+
122
+ Style/EachWithObject:
123
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
124
+ Enabled: false
125
+
126
+ Style/EmptyLiteral:
127
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
128
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
129
+ Enabled: false
130
+
131
+ # Checks whether the source file has a utf-8 encoding comment or not
132
+ # AutoCorrectEncodingComment must match the regex
133
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
134
+ Style/Encoding:
135
+ Enabled: false
136
+
137
+ Style/EvenOdd:
138
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
139
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
140
+ Enabled: false
141
+
142
+ Style/ExtraSpacing:
143
+ Description: 'Do not use unnecessary spacing.'
144
+ Enabled: true
145
+
146
+ Style/FileName:
147
+ Description: 'Use snake_case for source file names.'
148
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
149
+ Enabled: false
150
+
151
+ Style/FlipFlop:
152
+ Description: 'Checks for flip flops'
153
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
154
+ Enabled: false
155
+
156
+ Style/FormatString:
157
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
158
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
159
+ Enabled: false
160
+
161
+ Style/GlobalVars:
162
+ Description: 'Do not introduce global variables.'
163
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
164
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
165
+ Enabled: false
166
+
167
+ Style/GuardClause:
168
+ Description: 'Check for conditionals that can be replaced with guard clauses'
169
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
170
+ Enabled: false
171
+
172
+ Style/IfUnlessModifier:
173
+ Description: >-
174
+ Favor modifier if/unless usage when you have a
175
+ single-line body.
176
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
177
+ Enabled: false
178
+
179
+ Style/IfWithSemicolon:
180
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
182
+ Enabled: false
183
+
184
+ Style/InlineComment:
185
+ Description: 'Avoid inline comments.'
186
+ Enabled: false
187
+
188
+ Style/Lambda:
189
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
190
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
191
+ Enabled: false
192
+
193
+ Style/LambdaCall:
194
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
195
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
196
+ Enabled: false
197
+
198
+ Style/LineEndConcatenation:
199
+ Description: >-
200
+ Use \ instead of + or << to concatenate two string literals at
201
+ line end.
202
+ Enabled: false
203
+
204
+ Metrics/LineLength:
205
+ Description: 'Limit lines to 80 characters.'
206
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
207
+ Max: 80
208
+
209
+ Metrics/MethodLength:
210
+ Description: 'Avoid methods longer than 10 lines of code.'
211
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
212
+ Enabled: false
213
+
214
+ Style/ModuleFunction:
215
+ Description: 'Checks for usage of `extend self` in modules.'
216
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
217
+ Enabled: false
218
+
219
+ Style/MultilineOperationIndentation:
220
+ Description: >-
221
+ Checks indentation of binary operations that span more than
222
+ one line.
223
+ Enabled: true
224
+ EnforcedStyle: indented
225
+
226
+ Style/MultilineBlockChain:
227
+ Description: 'Avoid multi-line chains of blocks.'
228
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
229
+ Enabled: false
230
+
231
+ Style/MultilineMethodCallIndentation:
232
+ Description: >-
233
+ Checks indentation of method calls with the dot operator
234
+ that span more than one line.
235
+ Enabled: true
236
+ EnforcedStyle: indented
237
+
238
+ Style/NegatedIf:
239
+ Description: >-
240
+ Favor unless over if for negative conditions
241
+ (or control flow or).
242
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
243
+ Enabled: false
244
+
245
+ Style/NegatedWhile:
246
+ Description: 'Favor until over while for negative conditions.'
247
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
248
+ Enabled: false
249
+
250
+ Style/Next:
251
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
252
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
253
+ Enabled: false
254
+
255
+ Style/NilComparison:
256
+ Description: 'Prefer x.nil? to x == nil.'
257
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
258
+ Enabled: false
259
+
260
+ Style/Not:
261
+ Description: 'Use ! instead of not.'
262
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
263
+ Enabled: false
264
+
265
+ Style/NumericLiterals:
266
+ Description: >-
267
+ Add underscores to large numeric literals to improve their
268
+ readability.
269
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
270
+ Enabled: false
271
+
272
+ Style/OneLineConditional:
273
+ Description: >-
274
+ Favor the ternary operator(?:) over
275
+ if/then/else/end constructs.
276
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
277
+ Enabled: false
278
+
279
+ Style/OpMethod:
280
+ Description: 'When defining binary operators, name the argument other.'
281
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
282
+ Enabled: false
283
+
284
+ Metrics/ParameterLists:
285
+ Description: 'Avoid parameter lists longer than three or four parameters.'
286
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
287
+ Enabled: false
288
+
289
+ Style/PercentLiteralDelimiters:
290
+ Description: 'Use `%`-literal delimiters consistently'
291
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
292
+ Enabled: false
293
+
294
+ Style/PerlBackrefs:
295
+ Description: 'Avoid Perl-style regex back references.'
296
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
297
+ Enabled: false
298
+
299
+ Style/PredicateName:
300
+ Description: 'Check the names of predicate methods.'
301
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
302
+ NamePrefixBlacklist:
303
+ - is_
304
+ Exclude:
305
+ - spec/**/*
306
+
307
+ Style/Proc:
308
+ Description: 'Use proc instead of Proc.new.'
309
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
310
+ Enabled: false
311
+
312
+ Style/RaiseArgs:
313
+ Description: 'Checks the arguments passed to raise/fail.'
314
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
315
+ Enabled: false
316
+
317
+ Style/RegexpLiteral:
318
+ Description: 'Use / or %r around regular expressions.'
319
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
320
+ Enabled: false
321
+
322
+ Style/SelfAssignment:
323
+ Description: >-
324
+ Checks for places where self-assignment shorthand should have
325
+ been used.
326
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
327
+ Enabled: false
328
+
329
+ Style/SingleLineBlockParams:
330
+ Description: 'Enforces the names of some block params.'
331
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
332
+ Enabled: false
333
+
334
+ Style/SingleLineMethods:
335
+ Description: 'Avoid single-line methods.'
336
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
337
+ Enabled: false
338
+
339
+ Style/SignalException:
340
+ Description: 'Checks for proper usage of fail and raise.'
341
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
342
+ Enabled: false
343
+
344
+ Style/SpecialGlobalVars:
345
+ Description: 'Avoid Perl-style global variables.'
346
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
347
+ Enabled: false
348
+
349
+ Style/StringLiterals:
350
+ Description: 'Checks if uses of quotes match the configured preference.'
351
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
352
+ EnforcedStyle: double_quotes
353
+ Enabled: true
354
+
355
+ Style/FrozenStringLiteralComment:
356
+ Enabled: false
357
+
358
+ Style/TrailingCommaInArguments:
359
+ Description: 'Checks for trailing comma in argument lists.'
360
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
361
+ EnforcedStyleForMultiline: comma
362
+ SupportedStyles:
363
+ - comma
364
+ - consistent_comma
365
+ - no_comma
366
+ Enabled: true
367
+
368
+ Style/TrailingCommaInLiteral:
369
+ Description: 'Checks for trailing comma in array and hash literals.'
370
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
371
+ EnforcedStyleForMultiline: comma
372
+ SupportedStyles:
373
+ - comma
374
+ - consistent_comma
375
+ - no_comma
376
+ Enabled: true
377
+
378
+ Style/TrivialAccessors:
379
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
380
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
381
+ Enabled: false
382
+
383
+ Style/VariableInterpolation:
384
+ Description: >-
385
+ Don't interpolate global, instance and class variables
386
+ directly in strings.
387
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
388
+ Enabled: false
389
+
390
+ Style/WhenThen:
391
+ Description: 'Use when x then ... for one-line cases.'
392
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
393
+ Enabled: false
394
+
395
+ Style/WhileUntilModifier:
396
+ Description: >-
397
+ Favor modifier while/until usage when you have a
398
+ single-line body.
399
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
400
+ Enabled: false
401
+
402
+ Style/WordArray:
403
+ Description: 'Use %w or %W for arrays of words.'
404
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
405
+ Enabled: false
406
+
407
+ # Lint
408
+
409
+ Lint/AmbiguousOperator:
410
+ Description: >-
411
+ Checks for ambiguous operators in the first argument of a
412
+ method invocation without parentheses.
413
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
414
+ Enabled: false
415
+
416
+ Lint/AmbiguousRegexpLiteral:
417
+ Description: >-
418
+ Checks for ambiguous regexp literals in the first argument of
419
+ a method invocation without parenthesis.
420
+ Enabled: false
421
+
422
+ Lint/AssignmentInCondition:
423
+ Description: "Don't use assignment in conditions."
424
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
425
+ Enabled: false
426
+
427
+ Lint/CircularArgumentReference:
428
+ Description: "Don't refer to the keyword argument in the default value."
429
+ Enabled: false
430
+
431
+ Lint/ConditionPosition:
432
+ Description: >-
433
+ Checks for condition placed in a confusing position relative to
434
+ the keyword.
435
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
436
+ Enabled: false
437
+
438
+ Lint/DeprecatedClassMethods:
439
+ Description: 'Check for deprecated class method calls.'
440
+ Enabled: false
441
+
442
+ Lint/DuplicatedKey:
443
+ Description: 'Check for duplicate keys in hash literals.'
444
+ Enabled: false
445
+
446
+ Lint/EachWithObjectArgument:
447
+ Description: 'Check for immutable argument given to each_with_object.'
448
+ Enabled: false
449
+
450
+ Lint/ElseLayout:
451
+ Description: 'Check for odd code arrangement in an else block.'
452
+ Enabled: false
453
+
454
+ Lint/FormatParameterMismatch:
455
+ Description: 'The number of parameters to format/sprint must match the fields.'
456
+ Enabled: false
457
+
458
+ Lint/HandleExceptions:
459
+ Description: "Don't suppress exception."
460
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
461
+ Enabled: false
462
+
463
+ Lint/InvalidCharacterLiteral:
464
+ Description: >-
465
+ Checks for invalid character literals with a non-escaped
466
+ whitespace character.
467
+ Enabled: false
468
+
469
+ Style/InitialIndentation:
470
+ Description: >-
471
+ Checks the indentation of the first non-blank non-comment line in a file.
472
+ Enabled: false
473
+
474
+ Lint/LiteralInCondition:
475
+ Description: 'Checks of literals used in conditions.'
476
+ Enabled: false
477
+
478
+ Lint/LiteralInInterpolation:
479
+ Description: 'Checks for literals used in interpolation.'
480
+ Enabled: false
481
+
482
+ Lint/Loop:
483
+ Description: >-
484
+ Use Kernel#loop with break rather than begin/end/until or
485
+ begin/end/while for post-loop tests.
486
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
487
+ Enabled: false
488
+
489
+ Lint/NestedMethodDefinition:
490
+ Description: 'Do not use nested method definitions.'
491
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
492
+ Enabled: false
493
+
494
+ Lint/NonLocalExitFromIterator:
495
+ Description: 'Do not use return in iterator to cause non-local exit.'
496
+ Enabled: false
497
+
498
+ Lint/ParenthesesAsGroupedExpression:
499
+ Description: >-
500
+ Checks for method calls with a space before the opening
501
+ parenthesis.
502
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
503
+ Enabled: false
504
+
505
+ Lint/RequireParentheses:
506
+ Description: >-
507
+ Use parentheses in the method call to avoid confusion
508
+ about precedence.
509
+ Enabled: false
510
+
511
+ Lint/UnderscorePrefixedVariableName:
512
+ Description: 'Do not use prefix `_` for a variable that is used.'
513
+ Enabled: false
514
+
515
+ Lint/UnneededDisable:
516
+ Description: >-
517
+ Checks for rubocop:disable comments that can be removed.
518
+ Note: this cop is not disabled when disabling all cops.
519
+ It must be explicitly disabled.
520
+ Enabled: false
521
+
522
+ Lint/Void:
523
+ Description: 'Possible use of operator/literal/variable in void context.'
524
+ Enabled: false
525
+
526
+ # Performance
527
+
528
+ Performance/CaseWhenSplat:
529
+ Description: >-
530
+ Place `when` conditions that use splat at the end
531
+ of the list of `when` branches.
532
+ Enabled: false
533
+
534
+ Performance/Count:
535
+ Description: >-
536
+ Use `count` instead of `select...size`, `reject...size`,
537
+ `select...count`, `reject...count`, `select...length`,
538
+ and `reject...length`.
539
+ Enabled: false
540
+
541
+ Performance/Detect:
542
+ Description: >-
543
+ Use `detect` instead of `select.first`, `find_all.first`,
544
+ `select.last`, and `find_all.last`.
545
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
546
+ Enabled: false
547
+
548
+ Performance/FlatMap:
549
+ Description: >-
550
+ Use `Enumerable#flat_map`
551
+ instead of `Enumerable#map...Array#flatten(1)`
552
+ or `Enumberable#collect..Array#flatten(1)`
553
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
554
+ Enabled: false
555
+
556
+ Performance/ReverseEach:
557
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
558
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
559
+ Enabled: false
560
+
561
+ Performance/Sample:
562
+ Description: >-
563
+ Use `sample` instead of `shuffle.first`,
564
+ `shuffle.last`, and `shuffle[Fixnum]`.
565
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
566
+ Enabled: false
567
+
568
+ Performance/Size:
569
+ Description: >-
570
+ Use `size` instead of `count` for counting
571
+ the number of elements in `Array` and `Hash`.
572
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
573
+ Enabled: false
574
+
575
+ Performance/StringReplacement:
576
+ Description: >-
577
+ Use `tr` instead of `gsub` when you are replacing the same
578
+ number of characters. Use `delete` instead of `gsub` when
579
+ you are deleting characters.
580
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
581
+ Enabled: false
582
+
583
+ # Rails
584
+
585
+ Rails/ActionFilter:
586
+ Description: 'Enforces consistent use of action filter methods.'
587
+ Enabled: false
588
+
589
+ Rails/Date:
590
+ Description: >-
591
+ Checks the correct usage of date aware methods,
592
+ such as Date.today, Date.current etc.
593
+ Enabled: false
594
+
595
+ Rails/FindBy:
596
+ Description: 'Prefer find_by over where.first.'
597
+ Enabled: false
598
+
599
+ Rails/FindEach:
600
+ Description: 'Prefer all.find_each over all.find.'
601
+ Enabled: false
602
+
603
+ Rails/HasAndBelongsToMany:
604
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
605
+ Enabled: false
606
+
607
+ Rails/Output:
608
+ Description: 'Checks for calls to puts, print, etc.'
609
+ Enabled: false
610
+
611
+ Rails/ReadWriteAttribute:
612
+ Description: >-
613
+ Checks for read_attribute(:attr) and
614
+ write_attribute(:attr, val).
615
+ Enabled: false
616
+
617
+ Rails/ScopeArgs:
618
+ Description: 'Checks the arguments of ActiveRecord scopes.'
619
+ Enabled: false
620
+
621
+ Rails/TimeZone:
622
+ Description: 'Checks the correct usage of time zone aware methods.'
623
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
624
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
625
+ Enabled: false
626
+
627
+ Rails/Validation:
628
+ Description: 'Use validates :attribute, hash of validations.'
629
+ Enabled: false