workarea-sezzle 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.gitignore +23 -0
- data/.rubocop.yml +405 -0
- data/.scss-lint.yml +204 -0
- data/Gemfile +17 -0
- data/LICENSE +7 -0
- data/README.md +95 -0
- data/Rakefile +56 -0
- data/Workarea +0 -0
- data/app/assets/images/workarea/admin/sezzle/.keep +0 -0
- data/app/assets/images/workarea/sezzle_logo_white.svg +1 -0
- data/app/assets/images/workarea/storefront/sezzle/.keep +0 -0
- data/app/assets/javascripts/workarea/admin/sezzle/.keep +0 -0
- data/app/assets/javascripts/workarea/storefront/sezzle/.keep +0 -0
- data/app/assets/stylesheets/workarea/admin/sezzle/.keep +0 -0
- data/app/assets/stylesheets/workarea/admin/sezzle/components/_payment_icon.scss +13 -0
- data/app/assets/stylesheets/workarea/storefront/sezzle/.keep +0 -0
- data/app/assets/stylesheets/workarea/storefront/sezzle/components/_payment_icon.scss +13 -0
- data/app/assets/stylesheets/workarea/storefront/sezzle/components/_sezzle.scss +13 -0
- data/app/controllers/.keep +0 -0
- data/app/controllers/workarea/storefront/checkout/place_order_controller.decorator +11 -0
- data/app/controllers/workarea/storefront/sezzle_controller.rb +109 -0
- data/app/helpers/.keep +0 -0
- data/app/mailers/.keep +0 -0
- data/app/models/.keep +0 -0
- data/app/models/workarea/payment/authorize/sezzle.rb +32 -0
- data/app/models/workarea/payment/capture/sezzle.rb +85 -0
- data/app/models/workarea/payment/purchase/sezzle.rb +30 -0
- data/app/models/workarea/payment/refund/sezzle.rb +47 -0
- data/app/models/workarea/payment/tender/sezzle.rb +15 -0
- data/app/models/workarea/paymentl.decorator +32 -0
- data/app/services/workarea/sezzle/order_builder.rb +135 -0
- data/app/view_models/workarea/storefront/checkout/payment_view_model.decorator +11 -0
- data/app/views/.keep +0 -0
- data/app/views/workarea/admin/orders/tenders/_sezzle.html.haml +3 -0
- data/app/views/workarea/storefront/carts/_sezzle_widget.html.haml +5 -0
- data/app/views/workarea/storefront/checkouts/_sezzle_payment.html.haml +8 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_sezzle.html.haml +1 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_sezzle.text.erb +1 -0
- data/app/views/workarea/storefront/orders/tenders/_sezzle.html.haml +4 -0
- data/app/views/workarea/storefront/products/_sezzle_widget.html.haml +10 -0
- data/app/views/workarea/storefront/sezzle/_script.html.haml +22 -0
- data/bin/rails +25 -0
- data/config/initializers/appends.rb +30 -0
- data/config/initializers/configurations.rb +41 -0
- data/config/initializers/workarea.rb +21 -0
- data/config/locales/en.yml +43 -0
- data/config/routes.rb +5 -0
- data/lib/workarea/sezzle.rb +53 -0
- data/lib/workarea/sezzle/authentication.rb +49 -0
- data/lib/workarea/sezzle/bogus_gateway.rb +128 -0
- data/lib/workarea/sezzle/engine.rb +10 -0
- data/lib/workarea/sezzle/gateway.rb +90 -0
- data/lib/workarea/sezzle/response.rb +27 -0
- data/lib/workarea/sezzle/version.rb +5 -0
- data/module +0 -0
- data/test/dummy/.ruby-version +1 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +2 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/javascript/packs/application.js +14 -0
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +25 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +34 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +53 -0
- data/test/dummy/config/environments/production.rb +101 -0
- data/test/dummy/config/environments/test.rb +47 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +12 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +28 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +38 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/integration/workarea/storefront/sezzle_integration_test.rb +205 -0
- data/test/models/workarea/payment/sezzle_payment_integration_test.rb +82 -0
- data/test/services/workarea/sezzle/order_builder_test.rb +116 -0
- data/test/teaspoon_env.rb +6 -0
- data/test/test_helper.rb +10 -0
- data/workarea-sezzle.gemspec +20 -0
- metadata +163 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b01482b4ee55ec93d7bc5522231e9ced6c616753b53fa121d3218ad69521a8b7
|
|
4
|
+
data.tar.gz: b83998b2ca6869dfe0fa803832a6f518f217f618936034f0858fb378b490ca43
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 34c76b5010f111b4090e9a7bd4c065cd19c3807dcb5def346f452d67979de50dab031cc7ff797dffa9c9ff68edd596d87b23720d5a00a15e8f03653e2b3209db
|
|
7
|
+
data.tar.gz: 4948b6c5c1683c9089fa2f57b5184c9868cdf327d1a6d62fc325ab2263ad6678681733297985be4f801e82d0a26b62404fee3cc1f850b67a8263e1843fb47621
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve Workarea Sezzle
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
⚠️**Before you create**⚠️
|
|
11
|
+
Please verify the issue you're experiencing is not part of your Workarea project customizations. The best way to do this is with a [vanilla Workarea installation](https://developer.workarea.com/articles/create-a-new-host-application.html). This will help us spend time on fixes/improvements for the whole community. Thank you!
|
|
12
|
+
|
|
13
|
+
**Describe the bug**
|
|
14
|
+
A clear and concise description of what the bug is.
|
|
15
|
+
|
|
16
|
+
**To Reproduce**
|
|
17
|
+
Steps to reproduce the behavior:
|
|
18
|
+
1. Go to '...'
|
|
19
|
+
2. Click on '....'
|
|
20
|
+
3. Scroll down to '....'
|
|
21
|
+
4. See error
|
|
22
|
+
|
|
23
|
+
**Expected behavior**
|
|
24
|
+
A clear and concise description of what you expected to happen.
|
|
25
|
+
|
|
26
|
+
**Workarea Setup (please complete the following information):**
|
|
27
|
+
- Workarea Sezzle Version
|
|
28
|
+
- Workarea Version: [e.g. v3.4.6]
|
|
29
|
+
- Plugins [e.g. workarea-blog, workarea-sitemaps]
|
|
30
|
+
|
|
31
|
+
**Attachments**
|
|
32
|
+
If applicable, add any attachments to help explain your problem, things like:
|
|
33
|
+
- screenshots
|
|
34
|
+
- Gemfile.lock
|
|
35
|
+
- test cases
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Documentation request
|
|
3
|
+
about: Suggest documentation
|
|
4
|
+
title: ''
|
|
5
|
+
labels: documentation
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your documentation related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm confused by [...]
|
|
12
|
+
|
|
13
|
+
**Describe the documentation you'd like**
|
|
14
|
+
A clear and concise description of what would be in the documentation article.
|
|
15
|
+
|
|
16
|
+
**Additional context**
|
|
17
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for Workarea-Sezzle
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
data/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.bundle/
|
|
2
|
+
log/*.log
|
|
3
|
+
pkg/
|
|
4
|
+
test/dummy/log/*.log
|
|
5
|
+
test/dummy/tmp/
|
|
6
|
+
.DS_Store
|
|
7
|
+
.byebug_history
|
|
8
|
+
.bundle/
|
|
9
|
+
.sass-cache/
|
|
10
|
+
Gemfile.lock
|
|
11
|
+
pkg/
|
|
12
|
+
test/dummy/tmp/
|
|
13
|
+
test/dummy/public/
|
|
14
|
+
log/*.log
|
|
15
|
+
test/dummy/log/*.log
|
|
16
|
+
test/dummy/db/*.sqlite3
|
|
17
|
+
test/dummy/db/*.sqlite3-journal
|
|
18
|
+
node_modules
|
|
19
|
+
yarn.lock
|
|
20
|
+
yarn-error.log
|
|
21
|
+
package-lock.json
|
|
22
|
+
test/dummy/config/master.key
|
|
23
|
+
test/dummy/config/credentials.yml.enc
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 2.5
|
|
3
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
|
4
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
|
5
|
+
DisabledByDefault: true
|
|
6
|
+
Exclude:
|
|
7
|
+
- '.git/**/*'
|
|
8
|
+
- 'node_modules/**/*'
|
|
9
|
+
- 'scripts/*'
|
|
10
|
+
Include:
|
|
11
|
+
- '**/*.decorator'
|
|
12
|
+
|
|
13
|
+
inherit_mode:
|
|
14
|
+
merge:
|
|
15
|
+
- Include
|
|
16
|
+
|
|
17
|
+
Bundler/OrderedGems:
|
|
18
|
+
Description: Order gems alphabetically
|
|
19
|
+
Enabled: true
|
|
20
|
+
|
|
21
|
+
Layout/ArgumentAlignment:
|
|
22
|
+
Description: Here we check if the arguments on a multi-line method definition are aligned.
|
|
23
|
+
Enabled: true
|
|
24
|
+
|
|
25
|
+
# Supports --auto-correct
|
|
26
|
+
Layout/ArrayAlignment:
|
|
27
|
+
Description: Align the elements of an array literal if they span more than one line.
|
|
28
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#align-multiline-arrays
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
# Supports --auto-correct
|
|
32
|
+
Layout/BlockAlignment:
|
|
33
|
+
Description: Align block ends correctly.
|
|
34
|
+
Enabled: true
|
|
35
|
+
|
|
36
|
+
Layout/BlockEndNewline:
|
|
37
|
+
Description: This cop checks whether the end statement of a do..end block is on its own line.
|
|
38
|
+
Enabled: true
|
|
39
|
+
|
|
40
|
+
Layout/CaseIndentation:
|
|
41
|
+
Description: Align `when` with `case`.
|
|
42
|
+
Enabled: true
|
|
43
|
+
|
|
44
|
+
# Align comments with method definitions.
|
|
45
|
+
Layout/CommentIndentation:
|
|
46
|
+
Description: Indentation of comments.
|
|
47
|
+
Enabled: true
|
|
48
|
+
|
|
49
|
+
Layout/ConditionPosition:
|
|
50
|
+
Description: Checks for condition placed in a confusing position relative to the keyword.
|
|
51
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#same-line-condition
|
|
52
|
+
Enabled: true
|
|
53
|
+
|
|
54
|
+
Layout/ClassStructure:
|
|
55
|
+
Enabled: false
|
|
56
|
+
Categories:
|
|
57
|
+
module_inclusion:
|
|
58
|
+
- include
|
|
59
|
+
- prepend
|
|
60
|
+
- extend
|
|
61
|
+
ExpectedOrder:
|
|
62
|
+
- module_inclusion
|
|
63
|
+
- constants
|
|
64
|
+
- public_class_methods
|
|
65
|
+
- initializer
|
|
66
|
+
- instance_methods
|
|
67
|
+
- protected_methods
|
|
68
|
+
- private_methods
|
|
69
|
+
|
|
70
|
+
Layout/ClosingParenthesisIndentation:
|
|
71
|
+
Description: This cop checks the indentation of hanging closing parentheses in method calls, method definitions, and grouped expressions. A hanging closing parenthesis means ) preceded by a line break.
|
|
72
|
+
Enabled: true
|
|
73
|
+
|
|
74
|
+
Layout/EmptyLineAfterMagicComment:
|
|
75
|
+
Enabled: true
|
|
76
|
+
|
|
77
|
+
Layout/EmptyLinesAroundClassBody:
|
|
78
|
+
Description: In a regular class definition, no empty lines around the body.
|
|
79
|
+
Enabled: true
|
|
80
|
+
|
|
81
|
+
Layout/EmptyLineAfterGuardClause:
|
|
82
|
+
Description: There should be an empty line after a guard clause.
|
|
83
|
+
Enabled: true
|
|
84
|
+
|
|
85
|
+
Layout/EmptyLinesAroundMethodBody:
|
|
86
|
+
Description: In a regular method definition, no empty lines around the body.
|
|
87
|
+
Enabled: true
|
|
88
|
+
|
|
89
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
90
|
+
Description: In a regular module definition, no empty lines around the body.
|
|
91
|
+
Enabled: true
|
|
92
|
+
|
|
93
|
+
Layout/EmptyComment:
|
|
94
|
+
Description: Checks empty comment.
|
|
95
|
+
Enabled: true
|
|
96
|
+
|
|
97
|
+
Layout/EmptyLineBetweenDefs:
|
|
98
|
+
Description: Use empty lines between defs.
|
|
99
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#empty-lines-between-methods
|
|
100
|
+
Enabled: true
|
|
101
|
+
AllowAdjacentOneLineDefs: false
|
|
102
|
+
|
|
103
|
+
# Supports --auto-correct
|
|
104
|
+
Layout/EmptyLines:
|
|
105
|
+
Description: Don't use several empty lines in a row.
|
|
106
|
+
Enabled: true
|
|
107
|
+
|
|
108
|
+
# Supports --auto-correct
|
|
109
|
+
Layout/ElseAlignment:
|
|
110
|
+
Description: Align elses and elsifs correctly.
|
|
111
|
+
Enabled: true
|
|
112
|
+
|
|
113
|
+
Layout/DefEndAlignment:
|
|
114
|
+
Description: Align ends corresponding to defs correctly.
|
|
115
|
+
Enabled: true
|
|
116
|
+
EnforcedStyleAlignWith: start_of_line
|
|
117
|
+
AutoCorrect: false
|
|
118
|
+
|
|
119
|
+
# Supports --auto-correct
|
|
120
|
+
Layout/EndAlignment:
|
|
121
|
+
Description: Align ends correctly.
|
|
122
|
+
# The value `keyword` means that `end` should be aligned with the matching
|
|
123
|
+
# keyword (if, while, etc.).
|
|
124
|
+
# The value `variable` means that in assignments, `end` should be aligned
|
|
125
|
+
# with the start of the variable on the left hand side of `=`. In all other
|
|
126
|
+
# situations, `end` should still be aligned with the keyword.
|
|
127
|
+
# The value `start_of_line` means that `end` should be aligned with the start
|
|
128
|
+
# of the line which the matching keyword appears on.
|
|
129
|
+
Enabled: true
|
|
130
|
+
EnforcedStyleAlignWith: keyword
|
|
131
|
+
AutoCorrect: false
|
|
132
|
+
|
|
133
|
+
# Supports --auto-correct
|
|
134
|
+
Layout/ExtraSpacing:
|
|
135
|
+
Description: Do not use unnecessary spacing.
|
|
136
|
+
Enabled: true
|
|
137
|
+
AllowForAlignment: true
|
|
138
|
+
|
|
139
|
+
Layout/FirstArgumentIndentation:
|
|
140
|
+
Enabled: true
|
|
141
|
+
|
|
142
|
+
Layout/FirstArrayElementIndentation:
|
|
143
|
+
Description: Use 2 spaces for indentation in a array, relative to the start of the line where the left curly brace is.
|
|
144
|
+
Enabled: true
|
|
145
|
+
|
|
146
|
+
Layout/FirstHashElementIndentation:
|
|
147
|
+
Description: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
|
|
148
|
+
Enabled: true
|
|
149
|
+
|
|
150
|
+
Layout/FirstHashElementLineBreak:
|
|
151
|
+
Description: Checks for a line break before the first element in a multi-line hash.
|
|
152
|
+
Enabled: true
|
|
153
|
+
|
|
154
|
+
Layout/HashAlignment:
|
|
155
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
|
156
|
+
Enabled: true
|
|
157
|
+
EnforcedHashRocketStyle: key
|
|
158
|
+
EnforcedColonStyle: key
|
|
159
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
|
160
|
+
SupportedLastArgumentHashStyles:
|
|
161
|
+
- always_inspect
|
|
162
|
+
- always_ignore
|
|
163
|
+
- ignore_implicit
|
|
164
|
+
- ignore_explicit
|
|
165
|
+
|
|
166
|
+
Layout/IndentationConsistency:
|
|
167
|
+
Description: Ensure all lines of code are indented consistently
|
|
168
|
+
Enabled: true
|
|
169
|
+
|
|
170
|
+
Layout/IndentationWidth:
|
|
171
|
+
Width: 2
|
|
172
|
+
|
|
173
|
+
Layout/LineLength:
|
|
174
|
+
Description: This cop checks that the line length is less than 100 characters
|
|
175
|
+
Enabled: true
|
|
176
|
+
IgnoredPatterns: ['(\A|\s)#']
|
|
177
|
+
Max: 100
|
|
178
|
+
|
|
179
|
+
Layout/MultilineHashBraceLayout:
|
|
180
|
+
Description: This cop checks that the closing brace in a hash literal is either on the same line as the last hash element, or a new line.
|
|
181
|
+
Enabled: true
|
|
182
|
+
|
|
183
|
+
Layout/MultilineMethodCallIndentation:
|
|
184
|
+
Description: This cop checks the indentation of the method name part in method calls that span more than one line.
|
|
185
|
+
EnforcedStyle: indented_relative_to_receiver
|
|
186
|
+
Enabled: true
|
|
187
|
+
|
|
188
|
+
Layout/MultilineMethodArgumentLineBreaks:
|
|
189
|
+
Description: This cop ensures that each argument in a multi-line method call starts on a separate line.
|
|
190
|
+
Enabled: true
|
|
191
|
+
|
|
192
|
+
# Supports --auto-correct
|
|
193
|
+
Layout/SpaceAfterColon:
|
|
194
|
+
Description: Use spaces after colons.
|
|
195
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#spaces-operators
|
|
196
|
+
Enabled: true
|
|
197
|
+
|
|
198
|
+
# Supports --auto-correct
|
|
199
|
+
Layout/SpaceAfterComma:
|
|
200
|
+
Description: Use spaces after commas.
|
|
201
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#spaces-operators
|
|
202
|
+
Enabled: true
|
|
203
|
+
|
|
204
|
+
# Supports --auto-correct
|
|
205
|
+
Layout/SpaceAfterMethodName:
|
|
206
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
|
207
|
+
in a method definition.
|
|
208
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#parens-no-spaces
|
|
209
|
+
Enabled: true
|
|
210
|
+
|
|
211
|
+
# Supports --auto-correct
|
|
212
|
+
Layout/SpaceAfterNot:
|
|
213
|
+
Description: Tracks redundant space after the ! operator.
|
|
214
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-space-bang
|
|
215
|
+
Enabled: true
|
|
216
|
+
|
|
217
|
+
# Supports --auto-correct
|
|
218
|
+
Layout/SpaceAfterSemicolon:
|
|
219
|
+
Description: Use spaces after semicolons.
|
|
220
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#spaces-operators
|
|
221
|
+
Enabled: true
|
|
222
|
+
|
|
223
|
+
# Supports --auto-correct
|
|
224
|
+
Layout/SpaceAroundBlockParameters:
|
|
225
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
|
226
|
+
Enabled: true
|
|
227
|
+
EnforcedStyleInsidePipes: no_space
|
|
228
|
+
|
|
229
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
230
|
+
Enabled: true
|
|
231
|
+
|
|
232
|
+
Layout/SpaceAroundKeyword:
|
|
233
|
+
Enabled: true
|
|
234
|
+
|
|
235
|
+
Layout/SpaceAroundOperators:
|
|
236
|
+
Enabled: true
|
|
237
|
+
|
|
238
|
+
Layout/SpaceBeforeFirstArg:
|
|
239
|
+
Enabled: true
|
|
240
|
+
|
|
241
|
+
Layout/SpaceBeforeBlockBraces:
|
|
242
|
+
Description: Use `foo {}` not `foo{}`.
|
|
243
|
+
Enabled: true
|
|
244
|
+
|
|
245
|
+
Layout/SpaceInsideBlockBraces:
|
|
246
|
+
Description: Use `foo { bar }` not `foo {bar}`.
|
|
247
|
+
Enabled: true
|
|
248
|
+
|
|
249
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
250
|
+
Description: "Use `{ a: 1 }` not `{a:1}`."
|
|
251
|
+
Enabled: true
|
|
252
|
+
|
|
253
|
+
Layout/SpaceInsideParens:
|
|
254
|
+
Enabled: true
|
|
255
|
+
|
|
256
|
+
Layout/IndentationStyle:
|
|
257
|
+
Description: Detect hard tabs, no hard tabs.
|
|
258
|
+
Enabled: true
|
|
259
|
+
|
|
260
|
+
Layout/TrailingEmptyLines:
|
|
261
|
+
Description: There must be an empty newline at the end of the file.
|
|
262
|
+
StyleGuide: https://rubystyle.guide/#newline-eof
|
|
263
|
+
Enabled: true
|
|
264
|
+
EnforcedStyle: final_newline
|
|
265
|
+
|
|
266
|
+
Layout/TrailingWhitespace:
|
|
267
|
+
Description: No trailing whitespace.
|
|
268
|
+
Enabled: true
|
|
269
|
+
|
|
270
|
+
Lint/AssignmentInCondition:
|
|
271
|
+
Description: Don't use assignment in conditions.
|
|
272
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#safe-assignment-in-condition
|
|
273
|
+
Enabled: true
|
|
274
|
+
AllowSafeAssignment: false
|
|
275
|
+
|
|
276
|
+
Lint/Debugger:
|
|
277
|
+
Description: Checks for debugger statements
|
|
278
|
+
Enabled: true
|
|
279
|
+
|
|
280
|
+
Lint/EmptyInterpolation:
|
|
281
|
+
Description: Checks for empty string interpolation.
|
|
282
|
+
Enabled: true
|
|
283
|
+
|
|
284
|
+
Lint/PercentStringArray:
|
|
285
|
+
Description: >-
|
|
286
|
+
Checks for unwanted commas and quotes in %w/%W literals.
|
|
287
|
+
Enabled: true
|
|
288
|
+
|
|
289
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
|
290
|
+
Lint/RequireParentheses:
|
|
291
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
|
292
|
+
Enabled: true
|
|
293
|
+
|
|
294
|
+
Lint/UselessAssignment:
|
|
295
|
+
Description: Checks for useless assignment to a local variable.
|
|
296
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#underscore-unused-vars
|
|
297
|
+
Enabled: true
|
|
298
|
+
|
|
299
|
+
Naming/ClassAndModuleCamelCase:
|
|
300
|
+
Description: Use CamelCase for classes and modules.
|
|
301
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#camelcase-classes
|
|
302
|
+
Enabled: true
|
|
303
|
+
|
|
304
|
+
Naming/ConstantName:
|
|
305
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
|
306
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#screaming-snake-case
|
|
307
|
+
Enabled: false
|
|
308
|
+
|
|
309
|
+
Naming/FileName:
|
|
310
|
+
Description: Use snake_case for source file names.
|
|
311
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#snake-case-files
|
|
312
|
+
Enabled: false
|
|
313
|
+
|
|
314
|
+
Naming/MethodName:
|
|
315
|
+
Description: Use the configured style when naming methods.
|
|
316
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#snake-case-symbols-methods-vars
|
|
317
|
+
Enabled: false
|
|
318
|
+
EnforcedStyle: snake_case
|
|
319
|
+
SupportedStyles:
|
|
320
|
+
- snake_case
|
|
321
|
+
- camelCase
|
|
322
|
+
|
|
323
|
+
Naming/VariableName:
|
|
324
|
+
Description: Use the configured style when naming variables.
|
|
325
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#snake-case-symbols-methods-vars
|
|
326
|
+
Enabled: true
|
|
327
|
+
EnforcedStyle: snake_case
|
|
328
|
+
SupportedStyles:
|
|
329
|
+
- snake_case
|
|
330
|
+
- camelCase
|
|
331
|
+
|
|
332
|
+
# Supports --auto-correct
|
|
333
|
+
Style/AndOr:
|
|
334
|
+
Description: Use &&/|| instead of and/or.
|
|
335
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-and-or-or
|
|
336
|
+
Enabled: true
|
|
337
|
+
Exclude:
|
|
338
|
+
- 'app/controllers/**/*'
|
|
339
|
+
|
|
340
|
+
Style/BlockDelimiters:
|
|
341
|
+
Description: Check for uses of braces or do/end around single line or multi-line blocks.
|
|
342
|
+
Enabled: true
|
|
343
|
+
|
|
344
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
|
345
|
+
Style/HashSyntax:
|
|
346
|
+
Enabled: true
|
|
347
|
+
|
|
348
|
+
# Defining a method with parameters needs parentheses.
|
|
349
|
+
Style/MethodDefParentheses:
|
|
350
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
|
351
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#method-parens
|
|
352
|
+
Enabled: true
|
|
353
|
+
EnforcedStyle: require_parentheses
|
|
354
|
+
|
|
355
|
+
# Supports --auto-correct
|
|
356
|
+
Style/NilComparison:
|
|
357
|
+
Description: Prefer x.nil? to x == nil.
|
|
358
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#predicate-methods
|
|
359
|
+
Enabled: true
|
|
360
|
+
|
|
361
|
+
# Supports --auto-correct
|
|
362
|
+
Style/Not:
|
|
363
|
+
Description: Use ! instead of not.
|
|
364
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#bang-not-not
|
|
365
|
+
Enabled: true
|
|
366
|
+
|
|
367
|
+
Style/OptionalArguments:
|
|
368
|
+
Description: Checks for optional arguments that do not appear at the end of the argument
|
|
369
|
+
list
|
|
370
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#optional-arguments
|
|
371
|
+
Enabled: true
|
|
372
|
+
|
|
373
|
+
# Supports --auto-correct
|
|
374
|
+
Style/RedundantReturn:
|
|
375
|
+
Description: Don't use return where it's not required.
|
|
376
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-explicit-return
|
|
377
|
+
Enabled: true
|
|
378
|
+
AllowMultipleReturnValues: false
|
|
379
|
+
|
|
380
|
+
# Supports --auto-correct
|
|
381
|
+
Style/RegexpLiteral:
|
|
382
|
+
Description: Use / or %r around regular expressions.
|
|
383
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#percent-r
|
|
384
|
+
Enabled: false
|
|
385
|
+
EnforcedStyle: slashes
|
|
386
|
+
SupportedStyles:
|
|
387
|
+
- slashes
|
|
388
|
+
- percent_r
|
|
389
|
+
- mixed
|
|
390
|
+
AllowInnerSlashes: false
|
|
391
|
+
|
|
392
|
+
Style/StringLiterals:
|
|
393
|
+
EnforcedStyle: single_quotes
|
|
394
|
+
SupportedStyles:
|
|
395
|
+
- single_quotes
|
|
396
|
+
- double_quotes
|
|
397
|
+
|
|
398
|
+
Style/UnlessElse:
|
|
399
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
|
400
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-else-with-unless
|
|
401
|
+
Enabled: true
|
|
402
|
+
|
|
403
|
+
Style/ZeroLengthPredicate:
|
|
404
|
+
Description: 'Use #empty? when testing for objects of length 0.'
|
|
405
|
+
Enabled: false
|