easypost 3.5.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +19 -5
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +5 -0
  5. data/CHANGELOG.md +88 -88
  6. data/Gemfile +2 -0
  7. data/README.md +2 -10
  8. data/Rakefile +2 -1
  9. data/UPGRADE_GUIDE.md +62 -0
  10. data/VERSION +1 -1
  11. data/bin/easypost-irb +5 -3
  12. data/easycop.yml +180 -0
  13. data/easypost.gemspec +21 -19
  14. data/lib/easypost/address.rb +26 -26
  15. data/lib/easypost/api_key.rb +3 -0
  16. data/lib/easypost/batch.rb +31 -30
  17. data/lib/easypost/brand.rb +4 -0
  18. data/lib/easypost/carrier_account.rb +4 -0
  19. data/lib/easypost/carrier_type.rb +3 -0
  20. data/lib/easypost/customs_info.rb +5 -1
  21. data/lib/easypost/customs_item.rb +5 -1
  22. data/lib/easypost/error.rb +7 -7
  23. data/lib/easypost/event.rb +5 -1
  24. data/lib/easypost/insurance.rb +4 -0
  25. data/lib/easypost/object.rb +44 -28
  26. data/lib/easypost/order.rb +15 -11
  27. data/lib/easypost/parcel.rb +7 -0
  28. data/lib/easypost/pickup.rb +15 -9
  29. data/lib/easypost/pickup_rate.rb +3 -1
  30. data/lib/easypost/postage_label.rb +3 -0
  31. data/lib/easypost/rate.rb +7 -0
  32. data/lib/easypost/refund.rb +3 -0
  33. data/lib/easypost/report.rb +9 -16
  34. data/lib/easypost/resource.rb +41 -25
  35. data/lib/easypost/scan_form.rb +8 -3
  36. data/lib/easypost/shipment.rb +47 -51
  37. data/lib/easypost/tax_identifier.rb +4 -0
  38. data/lib/easypost/tracker.rb +9 -4
  39. data/lib/easypost/user.rb +14 -5
  40. data/lib/easypost/util.rb +21 -17
  41. data/lib/easypost/version.rb +3 -1
  42. data/lib/easypost/webhook.rb +18 -12
  43. data/lib/easypost.rb +59 -51
  44. metadata +74 -19
  45. data/lib/easypost/print_job.rb +0 -2
  46. data/lib/easypost/printer.rb +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61c0e0c8eb25bf4d96db43cd812a71df8648e2b1a77f2eef5d651bb4c1275cbf
4
- data.tar.gz: ac36be5df27407e988d4fcc50c93a312fe8e1465cba96e85c8120d36acdfcf65
3
+ metadata.gz: 4033b69b8c91126ab87ed8a16c3b5dd8bd7b4b06b9e7cc4011fe478163244a3a
4
+ data.tar.gz: 554e850ea8107cd0d8de3efca5c0ed18834c7b51c5c437ca9e6c4f8d197489a2
5
5
  SHA512:
6
- metadata.gz: cd011f19406e4f5187f6daac73c490621052605610160992ce4ec42db0b9a4e1b3f64f90123f2b8a7399f32f3b54c7d6515e03c882e01acbc913d611dce9f0a2
7
- data.tar.gz: 3bb63bfce116fa8e1504cde77b38019c68bd4269770246e78aad8916b3e04e29877926550ddaf17fe5fa8489e071069a5e2b0e1432a0fdb52bc0f55e4a981af5
6
+ metadata.gz: 77335abc417c0cf3d1af97d9b4941b00f8dec6400282d0f4f25a3408c47b82eaa5f8a8de6564f250e6a985f3261c296eb22d535eed3d04cc5c7a2716c5239352
7
+ data.tar.gz: 27cc114d89dddec6d2bf7862cd0f15c8d875f739a806a1589ca2626fc61ed9387ee5602d373c85902d6fc8908fe266df347d5d7409a4e9af42cb0091e5791690
@@ -1,8 +1,8 @@
1
- name: 'CI'
1
+ name: "CI"
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [master]
6
6
  pull_request: ~
7
7
 
8
8
  jobs:
@@ -10,13 +10,27 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  strategy:
12
12
  matrix:
13
- rubyversion: ['2.4', '2.5', '2.6', '2.7', '3.0']
13
+ rubyversion: ["2.5", "2.6", "2.7", "3.0", "3.1"]
14
14
  steps:
15
- - uses: actions/checkout@v2
16
- - name: set up ruby
15
+ - name: Checkout Repository
16
+ uses: actions/checkout@v2
17
+ - name: Set up Ruby
17
18
  uses: ruby/setup-ruby@v1
18
19
  with:
19
20
  ruby-version: ${{ matrix.rubyversion }}
20
21
  bundler-cache: true
21
22
  - name: run tests
22
23
  run: bundle exec rspec
24
+ lint:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - name: Checkout Repository
28
+ uses: actions/checkout@v2
29
+ - name: Set up Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: "3.0"
33
+ - name: Install Dependencies
34
+ run: bundle install
35
+ - name: Lint Project
36
+ run: rubocop
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ spec/reports
12
12
  test/tmp
13
13
  test/version_tmp
14
14
  tmp
15
+ .idea/
15
16
 
16
17
  # YARD artifacts
17
18
  .yardoc
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_from: easycop.yml
2
+
3
+ # We are ignoring RSpec/FilePath because Simplecov doesn't play nice with nested spec files
4
+ RSpec/FilePath:
5
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # CHANGELOG
2
2
 
3
-
4
- ## 3.5.0 2021-12-06
3
+ ## v4.0.0 (2022-02-25)
4
+
5
+ * Bumps minimum Ruby version from `2.2` to `2.5`
6
+ * Bumps dev dependencies
7
+ * Documents each interface of the project in code
8
+ * Overhauls the test suite with full coverage
9
+ * Introduces `Rubocop` and lints the entire project
10
+ * Removes the unusable `Print` and `PrintJob` objects
11
+ * Removes deprecated and unusable `stamp_and_barcode_by_reference` method on the Batch object
12
+ * Explicitly returns an error of "not implemented" for `Rate.all` and `Parcel.all`
13
+ * Removes the `Shipment.get_rates` function as shipments already contain rates. If you need to get new rates for a shipment, use the `Shipment.regenerate_rates` function instead
14
+ * Removes the parameters from `Address.verify` as they are unusable
15
+ * Removes the deprecated `http_status` property of the `EasyPost::Error` object as it was replaced with `status`
16
+ * Fixes a bug that would append an extra `id` field to each retrieved object
17
+ * Various other small improvements and bug fixes
18
+
19
+ ## v3.5.0 (2021-12-06)
5
20
 
6
21
  * Adds the `update_brand` method to the user object (closes #122)
7
22
 
8
-
9
- ## 3.4.0 2021-07-13
23
+ ## v3.4.0 (2021-07-13)
10
24
 
11
25
  * Removed deprecated `Item` object
12
26
  * Sorted EasyPost Resources list
@@ -15,236 +29,222 @@
15
29
  * Adds `regenerate_rates` method for new rerate API
16
30
  * Adds `deconstruct_keys` method to allow for pattern matching on EasyPost objects
17
31
 
18
-
19
- ## 3.3.0 2021-06-10
32
+ ## v3.3.0 (2021-06-10)
20
33
 
21
34
  * Adds `SmartRate` functionality to the `Shipments` object (available by calling `get_smartrates` on a shipment)
22
35
  * Fix bug where `EasyPost::CarrierAccount.types` was hitting the wrong endpoint
23
36
 
24
-
25
- ## 3.2.0 2021-01-14
37
+ ## v3.2.0 (2021-01-14)
26
38
 
27
39
  * Replace Travis CI with Github Actions
28
40
  * Add Ruby 3.0 to supported platforms (#110; thanks @maxwell)
29
41
 
30
-
31
- ## 3.1.5 2020-12-16
42
+ ## v3.1.5 (2020-12-16)
32
43
 
33
44
  * Fix attribute lookup when manually constructing objects (#105; thanks @drewtempelmeyer)
34
45
  * Flatten class names and clean up some other style issues
35
46
  * Fix `EasyPost::Address.create_and_verify`, broken since 3.1.0 (#108; thanks @rajbirverma)
36
47
 
37
-
38
- ## 3.1.4 2020-09-29
48
+ ## v3.1.4 (2020-09-29)
39
49
 
40
50
  * Don't modify params passed into Address#create (#78; thanks @TheRusskiy)
41
51
  * Don't modify `carriers` and `services` parameters to `Shipment.lowest_rate` (#71 / #103, thanks @vladvinnikov and @jurisgalang)
42
52
  * When constructing an easypost object, convert the key to a string (#102; thanks @Geesu)
43
53
  * Expose the raw HTTP response as `#http_body` on `EasyPost::Error` objects (#101; thanks @Geesu)
44
54
 
45
-
46
- ## 3.1.3 2020-06-26
55
+ ## v3.1.3 (2020-06-26)
47
56
 
48
57
  * Fix bug causing Authorization header to be included in User-Agent header. All users must upgrade.
49
58
 
50
-
51
- ## 3.1.2 2020-06-24
59
+ ## v3.1.2 (2020-06-24)
52
60
 
53
61
  * Bad gem push. New version required.
54
62
 
55
-
56
- ## 3.1.1 2020-06-23
63
+ ## v3.1.1 (2020-06-23)
57
64
 
58
65
  * Fix bug where EasyPost.http_config was invalid when not explicitly initialized.
59
66
 
60
-
61
- ## 3.1.0 2020-06-23
67
+ ## v3.1.0 (2020-06-23)
62
68
 
63
69
  * Add Shipment Invoice and Refund Report
64
70
  * Remove dependencies on `RestClient` and `MultiJson`
65
71
  * Remove some deprecated endpoints
66
72
 
67
-
68
- ## 3.0.1 2018-05-17
73
+ ## v3.0.1 (2018-05-17)
69
74
 
70
75
  * Enforce TLS certificate validity by default
71
76
 
72
-
73
- ## 3.0.0 2018-02-15
77
+ ## v3.0.0 (2018-02-15)
74
78
 
75
79
  * Require use of ruby ~> 2.0 and TLSv1.2
76
80
 
77
-
78
- ## 2.7.3 2018-02-05
81
+ ## v2.7.3 (2018-02-05)
79
82
 
80
83
  * Fix bug with introduced around certain JSON objects with IDs (thanks vladvinnikov!)
81
84
 
82
-
83
- ## 2.7.2 2018-02-01
85
+ ## v2.7.2 (2018-02-01)
84
86
 
85
87
  * Removed unused and unsupported code paths for Container model
86
88
  * Removed unused and unsupported code path for Stamp and Barcode methods on the Shipment model
87
89
  * Fixed a bug with non-model JSON object with an "id" key being treated as models and raising errors
88
90
 
89
-
90
- ## 2.7.1 2017-05-25
91
+ ## v2.7.1 (2017-05-25)
91
92
 
92
93
  * Allow reports to be retrieved without passing a type
93
94
 
94
-
95
- ## 2.7.0 2017-04-04
95
+ ## v2.7.0 (2017-04-04)
96
96
 
97
97
  * Changed Report CRUD signatures. requires report type to be passed
98
98
 
99
-
100
- ## 2.6.2 2017-02-14
99
+ ## v2.6.2 (2017-02-14)
101
100
 
102
101
  * Added get_rates method for Orders
103
102
 
104
-
105
- ## 2.6.1 2017-01-19
103
+ ## v2.6.1 (2017-01-19)
106
104
 
107
105
  * Updated create method for ScanForms
108
106
 
109
-
110
- ## 2.6.0 2017-01-17
107
+ ## v2.6.0 (2017-01-17)
111
108
 
112
109
  * Add basic CRUD methods for Webhooks
113
110
 
114
-
115
- ## 2.5.0 2016-12-19
111
+ ## v2.5.0 (2016-12-19)
116
112
 
117
113
  * Add prefixes to report in utils
118
114
 
119
-
120
- ## 2.4.0 2016-12-08
115
+ ## v2.4.0 (2016-12-08)
121
116
 
122
117
  * Add report resource to ruby client
123
118
 
124
-
125
- ## 2.3.0 2016-11-25
119
+ ## v2.3.0 (2016-11-25)
126
120
 
127
121
  * Updated dependencies to allow rest-client 2.0.0 and above
128
122
 
129
-
130
- ## 2.2.0 2016-07-26
123
+ ## v2.2.0 (2016-07-260
131
124
 
132
125
  * Added standalone Insurance model
133
126
 
134
-
135
- ## 2.1.11 2016-02-04
127
+ ## v2.1.11 (2016-02-04)
136
128
 
137
129
  * Allowed user creation for top-level users
138
130
 
139
-
140
- ## 2.1.10 2015-12-23
131
+ ## v2.1.10 (2015-12-23)
141
132
 
142
133
  * Added verify and verify_strict params to Address.create
143
134
  * Added Tracker.create_list and Tracker.all_updated for working with large
144
135
  numbers of Trackers.
145
136
 
146
-
147
- ## 2.1.9 2015-11-04
137
+ ## v2.1.9 (2015-11-04)
148
138
 
149
139
  * Added new tests for Tracker.all
150
140
  * Updated some old examples
151
141
 
152
-
153
- ## 2.1.8 2015-10-21
142
+ ## v2.1.8 (2015-10-21)
154
143
 
155
144
  * Added Cancel method for Pickups (thanks Ramie Blatt!)
156
145
 
157
-
158
- ## 2.1.7 2015-10-05
146
+ ## v2.1.7 (2015-10-05)
159
147
 
160
148
  * Fixed Address.create_and_verify and changed how errors are raised (thanks Dimitri Roche!)
161
149
  * Require newer version of the multi_json package
162
150
 
163
-
164
- ## 2.1.6 2015-06-10
151
+ ## v2.1.6 (2015-06-10)
165
152
 
166
153
  * Added Address message accessor for backwards compatability
167
154
 
168
-
169
- ## 2.1.5 2015-06-10
155
+ ## v2.1.5 (2015-06-10)
170
156
 
171
157
  * Removed Address.message
172
158
 
173
-
174
- ## 2.1.4 2015-06-03
159
+ ## v2.1.4 (2015-06-03)
175
160
 
176
161
  * Add Printer and PrintJob resources.
177
162
 
178
-
179
- ## 2.1.3 2015-04-30
163
+ ## v2.1.3 (2015-04-30)
180
164
 
181
165
  * Bux fix, EasyPost::Errors no longer break with a nil json body.
182
166
 
183
-
184
- ## 2.1.2 2015-04-29
167
+ ## v2.1.2 (2015-04-29)
185
168
 
186
169
  * EasyPost::Errors now correctly parse field errors and error codes.
187
170
 
188
-
189
- ## 2.1.1 2015-04-15
171
+ ## v2.1.1 (2015-04-15)
190
172
 
191
173
  * CarrierAccount will now correctly save in-place modifications to credentials
192
174
  * Nested variables should now be saved correctly across all models
193
175
  * Fixed version numbering confusion (the previous version was 2.0.15, not 2.1.0)
194
176
 
195
-
196
- ## 2.0.15 2015-04-15
177
+ ## v2.0.15 (2015-04-15)
197
178
 
198
179
  * Added tracker to shipment buy response
199
180
  * Updated tracker tests
200
181
 
201
-
202
- ## 2.0.14 2015-04-15
182
+ ## v2.0.14 (2015-04-15)
203
183
 
204
184
  * Added User and CarrierAccount models with CRUD functionality
205
185
 
206
-
207
- ## 2.0.13 2014-10-30
186
+ ## v2.0.13 (2014-10-30)
208
187
 
209
188
  * Added Pickup, PickupRate resources.
210
189
  * Added ability to pass api_key to a few resources that were missing it.
211
190
 
212
-
213
- ## 2.0.12 2014-07-07
191
+ ## v2.0.12 (2014-07-07)
214
192
 
215
193
  * Added Item, Container, and Order resources.
216
194
  * Fixed and added a lot of tests.
217
195
 
218
-
219
- ## 2.0.11 2013-12-16
196
+ ## v2.0.11 (2013-12-16)
220
197
 
221
198
  * Added Event.receive method for parsing events sent by webhook.
222
199
  * Fixed tests to account for the tracking code returning and array of details instead of a Hash
223
200
 
224
-
225
- ## 2.0.10 2013-10-03
201
+ ## v2.0.10 (2013-10-03)
226
202
 
227
203
  * API Addition: Event resource added for webhook consumption.
228
204
 
229
-
230
- ## 2.0.9 2013-09-19
205
+ ## v2.0.9 (2013-09-19)
231
206
 
232
207
  * Interface Change: Changed batch.scan_form to batch.create_scan_form to support the ability to refer to scan forms associated to batches.
233
208
 
234
-
235
- ## 2.0.3 2013-07-31
209
+ ## v2.0.3 (2013-07-31)
236
210
 
237
211
  * API Addition: Tracker resource added. Trackers can be used to register any tracking code with EasyPost webhooks.
238
212
 
239
-
240
- ## 2.0.2 2013-07-23
213
+ ## v2.0.2 (2013-07-23)
241
214
 
242
215
  * API Addition: Shipment.track_with_code returns tracking details for any tracking code.
243
216
 
244
-
245
- ## 2.0.1 2013-07-07
217
+ ## v2.0.1 (2013-07-07)
246
218
 
247
219
  * API Addition: Address.create_and_verify returns a verified address in one step.
248
220
  * API Addition: Shipment.label forces the creation of additional label formats (pdf, epl2, zpl).
249
221
  * API Addition: Shipment.insure purchases insurance for a shipment.
250
222
  * Library Update: Added the ability to negatively filter carriers and services with Shipment.lowest_rate (e.g. '!usps').
223
+
224
+ ## v2.0.0 (2013-06-25)
225
+
226
+ ## v1.1.3 (2013-06-05)
227
+
228
+ ## v1.1.2 (2013-06-05)
229
+
230
+ ## v1.1.1 (2013-02-12)
231
+
232
+ ## v1.1.0 (2013-01-29)
233
+
234
+ ## v1.0.8 (2012-11-19)
235
+
236
+ ## v1.0.7 (2012-11-19)
237
+
238
+ ## v1.0.6 (2012-11-19)
239
+
240
+ ## v1.0.5 (2012-11-19)
241
+
242
+ ## v1.0.4 (2012-11-14)
243
+
244
+ ## v1.0.3 (2012-11-13)
245
+
246
+ ## v1.0.2 (2012-11-13)
247
+
248
+ ## v1.0.1 (2012-11-13)
249
+
250
+ ## v1.0.0 (2012-11-02)
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
  gemspec
data/README.md CHANGED
@@ -100,14 +100,6 @@ Up-to-date documentation at: https://easypost.com/docs
100
100
  ## Development
101
101
 
102
102
  ```bash
103
- # Run tests
104
- API_KEY=123... bundle exec rspec
103
+ # Run tests (coverage is generated on a successful test suite run)
104
+ EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... bundle exec rspec
105
105
  ```
106
-
107
- ## Releasing
108
-
109
- 1. Update the version in `VERSION`
110
- 1. Update the `CHANGELOG`
111
- 1. Tag a release on GitHub
112
- 1. Build the Gem `gem build easypost.gemspec`
113
- 1. Publish the Gem `gem push easypost-X.X.X.gem` (replace `X.X.X` with the version being released)
data/Rakefile CHANGED
@@ -1,2 +1,3 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
2
 
3
+ require 'bundler/gem_tasks'
data/UPGRADE_GUIDE.md ADDED
@@ -0,0 +1,62 @@
1
+ # Upgrade Guide
2
+
3
+ Use the following guide to assist in the upgrade process of the `easypost-ruby` library between major versions.
4
+
5
+ ## Upgrading from 3.x to 4.0
6
+
7
+ ### 4.0 High Impact Changes
8
+
9
+ * [Updating Dependencies](#40-updating-dependencies)
10
+
11
+ ### 4.0 Medium Impact Changes
12
+
13
+ * [Removal of `get_rates` Shipment Method](#40-removal-of-getrates-shipment-method)
14
+
15
+ ### 4.0 Low Impact Changes
16
+
17
+ * [Removal of `Print` and `PrintJob` Objects](#40-removal-of-print-and-printjob-objects)
18
+ * [Removal of `stamp_and_barcode_by_reference` Batch Method](#40-removal-of-stampandbarcodebyreference-batch-method)
19
+ * [Removal of `Address.verify` Parameters](#40-removal-of-addressverify-parameters)
20
+ * [Removal of the `http_status` Property on EasyPost::Error](#40-removal-of-httpstatus-property-on-easyposterror)
21
+
22
+ ## 4.0 Updating Dependencies
23
+
24
+ Likelihood of Impact: High
25
+
26
+ **Ruby 2.5 Required**
27
+
28
+ easypost-ruby now requires Ruby 2.5 or greater.
29
+
30
+ **Dependencies**
31
+
32
+ No production dependencies were altered. Development dependencies were all bumped and `simplecov` and `rubocop` were introduced.
33
+
34
+ ## 4.0 Removal of get_rates Shipment Method
35
+
36
+ Likelihood of Impact: Medium
37
+
38
+ The HTTP method used for the `get_rates` endpoint at the API level has changed from `POST` to `GET` and will only retrieve rates for a shipment instead of regenerating them. A new `/rerate` endpoint has been introduced to replace this functionality; In this library, you can now call the `Shipment.regenerate_rates` method to regenerate rates. Due to the logic change, the `get_rates` method has been removed since a Shipment inherently already has rates associated.
39
+
40
+ ## 4.0 Removal of Print and PrintJob Objects
41
+
42
+ Likelihood of Impact: Low
43
+
44
+ The `Print` and `PrintJob` objects have been removed as they are no longer usable with the current version of the API.
45
+
46
+ ## 4.0 Removal of stamp_and_barcode_by_reference Batch Method
47
+
48
+ Likelihood of Impact: Low
49
+
50
+ The `stamp_and_barcode_by_reference` Batch method has been removed as it is no longer usable with the current version of the API.
51
+
52
+ ## 4.0 Removal of Address.verify Parameters
53
+
54
+ Likelihood of Impact: Low
55
+
56
+ The parameters for the `Address.verify` method were removed as they were unusable, the current version of the API does not allow you to verify an address by specifying a carrier.
57
+
58
+ ## 4.0 Removal of http_status Property on EasyPost::Error
59
+
60
+ Likelihood of Impact: Low
61
+
62
+ The deprecated `http_status` property has been removed in favor of the `status` property on the EasyPost::Error object.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.0
1
+ 4.0.0
data/bin/easypost-irb CHANGED
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
3
5
 
4
- libs = " -r irb/completion"
5
- libs << " -r #{File.dirname(__FILE__) + '/../lib/easypost'}"
6
- puts "Initializing EasyPost..."
6
+ libs = ' -r irb/completion'
7
+ libs << " -r #{"#{File.dirname(__FILE__)}/../lib/easypost"}"
8
+ puts 'Initializing EasyPost...'
7
9
  exec "#{irb} #{libs} --simple-prompt"
data/easycop.yml ADDED
@@ -0,0 +1,180 @@
1
+ # This file was generated by
2
+ # `rake easycop:init`
3
+ # on 2019-12-16 19:20:52 +0000 using EasyCop version 0.1.
4
+ ---
5
+ require:
6
+ - rubocop-rspec
7
+ AllCops:
8
+ TargetRubyVersion: 2.5
9
+ NewCops: disable
10
+ Layout/BlockAlignment:
11
+ Enabled: true
12
+ EnforcedStyleAlignWith: start_of_block
13
+ Layout/DotPosition:
14
+ Enabled: true
15
+ AutoCorrect: true
16
+ EnforcedStyle: leading
17
+ Layout/EmptyLineAfterGuardClause:
18
+ Enabled: true
19
+ AutoCorrect: true
20
+ Layout/EmptyLinesAroundArguments:
21
+ Enabled: true
22
+ AutoCorrect: true
23
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
24
+ Enabled: true
25
+ AutoCorrect: true
26
+ Layout/EndAlignment:
27
+ Enabled: true
28
+ EnforcedStyleAlignWith: keyword
29
+ AutoCorrect: true
30
+ Layout/MultilineMethodCallBraceLayout:
31
+ EnforcedStyle: new_line
32
+ Layout/MultilineHashBraceLayout:
33
+ EnforcedStyle: new_line
34
+ Layout/MultilineArrayBraceLayout:
35
+ EnforcedStyle: new_line
36
+ Layout/FirstArrayElementLineBreak:
37
+ Enabled: true
38
+ Layout/FirstHashElementLineBreak:
39
+ Enabled: true
40
+ Layout/FirstMethodArgumentLineBreak:
41
+ Enabled: true
42
+ Layout/LineLength:
43
+ Max: 120
44
+ IgnoredPatterns:
45
+ - "(\\A|\\s)#"
46
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
47
+ Enabled: true
48
+ Layout/SpaceBeforeBrackets: # new in 1.7
49
+ Enabled: true
50
+ RSpec/SharedExamples:
51
+ Enabled: false
52
+ RSpec/NestedGroups:
53
+ Enabled: false
54
+ RSpec/ExampleLength:
55
+ Enabled: false
56
+ RSpec/ImplicitSubject:
57
+ Enabled: false
58
+ RSpec/MultipleExpectations:
59
+ Enabled: false
60
+ RSpec/MultipleMemoizedHelpers:
61
+ Enabled: false
62
+ RSpec/IdenticalEqualityAssertion: # new in 2.4
63
+ Enabled: true
64
+ Style/BlockDelimiters:
65
+ Enabled: true
66
+ EnforcedStyle: braces_for_chaining
67
+ Style/ClassAndModuleChildren:
68
+ Enabled: true
69
+ EnforcedStyle: compact
70
+ Style/Documentation:
71
+ Enabled: false
72
+ Style/MethodCalledOnDoEndBlock:
73
+ Severity: warning
74
+ Enabled: true
75
+ Style/RaiseArgs:
76
+ Enabled: false
77
+ Style/RescueStandardError:
78
+ Enabled: true
79
+ Style/MultilineBlockChain:
80
+ Enabled: false
81
+ Style/TrailingCommaInHashLiteral:
82
+ EnforcedStyleForMultiline: consistent_comma
83
+ Style/TrailingCommaInArguments:
84
+ EnforcedStyleForMultiline: consistent_comma
85
+ Style/TrailingCommaInArrayLiteral:
86
+ EnforcedStyleForMultiline: consistent_comma
87
+ Style/SymbolArray:
88
+ Enabled: false
89
+ Style/IfUnlessModifier:
90
+ Enabled: false
91
+ Metrics/BlockLength:
92
+ Enabled: false
93
+ Metrics/ClassLength:
94
+ Enabled: false
95
+ Metrics/CyclomaticComplexity:
96
+ Enabled: false
97
+ Metrics/PerceivedComplexity:
98
+ Enabled: false
99
+ Metrics/ModuleLength:
100
+ Enabled: false
101
+ Metrics/MethodLength:
102
+ Enabled: false
103
+ Metrics/ParameterLists:
104
+ Enabled: false
105
+ Metrics/AbcSize:
106
+ Enabled: false
107
+ Gemspec/DateAssignment: # new in 1.10
108
+ Enabled: true
109
+ Lint/AmbiguousAssignment: # new in 1.7
110
+ Enabled: true
111
+ Lint/AmbiguousRange: # new in 1.19
112
+ Enabled: true
113
+ Lint/DeprecatedConstants: # new in 1.8
114
+ Enabled: true
115
+ Lint/DuplicateBranch: # new in 1.3
116
+ Enabled: true
117
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
118
+ Enabled: true
119
+ Lint/EmptyBlock: # new in 1.1
120
+ Enabled: true
121
+ Lint/EmptyClass: # new in 1.3
122
+ Enabled: true
123
+ Lint/EmptyInPattern: # new in 1.16
124
+ Enabled: true
125
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
126
+ Enabled: true
127
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
128
+ Enabled: true
129
+ Lint/NumberedParameterAssignment: # new in 1.9
130
+ Enabled: true
131
+ Lint/OrAssignmentToConstant: # new in 1.9
132
+ Enabled: true
133
+ Lint/RedundantDirGlobSort: # new in 1.8
134
+ Enabled: true
135
+ Lint/SymbolConversion: # new in 1.9
136
+ Enabled: true
137
+ Lint/ToEnumArguments: # new in 1.1
138
+ Enabled: true
139
+ Lint/TripleQuotes: # new in 1.9
140
+ Enabled: true
141
+ Lint/UnexpectedBlockArity: # new in 1.5
142
+ Enabled: true
143
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
144
+ Enabled: true
145
+ Naming/InclusiveLanguage: # new in 1.18
146
+ Enabled: true
147
+ Style/ArgumentsForwarding: # new in 1.1
148
+ Enabled: true
149
+ Style/CollectionCompact: # new in 1.2
150
+ Enabled: true
151
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
152
+ Enabled: true
153
+ Style/EndlessMethod: # new in 1.8
154
+ Enabled: true
155
+ Style/HashConversion: # new in 1.10
156
+ Enabled: true
157
+ Style/HashExcept: # new in 1.7
158
+ Enabled: true
159
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
160
+ Enabled: true
161
+ Style/InPatternThen: # new in 1.16
162
+ Enabled: true
163
+ Style/MultilineInPatternThen: # new in 1.16
164
+ Enabled: true
165
+ Style/NegatedIfElseCondition: # new in 1.2
166
+ Enabled: true
167
+ Style/NilLambda: # new in 1.3
168
+ Enabled: true
169
+ Style/QuotedSymbols: # new in 1.16
170
+ Enabled: true
171
+ Style/RedundantArgument: # new in 1.4
172
+ Enabled: true
173
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
174
+ Enabled: true
175
+ Style/StringChars: # new in 1.12
176
+ Enabled: true
177
+ Style/SwapValues: # new in 1.1
178
+ Enabled: true
179
+ RSpec/Rails/AvoidSetupHook: # new in 2.4
180
+ Enabled: true