easypost 3.5.1 → 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 -48
  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 -40
  41. data/lib/easypost/version.rb +3 -1
  42. data/lib/easypost/webhook.rb +18 -12
  43. data/lib/easypost.rb +59 -55
  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: c893399d43b9432c0b6812c5649ab48ad2ad1c04b6373e7999cc8c1fdf22d82b
4
- data.tar.gz: f98230c21010af6117011b0ddee1a1bda574a821fc5ae470a85e4961e72954ef
3
+ metadata.gz: 4033b69b8c91126ab87ed8a16c3b5dd8bd7b4b06b9e7cc4011fe478163244a3a
4
+ data.tar.gz: 554e850ea8107cd0d8de3efca5c0ed18834c7b51c5c437ca9e6c4f8d197489a2
5
5
  SHA512:
6
- metadata.gz: 1822930673f844b99cc6f53ea4c5564b54342590383433ee359f4c3420d56ddbd3cc166d4d2e1975b52a848c95d6854b1b0e79245e3a9b9660ee309a795f5b99
7
- data.tar.gz: b7fa805a9b6cc8a65b3076828f9bd5740709475b4d63824d34dc4981c9ea779af1c9eff273d546e59c7e79d0b7002f9dbbd3353d5faad2911e6615495cbec6cc
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,14 +1,26 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 3.5.1 2022-07-01
4
-
5
- * Backports newer user-agent header
6
-
7
- ## 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)
8
20
 
9
21
  * Adds the `update_brand` method to the user object (closes #122)
10
22
 
11
- ## 3.4.0 2021-07-13
23
+ ## v3.4.0 (2021-07-13)
12
24
 
13
25
  * Removed deprecated `Item` object
14
26
  * Sorted EasyPost Resources list
@@ -17,194 +29,222 @@
17
29
  * Adds `regenerate_rates` method for new rerate API
18
30
  * Adds `deconstruct_keys` method to allow for pattern matching on EasyPost objects
19
31
 
20
- ## 3.3.0 2021-06-10
32
+ ## v3.3.0 (2021-06-10)
21
33
 
22
34
  * Adds `SmartRate` functionality to the `Shipments` object (available by calling `get_smartrates` on a shipment)
23
35
  * Fix bug where `EasyPost::CarrierAccount.types` was hitting the wrong endpoint
24
36
 
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
- ## 3.1.5 2020-12-16
42
+ ## v3.1.5 (2020-12-16)
31
43
 
32
44
  * Fix attribute lookup when manually constructing objects (#105; thanks @drewtempelmeyer)
33
45
  * Flatten class names and clean up some other style issues
34
46
  * Fix `EasyPost::Address.create_and_verify`, broken since 3.1.0 (#108; thanks @rajbirverma)
35
47
 
36
- ## 3.1.4 2020-09-29
48
+ ## v3.1.4 (2020-09-29)
37
49
 
38
50
  * Don't modify params passed into Address#create (#78; thanks @TheRusskiy)
39
51
  * Don't modify `carriers` and `services` parameters to `Shipment.lowest_rate` (#71 / #103, thanks @vladvinnikov and @jurisgalang)
40
52
  * When constructing an easypost object, convert the key to a string (#102; thanks @Geesu)
41
53
  * Expose the raw HTTP response as `#http_body` on `EasyPost::Error` objects (#101; thanks @Geesu)
42
54
 
43
- ## 3.1.3 2020-06-26
55
+ ## v3.1.3 (2020-06-26)
44
56
 
45
57
  * Fix bug causing Authorization header to be included in User-Agent header. All users must upgrade.
46
58
 
47
- ## 3.1.2 2020-06-24
59
+ ## v3.1.2 (2020-06-24)
48
60
 
49
61
  * Bad gem push. New version required.
50
62
 
51
- ## 3.1.1 2020-06-23
63
+ ## v3.1.1 (2020-06-23)
52
64
 
53
65
  * Fix bug where EasyPost.http_config was invalid when not explicitly initialized.
54
66
 
55
- ## 3.1.0 2020-06-23
67
+ ## v3.1.0 (2020-06-23)
56
68
 
57
69
  * Add Shipment Invoice and Refund Report
58
70
  * Remove dependencies on `RestClient` and `MultiJson`
59
71
  * Remove some deprecated endpoints
60
72
 
61
- ## 3.0.1 2018-05-17
73
+ ## v3.0.1 (2018-05-17)
62
74
 
63
75
  * Enforce TLS certificate validity by default
64
76
 
65
- ## 3.0.0 2018-02-15
77
+ ## v3.0.0 (2018-02-15)
66
78
 
67
79
  * Require use of ruby ~> 2.0 and TLSv1.2
68
80
 
69
- ## 2.7.3 2018-02-05
81
+ ## v2.7.3 (2018-02-05)
70
82
 
71
83
  * Fix bug with introduced around certain JSON objects with IDs (thanks vladvinnikov!)
72
84
 
73
- ## 2.7.2 2018-02-01
85
+ ## v2.7.2 (2018-02-01)
74
86
 
75
87
  * Removed unused and unsupported code paths for Container model
76
88
  * Removed unused and unsupported code path for Stamp and Barcode methods on the Shipment model
77
89
  * Fixed a bug with non-model JSON object with an "id" key being treated as models and raising errors
78
90
 
79
- ## 2.7.1 2017-05-25
91
+ ## v2.7.1 (2017-05-25)
80
92
 
81
93
  * Allow reports to be retrieved without passing a type
82
94
 
83
- ## 2.7.0 2017-04-04
95
+ ## v2.7.0 (2017-04-04)
84
96
 
85
97
  * Changed Report CRUD signatures. requires report type to be passed
86
98
 
87
- ## 2.6.2 2017-02-14
99
+ ## v2.6.2 (2017-02-14)
88
100
 
89
101
  * Added get_rates method for Orders
90
102
 
91
- ## 2.6.1 2017-01-19
103
+ ## v2.6.1 (2017-01-19)
92
104
 
93
105
  * Updated create method for ScanForms
94
106
 
95
- ## 2.6.0 2017-01-17
107
+ ## v2.6.0 (2017-01-17)
96
108
 
97
109
  * Add basic CRUD methods for Webhooks
98
110
 
99
- ## 2.5.0 2016-12-19
111
+ ## v2.5.0 (2016-12-19)
100
112
 
101
113
  * Add prefixes to report in utils
102
114
 
103
- ## 2.4.0 2016-12-08
115
+ ## v2.4.0 (2016-12-08)
104
116
 
105
117
  * Add report resource to ruby client
106
118
 
107
- ## 2.3.0 2016-11-25
119
+ ## v2.3.0 (2016-11-25)
108
120
 
109
121
  * Updated dependencies to allow rest-client 2.0.0 and above
110
122
 
111
- ## 2.2.0 2016-07-26
123
+ ## v2.2.0 (2016-07-260
112
124
 
113
125
  * Added standalone Insurance model
114
126
 
115
- ## 2.1.11 2016-02-04
127
+ ## v2.1.11 (2016-02-04)
116
128
 
117
129
  * Allowed user creation for top-level users
118
130
 
119
- ## 2.1.10 2015-12-23
131
+ ## v2.1.10 (2015-12-23)
120
132
 
121
133
  * Added verify and verify_strict params to Address.create
122
134
  * Added Tracker.create_list and Tracker.all_updated for working with large
123
135
  numbers of Trackers.
124
136
 
125
- ## 2.1.9 2015-11-04
137
+ ## v2.1.9 (2015-11-04)
126
138
 
127
139
  * Added new tests for Tracker.all
128
140
  * Updated some old examples
129
141
 
130
- ## 2.1.8 2015-10-21
142
+ ## v2.1.8 (2015-10-21)
131
143
 
132
144
  * Added Cancel method for Pickups (thanks Ramie Blatt!)
133
145
 
134
- ## 2.1.7 2015-10-05
146
+ ## v2.1.7 (2015-10-05)
135
147
 
136
148
  * Fixed Address.create_and_verify and changed how errors are raised (thanks Dimitri Roche!)
137
149
  * Require newer version of the multi_json package
138
150
 
139
- ## 2.1.6 2015-06-10
151
+ ## v2.1.6 (2015-06-10)
140
152
 
141
153
  * Added Address message accessor for backwards compatability
142
154
 
143
- ## 2.1.5 2015-06-10
155
+ ## v2.1.5 (2015-06-10)
144
156
 
145
157
  * Removed Address.message
146
158
 
147
- ## 2.1.4 2015-06-03
159
+ ## v2.1.4 (2015-06-03)
148
160
 
149
161
  * Add Printer and PrintJob resources.
150
162
 
151
- ## 2.1.3 2015-04-30
163
+ ## v2.1.3 (2015-04-30)
152
164
 
153
165
  * Bux fix, EasyPost::Errors no longer break with a nil json body.
154
166
 
155
- ## 2.1.2 2015-04-29
167
+ ## v2.1.2 (2015-04-29)
156
168
 
157
169
  * EasyPost::Errors now correctly parse field errors and error codes.
158
170
 
159
- ## 2.1.1 2015-04-15
171
+ ## v2.1.1 (2015-04-15)
160
172
 
161
173
  * CarrierAccount will now correctly save in-place modifications to credentials
162
174
  * Nested variables should now be saved correctly across all models
163
175
  * Fixed version numbering confusion (the previous version was 2.0.15, not 2.1.0)
164
176
 
165
- ## 2.0.15 2015-04-15
177
+ ## v2.0.15 (2015-04-15)
166
178
 
167
179
  * Added tracker to shipment buy response
168
180
  * Updated tracker tests
169
181
 
170
- ## 2.0.14 2015-04-15
182
+ ## v2.0.14 (2015-04-15)
171
183
 
172
184
  * Added User and CarrierAccount models with CRUD functionality
173
185
 
174
- ## 2.0.13 2014-10-30
186
+ ## v2.0.13 (2014-10-30)
175
187
 
176
188
  * Added Pickup, PickupRate resources.
177
189
  * Added ability to pass api_key to a few resources that were missing it.
178
190
 
179
- ## 2.0.12 2014-07-07
191
+ ## v2.0.12 (2014-07-07)
180
192
 
181
193
  * Added Item, Container, and Order resources.
182
194
  * Fixed and added a lot of tests.
183
195
 
184
- ## 2.0.11 2013-12-16
196
+ ## v2.0.11 (2013-12-16)
185
197
 
186
198
  * Added Event.receive method for parsing events sent by webhook.
187
199
  * Fixed tests to account for the tracking code returning and array of details instead of a Hash
188
200
 
189
- ## 2.0.10 2013-10-03
201
+ ## v2.0.10 (2013-10-03)
190
202
 
191
203
  * API Addition: Event resource added for webhook consumption.
192
204
 
193
- ## 2.0.9 2013-09-19
205
+ ## v2.0.9 (2013-09-19)
194
206
 
195
207
  * Interface Change: Changed batch.scan_form to batch.create_scan_form to support the ability to refer to scan forms associated to batches.
196
208
 
197
- ## 2.0.3 2013-07-31
209
+ ## v2.0.3 (2013-07-31)
198
210
 
199
211
  * API Addition: Tracker resource added. Trackers can be used to register any tracking code with EasyPost webhooks.
200
212
 
201
- ## 2.0.2 2013-07-23
213
+ ## v2.0.2 (2013-07-23)
202
214
 
203
215
  * API Addition: Shipment.track_with_code returns tracking details for any tracking code.
204
216
 
205
- ## 2.0.1 2013-07-07
217
+ ## v2.0.1 (2013-07-07)
206
218
 
207
219
  * API Addition: Address.create_and_verify returns a verified address in one step.
208
220
  * API Addition: Shipment.label forces the creation of additional label formats (pdf, epl2, zpl).
209
221
  * API Addition: Shipment.insure purchases insurance for a shipment.
210
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.1
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