shopify_api 9.0.2 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +36 -0
  3. data/.github/workflows/build.yml +41 -0
  4. data/.gitignore +2 -1
  5. data/.rubocop.yml +23 -3
  6. data/.rubocop_todo.yml +75 -0
  7. data/CHANGELOG.md +43 -0
  8. data/CONTRIBUTING.md +1 -1
  9. data/Gemfile +5 -0
  10. data/Gemfile.lock +151 -0
  11. data/Gemfile_ar51 +1 -1
  12. data/README.md +47 -31
  13. data/RELEASING +10 -6
  14. data/Rakefile +16 -5
  15. data/SECURITY.md +59 -0
  16. data/docs/_config.yml +1 -0
  17. data/docs/_includes/footer.html +28 -0
  18. data/docs/_includes/head.html +28 -0
  19. data/docs/_layouts/index.html +57 -0
  20. data/docs/graphql.md +47 -2
  21. data/docs/index.md +639 -0
  22. data/lib/active_resource/connection_ext.rb +1 -0
  23. data/lib/active_resource/detailed_log_subscriber.rb +6 -7
  24. data/lib/active_resource/json_errors.rb +8 -2
  25. data/lib/shopify_api.rb +8 -1
  26. data/lib/shopify_api/api_access.rb +57 -0
  27. data/lib/shopify_api/api_version.rb +6 -5
  28. data/lib/shopify_api/connection.rb +1 -0
  29. data/lib/shopify_api/countable.rb +3 -2
  30. data/lib/shopify_api/disable_prefix_check.rb +2 -2
  31. data/lib/shopify_api/events.rb +2 -1
  32. data/lib/shopify_api/graphql.rb +28 -8
  33. data/lib/shopify_api/limits.rb +3 -2
  34. data/lib/shopify_api/message_enricher.rb +11 -9
  35. data/lib/shopify_api/meta.rb +0 -1
  36. data/lib/shopify_api/metafields.rb +5 -4
  37. data/lib/shopify_api/pagination_link_headers.rb +5 -4
  38. data/lib/shopify_api/resources.rb +1 -0
  39. data/lib/shopify_api/resources/access_scope.rb +1 -1
  40. data/lib/shopify_api/resources/access_token.rb +1 -0
  41. data/lib/shopify_api/resources/address.rb +1 -0
  42. data/lib/shopify_api/resources/announcement.rb +2 -1
  43. data/lib/shopify_api/resources/application_charge.rb +1 -0
  44. data/lib/shopify_api/resources/application_credit.rb +1 -0
  45. data/lib/shopify_api/resources/article.rb +3 -2
  46. data/lib/shopify_api/resources/asset.rb +6 -5
  47. data/lib/shopify_api/resources/assigned_fulfillment_order.rb +1 -1
  48. data/lib/shopify_api/resources/base.rb +12 -8
  49. data/lib/shopify_api/resources/billing_address.rb +1 -0
  50. data/lib/shopify_api/resources/blog.rb +2 -1
  51. data/lib/shopify_api/resources/carrier_service.rb +1 -0
  52. data/lib/shopify_api/resources/cart.rb +2 -1
  53. data/lib/shopify_api/resources/collect.rb +1 -0
  54. data/lib/shopify_api/resources/collection_listing.rb +1 -0
  55. data/lib/shopify_api/resources/comment.rb +20 -5
  56. data/lib/shopify_api/resources/country.rb +1 -0
  57. data/lib/shopify_api/resources/custom_collection.rb +4 -3
  58. data/lib/shopify_api/resources/customer.rb +2 -1
  59. data/lib/shopify_api/resources/customer_group.rb +1 -0
  60. data/lib/shopify_api/resources/customer_invite.rb +1 -0
  61. data/lib/shopify_api/resources/customer_saved_search.rb +2 -1
  62. data/lib/shopify_api/resources/discount_code.rb +1 -0
  63. data/lib/shopify_api/resources/discount_code_batch.rb +34 -0
  64. data/lib/shopify_api/resources/draft_order.rb +1 -0
  65. data/lib/shopify_api/resources/draft_order_invoice.rb +1 -0
  66. data/lib/shopify_api/resources/event.rb +1 -0
  67. data/lib/shopify_api/resources/fulfillment.rb +12 -3
  68. data/lib/shopify_api/resources/fulfillment_event.rb +1 -0
  69. data/lib/shopify_api/resources/fulfillment_order.rb +30 -16
  70. data/lib/shopify_api/resources/fulfillment_order_locations_for_move.rb +1 -0
  71. data/lib/shopify_api/resources/fulfillment_request.rb +1 -0
  72. data/lib/shopify_api/resources/fulfillment_service.rb +1 -0
  73. data/lib/shopify_api/resources/fulfillment_v2.rb +3 -2
  74. data/lib/shopify_api/resources/gift_card.rb +1 -0
  75. data/lib/shopify_api/resources/image.rb +2 -1
  76. data/lib/shopify_api/resources/inventory_level.rb +3 -4
  77. data/lib/shopify_api/resources/line_item.rb +4 -3
  78. data/lib/shopify_api/resources/location.rb +1 -1
  79. data/lib/shopify_api/resources/marketing_event.rb +1 -0
  80. data/lib/shopify_api/resources/metafield.rb +1 -0
  81. data/lib/shopify_api/resources/note_attribute.rb +1 -0
  82. data/lib/shopify_api/resources/option.rb +1 -0
  83. data/lib/shopify_api/resources/order.rb +2 -1
  84. data/lib/shopify_api/resources/order_risk.rb +1 -0
  85. data/lib/shopify_api/resources/page.rb +1 -0
  86. data/lib/shopify_api/resources/payment_details.rb +1 -0
  87. data/lib/shopify_api/resources/policy.rb +1 -0
  88. data/lib/shopify_api/resources/price_rule.rb +1 -1
  89. data/lib/shopify_api/resources/product.rb +27 -3
  90. data/lib/shopify_api/resources/product_listing.rb +1 -0
  91. data/lib/shopify_api/resources/province.rb +1 -0
  92. data/lib/shopify_api/resources/receipt.rb +1 -0
  93. data/lib/shopify_api/resources/recurring_application_charge.rb +4 -1
  94. data/lib/shopify_api/resources/redirect.rb +1 -0
  95. data/lib/shopify_api/resources/refund.rb +2 -1
  96. data/lib/shopify_api/resources/report.rb +1 -0
  97. data/lib/shopify_api/resources/resource_feedback.rb +1 -1
  98. data/lib/shopify_api/resources/rule.rb +1 -0
  99. data/lib/shopify_api/resources/script_tag.rb +1 -0
  100. data/lib/shopify_api/resources/shipping_address.rb +1 -0
  101. data/lib/shopify_api/resources/shipping_line.rb +1 -0
  102. data/lib/shopify_api/resources/shipping_zone.rb +1 -0
  103. data/lib/shopify_api/resources/shop.rb +2 -1
  104. data/lib/shopify_api/resources/smart_collection.rb +4 -8
  105. data/lib/shopify_api/resources/storefront_access_token.rb +1 -0
  106. data/lib/shopify_api/resources/tax_line.rb +1 -0
  107. data/lib/shopify_api/resources/tax_service.rb +1 -0
  108. data/lib/shopify_api/resources/theme.rb +1 -0
  109. data/lib/shopify_api/resources/transaction.rb +1 -0
  110. data/lib/shopify_api/resources/usage_charge.rb +1 -0
  111. data/lib/shopify_api/resources/user.rb +1 -0
  112. data/lib/shopify_api/resources/variant.rb +35 -0
  113. data/lib/shopify_api/resources/webhook.rb +1 -0
  114. data/lib/shopify_api/session.rb +43 -14
  115. data/lib/shopify_api/version.rb +2 -1
  116. data/lib/verify_docs.rb +8 -0
  117. data/service.yml +1 -1
  118. data/shopify_api.gemspec +13 -6
  119. data/test/access_token_test.rb +6 -5
  120. data/test/active_resource/json_errors_test.rb +6 -6
  121. data/test/api_access_test.rb +153 -0
  122. data/test/api_version_test.rb +3 -3
  123. data/test/application_charge_test.rb +30 -27
  124. data/test/application_credit_test.rb +10 -9
  125. data/test/article_test.rb +34 -35
  126. data/test/asset_test.rb +14 -6
  127. data/test/assigned_fulfillment_order_test.rb +5 -4
  128. data/test/base_test.rb +64 -49
  129. data/test/blog_test.rb +4 -3
  130. data/test/carrier_service_test.rb +7 -6
  131. data/test/cart_test.rb +2 -1
  132. data/test/collect_test.rb +4 -3
  133. data/test/collection_listing_test.rb +21 -16
  134. data/test/collection_publication_test.rb +8 -8
  135. data/test/collection_test.rb +20 -19
  136. data/test/countable_test.rb +3 -2
  137. data/test/currency_test.rb +5 -5
  138. data/test/custom_collection_test.rb +4 -3
  139. data/test/customer_saved_search_test.rb +18 -8
  140. data/test/customer_test.rb +22 -14
  141. data/test/detailed_log_subscriber_test.rb +15 -11
  142. data/test/discount_code_batch_test.rb +41 -0
  143. data/test/discount_code_test.rb +21 -15
  144. data/test/draft_order_test.rb +68 -52
  145. data/test/fixtures/assigned_fulfillment_orders.json +2 -0
  146. data/test/fixtures/discount_code_batch.json +14 -0
  147. data/test/fixtures/discount_code_batch_discount_codes.json +21 -0
  148. data/test/fixtures/fulfillment_order.json +1 -0
  149. data/test/fixtures/fulfillment_orders.json +2 -0
  150. data/test/fulfillment_event_test.rb +31 -26
  151. data/test/fulfillment_order_test.rb +215 -147
  152. data/test/fulfillment_order_test_helper.rb +1 -0
  153. data/test/fulfillment_request_test.rb +10 -8
  154. data/test/fulfillment_service_test.rb +13 -12
  155. data/test/fulfillment_test.rb +81 -66
  156. data/test/fulfillment_v2_test.rb +16 -12
  157. data/test/gift_card_test.rb +6 -4
  158. data/test/graphql_test.rb +55 -23
  159. data/test/image_test.rb +19 -17
  160. data/test/inventory_level_test.rb +24 -15
  161. data/test/lib/webmock_extensions/last_request.rb +1 -1
  162. data/test/limits_test.rb +2 -1
  163. data/test/location_test.rb +2 -1
  164. data/test/marketing_event_test.rb +20 -20
  165. data/test/message_enricher_test.rb +6 -6
  166. data/test/meta_test.rb +7 -9
  167. data/test/metafield_test.rb +30 -20
  168. data/test/order_risk_test.rb +17 -16
  169. data/test/order_test.rb +43 -28
  170. data/test/pagination_test.rb +89 -56
  171. data/test/policy_test.rb +6 -5
  172. data/test/price_rule_test.rb +20 -15
  173. data/test/product_listing_test.rb +20 -20
  174. data/test/product_publication_test.rb +8 -8
  175. data/test/product_test.rb +71 -20
  176. data/test/publication_test.rb +3 -3
  177. data/test/recurring_application_charge_test.rb +104 -42
  178. data/test/redirect_test.rb +4 -3
  179. data/test/refund_test.rb +22 -17
  180. data/test/report_test.rb +12 -10
  181. data/test/resource_feedback_test.rb +14 -13
  182. data/test/script_tag_test.rb +10 -9
  183. data/test/session_test.rb +234 -43
  184. data/test/shipping_zone_test.rb +4 -3
  185. data/test/shop_test.rb +47 -33
  186. data/test/smart_collection_test.rb +5 -29
  187. data/test/storefront_access_token_test.rb +13 -15
  188. data/test/tax_service_test.rb +7 -4
  189. data/test/tender_transaction_test.rb +3 -3
  190. data/test/test_helper.rb +14 -12
  191. data/test/transaction_test.rb +4 -3
  192. data/test/usage_charge_test.rb +12 -8
  193. data/test/user_test.rb +4 -3
  194. data/test/variant_test.rb +50 -23
  195. data/test/webhook_test.rb +10 -7
  196. metadata +30 -15
  197. data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +0 -1027
  198. data/.travis.yml +0 -23
  199. data/bin/shopify +0 -3
@@ -1,21 +1,24 @@
1
+ # frozen_string_literal: true
1
2
  require 'test_helper'
2
3
 
3
4
  class WebhookTest < Test::Unit::TestCase
4
5
  test 'create should create a webhook' do
5
- fake 'webhooks', :method => :post, :status => 201, :body => load_fixture('webhook')
6
- webhook = ShopifyAPI::Webhook.create(address: "http://www.yoloship.it/webhook", topic: "orders/create", format: "json")
7
- assert_equal "http://www.yoloship.it/webhook", webhook.address
6
+ fake('webhooks', method: :post, status: 201, body: load_fixture('webhook'))
7
+ webhook = ShopifyAPI::Webhook.create(
8
+ address: "http://www.yoloship.it/webhook", topic: "orders/create", format: "json"
9
+ )
10
+ assert_equal("http://www.yoloship.it/webhook", webhook.address)
8
11
  end
9
12
 
10
13
  test 'get should retrieve a webhook' do
11
- fake 'webhooks/123456', :method => :get, :status => 200, :body => load_fixture('webhook')
14
+ fake('webhooks/123456', method: :get, status: 200, body: load_fixture('webhook'))
12
15
  webhook = ShopifyAPI::Webhook.find(123456)
13
- assert_equal "http://www.yoloship.it/webhook", webhook.address
16
+ assert_equal("http://www.yoloship.it/webhook", webhook.address)
14
17
  end
15
18
 
16
19
  test 'find all should return all webhooks' do
17
- fake 'webhooks', :method => :get, :status => 200, :body => load_fixture('webhooks')
20
+ fake('webhooks', method: :get, status: 200, body: load_fixture('webhooks'))
18
21
  webhook = ShopifyAPI::Webhook.all
19
- assert_equal 123456, webhook.first.id
22
+ assert_equal(123456, webhook.first.id)
20
23
  end
21
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.2
4
+ version: 9.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-06 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 0.9.8
67
+ version: 1.4.0
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 0.9.8
74
+ version: 1.4.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: webmock
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -129,7 +129,7 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
- name: rubocop
132
+ name: rubocop-shopify
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
@@ -170,13 +170,13 @@ dependencies:
170
170
  - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
- description: The Shopify API gem allows Ruby developers to programmatically access
174
- the admin section of Shopify stores. The API is implemented as JSON or XML over
175
- HTTP using all four verbs (GET/POST/PUT/DELETE). Each resource, like Order, Product,
176
- or Collection, has its own URL and is manipulated in isolation.
173
+ description: |
174
+ The Shopify API gem allows Ruby developers to programmatically access the admin
175
+ section of Shopify stores. The API is implemented as JSON or XML over HTTP using
176
+ all four verbs (GET/POST/PUT/DELETE). Each resource, like Order, Product, or
177
+ Collection, has its own URL and is manipulated in isolation.
177
178
  email: developers@jadedpixel.com
178
- executables:
179
- - shopify
179
+ executables: []
180
180
  extensions: []
181
181
  extra_rdoc_files:
182
182
  - LICENSE
@@ -184,15 +184,17 @@ extra_rdoc_files:
184
184
  files:
185
185
  - ".document"
186
186
  - ".github/CODEOWNERS"
187
+ - ".github/ISSUE_TEMPLATE.md"
187
188
  - ".github/probots.yml"
189
+ - ".github/workflows/build.yml"
188
190
  - ".gitignore"
189
- - ".rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml"
190
191
  - ".rubocop.yml"
191
- - ".travis.yml"
192
+ - ".rubocop_todo.yml"
192
193
  - CHANGELOG.md
193
194
  - CONTRIBUTING.md
194
195
  - CONTRIBUTORS
195
196
  - Gemfile
197
+ - Gemfile.lock
196
198
  - Gemfile_ar41
197
199
  - Gemfile_ar50
198
200
  - Gemfile_ar51
@@ -201,13 +203,19 @@ files:
201
203
  - README.md
202
204
  - RELEASING
203
205
  - Rakefile
204
- - bin/shopify
206
+ - SECURITY.md
205
207
  - docker-compose.yml
208
+ - docs/_config.yml
209
+ - docs/_includes/footer.html
210
+ - docs/_includes/head.html
211
+ - docs/_layouts/index.html
206
212
  - docs/graphql.md
213
+ - docs/index.md
207
214
  - lib/active_resource/connection_ext.rb
208
215
  - lib/active_resource/detailed_log_subscriber.rb
209
216
  - lib/active_resource/json_errors.rb
210
217
  - lib/shopify_api.rb
218
+ - lib/shopify_api/api_access.rb
211
219
  - lib/shopify_api/api_version.rb
212
220
  - lib/shopify_api/connection.rb
213
221
  - lib/shopify_api/countable.rb
@@ -255,6 +263,7 @@ files:
255
263
  - lib/shopify_api/resources/customer_invite.rb
256
264
  - lib/shopify_api/resources/customer_saved_search.rb
257
265
  - lib/shopify_api/resources/discount_code.rb
266
+ - lib/shopify_api/resources/discount_code_batch.rb
258
267
  - lib/shopify_api/resources/draft_order.rb
259
268
  - lib/shopify_api/resources/draft_order_invoice.rb
260
269
  - lib/shopify_api/resources/event.rb
@@ -314,6 +323,7 @@ files:
314
323
  - lib/shopify_api/resources/webhook.rb
315
324
  - lib/shopify_api/session.rb
316
325
  - lib/shopify_api/version.rb
326
+ - lib/verify_docs.rb
317
327
  - service.yml
318
328
  - shipit.rubygems.yml
319
329
  - shopify_api.gemspec
@@ -321,6 +331,7 @@ files:
321
331
  - test/access_scope_test.rb
322
332
  - test/access_token_test.rb
323
333
  - test/active_resource/json_errors_test.rb
334
+ - test/api_access_test.rb
324
335
  - test/api_permission_test.rb
325
336
  - test/api_version_test.rb
326
337
  - test/application_charge_test.rb
@@ -343,6 +354,7 @@ files:
343
354
  - test/customer_saved_search_test.rb
344
355
  - test/customer_test.rb
345
356
  - test/detailed_log_subscriber_test.rb
357
+ - test/discount_code_batch_test.rb
346
358
  - test/discount_code_test.rb
347
359
  - test/draft_order_test.rb
348
360
  - test/fixtures/abandoned_checkout.json
@@ -385,6 +397,8 @@ files:
385
397
  - test/fixtures/customers_account_activation_url.json
386
398
  - test/fixtures/customers_search.json
387
399
  - test/fixtures/discount_code.json
400
+ - test/fixtures/discount_code_batch.json
401
+ - test/fixtures/discount_code_batch_discount_codes.json
388
402
  - test/fixtures/discount_codes.json
389
403
  - test/fixtures/draft_order.json
390
404
  - test/fixtures/draft_order_completed.json
@@ -515,7 +529,8 @@ files:
515
529
  homepage: http://www.shopify.com/partners/apps
516
530
  licenses:
517
531
  - MIT
518
- metadata: {}
532
+ metadata:
533
+ allowed_push_host: https://rubygems.org
519
534
  post_install_message:
520
535
  rdoc_options:
521
536
  - "--charset=UTF-8"
@@ -1,1027 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - 'db/schema.rb'
4
- DisabledByDefault: true
5
- StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
6
-
7
- Lint/AssignmentInCondition:
8
- Enabled: true
9
-
10
- Layout/AccessModifierIndentation:
11
- EnforcedStyle: indent
12
- SupportedStyles:
13
- - outdent
14
- - indent
15
- IndentationWidth:
16
-
17
- Style/Alias:
18
- EnforcedStyle: prefer_alias_method
19
- SupportedStyles:
20
- - prefer_alias
21
- - prefer_alias_method
22
-
23
- Layout/AlignHash:
24
- EnforcedHashRocketStyle: key
25
- EnforcedColonStyle: key
26
- EnforcedLastArgumentHashStyle: ignore_implicit
27
- SupportedLastArgumentHashStyles:
28
- - always_inspect
29
- - always_ignore
30
- - ignore_implicit
31
- - ignore_explicit
32
-
33
- Layout/AlignParameters:
34
- EnforcedStyle: with_fixed_indentation
35
- SupportedStyles:
36
- - with_first_parameter
37
- - with_fixed_indentation
38
- IndentationWidth:
39
-
40
- Style/AndOr:
41
- EnforcedStyle: always
42
- SupportedStyles:
43
- - always
44
- - conditionals
45
-
46
- Style/BarePercentLiterals:
47
- EnforcedStyle: bare_percent
48
- SupportedStyles:
49
- - percent_q
50
- - bare_percent
51
-
52
- Style/BlockDelimiters:
53
- EnforcedStyle: line_count_based
54
- SupportedStyles:
55
- - line_count_based
56
- - semantic
57
- - braces_for_chaining
58
- ProceduralMethods:
59
- - benchmark
60
- - bm
61
- - bmbm
62
- - create
63
- - each_with_object
64
- - measure
65
- - new
66
- - realtime
67
- - tap
68
- - with_object
69
- FunctionalMethods:
70
- - let
71
- - let!
72
- - subject
73
- - watch
74
- IgnoredMethods:
75
- - lambda
76
- - proc
77
- - it
78
-
79
- Style/BracesAroundHashParameters:
80
- EnforcedStyle: no_braces
81
- SupportedStyles:
82
- - braces
83
- - no_braces
84
- - context_dependent
85
-
86
- Layout/CaseIndentation:
87
- EnforcedStyle: end
88
- SupportedStyles:
89
- - case
90
- - end
91
- IndentOneStep: false
92
- IndentationWidth:
93
-
94
- Style/ClassAndModuleChildren:
95
- EnforcedStyle: nested
96
- SupportedStyles:
97
- - nested
98
- - compact
99
-
100
- Style/ClassCheck:
101
- EnforcedStyle: is_a?
102
- SupportedStyles:
103
- - is_a?
104
- - kind_of?
105
-
106
- Style/CommandLiteral:
107
- EnforcedStyle: percent_x
108
- SupportedStyles:
109
- - backticks
110
- - percent_x
111
- - mixed
112
- AllowInnerBackticks: false
113
-
114
- Style/CommentAnnotation:
115
- Keywords:
116
- - TODO
117
- - FIXME
118
- - OPTIMIZE
119
- - HACK
120
- - REVIEW
121
-
122
- Style/ConditionalAssignment:
123
- EnforcedStyle: assign_to_condition
124
- SupportedStyles:
125
- - assign_to_condition
126
- - assign_inside_condition
127
- SingleLineConditionsOnly: true
128
-
129
- Layout/DotPosition:
130
- EnforcedStyle: leading
131
- SupportedStyles:
132
- - leading
133
- - trailing
134
-
135
- Style/EmptyElse:
136
- EnforcedStyle: both
137
- SupportedStyles:
138
- - empty
139
- - nil
140
- - both
141
-
142
- Layout/EmptyLineBetweenDefs:
143
- AllowAdjacentOneLineDefs: false
144
-
145
- Layout/EmptyLinesAroundBlockBody:
146
- EnforcedStyle: no_empty_lines
147
- SupportedStyles:
148
- - empty_lines
149
- - no_empty_lines
150
-
151
- Layout/EmptyLinesAroundClassBody:
152
- EnforcedStyle: no_empty_lines
153
- SupportedStyles:
154
- - empty_lines
155
- - empty_lines_except_namespace
156
- - no_empty_lines
157
-
158
- Layout/EmptyLinesAroundModuleBody:
159
- EnforcedStyle: no_empty_lines
160
- SupportedStyles:
161
- - empty_lines
162
- - empty_lines_except_namespace
163
- - no_empty_lines
164
-
165
- Layout/ExtraSpacing:
166
- AllowForAlignment: true
167
- ForceEqualSignAlignment: false
168
-
169
- Naming/FileName:
170
- Exclude: []
171
- ExpectMatchingDefinition: false
172
- Regex:
173
- IgnoreExecutableScripts: true
174
-
175
- Layout/IndentFirstArgument:
176
- EnforcedStyle: consistent
177
- SupportedStyles:
178
- - consistent
179
- - special_for_inner_method_call
180
- - special_for_inner_method_call_in_parentheses
181
- IndentationWidth:
182
-
183
- Style/For:
184
- EnforcedStyle: each
185
- SupportedStyles:
186
- - for
187
- - each
188
-
189
- Style/FormatString:
190
- EnforcedStyle: format
191
- SupportedStyles:
192
- - format
193
- - sprintf
194
- - percent
195
-
196
- Style/FrozenStringLiteralComment:
197
- Details: >-
198
- Add `# frozen_string_literal: true` to the top of the file. Frozen string
199
- literals will become the default in a future Ruby version, and we want to
200
- make sure we're ready.
201
- EnforcedStyle: always
202
- SupportedStyles:
203
- - always
204
- - never
205
-
206
- Style/GlobalVars:
207
- AllowedVariables: []
208
-
209
- Style/HashSyntax:
210
- EnforcedStyle: ruby19
211
- SupportedStyles:
212
- - ruby19
213
- - hash_rockets
214
- - no_mixed_keys
215
- - ruby19_no_mixed_keys
216
- UseHashRocketsWithSymbolValues: false
217
- PreferHashRocketsForNonAlnumEndingSymbols: false
218
-
219
- Layout/IndentationConsistency:
220
- EnforcedStyle: normal
221
- SupportedStyles:
222
- - normal
223
- - rails
224
-
225
- Layout/IndentationWidth:
226
- Width: 2
227
-
228
- Layout/IndentFirstArrayElement:
229
- EnforcedStyle: consistent
230
- SupportedStyles:
231
- - special_inside_parentheses
232
- - consistent
233
- - align_brackets
234
- IndentationWidth:
235
-
236
- Layout/IndentAssignment:
237
- IndentationWidth:
238
-
239
- Layout/IndentFirstHashElement:
240
- EnforcedStyle: consistent
241
- SupportedStyles:
242
- - special_inside_parentheses
243
- - consistent
244
- - align_braces
245
- IndentationWidth:
246
-
247
- Style/LambdaCall:
248
- EnforcedStyle: call
249
- SupportedStyles:
250
- - call
251
- - braces
252
-
253
- Style/Next:
254
- EnforcedStyle: skip_modifier_ifs
255
- MinBodyLength: 3
256
- SupportedStyles:
257
- - skip_modifier_ifs
258
- - always
259
-
260
- Style/NonNilCheck:
261
- IncludeSemanticChanges: false
262
-
263
- Style/MethodCallWithArgsParentheses:
264
- Enabled: true
265
- IgnoreMacros: true
266
- IgnoredMethods:
267
- - require
268
- - require_relative
269
- - require_dependency
270
- - yield
271
- - raise
272
- - puts
273
- Exclude:
274
- - Gemfile
275
-
276
- Style/MethodDefParentheses:
277
- EnforcedStyle: require_parentheses
278
- SupportedStyles:
279
- - require_parentheses
280
- - require_no_parentheses
281
- - require_no_parentheses_except_multiline
282
-
283
- Naming/MethodName:
284
- EnforcedStyle: snake_case
285
- SupportedStyles:
286
- - snake_case
287
- - camelCase
288
-
289
- Layout/MultilineArrayBraceLayout:
290
- EnforcedStyle: symmetrical
291
- SupportedStyles:
292
- - symmetrical
293
- - new_line
294
- - same_line
295
-
296
- Layout/MultilineHashBraceLayout:
297
- EnforcedStyle: symmetrical
298
- SupportedStyles:
299
- - symmetrical
300
- - new_line
301
- - same_line
302
-
303
- Layout/MultilineMethodCallBraceLayout:
304
- EnforcedStyle: symmetrical
305
- SupportedStyles:
306
- - symmetrical
307
- - new_line
308
- - same_line
309
-
310
- Layout/MultilineMethodCallIndentation:
311
- EnforcedStyle: indented
312
- SupportedStyles:
313
- - aligned
314
- - indented
315
- - indented_relative_to_receiver
316
- IndentationWidth: 2
317
-
318
- Layout/MultilineMethodDefinitionBraceLayout:
319
- EnforcedStyle: symmetrical
320
- SupportedStyles:
321
- - symmetrical
322
- - new_line
323
- - same_line
324
-
325
- Style/NumericLiteralPrefix:
326
- EnforcedOctalStyle: zero_only
327
- SupportedOctalStyles:
328
- - zero_with_o
329
- - zero_only
330
-
331
- Style/ParenthesesAroundCondition:
332
- AllowSafeAssignment: true
333
-
334
- Style/PercentQLiterals:
335
- EnforcedStyle: lower_case_q
336
- SupportedStyles:
337
- - lower_case_q
338
- - upper_case_q
339
-
340
- Naming/PredicateName:
341
- NamePrefix:
342
- - is_
343
- NamePrefixBlacklist:
344
- - is_
345
- NameWhitelist:
346
- - is_a?
347
- Exclude:
348
- - 'spec/**/*'
349
-
350
- Style/PreferredHashMethods:
351
- EnforcedStyle: short
352
- SupportedStyles:
353
- - short
354
- - verbose
355
-
356
- Style/RaiseArgs:
357
- EnforcedStyle: exploded
358
- SupportedStyles:
359
- - compact
360
- - exploded
361
-
362
- Style/RedundantReturn:
363
- AllowMultipleReturnValues: false
364
-
365
- Style/RegexpLiteral:
366
- EnforcedStyle: mixed
367
- SupportedStyles:
368
- - slashes
369
- - percent_r
370
- - mixed
371
- AllowInnerSlashes: false
372
-
373
- Style/SafeNavigation:
374
- ConvertCodeThatCanStartToReturnNil: false
375
- Enabled: true
376
-
377
- Lint/SafeNavigationChain:
378
- Enabled: true
379
-
380
- Style/Semicolon:
381
- AllowAsExpressionSeparator: false
382
-
383
- Style/SignalException:
384
- EnforcedStyle: only_raise
385
- SupportedStyles:
386
- - only_raise
387
- - only_fail
388
- - semantic
389
-
390
- Style/SingleLineMethods:
391
- AllowIfMethodIsEmpty: true
392
-
393
- Layout/SpaceBeforeFirstArg:
394
- AllowForAlignment: true
395
-
396
- Style/SpecialGlobalVars:
397
- EnforcedStyle: use_english_names
398
- SupportedStyles:
399
- - use_perl_names
400
- - use_english_names
401
-
402
- Style/StabbyLambdaParentheses:
403
- EnforcedStyle: require_parentheses
404
- SupportedStyles:
405
- - require_parentheses
406
- - require_no_parentheses
407
-
408
- Style/StringLiteralsInInterpolation:
409
- EnforcedStyle: single_quotes
410
- SupportedStyles:
411
- - single_quotes
412
- - double_quotes
413
-
414
- Layout/SpaceAroundBlockParameters:
415
- EnforcedStyleInsidePipes: no_space
416
- SupportedStylesInsidePipes:
417
- - space
418
- - no_space
419
-
420
- Layout/SpaceAroundEqualsInParameterDefault:
421
- EnforcedStyle: space
422
- SupportedStyles:
423
- - space
424
- - no_space
425
-
426
- Layout/SpaceAroundOperators:
427
- AllowForAlignment: true
428
-
429
- Layout/SpaceBeforeBlockBraces:
430
- EnforcedStyle: space
431
- EnforcedStyleForEmptyBraces: space
432
- SupportedStyles:
433
- - space
434
- - no_space
435
-
436
- Layout/SpaceInsideBlockBraces:
437
- EnforcedStyle: space
438
- SupportedStyles:
439
- - space
440
- - no_space
441
- EnforcedStyleForEmptyBraces: no_space
442
- SpaceBeforeBlockParameters: true
443
-
444
- Layout/SpaceInsideHashLiteralBraces:
445
- EnforcedStyle: space
446
- EnforcedStyleForEmptyBraces: no_space
447
- SupportedStyles:
448
- - space
449
- - no_space
450
- - compact
451
-
452
- Layout/SpaceInsideStringInterpolation:
453
- EnforcedStyle: no_space
454
- SupportedStyles:
455
- - space
456
- - no_space
457
-
458
- Style/SymbolProc:
459
- IgnoredMethods:
460
- - respond_to
461
- - define_method
462
-
463
- Style/TernaryParentheses:
464
- EnforcedStyle: require_no_parentheses
465
- SupportedStyles:
466
- - require_parentheses
467
- - require_no_parentheses
468
- AllowSafeAssignment: true
469
-
470
- Layout/TrailingBlankLines:
471
- EnforcedStyle: final_newline
472
- SupportedStyles:
473
- - final_newline
474
- - final_blank_line
475
-
476
- Style/TrivialAccessors:
477
- ExactNameMatch: true
478
- AllowPredicates: true
479
- AllowDSLWriters: false
480
- IgnoreClassMethods: false
481
- Whitelist:
482
- - to_ary
483
- - to_a
484
- - to_c
485
- - to_enum
486
- - to_h
487
- - to_hash
488
- - to_i
489
- - to_int
490
- - to_io
491
- - to_open
492
- - to_path
493
- - to_proc
494
- - to_r
495
- - to_regexp
496
- - to_str
497
- - to_s
498
- - to_sym
499
-
500
- Naming/VariableName:
501
- EnforcedStyle: snake_case
502
- SupportedStyles:
503
- - snake_case
504
- - camelCase
505
-
506
- Style/WhileUntilModifier:
507
- Enabled: true
508
-
509
- Metrics/BlockNesting:
510
- Max: 3
511
-
512
- Metrics/LineLength:
513
- Max: 120
514
- AllowHeredoc: true
515
- AllowURI: true
516
- URISchemes:
517
- - http
518
- - https
519
- IgnoreCopDirectives: false
520
- IgnoredPatterns:
521
- - '\A\s*(remote_)?test(_\w+)?\s.*(do|->)(\s|\Z)'
522
-
523
- Metrics/ParameterLists:
524
- Max: 5
525
- CountKeywordArgs: false
526
-
527
- Layout/BlockAlignment:
528
- EnforcedStyleAlignWith: either
529
- SupportedStylesAlignWith:
530
- - either
531
- - start_of_block
532
- - start_of_line
533
-
534
- Layout/EndAlignment:
535
- EnforcedStyleAlignWith: variable
536
- SupportedStylesAlignWith:
537
- - keyword
538
- - variable
539
- - start_of_line
540
-
541
- Layout/DefEndAlignment:
542
- EnforcedStyleAlignWith: start_of_line
543
- SupportedStylesAlignWith:
544
- - start_of_line
545
- - def
546
-
547
- Lint/InheritException:
548
- EnforcedStyle: runtime_error
549
- SupportedStyles:
550
- - runtime_error
551
- - standard_error
552
-
553
- Lint/UnusedBlockArgument:
554
- IgnoreEmptyBlocks: true
555
- AllowUnusedKeywordArguments: false
556
-
557
- Lint/UnusedMethodArgument:
558
- AllowUnusedKeywordArguments: false
559
- IgnoreEmptyMethods: true
560
-
561
- Naming/AccessorMethodName:
562
- Enabled: true
563
-
564
- Layout/AlignArray:
565
- Enabled: true
566
-
567
- Style/ArrayJoin:
568
- Enabled: true
569
-
570
- Naming/AsciiIdentifiers:
571
- Enabled: true
572
-
573
- Style/Attr:
574
- Enabled: true
575
-
576
- Style/BeginBlock:
577
- Enabled: true
578
-
579
- Style/BlockComments:
580
- Enabled: true
581
-
582
- Layout/BlockEndNewline:
583
- Enabled: true
584
-
585
- Style/CaseEquality:
586
- Enabled: true
587
-
588
- Style/CharacterLiteral:
589
- Enabled: true
590
-
591
- Naming/ClassAndModuleCamelCase:
592
- Enabled: true
593
-
594
- Style/ClassMethods:
595
- Enabled: true
596
-
597
- Style/ClassVars:
598
- Enabled: true
599
-
600
- Layout/ClosingParenthesisIndentation:
601
- Enabled: true
602
-
603
- Style/ColonMethodCall:
604
- Enabled: true
605
-
606
- Layout/CommentIndentation:
607
- Enabled: true
608
-
609
- Naming/ConstantName:
610
- Enabled: true
611
-
612
- Style/DateTime:
613
- Enabled: true
614
-
615
- Style/DefWithParentheses:
616
- Enabled: true
617
-
618
- Style/EachForSimpleLoop:
619
- Enabled: true
620
-
621
- Style/EachWithObject:
622
- Enabled: true
623
-
624
- Layout/ElseAlignment:
625
- Enabled: true
626
-
627
- Style/EmptyCaseCondition:
628
- Enabled: true
629
-
630
- Layout/EmptyLines:
631
- Enabled: true
632
-
633
- Layout/EmptyLinesAroundAccessModifier:
634
- Enabled: true
635
-
636
- Layout/EmptyLinesAroundMethodBody:
637
- Enabled: true
638
-
639
- Style/EmptyLiteral:
640
- Enabled: true
641
-
642
- Style/EndBlock:
643
- Enabled: true
644
-
645
- Layout/EndOfLine:
646
- Enabled: true
647
-
648
- Style/EvenOdd:
649
- Enabled: true
650
-
651
- Layout/InitialIndentation:
652
- Enabled: true
653
-
654
- Lint/FlipFlop:
655
- Enabled: true
656
-
657
- Style/IfInsideElse:
658
- Enabled: true
659
-
660
- Style/IfUnlessModifierOfIfUnless:
661
- Enabled: true
662
-
663
- Style/IfWithSemicolon:
664
- Enabled: true
665
-
666
- Style/IdenticalConditionalBranches:
667
- Enabled: true
668
-
669
- Style/InfiniteLoop:
670
- Enabled: true
671
-
672
- Layout/LeadingCommentSpace:
673
- Enabled: true
674
-
675
- Style/LineEndConcatenation:
676
- Enabled: true
677
-
678
- Style/MethodCallWithoutArgsParentheses:
679
- Enabled: true
680
-
681
- Style/MethodMissingSuper:
682
- Enabled: true
683
-
684
- Style/MissingRespondToMissing:
685
- Enabled: true
686
-
687
- Layout/MultilineBlockLayout:
688
- Enabled: true
689
-
690
- Style/MultilineIfThen:
691
- Enabled: true
692
-
693
- Style/MultilineMemoization:
694
- Enabled: true
695
-
696
- Style/MultilineTernaryOperator:
697
- Enabled: true
698
-
699
- Style/NegatedIf:
700
- Enabled: true
701
-
702
- Style/NegatedWhile:
703
- Enabled: true
704
-
705
- Style/NestedModifier:
706
- Enabled: true
707
-
708
- Style/NestedParenthesizedCalls:
709
- Enabled: true
710
-
711
- Style/NestedTernaryOperator:
712
- Enabled: true
713
-
714
- Style/NilComparison:
715
- Enabled: true
716
-
717
- Style/Not:
718
- Enabled: true
719
-
720
- Style/OneLineConditional:
721
- Enabled: true
722
-
723
- Naming/BinaryOperatorParameterName:
724
- Enabled: true
725
-
726
- Style/OptionalArguments:
727
- Enabled: true
728
-
729
- Style/ParallelAssignment:
730
- Enabled: true
731
-
732
- Style/PerlBackrefs:
733
- Enabled: true
734
-
735
- Style/Proc:
736
- Enabled: true
737
-
738
- Style/RedundantBegin:
739
- Enabled: true
740
-
741
- Style/RedundantException:
742
- Enabled: true
743
-
744
- Style/RedundantFreeze:
745
- Enabled: true
746
-
747
- Style/RedundantParentheses:
748
- Enabled: true
749
-
750
- Style/RedundantSelf:
751
- Enabled: true
752
-
753
- Style/RedundantSortBy:
754
- Enabled: true
755
-
756
- Layout/RescueEnsureAlignment:
757
- Enabled: true
758
-
759
- Style/RescueModifier:
760
- Enabled: true
761
-
762
- Style/Sample:
763
- Enabled: true
764
-
765
- Style/SelfAssignment:
766
- Enabled: true
767
-
768
- Layout/SpaceAfterColon:
769
- Enabled: true
770
-
771
- Layout/SpaceAfterComma:
772
- Enabled: true
773
-
774
- Layout/SpaceAfterMethodName:
775
- Enabled: true
776
-
777
- Layout/SpaceAfterNot:
778
- Enabled: true
779
-
780
- Layout/SpaceAfterSemicolon:
781
- Enabled: true
782
-
783
- Layout/SpaceBeforeComma:
784
- Enabled: true
785
-
786
- Layout/SpaceBeforeComment:
787
- Enabled: true
788
-
789
- Layout/SpaceBeforeSemicolon:
790
- Enabled: true
791
-
792
- Layout/SpaceAroundKeyword:
793
- Enabled: true
794
-
795
- Layout/SpaceInsideArrayPercentLiteral:
796
- Enabled: true
797
-
798
- Layout/SpaceInsidePercentLiteralDelimiters:
799
- Enabled: true
800
-
801
- Layout/SpaceInsideArrayLiteralBrackets:
802
- Enabled: true
803
-
804
- Layout/SpaceInsideParens:
805
- Enabled: true
806
-
807
- Layout/SpaceInsideRangeLiteral:
808
- Enabled: true
809
-
810
- Style/SymbolLiteral:
811
- Enabled: true
812
-
813
- Layout/Tab:
814
- Enabled: true
815
-
816
- Layout/TrailingWhitespace:
817
- Enabled: true
818
-
819
- Style/UnlessElse:
820
- Enabled: true
821
-
822
- Style/UnneededCapitalW:
823
- Enabled: true
824
-
825
- Style/UnneededInterpolation:
826
- Enabled: true
827
-
828
- Style/UnneededPercentQ:
829
- Enabled: true
830
-
831
- Style/VariableInterpolation:
832
- Enabled: true
833
-
834
- Style/WhenThen:
835
- Enabled: true
836
-
837
- Style/WhileUntilDo:
838
- Enabled: true
839
-
840
- Style/ZeroLengthPredicate:
841
- Enabled: true
842
-
843
- Layout/IndentHeredoc:
844
- EnforcedStyle: squiggly
845
-
846
- Lint/AmbiguousOperator:
847
- Enabled: true
848
-
849
- Lint/AmbiguousRegexpLiteral:
850
- Enabled: true
851
-
852
- Lint/CircularArgumentReference:
853
- Enabled: true
854
-
855
- Layout/ConditionPosition:
856
- Enabled: true
857
-
858
- Lint/Debugger:
859
- Enabled: true
860
-
861
- Lint/DeprecatedClassMethods:
862
- Enabled: true
863
-
864
- Lint/DuplicateMethods:
865
- Enabled: true
866
-
867
- Lint/DuplicatedKey:
868
- Enabled: true
869
-
870
- Lint/EachWithObjectArgument:
871
- Enabled: true
872
-
873
- Lint/ElseLayout:
874
- Enabled: true
875
-
876
- Lint/EmptyEnsure:
877
- Enabled: true
878
-
879
- Lint/EmptyInterpolation:
880
- Enabled: true
881
-
882
- Lint/EndInMethod:
883
- Enabled: true
884
-
885
- Lint/EnsureReturn:
886
- Enabled: true
887
-
888
- Lint/FloatOutOfRange:
889
- Enabled: true
890
-
891
- Lint/FormatParameterMismatch:
892
- Enabled: true
893
-
894
- Lint/HandleExceptions:
895
- Enabled: true
896
-
897
- Lint/ImplicitStringConcatenation:
898
- Description: Checks for adjacent string literals on the same line, which could
899
- better be represented as a single string literal.
900
-
901
- Lint/IneffectiveAccessModifier:
902
- Description: Checks for attempts to use `private` or `protected` to set the visibility
903
- of a class method, which does not work.
904
-
905
- Lint/LiteralAsCondition:
906
- Enabled: true
907
-
908
- Lint/LiteralInInterpolation:
909
- Enabled: true
910
-
911
- Lint/Loop:
912
- Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
913
- for post-loop tests.
914
-
915
- Lint/NestedMethodDefinition:
916
- Enabled: true
917
-
918
- Lint/NextWithoutAccumulator:
919
- Description: Do not omit the accumulator when calling `next` in a `reduce`/`inject`
920
- block.
921
-
922
- Lint/NonLocalExitFromIterator:
923
- Enabled: true
924
-
925
- Lint/ParenthesesAsGroupedExpression:
926
- Enabled: true
927
-
928
- Lint/PercentStringArray:
929
- Enabled: true
930
-
931
- Lint/PercentSymbolArray:
932
- Enabled: true
933
-
934
- Lint/RandOne:
935
- Description: Checks for `rand(1)` calls. Such calls always return `0` and most
936
- likely a mistake.
937
-
938
- Lint/RequireParentheses:
939
- Enabled: true
940
-
941
- Lint/RescueException:
942
- Enabled: true
943
-
944
- Lint/ShadowedException:
945
- Enabled: true
946
-
947
- Lint/ShadowingOuterLocalVariable:
948
- Enabled: true
949
-
950
- Lint/StringConversionInInterpolation:
951
- Enabled: true
952
-
953
- Lint/UnderscorePrefixedVariableName:
954
- Enabled: true
955
-
956
- Lint/UnifiedInteger:
957
- Enabled: true
958
-
959
- Lint/UnneededCopDisableDirective:
960
- Enabled: true
961
-
962
- Lint/UnneededCopEnableDirective:
963
- Enabled: true
964
-
965
- Lint/UnneededSplatExpansion:
966
- Enabled: true
967
-
968
- Lint/UnreachableCode:
969
- Enabled: true
970
-
971
- Lint/UselessAccessModifier:
972
- ContextCreatingMethods: []
973
-
974
- Lint/UselessAssignment:
975
- Enabled: true
976
-
977
- Lint/UselessComparison:
978
- Enabled: true
979
-
980
- Lint/UselessElseWithoutRescue:
981
- Enabled: true
982
-
983
- Lint/UselessSetterCall:
984
- Enabled: true
985
-
986
- Lint/Void:
987
- Enabled: true
988
-
989
- Security/Eval:
990
- Enabled: true
991
-
992
- Security/JSONLoad:
993
- Enabled: true
994
-
995
- Security/Open:
996
- Enabled: true
997
-
998
- Lint/BigDecimalNew:
999
- Enabled: true
1000
-
1001
- Style/Strip:
1002
- Enabled: true
1003
-
1004
- Style/TrailingBodyOnClass:
1005
- Enabled: true
1006
-
1007
- Style/TrailingBodyOnModule:
1008
- Enabled: true
1009
-
1010
- Style/TrailingCommaInArrayLiteral:
1011
- EnforcedStyleForMultiline: comma
1012
- Enabled: true
1013
-
1014
- Style/TrailingCommaInHashLiteral:
1015
- EnforcedStyleForMultiline: comma
1016
- Enabled: true
1017
-
1018
- Layout/SpaceInsideReferenceBrackets:
1019
- EnforcedStyle: no_space
1020
- EnforcedStyleForEmptyBrackets: no_space
1021
- Enabled: true
1022
-
1023
- Style/ModuleFunction:
1024
- EnforcedStyle: extend_self
1025
-
1026
- Lint/OrderedMagicComments:
1027
- Enabled: true