flex_commerce_api 0.6.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +6 -0
  3. data/.gitignore +14 -0
  4. data/.rspec +4 -0
  5. data/.rubocop.yml +1065 -0
  6. data/.ruby-gemset +1 -0
  7. data/.ruby-version +1 -0
  8. data/.travis.yml +3 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +56 -0
  12. data/Rakefile +1 -0
  13. data/app/models/address.rb +41 -0
  14. data/app/models/asset_file.rb +26 -0
  15. data/app/models/asset_folder.rb +14 -0
  16. data/app/models/bundle.rb +20 -0
  17. data/app/models/bundle_group.rb +15 -0
  18. data/app/models/cart.rb +136 -0
  19. data/app/models/category.rb +70 -0
  20. data/app/models/category_tree.rb +11 -0
  21. data/app/models/component.rb +8 -0
  22. data/app/models/container_coupon.rb +12 -0
  23. data/app/models/country.rb +11 -0
  24. data/app/models/coupon.rb +18 -0
  25. data/app/models/customer_account.rb +96 -0
  26. data/app/models/customer_account_authentication.rb +5 -0
  27. data/app/models/customer_segment.rb +6 -0
  28. data/app/models/customer_segment_member.rb +6 -0
  29. data/app/models/data_attribute.rb +6 -0
  30. data/app/models/data_store_record.rb +9 -0
  31. data/app/models/data_store_type.rb +9 -0
  32. data/app/models/discount_summary.rb +12 -0
  33. data/app/models/email.rb +5 -0
  34. data/app/models/ewis_opt_in.rb +8 -0
  35. data/app/models/external_url.rb +6 -0
  36. data/app/models/free_shipping_promotion.rb +12 -0
  37. data/app/models/import.rb +6 -0
  38. data/app/models/import_entry.rb +6 -0
  39. data/app/models/line_item.rb +34 -0
  40. data/app/models/line_item_discount.rb +7 -0
  41. data/app/models/markdown_price.rb +11 -0
  42. data/app/models/menu.rb +36 -0
  43. data/app/models/menu_item.rb +7 -0
  44. data/app/models/menu_item_item.rb +5 -0
  45. data/app/models/note.rb +18 -0
  46. data/app/models/order.rb +38 -0
  47. data/app/models/password_recovery.rb +20 -0
  48. data/app/models/payment_address_verification.rb +13 -0
  49. data/app/models/payment_process.rb +13 -0
  50. data/app/models/payment_provider.rb +15 -0
  51. data/app/models/payment_transaction.rb +13 -0
  52. data/app/models/product.rb +99 -0
  53. data/app/models/product_asset_file.rb +12 -0
  54. data/app/models/promotion.rb +19 -0
  55. data/app/models/promotion_qualifying_product_exclusion.rb +8 -0
  56. data/app/models/redirect.rb +14 -0
  57. data/app/models/refund.rb +14 -0
  58. data/app/models/remote_address.rb +22 -0
  59. data/app/models/remote_line_item.rb +11 -0
  60. data/app/models/remote_order.rb +15 -0
  61. data/app/models/remote_shipping_method.rb +12 -0
  62. data/app/models/report.rb +18 -0
  63. data/app/models/report_invocation.rb +18 -0
  64. data/app/models/retail_store.rb +18 -0
  65. data/app/models/role.rb +6 -0
  66. data/app/models/search_suggestion.rb +17 -0
  67. data/app/models/section.rb +9 -0
  68. data/app/models/session.rb +8 -0
  69. data/app/models/shipping_method.rb +26 -0
  70. data/app/models/slug.rb +19 -0
  71. data/app/models/static_page.rb +60 -0
  72. data/app/models/static_page_folder.rb +8 -0
  73. data/app/models/stock_level.rb +21 -0
  74. data/app/models/tax_code.rb +6 -0
  75. data/app/models/taxonomy.rb +5 -0
  76. data/app/models/template.rb +9 -0
  77. data/app/models/template_component.rb +11 -0
  78. data/app/models/template_definition.rb +12 -0
  79. data/app/models/template_section.rb +12 -0
  80. data/app/models/user.rb +8 -0
  81. data/app/models/user_profile.rb +6 -0
  82. data/app/models/v2/create_order.rb +10 -0
  83. data/app/models/v2/deallocate_order.rb +10 -0
  84. data/app/models/v2/line_item.rb +9 -0
  85. data/app/models/v2/order.rb +9 -0
  86. data/app/models/v2/unallocate_order.rb +10 -0
  87. data/app/models/variant.rb +18 -0
  88. data/app/models/webhook.rb +17 -0
  89. data/app/services/param_to_shql.rb +72 -0
  90. data/app/services/surrogate_keys.rb +44 -0
  91. data/bin/console +14 -0
  92. data/bin/setup +7 -0
  93. data/config/locales/payments.en.yml +3 -0
  94. data/flex-commerce-api.gemspec +41 -0
  95. data/lib/flex_commerce.rb +95 -0
  96. data/lib/flex_commerce_api.rb +21 -0
  97. data/lib/flex_commerce_api/api_base.rb +11 -0
  98. data/lib/flex_commerce_api/base_resource.rb +250 -0
  99. data/lib/flex_commerce_api/config.rb +55 -0
  100. data/lib/flex_commerce_api/error/access_denied.rb +6 -0
  101. data/lib/flex_commerce_api/error/bad_request.rb +10 -0
  102. data/lib/flex_commerce_api/error/base.rb +12 -0
  103. data/lib/flex_commerce_api/error/client_error.rb +7 -0
  104. data/lib/flex_commerce_api/error/connection_error.rb +6 -0
  105. data/lib/flex_commerce_api/error/internal_server.rb +37 -0
  106. data/lib/flex_commerce_api/error/not_found.rb +13 -0
  107. data/lib/flex_commerce_api/error/record_invalid.rb +16 -0
  108. data/lib/flex_commerce_api/error/unexpected_status.rb +7 -0
  109. data/lib/flex_commerce_api/errors.rb +13 -0
  110. data/lib/flex_commerce_api/json_api_client_extension/builder.rb +28 -0
  111. data/lib/flex_commerce_api/json_api_client_extension/capture_surrogate_keys_middleware.rb +16 -0
  112. data/lib/flex_commerce_api/json_api_client_extension/flexible_connection.rb +59 -0
  113. data/lib/flex_commerce_api/json_api_client_extension/has_many_association_proxy.rb +60 -0
  114. data/lib/flex_commerce_api/json_api_client_extension/included_data.rb +27 -0
  115. data/lib/flex_commerce_api/json_api_client_extension/json_format_middleware.rb +20 -0
  116. data/lib/flex_commerce_api/json_api_client_extension/logging_middleware.rb +24 -0
  117. data/lib/flex_commerce_api/json_api_client_extension/paginator.rb +26 -0
  118. data/lib/flex_commerce_api/json_api_client_extension/parse_json.rb +23 -0
  119. data/lib/flex_commerce_api/json_api_client_extension/parsers/parser.rb +16 -0
  120. data/lib/flex_commerce_api/json_api_client_extension/previewed_request_middleware.rb +17 -0
  121. data/lib/flex_commerce_api/json_api_client_extension/remote_builder.rb +29 -0
  122. data/lib/flex_commerce_api/json_api_client_extension/requestor.rb +42 -0
  123. data/lib/flex_commerce_api/json_api_client_extension/save_request_body_middleware.rb +20 -0
  124. data/lib/flex_commerce_api/json_api_client_extension/status_middleware.rb +40 -0
  125. data/lib/flex_commerce_api/v2/api_base.rb +13 -0
  126. data/lib/flex_commerce_api/version.rb +3 -0
  127. data/lib/json_erb.rb +9 -0
  128. data/lib/json_struct.rb +73 -0
  129. data/lib/patches.rb +4 -0
  130. data/lib/patches/json_api_client/resource.rb +50 -0
  131. data/lib/paypal_express.rb +3 -0
  132. data/lib/paypal_express/additional_info.rb +45 -0
  133. data/lib/paypal_express/api.rb +86 -0
  134. data/lib/paypal_express/auth.rb +83 -0
  135. data/lib/paypal_express/cart_shipping_method.rb +38 -0
  136. data/lib/paypal_express/exception/access_denied.rb +10 -0
  137. data/lib/paypal_express/exception/connection_error.rb +10 -0
  138. data/lib/paypal_express/exception/not_authorized.rb +10 -0
  139. data/lib/paypal_express/exception/transaction.rb +15 -0
  140. data/lib/paypal_express/generate_summary.rb +118 -0
  141. data/lib/paypal_express/process/paypal_params.rb +123 -0
  142. data/lib/paypal_express/process/response_parser.rb +146 -0
  143. data/lib/paypal_express/setup.rb +94 -0
  144. data/lib/paypal_express/shipping_methods_for_cart.rb +46 -0
  145. data/lib/retry.rb +20 -0
  146. data/schemas/jsonapi/schema.json +370 -0
  147. data/schemas/shift/v1/documents/collection/address.json +45 -0
  148. data/schemas/shift/v1/documents/collection/asset_file.json +43 -0
  149. data/schemas/shift/v1/documents/collection/asset_folder.json +43 -0
  150. data/schemas/shift/v1/documents/collection/customer_account.json +50 -0
  151. data/schemas/shift/v1/documents/collection/markdown_price.json +43 -0
  152. data/schemas/shift/v1/documents/collection/product.json +43 -0
  153. data/schemas/shift/v1/documents/collection/variant.json +43 -0
  154. data/schemas/shift/v1/documents/member/address.json +39 -0
  155. data/schemas/shift/v1/documents/member/asset_file.json +37 -0
  156. data/schemas/shift/v1/documents/member/asset_folder.json +39 -0
  157. data/schemas/shift/v1/documents/member/customer_account.json +44 -0
  158. data/schemas/shift/v1/documents/member/markdown_price.json +37 -0
  159. data/schemas/shift/v1/documents/member/product.json +39 -0
  160. data/schemas/shift/v1/documents/member/variant.json +46 -0
  161. data/schemas/shift/v1/resources/address.json +130 -0
  162. data/schemas/shift/v1/resources/asset_file.json +146 -0
  163. data/schemas/shift/v1/resources/asset_folder.json +188 -0
  164. data/schemas/shift/v1/resources/customer_account.json +339 -0
  165. data/schemas/shift/v1/resources/markdown_price.json +52 -0
  166. data/schemas/shift/v1/resources/product.json +230 -0
  167. data/schemas/shift/v1/resources/variant.json +298 -0
  168. data/tasks/json_schema.thor +275 -0
  169. data/todo.md +8 -0
  170. metadata +470 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8df21fbb808a597a47e3ce03e124cde9285e26bbfdafe37af9783eed3fc43571
4
+ data.tar.gz: 1b628de8125b13534465116d350a5b9c6b79ff3227012857a874b8d8ea6a043e
5
+ SHA512:
6
+ metadata.gz: fa63b986f6e5deae7834142534a7eb2051c2a5c4eeadf6059fefd578fbf83b4211fb890d27516a2bbbbfbaeec6f6fbae068c03d4e8c8598a79e3237023ea6d3f
7
+ data.tar.gz: d4d71f00eceda350a4824bf3d383409e3bbbf473042f7c6bbffe8078cf6ae3988dc77c0c2d07b4fd7e0e67fe56d9c4258ec7a88765f69c33a91c9c3ef2adbafb
@@ -0,0 +1,6 @@
1
+ # These will work out of the box if you use rake test_account:create with default settings
2
+ API_URL=http://api.shiftlocal.co.uk:4567
3
+ API_ACCOUNT=testaccount
4
+ API_KEY=314e47ece578a11e6e77c6153229cd25
5
+ SHIFT_OPEN_TIMEOUT = 2
6
+ SHIFT_TIMEOUT = 15
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .idea
11
+ .env
12
+ .byebug_history
13
+ .DS_Store
14
+ .vscode/settings.json
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --tag ~server
3
+ --exclude-pattern spec/{e2e,lib}/**/*
4
+ --format documentation
@@ -0,0 +1,1065 @@
1
+ AllCops:
2
+ Include:
3
+ - "**/*.gemspec"
4
+ - "**/*.podspec"
5
+ - "**/*.jbuilder"
6
+ - "**/*.rake"
7
+ - "**/*.opal"
8
+ - "**/Gemfile"
9
+ - "**/Rakefile"
10
+ - "**/Capfile"
11
+ - "**/Guardfile"
12
+ - "**/Podfile"
13
+ - "**/Thorfile"
14
+ - "**/Vagrantfile"
15
+ - "**/Berksfile"
16
+ - "**/Cheffile"
17
+ - "**/Vagabondfile"
18
+ Exclude:
19
+ - "vendor/**/*"
20
+ RunRailsCops: false
21
+ DisplayCopNames: false
22
+ StyleGuideCopsOnly: false
23
+ Style/AccessModifierIndentation:
24
+ Description: Check indentation of private/protected visibility modifiers.
25
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
26
+ Enabled: true
27
+ EnforcedStyle: indent
28
+ SupportedStyles:
29
+ - outdent
30
+ - indent
31
+ Style/AlignHash:
32
+ Description: Align the elements of a hash literal if they span more than one line.
33
+ Enabled: true
34
+ EnforcedHashRocketStyle: key
35
+ EnforcedColonStyle: key
36
+ EnforcedLastArgumentHashStyle: always_inspect
37
+ SupportedLastArgumentHashStyles:
38
+ - always_inspect
39
+ - always_ignore
40
+ - ignore_implicit
41
+ - ignore_explicit
42
+ Style/AlignParameters:
43
+ Description: Align the parameters of a method call if they span more than one line.
44
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
45
+ Enabled: true
46
+ EnforcedStyle: with_first_parameter
47
+ SupportedStyles:
48
+ - with_first_parameter
49
+ - with_fixed_indentation
50
+ Style/AndOr:
51
+ Description: Use &&/|| instead of and/or.
52
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
53
+ Enabled: true
54
+ EnforcedStyle: always
55
+ SupportedStyles:
56
+ - always
57
+ - conditionals
58
+ Style/BarePercentLiterals:
59
+ Description: Checks if usage of %() or %Q() matches configuration.
60
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
61
+ Enabled: true
62
+ EnforcedStyle: bare_percent
63
+ SupportedStyles:
64
+ - percent_q
65
+ - bare_percent
66
+ Style/BracesAroundHashParameters:
67
+ Description: Enforce braces style around hash parameters.
68
+ Enabled: true
69
+ EnforcedStyle: no_braces
70
+ SupportedStyles:
71
+ - braces
72
+ - no_braces
73
+ - context_dependent
74
+ Style/CaseIndentation:
75
+ Description: Indentation of when in a case/when/[else/]end.
76
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
77
+ Enabled: true
78
+ IndentWhenRelativeTo: case
79
+ SupportedStyles:
80
+ - case
81
+ - end
82
+ IndentOneStep: false
83
+ Style/ClassAndModuleChildren:
84
+ Description: Checks style of children classes and modules.
85
+ Enabled: false
86
+ EnforcedStyle: nested
87
+ SupportedStyles:
88
+ - nested
89
+ - compact
90
+ Style/ClassCheck:
91
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
92
+ Enabled: true
93
+ EnforcedStyle: is_a?
94
+ SupportedStyles:
95
+ - is_a?
96
+ - kind_of?
97
+ Style/CollectionMethods:
98
+ Description: Preferred collection methods.
99
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
100
+ Enabled: true
101
+ PreferredMethods:
102
+ collect: map
103
+ collect!: map!
104
+ find: detect
105
+ find_all: select
106
+ reduce: inject
107
+ Style/CommentAnnotation:
108
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
109
+ REVIEW).
110
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
111
+ Enabled: false
112
+ Keywords:
113
+ - TODO
114
+ - FIXME
115
+ - OPTIMIZE
116
+ - HACK
117
+ - REVIEW
118
+ Style/DotPosition:
119
+ Description: Checks the position of the dot in multi-line method calls.
120
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
121
+ Enabled: true
122
+ EnforcedStyle: trailing
123
+ SupportedStyles:
124
+ - leading
125
+ - trailing
126
+ Style/EmptyLineBetweenDefs:
127
+ Description: Use empty lines between defs.
128
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
129
+ Enabled: true
130
+ AllowAdjacentOneLineDefs: false
131
+ Style/EmptyLinesAroundBlockBody:
132
+ Description: Keeps track of empty lines around block bodies.
133
+ Enabled: true
134
+ EnforcedStyle: no_empty_lines
135
+ SupportedStyles:
136
+ - empty_lines
137
+ - no_empty_lines
138
+ Style/EmptyLinesAroundClassBody:
139
+ Description: Keeps track of empty lines around class bodies.
140
+ Enabled: true
141
+ EnforcedStyle: no_empty_lines
142
+ SupportedStyles:
143
+ - empty_lines
144
+ - no_empty_lines
145
+ Style/EmptyLinesAroundModuleBody:
146
+ Description: Keeps track of empty lines around module bodies.
147
+ Enabled: true
148
+ EnforcedStyle: no_empty_lines
149
+ SupportedStyles:
150
+ - empty_lines
151
+ - no_empty_lines
152
+ Style/Encoding:
153
+ Description: Use UTF-8 as the source file encoding.
154
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
155
+ Enabled: false
156
+ EnforcedStyle: always
157
+ SupportedStyles:
158
+ - when_needed
159
+ - always
160
+ Style/FileName:
161
+ Description: Use snake_case for source file names.
162
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
163
+ Enabled: false
164
+ Exclude: []
165
+ Style/FirstParameterIndentation:
166
+ Description: Checks the indentation of the first parameter in a method call.
167
+ Enabled: true
168
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
169
+ SupportedStyles:
170
+ - consistent
171
+ - special_for_inner_method_call
172
+ - special_for_inner_method_call_in_parentheses
173
+ Style/For:
174
+ Description: Checks use of for or each in multiline loops.
175
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
176
+ Enabled: true
177
+ EnforcedStyle: each
178
+ SupportedStyles:
179
+ - for
180
+ - each
181
+ Style/FormatString:
182
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
183
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
184
+ Enabled: false
185
+ EnforcedStyle: format
186
+ SupportedStyles:
187
+ - format
188
+ - sprintf
189
+ - percent
190
+ Style/GlobalVars:
191
+ Description: Do not introduce global variables.
192
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
193
+ Enabled: false
194
+ AllowedVariables: []
195
+ Style/GuardClause:
196
+ Description: Check for conditionals that can be replaced with guard clauses
197
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
198
+ Enabled: false
199
+ MinBodyLength: 1
200
+ Style/HashSyntax:
201
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
202
+ 1, :b => 2 }.'
203
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
204
+ Enabled: true
205
+ EnforcedStyle: ruby19
206
+ SupportedStyles:
207
+ - ruby19
208
+ - hash_rockets
209
+ Style/IfUnlessModifier:
210
+ Description: Favor modifier if/unless usage when you have a single-line body.
211
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
212
+ Enabled: false
213
+ MaxLineLength: 120
214
+ Style/IndentationWidth:
215
+ Description: Use 2 spaces for indentation.
216
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
217
+ Enabled: true
218
+ Width: 2
219
+ Style/IndentHash:
220
+ Description: Checks the indentation of the first key in a hash literal.
221
+ Enabled: true
222
+ EnforcedStyle: special_inside_parentheses
223
+ SupportedStyles:
224
+ - special_inside_parentheses
225
+ - consistent
226
+ Style/LambdaCall:
227
+ Description: Use lambda.call(...) instead of lambda.(...).
228
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
229
+ Enabled: false
230
+ EnforcedStyle: call
231
+ SupportedStyles:
232
+ - call
233
+ - braces
234
+ Style/Next:
235
+ Description: Use `next` to skip iteration instead of a condition at the end.
236
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
237
+ Enabled: false
238
+ EnforcedStyle: skip_modifier_ifs
239
+ MinBodyLength: 3
240
+ SupportedStyles:
241
+ - skip_modifier_ifs
242
+ - always
243
+ Style/NonNilCheck:
244
+ Description: Checks for redundant nil checks.
245
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
246
+ Enabled: true
247
+ IncludeSemanticChanges: false
248
+ Style/MethodDefParentheses:
249
+ Description: Checks if the method definitions have or don't have parentheses.
250
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
251
+ Enabled: true
252
+ EnforcedStyle: require_parentheses
253
+ SupportedStyles:
254
+ - require_parentheses
255
+ - require_no_parentheses
256
+ Style/MethodName:
257
+ Description: Use the configured style when naming methods.
258
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
259
+ Enabled: true
260
+ EnforcedStyle: snake_case
261
+ SupportedStyles:
262
+ - snake_case
263
+ - camelCase
264
+ Style/MultilineOperationIndentation:
265
+ Description: Checks indentation of binary operations that span more than one line.
266
+ Enabled: true
267
+ EnforcedStyle: aligned
268
+ SupportedStyles:
269
+ - aligned
270
+ - indented
271
+ Style/NumericLiterals:
272
+ Description: Add underscores to large numeric literals to improve their readability.
273
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
274
+ Enabled: false
275
+ MinDigits: 5
276
+ Style/ParenthesesAroundCondition:
277
+ Description: Don't use parentheses around the condition of an if/unless/while.
278
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
279
+ Enabled: true
280
+ AllowSafeAssignment: true
281
+ Style/PercentLiteralDelimiters:
282
+ Description: Use `%`-literal delimiters consistently
283
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
284
+ Enabled: false
285
+ PreferredDelimiters:
286
+ "%": "()"
287
+ "%i": "()"
288
+ "%q": "()"
289
+ "%Q": "()"
290
+ "%r": "{}"
291
+ "%s": "()"
292
+ "%w": "()"
293
+ "%W": "()"
294
+ "%x": "()"
295
+ Style/PercentQLiterals:
296
+ Description: Checks if uses of %Q/%q match the configured preference.
297
+ Enabled: true
298
+ EnforcedStyle: lower_case_q
299
+ SupportedStyles:
300
+ - lower_case_q
301
+ - upper_case_q
302
+ Style/PredicateName:
303
+ Description: Check the names of predicate methods.
304
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
305
+ Enabled: true
306
+ NamePrefix:
307
+ - is_
308
+ - has_
309
+ - have_
310
+ NamePrefixBlacklist:
311
+ - is_
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
+ EnforcedStyle: exploded
317
+ SupportedStyles:
318
+ - compact
319
+ - exploded
320
+ Style/RedundantReturn:
321
+ Description: Don't use return where it's not required.
322
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
323
+ Enabled: true
324
+ AllowMultipleReturnValues: false
325
+ Style/RegexpLiteral:
326
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
327
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
328
+ '/' character.
329
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
330
+ Enabled: false
331
+ MaxSlashes: 1
332
+ Style/Semicolon:
333
+ Description: Don't use semicolons to terminate expressions.
334
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
335
+ Enabled: true
336
+ AllowAsExpressionSeparator: false
337
+ Style/SignalException:
338
+ Description: Checks for proper usage of fail and raise.
339
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
340
+ Enabled: false
341
+ EnforcedStyle: semantic
342
+ SupportedStyles:
343
+ - only_raise
344
+ - only_fail
345
+ - semantic
346
+ Style/SingleLineBlockParams:
347
+ Description: Enforces the names of some block params.
348
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
349
+ Enabled: false
350
+ Methods:
351
+ - reduce:
352
+ - a
353
+ - e
354
+ - inject:
355
+ - a
356
+ - e
357
+ Style/SingleLineMethods:
358
+ Description: Avoid single-line methods.
359
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
360
+ Enabled: false
361
+ AllowIfMethodIsEmpty: true
362
+ Style/StringLiterals:
363
+ Description: Checks if uses of quotes match the configured preference.
364
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
365
+ Enabled: true
366
+ EnforcedStyle: double_quotes
367
+ SupportedStyles:
368
+ - single_quotes
369
+ - double_quotes
370
+ Style/StringLiteralsInInterpolation:
371
+ Description: Checks if uses of quotes inside expressions in interpolated strings
372
+ match the configured preference.
373
+ Enabled: true
374
+ EnforcedStyle: single_quotes
375
+ SupportedStyles:
376
+ - single_quotes
377
+ - double_quotes
378
+ Style/SpaceAroundBlockParameters:
379
+ Description: Checks the spacing inside and after block parameters pipes.
380
+ Enabled: true
381
+ EnforcedStyleInsidePipes: no_space
382
+ SupportedStyles:
383
+ - space
384
+ - no_space
385
+ Style/SpaceAroundEqualsInParameterDefault:
386
+ Description: Checks that the equals signs in parameter default assignments have
387
+ or don't have surrounding space depending on configuration.
388
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
389
+ Enabled: true
390
+ EnforcedStyle: space
391
+ SupportedStyles:
392
+ - space
393
+ - no_space
394
+ Style/SpaceBeforeBlockBraces:
395
+ Description: Checks that the left block brace has or doesn't have space before it.
396
+ Enabled: true
397
+ EnforcedStyle: space
398
+ SupportedStyles:
399
+ - space
400
+ - no_space
401
+ Style/SpaceInsideBlockBraces:
402
+ Description: Checks that block braces have or don't have surrounding space. For
403
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
404
+ space.
405
+ Enabled: true
406
+ EnforcedStyle: space
407
+ SupportedStyles:
408
+ - space
409
+ - no_space
410
+ EnforcedStyleForEmptyBraces: no_space
411
+ SpaceBeforeBlockParameters: true
412
+ Style/SpaceInsideHashLiteralBraces:
413
+ Description: Use spaces inside hash literal braces - or don't.
414
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
415
+ Enabled: true
416
+ EnforcedStyle: space
417
+ EnforcedStyleForEmptyBraces: no_space
418
+ SupportedStyles:
419
+ - space
420
+ - no_space
421
+ Style/SymbolProc:
422
+ Description: Use symbols as procs instead of blocks when possible.
423
+ Enabled: true
424
+ IgnoredMethods:
425
+ - respond_to
426
+ Style/TrailingBlankLines:
427
+ Description: Checks trailing blank lines and final newline.
428
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
429
+ Enabled: true
430
+ EnforcedStyle: final_newline
431
+ SupportedStyles:
432
+ - final_newline
433
+ - final_blank_line
434
+ Style/TrailingComma:
435
+ Description: Checks for trailing comma in parameter lists and literals.
436
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
437
+ Enabled: false
438
+ EnforcedStyleForMultiline: no_comma
439
+ SupportedStyles:
440
+ - comma
441
+ - no_comma
442
+ Style/TrivialAccessors:
443
+ Description: Prefer attr_* methods to trivial readers/writers.
444
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
445
+ Enabled: false
446
+ ExactNameMatch: false
447
+ AllowPredicates: false
448
+ AllowDSLWriters: false
449
+ Whitelist:
450
+ - to_ary
451
+ - to_a
452
+ - to_c
453
+ - to_enum
454
+ - to_h
455
+ - to_hash
456
+ - to_i
457
+ - to_int
458
+ - to_io
459
+ - to_open
460
+ - to_path
461
+ - to_proc
462
+ - to_r
463
+ - to_regexp
464
+ - to_str
465
+ - to_s
466
+ - to_sym
467
+ Style/VariableName:
468
+ Description: Use the configured style when naming variables.
469
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
470
+ Enabled: true
471
+ EnforcedStyle: snake_case
472
+ SupportedStyles:
473
+ - snake_case
474
+ - camelCase
475
+ Style/WhileUntilModifier:
476
+ Description: Favor modifier while/until usage when you have a single-line body.
477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
478
+ Enabled: false
479
+ MaxLineLength: 120
480
+ Style/WordArray:
481
+ Description: Use %w or %W for arrays of words.
482
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
483
+ Enabled: false
484
+ MinSize: 0
485
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
486
+ Metrics/AbcSize:
487
+ Description: A calculated magnitude based on number of assignments, branches, and
488
+ conditions.
489
+ Enabled: true
490
+ Max: 15
491
+ Metrics/BlockNesting:
492
+ Description: Avoid excessive block nesting
493
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
494
+ Enabled: false
495
+ Max: 3
496
+ Metrics/ClassLength:
497
+ Description: Avoid classes longer than 100 lines of code.
498
+ Enabled: false
499
+ CountComments: false
500
+ Max: 100
501
+ Metrics/CyclomaticComplexity:
502
+ Description: A complexity metric that is strongly correlated to the number of test
503
+ cases needed to validate a method.
504
+ Enabled: false
505
+ Max: 6
506
+ Metrics/LineLength:
507
+ Description: Limit lines to 80 characters.
508
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
509
+ Enabled: true
510
+ Max: 120
511
+ AllowURI: true
512
+ URISchemes:
513
+ - http
514
+ - https
515
+ Exclude:
516
+ - "spec/**/*"
517
+ - "views/**/*"
518
+ Metrics/MethodLength:
519
+ Description: Avoid methods longer than 10 lines of code.
520
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
521
+ Enabled: false
522
+ CountComments: false
523
+ Max: 10
524
+ Metrics/ParameterLists:
525
+ Description: Avoid parameter lists longer than three or four parameters.
526
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
527
+ Enabled: false
528
+ Max: 5
529
+ CountKeywordArgs: true
530
+ Metrics/PerceivedComplexity:
531
+ Description: A complexity metric geared towards measuring complexity for a human
532
+ reader.
533
+ Enabled: false
534
+ Max: 7
535
+ Lint/AssignmentInCondition:
536
+ Description: Don't use assignment in conditions.
537
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
538
+ Enabled: false
539
+ AllowSafeAssignment: true
540
+ Lint/EndAlignment:
541
+ Description: Align ends correctly.
542
+ Enabled: true
543
+ AlignWith: keyword
544
+ SupportedStyles:
545
+ - keyword
546
+ - variable
547
+ Lint/DefEndAlignment:
548
+ Description: Align ends corresponding to defs correctly.
549
+ Enabled: true
550
+ AlignWith: start_of_line
551
+ SupportedStyles:
552
+ - start_of_line
553
+ - def
554
+ Rails/ActionFilter:
555
+ Description: Enforces consistent use of action filter methods.
556
+ Enabled: false
557
+ EnforcedStyle: action
558
+ SupportedStyles:
559
+ - action
560
+ - filter
561
+ Include:
562
+ - app/controllers/**/*.rb
563
+ Rails/DefaultScope:
564
+ Description: Checks if the argument passed to default_scope is a block.
565
+ Enabled: true
566
+ Include:
567
+ - app/models/**/*.rb
568
+ Rails/HasAndBelongsToMany:
569
+ Description: Prefer has_many :through to has_and_belongs_to_many.
570
+ Enabled: true
571
+ Include:
572
+ - app/models/**/*.rb
573
+ Rails/Output:
574
+ Description: Checks for calls to puts, print, etc.
575
+ Enabled: true
576
+ Include:
577
+ - app/**/*.rb
578
+ - config/**/*.rb
579
+ - db/**/*.rb
580
+ - lib/**/*.rb
581
+ Rails/ReadWriteAttribute:
582
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
583
+ Enabled: true
584
+ Include:
585
+ - app/models/**/*.rb
586
+ Rails/ScopeArgs:
587
+ Description: Checks the arguments of ActiveRecord scopes.
588
+ Enabled: true
589
+ Include:
590
+ - app/models/**/*.rb
591
+ Rails/Validation:
592
+ Description: Use validates :attribute, hash of validations.
593
+ Enabled: true
594
+ Include:
595
+ - app/models/**/*.rb
596
+ Style/InlineComment:
597
+ Description: Avoid inline comments.
598
+ Enabled: false
599
+ Style/MethodCalledOnDoEndBlock:
600
+ Description: Avoid chaining a method call on a do...end block.
601
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
602
+ Enabled: false
603
+ Style/SymbolArray:
604
+ Description: Use %i or %I for arrays of symbols.
605
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
606
+ Enabled: false
607
+ Style/ExtraSpacing:
608
+ Description: Do not use unnecessary spacing.
609
+ Enabled: true
610
+ Style/AccessorMethodName:
611
+ Description: Check the naming of accessor methods for get_/set_.
612
+ Enabled: false
613
+ Style/Alias:
614
+ Description: Use alias_method instead of alias.
615
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
616
+ Enabled: false
617
+ Style/AlignArray:
618
+ Description: Align the elements of an array literal if they span more than one line.
619
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
620
+ Enabled: true
621
+ Style/ArrayJoin:
622
+ Description: Use Array#join instead of Array#*.
623
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
624
+ Enabled: false
625
+ Style/AsciiComments:
626
+ Description: Use only ascii symbols in comments.
627
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
628
+ Enabled: false
629
+ Style/AsciiIdentifiers:
630
+ Description: Use only ascii symbols in identifiers.
631
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
632
+ Enabled: false
633
+ Style/Attr:
634
+ Description: Checks for uses of Module#attr.
635
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
636
+ Enabled: false
637
+ Style/BeginBlock:
638
+ Description: Avoid the use of BEGIN blocks.
639
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
640
+ Enabled: true
641
+ Style/BlockComments:
642
+ Description: Do not use block comments.
643
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
644
+ Enabled: true
645
+ Style/BlockEndNewline:
646
+ Description: Put end statement of multiline block on its own line.
647
+ Enabled: true
648
+ Style/Blocks:
649
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
650
+ ugly). Prefer {...} over do...end for single-line blocks.
651
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
652
+ Enabled: true
653
+ Style/CaseEquality:
654
+ Description: Avoid explicit use of the case equality operator(===).
655
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
656
+ Enabled: false
657
+ Style/CharacterLiteral:
658
+ Description: Checks for uses of character literals.
659
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
660
+ Enabled: false
661
+ Style/ClassAndModuleCamelCase:
662
+ Description: Use CamelCase for classes and modules.
663
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
664
+ Enabled: true
665
+ Style/ClassMethods:
666
+ Description: Use self when defining module/class methods.
667
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
668
+ Enabled: true
669
+ Style/ClassVars:
670
+ Description: Avoid the use of class variables.
671
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
672
+ Enabled: false
673
+ Style/ColonMethodCall:
674
+ Description: 'Do not use :: for method call.'
675
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
676
+ Enabled: false
677
+ Style/CommentIndentation:
678
+ Description: Indentation of comments.
679
+ Enabled: true
680
+ Style/ConstantName:
681
+ Description: Constants should use SCREAMING_SNAKE_CASE.
682
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
683
+ Enabled: true
684
+ Style/DefWithParentheses:
685
+ Description: Use def with parentheses when there are arguments.
686
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
687
+ Enabled: true
688
+ Style/DeprecatedHashMethods:
689
+ Description: Checks for use of deprecated Hash methods.
690
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
691
+ Enabled: false
692
+ Style/Documentation:
693
+ Description: Document classes and non-namespace modules.
694
+ Enabled: false
695
+ Style/DoubleNegation:
696
+ Description: Checks for uses of double negation (!!).
697
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
698
+ Enabled: false
699
+ Style/EachWithObject:
700
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
701
+ Enabled: false
702
+ Style/ElseAlignment:
703
+ Description: Align elses and elsifs correctly.
704
+ Enabled: true
705
+ Style/EmptyElse:
706
+ Description: Avoid empty else-clauses.
707
+ Enabled: true
708
+ Style/EmptyLines:
709
+ Description: Don't use several empty lines in a row.
710
+ Enabled: true
711
+ Style/EmptyLinesAroundAccessModifier:
712
+ Description: Keep blank lines around access modifiers.
713
+ Enabled: true
714
+ Style/EmptyLinesAroundMethodBody:
715
+ Description: Keeps track of empty lines around method bodies.
716
+ Enabled: true
717
+ Style/EmptyLiteral:
718
+ Description: Prefer literals to Array.new/Hash.new/String.new.
719
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
720
+ Enabled: false
721
+ Style/EndBlock:
722
+ Description: Avoid the use of END blocks.
723
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
724
+ Enabled: true
725
+ Style/EndOfLine:
726
+ Description: Use Unix-style line endings.
727
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
728
+ Enabled: true
729
+ Style/EvenOdd:
730
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
731
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
732
+ Enabled: false
733
+ Style/FlipFlop:
734
+ Description: Checks for flip flops
735
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
736
+ Enabled: false
737
+ Style/IfWithSemicolon:
738
+ Description: Do not use if x; .... Use the ternary operator instead.
739
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
740
+ Enabled: false
741
+ Style/IndentationConsistency:
742
+ Description: Keep indentation straight.
743
+ Enabled: true
744
+ Style/IndentArray:
745
+ Description: Checks the indentation of the first element in an array literal.
746
+ Enabled: true
747
+ Style/InfiniteLoop:
748
+ Description: Use Kernel#loop for infinite loops.
749
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
750
+ Enabled: true
751
+ Style/Lambda:
752
+ Description: Use the new lambda literal syntax for single-line blocks.
753
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
754
+ Enabled: false
755
+ Style/LeadingCommentSpace:
756
+ Description: Comments should start with a space.
757
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
758
+ Enabled: true
759
+ Style/LineEndConcatenation:
760
+ Description: Use \ instead of + or << to concatenate two string literals at line
761
+ end.
762
+ Enabled: false
763
+ Style/MethodCallParentheses:
764
+ Description: Do not use parentheses for method calls with no arguments.
765
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
766
+ Enabled: true
767
+ Style/ModuleFunction:
768
+ Description: Checks for usage of `extend self` in modules.
769
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
770
+ Enabled: false
771
+ Style/MultilineBlockChain:
772
+ Description: Avoid multi-line chains of blocks.
773
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
774
+ Enabled: true
775
+ Style/MultilineBlockLayout:
776
+ Description: Ensures newlines after multiline block do statements.
777
+ Enabled: true
778
+ Style/MultilineIfThen:
779
+ Description: Do not use then for multi-line if/unless.
780
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
781
+ Enabled: true
782
+ Style/MultilineTernaryOperator:
783
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
784
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
785
+ Enabled: true
786
+ Style/NegatedIf:
787
+ Description: Favor unless over if for negative conditions (or control flow or).
788
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
789
+ Enabled: false
790
+ Style/NegatedWhile:
791
+ Description: Favor until over while for negative conditions.
792
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
793
+ Enabled: false
794
+ Style/NestedTernaryOperator:
795
+ Description: Use one expression per branch in a ternary operator.
796
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
797
+ Enabled: true
798
+ Style/NilComparison:
799
+ Description: Prefer x.nil? to x == nil.
800
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
801
+ Enabled: false
802
+ Style/Not:
803
+ Description: Use ! instead of not.
804
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
805
+ Enabled: false
806
+ Style/OneLineConditional:
807
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
808
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
809
+ Enabled: false
810
+ Style/OpMethod:
811
+ Description: When defining binary operators, name the argument other.
812
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
813
+ Enabled: false
814
+ Style/PerlBackrefs:
815
+ Description: Avoid Perl-style regex back references.
816
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
817
+ Enabled: false
818
+ Style/Proc:
819
+ Description: Use proc instead of Proc.new.
820
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
821
+ Enabled: false
822
+ Style/RedundantBegin:
823
+ Description: Don't use begin blocks when they are not needed.
824
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
825
+ Enabled: true
826
+ Style/RedundantException:
827
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
828
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
829
+ Enabled: true
830
+ Style/RedundantSelf:
831
+ Description: Don't use self where it's not needed.
832
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
833
+ Enabled: true
834
+ Style/RescueModifier:
835
+ Description: Avoid using rescue in its modifier form.
836
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
837
+ Enabled: true
838
+ Style/SelfAssignment:
839
+ Description: Checks for places where self-assignment shorthand should have been
840
+ used.
841
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
842
+ Enabled: false
843
+ Style/SingleSpaceBeforeFirstArg:
844
+ Description: Checks that exactly one space is used between a method name and the
845
+ first argument for method calls without parentheses.
846
+ Enabled: true
847
+ Style/SpaceAfterColon:
848
+ Description: Use spaces after colons.
849
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
850
+ Enabled: true
851
+ Style/SpaceAfterComma:
852
+ Description: Use spaces after commas.
853
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
854
+ Enabled: true
855
+ Style/SpaceAfterControlKeyword:
856
+ Description: Use spaces after if/elsif/unless/while/until/case/when.
857
+ Enabled: true
858
+ Style/SpaceAfterMethodName:
859
+ Description: Do not put a space between a method name and the opening parenthesis
860
+ in a method definition.
861
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
862
+ Enabled: true
863
+ Style/SpaceAfterNot:
864
+ Description: Tracks redundant space after the ! operator.
865
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
866
+ Enabled: true
867
+ Style/SpaceAfterSemicolon:
868
+ Description: Use spaces after semicolons.
869
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
870
+ Enabled: true
871
+ Style/SpaceBeforeComma:
872
+ Description: No spaces before commas.
873
+ Enabled: true
874
+ Style/SpaceBeforeComment:
875
+ Description: Checks for missing space between code and a comment on the same line.
876
+ Enabled: true
877
+ Style/SpaceBeforeSemicolon:
878
+ Description: No spaces before semicolons.
879
+ Enabled: true
880
+ Style/SpaceAroundOperators:
881
+ Description: Use spaces around operators.
882
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
883
+ Enabled: true
884
+ Style/SpaceBeforeModifierKeyword:
885
+ Description: Put a space before the modifier keyword.
886
+ Enabled: true
887
+ Style/SpaceInsideBrackets:
888
+ Description: No spaces after [ or before ].
889
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
890
+ Enabled: true
891
+ Style/SpaceInsideParens:
892
+ Description: No spaces after ( or before ).
893
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
894
+ Enabled: true
895
+ Style/SpaceInsideRangeLiteral:
896
+ Description: No spaces inside range literals.
897
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
898
+ Enabled: true
899
+ Style/SpecialGlobalVars:
900
+ Description: Avoid Perl-style global variables.
901
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
902
+ Enabled: false
903
+ Style/StructInheritance:
904
+ Description: Checks for inheritance from Struct.new.
905
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
906
+ Enabled: true
907
+ Style/Tab:
908
+ Description: No hard tabs.
909
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
910
+ Enabled: true
911
+ Style/TrailingWhitespace:
912
+ Description: Avoid trailing whitespace.
913
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
914
+ Enabled: true
915
+ Style/UnlessElse:
916
+ Description: Do not use unless with else. Rewrite these with the positive case first.
917
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
918
+ Enabled: true
919
+ Style/UnneededCapitalW:
920
+ Description: Checks for %W when interpolation is not needed.
921
+ Enabled: true
922
+ Style/UnneededPercentQ:
923
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
924
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
925
+ Enabled: true
926
+ Style/UnneededPercentX:
927
+ Description: Checks for %x when `` would do.
928
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
929
+ Enabled: true
930
+ Style/VariableInterpolation:
931
+ Description: Don't interpolate global, instance and class variables directly in
932
+ strings.
933
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
934
+ Enabled: false
935
+ Style/WhenThen:
936
+ Description: Use when x then ... for one-line cases.
937
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
938
+ Enabled: false
939
+ Style/WhileUntilDo:
940
+ Description: Checks for redundant do after while or until.
941
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
942
+ Enabled: true
943
+ Lint/AmbiguousOperator:
944
+ Description: Checks for ambiguous operators in the first argument of a method invocation
945
+ without parentheses.
946
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
947
+ Enabled: false
948
+ Lint/AmbiguousRegexpLiteral:
949
+ Description: Checks for ambiguous regexp literals in the first argument of a method
950
+ invocation without parenthesis.
951
+ Enabled: false
952
+ Lint/BlockAlignment:
953
+ Description: Align block ends correctly.
954
+ Enabled: true
955
+ Lint/ConditionPosition:
956
+ Description: Checks for condition placed in a confusing position relative to the
957
+ keyword.
958
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
959
+ Enabled: false
960
+ Lint/Debugger:
961
+ Description: Check for debugger calls.
962
+ Enabled: true
963
+ Lint/DeprecatedClassMethods:
964
+ Description: Check for deprecated class method calls.
965
+ Enabled: false
966
+ Lint/DuplicateMethods:
967
+ Description: Check for duplicate methods calls.
968
+ Enabled: true
969
+ Lint/ElseLayout:
970
+ Description: Check for odd code arrangement in an else block.
971
+ Enabled: false
972
+ Lint/EmptyEnsure:
973
+ Description: Checks for empty ensure block.
974
+ Enabled: true
975
+ Lint/EmptyInterpolation:
976
+ Description: Checks for empty string interpolation.
977
+ Enabled: true
978
+ Lint/EndInMethod:
979
+ Description: END blocks should not be placed inside method definitions.
980
+ Enabled: true
981
+ Lint/EnsureReturn:
982
+ Description: Do not use return in an ensure block.
983
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
984
+ Enabled: true
985
+ Lint/Eval:
986
+ Description: The use of eval represents a serious security risk.
987
+ Enabled: true
988
+ Lint/HandleExceptions:
989
+ Description: Don't suppress exception.
990
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
991
+ Enabled: false
992
+ Lint/InvalidCharacterLiteral:
993
+ Description: Checks for invalid character literals with a non-escaped whitespace
994
+ character.
995
+ Enabled: false
996
+ Lint/LiteralInCondition:
997
+ Description: Checks of literals used in conditions.
998
+ Enabled: false
999
+ Lint/LiteralInInterpolation:
1000
+ Description: Checks for literals used in interpolation.
1001
+ Enabled: false
1002
+ Lint/Loop:
1003
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1004
+ for post-loop tests.
1005
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1006
+ Enabled: false
1007
+ Lint/ParenthesesAsGroupedExpression:
1008
+ Description: Checks for method calls with a space before the opening parenthesis.
1009
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1010
+ Enabled: false
1011
+ Lint/RequireParentheses:
1012
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1013
+ Enabled: false
1014
+ Lint/RescueException:
1015
+ Description: Avoid rescuing the Exception class.
1016
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1017
+ Enabled: true
1018
+ Lint/ShadowingOuterLocalVariable:
1019
+ Description: Do not use the same name as outer local variable for block arguments
1020
+ or block local variables.
1021
+ Enabled: true
1022
+ Lint/SpaceBeforeFirstArg:
1023
+ Description: Put a space between a method name and the first argument in a method
1024
+ call without parentheses.
1025
+ Enabled: true
1026
+ Lint/StringConversionInInterpolation:
1027
+ Description: Checks for Object#to_s usage in string interpolation.
1028
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1029
+ Enabled: true
1030
+ Lint/UnderscorePrefixedVariableName:
1031
+ Description: Do not use prefix `_` for a variable that is used.
1032
+ Enabled: false
1033
+ Lint/UnusedBlockArgument:
1034
+ Description: Checks for unused block arguments.
1035
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1036
+ Enabled: true
1037
+ Lint/UnusedMethodArgument:
1038
+ Description: Checks for unused method arguments.
1039
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1040
+ Enabled: true
1041
+ Lint/UnreachableCode:
1042
+ Description: Unreachable code.
1043
+ Enabled: true
1044
+ Lint/UselessAccessModifier:
1045
+ Description: Checks for useless access modifiers.
1046
+ Enabled: true
1047
+ Lint/UselessAssignment:
1048
+ Description: Checks for useless assignment to a local variable.
1049
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1050
+ Enabled: true
1051
+ Lint/UselessComparison:
1052
+ Description: Checks for comparison of something with itself.
1053
+ Enabled: true
1054
+ Lint/UselessElseWithoutRescue:
1055
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1056
+ Enabled: true
1057
+ Lint/UselessSetterCall:
1058
+ Description: Checks for useless setter call to a local variable.
1059
+ Enabled: true
1060
+ Lint/Void:
1061
+ Description: Possible use of operator/literal/variable in void context.
1062
+ Enabled: false
1063
+ Rails/Delegate:
1064
+ Description: Prefer delegate method for delegations.
1065
+ Enabled: false