power_api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +9 -0
- data/.hound.yml +4 -0
- data/.rspec +3 -0
- data/.rubocop.yml +479 -0
- data/.ruby-version +1 -0
- data/.travis.yml +15 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +310 -0
- data/Guardfile +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +904 -0
- data/Rakefile +10 -0
- data/app/assets/config/power_api_manifest.js +2 -0
- data/app/assets/images/power_api/.keep +0 -0
- data/app/assets/javascripts/power_api/application.js +13 -0
- data/app/assets/stylesheets/power_api/application.css +15 -0
- data/app/controllers/concerns/api/deprecated.rb +23 -0
- data/app/controllers/concerns/api/error.rb +37 -0
- data/app/controllers/concerns/api/filtered.rb +15 -0
- data/app/controllers/concerns/api/versioned.rb +36 -0
- data/app/controllers/power_api/base_controller.rb +14 -0
- data/app/helpers/power_api/application_helper.rb +4 -0
- data/app/jobs/power_api/application_job.rb +4 -0
- data/app/mailers/power_api/application_mailer.rb +6 -0
- data/app/models/power_api/application_record.rb +5 -0
- data/app/responders/api_responder.rb +13 -0
- data/app/views/layouts/power_api/application.html.erb +14 -0
- data/bin/rails +14 -0
- data/config/routes.rb +2 -0
- data/lib/generators/power_api/controller/USAGE +5 -0
- data/lib/generators/power_api/controller/controller_generator.rb +152 -0
- data/lib/generators/power_api/install/USAGE +5 -0
- data/lib/generators/power_api/install/install_generator.rb +67 -0
- data/lib/generators/power_api/version/USAGE +5 -0
- data/lib/generators/power_api/version/version_generator.rb +54 -0
- data/lib/power_api.rb +35 -0
- data/lib/power_api/engine.rb +28 -0
- data/lib/power_api/errors.rb +4 -0
- data/lib/power_api/generator_helper/active_record_resource.rb +192 -0
- data/lib/power_api/generator_helper/ams_helper.rb +43 -0
- data/lib/power_api/generator_helper/controller_helper.rb +184 -0
- data/lib/power_api/generator_helper/pagination_helper.rb +48 -0
- data/lib/power_api/generator_helper/resource_helper.rb +33 -0
- data/lib/power_api/generator_helper/routes_helper.rb +91 -0
- data/lib/power_api/generator_helper/rubocop_helper.rb +11 -0
- data/lib/power_api/generator_helper/simple_token_auth_helper.rb +124 -0
- data/lib/power_api/generator_helper/swagger_helper.rb +463 -0
- data/lib/power_api/generator_helper/template_builder_helper.rb +23 -0
- data/lib/power_api/generator_helper/version_helper.rb +16 -0
- data/lib/power_api/generator_helpers.rb +25 -0
- data/lib/power_api/version.rb +3 -0
- data/lib/tasks/power_api_tasks.rake +4 -0
- data/power_api.gemspec +44 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/concerns/api/deprecated_spec.rb +37 -0
- data/spec/dummy/app/controllers/concerns/api/error_spec.rb +97 -0
- data/spec/dummy/app/controllers/concerns/api/filtered_spec.rb +42 -0
- data/spec/dummy/app/controllers/concerns/api/versioned_spec.rb +64 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/blog.rb +5 -0
- data/spec/dummy/app/models/portfolio.rb +5 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +38 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +54 -0
- data/spec/dummy/config/environments/production.rb +91 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +56 -0
- data/spec/dummy/config/routes.rb +12 -0
- data/spec/dummy/config/secrets.yml +32 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/db/migrate/20190322205209_create_blogs.rb +10 -0
- data/spec/dummy/db/migrate/20200215225917_create_users.rb +9 -0
- data/spec/dummy/db/migrate/20200227150449_create_portfolios.rb +10 -0
- data/spec/dummy/db/migrate/20200227150548_add_portfolio_id_blogs.rb +5 -0
- data/spec/dummy/db/schema.rb +38 -0
- data/spec/dummy/package.json +5 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/assets/image.png +0 -0
- data/spec/dummy/spec/assets/video.mp4 +0 -0
- data/spec/dummy/spec/factories/blogs.rb +7 -0
- data/spec/dummy/spec/factories/portfolios.rb +6 -0
- data/spec/dummy/spec/factories/users.rb +5 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/ams_helper_spec.rb +87 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/controller_helper_spec.rb +361 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/pagination_helper_spec.rb +56 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/resource_helper_spec.rb +31 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/routes_helper_spec.rb +179 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/simple_token_auth_helper_spec.rb +164 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/swagger_helper_spec.rb +451 -0
- data/spec/dummy/spec/lib/power_api/generator_helper/version_helper_spec.rb +55 -0
- data/spec/dummy/spec/support/shared_examples/active_record_resource.rb +101 -0
- data/spec/dummy/spec/support/shared_examples/active_record_resource_atrributes.rb +164 -0
- data/spec/dummy/spec/support/test_generator_helpers.rb +29 -0
- data/spec/dummy/spec/support/test_helpers.rb +11 -0
- data/spec/rails_helper.rb +49 -0
- data/spec/spec_helper.rb +9 -0
- metadata +602 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6469cf6940fa06287efc49c95cb631e7c84dd3ed49bf2e7c9ed4515793dadebf
|
4
|
+
data.tar.gz: cba6bd5f2c2221eacc15b179824af06b84d9665606354e297b30f8ebc38e2633
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1772b41b7ec8c0848b185096a242e9b59d4f09dd90787512178dd683106f88ddc3b2b4a01baba81c1a19a44c7ba96f02a1014a74b0146c86109af342a9772d92
|
7
|
+
data.tar.gz: aa7947e87ab257c368a94ae98722f9c77a181130411efa1b83e28e1d3714ed99140bb0e65c88e64616536e41050f56cbd24383ad044e6e726a33f3220cf43652
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
data/.hound.yml
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,479 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "vendor/**/*"
|
4
|
+
- "db/**/*"
|
5
|
+
- "bin/**/*"
|
6
|
+
DisplayCopNames: false
|
7
|
+
TargetRubyVersion: 2.5
|
8
|
+
Rails:
|
9
|
+
Enabled: true
|
10
|
+
Layout/AlignParameters:
|
11
|
+
Description: Align the parameters of a method call if they span more than one line.
|
12
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
13
|
+
Enabled: true
|
14
|
+
EnforcedStyle: with_fixed_indentation
|
15
|
+
SupportedStyles:
|
16
|
+
- with_first_parameter
|
17
|
+
- with_fixed_indentation
|
18
|
+
Metrics/BlockLength:
|
19
|
+
Enabled: false
|
20
|
+
Style/ClassAndModuleChildren:
|
21
|
+
Description: Checks style of children classes and modules.
|
22
|
+
Enabled: false
|
23
|
+
EnforcedStyle: nested
|
24
|
+
SupportedStyles:
|
25
|
+
- nested
|
26
|
+
- compact
|
27
|
+
Style/CommentAnnotation:
|
28
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
29
|
+
REVIEW).
|
30
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
31
|
+
Enabled: false
|
32
|
+
Keywords:
|
33
|
+
- TODO
|
34
|
+
- FIXME
|
35
|
+
- OPTIMIZE
|
36
|
+
- HACK
|
37
|
+
- REVIEW
|
38
|
+
Naming/FileName:
|
39
|
+
Description: Use snake_case for source file names.
|
40
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
41
|
+
Enabled: false
|
42
|
+
Exclude: []
|
43
|
+
Style/FormatString:
|
44
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
45
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
46
|
+
Enabled: false
|
47
|
+
EnforcedStyle: format
|
48
|
+
SupportedStyles:
|
49
|
+
- format
|
50
|
+
- sprintf
|
51
|
+
- percent
|
52
|
+
Style/FrozenStringLiteralComment:
|
53
|
+
Enabled: false
|
54
|
+
Style/GlobalVars:
|
55
|
+
Description: Do not introduce global variables.
|
56
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
57
|
+
Enabled: false
|
58
|
+
AllowedVariables: []
|
59
|
+
Style/GuardClause:
|
60
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
61
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
62
|
+
Enabled: false
|
63
|
+
MinBodyLength: 1
|
64
|
+
Style/IfUnlessModifier:
|
65
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
66
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
67
|
+
Enabled: false
|
68
|
+
Style/LambdaCall:
|
69
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
70
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
71
|
+
Enabled: false
|
72
|
+
EnforcedStyle: call
|
73
|
+
SupportedStyles:
|
74
|
+
- call
|
75
|
+
- braces
|
76
|
+
Style/Next:
|
77
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
78
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
79
|
+
Enabled: false
|
80
|
+
EnforcedStyle: skip_modifier_ifs
|
81
|
+
MinBodyLength: 3
|
82
|
+
SupportedStyles:
|
83
|
+
- skip_modifier_ifs
|
84
|
+
- always
|
85
|
+
Layout/MultilineOperationIndentation:
|
86
|
+
Description: Checks indentation of binary operations that span more than one line.
|
87
|
+
Enabled: true
|
88
|
+
EnforcedStyle: indented
|
89
|
+
SupportedStyles:
|
90
|
+
- aligned
|
91
|
+
- indented
|
92
|
+
Style/MutableConstant:
|
93
|
+
Description: Do not assign mutable objects to constants.
|
94
|
+
Enabled: false
|
95
|
+
Style/NumericLiterals:
|
96
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
97
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
98
|
+
Enabled: false
|
99
|
+
MinDigits: 5
|
100
|
+
Style/PercentLiteralDelimiters:
|
101
|
+
Description: Use `%`-literal delimiters consistently
|
102
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
103
|
+
Enabled: false
|
104
|
+
PreferredDelimiters:
|
105
|
+
"%": "()"
|
106
|
+
"%i": "()"
|
107
|
+
"%q": "()"
|
108
|
+
"%Q": "()"
|
109
|
+
"%r": "{}"
|
110
|
+
"%s": "()"
|
111
|
+
"%w": "()"
|
112
|
+
"%W": "()"
|
113
|
+
"%x": "()"
|
114
|
+
Naming/PredicateName:
|
115
|
+
Description: Check the names of predicate methods.
|
116
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
117
|
+
Enabled: true
|
118
|
+
NamePrefix:
|
119
|
+
- is_
|
120
|
+
- has_
|
121
|
+
- have_
|
122
|
+
NamePrefixBlacklist:
|
123
|
+
- is_
|
124
|
+
Style/RaiseArgs:
|
125
|
+
Description: Checks the arguments passed to raise/fail.
|
126
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
127
|
+
Enabled: false
|
128
|
+
EnforcedStyle: exploded
|
129
|
+
SupportedStyles:
|
130
|
+
- compact
|
131
|
+
- exploded
|
132
|
+
Style/SignalException:
|
133
|
+
Description: Checks for proper usage of fail and raise.
|
134
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
135
|
+
Enabled: false
|
136
|
+
EnforcedStyle: semantic
|
137
|
+
SupportedStyles:
|
138
|
+
- only_raise
|
139
|
+
- only_fail
|
140
|
+
- semantic
|
141
|
+
Style/SingleLineMethods:
|
142
|
+
Description: Avoid single-line methods.
|
143
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
144
|
+
Enabled: false
|
145
|
+
AllowIfMethodIsEmpty: true
|
146
|
+
Style/StringLiterals:
|
147
|
+
Description: Checks if uses of quotes match the configured preference.
|
148
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
149
|
+
Enabled: false
|
150
|
+
EnforcedStyle: double_quotes
|
151
|
+
SupportedStyles:
|
152
|
+
- single_quotes
|
153
|
+
- double_quotes
|
154
|
+
Style/TrailingCommaInArguments:
|
155
|
+
Description: Checks for trailing comma in argument lists.
|
156
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
157
|
+
Enabled: true
|
158
|
+
Style/TrailingCommaInArrayLiteral:
|
159
|
+
Description: Checks for trailing comma in array and hash literals.
|
160
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
161
|
+
Enabled: true
|
162
|
+
Style/TrailingCommaInHashLiteral:
|
163
|
+
Description: Checks for trailing comma in array and hash literals.
|
164
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
165
|
+
Enabled: true
|
166
|
+
Style/TrivialAccessors:
|
167
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
168
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
169
|
+
Enabled: false
|
170
|
+
ExactNameMatch: false
|
171
|
+
AllowPredicates: false
|
172
|
+
AllowDSLWriters: false
|
173
|
+
Whitelist:
|
174
|
+
- to_ary
|
175
|
+
- to_a
|
176
|
+
- to_c
|
177
|
+
- to_enum
|
178
|
+
- to_h
|
179
|
+
- to_hash
|
180
|
+
- to_i
|
181
|
+
- to_int
|
182
|
+
- to_io
|
183
|
+
- to_open
|
184
|
+
- to_path
|
185
|
+
- to_proc
|
186
|
+
- to_r
|
187
|
+
- to_regexp
|
188
|
+
- to_str
|
189
|
+
- to_s
|
190
|
+
- to_sym
|
191
|
+
Style/WhileUntilModifier:
|
192
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
193
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
194
|
+
Enabled: false
|
195
|
+
Style/WordArray:
|
196
|
+
Description: Use %w or %W for arrays of words.
|
197
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
198
|
+
Enabled: false
|
199
|
+
MinSize: 0
|
200
|
+
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
201
|
+
Metrics/AbcSize:
|
202
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
203
|
+
conditions.
|
204
|
+
Enabled: true
|
205
|
+
Max: 25
|
206
|
+
Metrics/BlockNesting:
|
207
|
+
Description: Avoid excessive block nesting
|
208
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
209
|
+
Enabled: true
|
210
|
+
Max: 3
|
211
|
+
Metrics/ClassLength:
|
212
|
+
Description: Avoid classes longer than 100 lines of code.
|
213
|
+
Enabled: false
|
214
|
+
CountComments: false
|
215
|
+
Max: 100
|
216
|
+
Metrics/LineLength:
|
217
|
+
Description: Limit lines to 100 characters.
|
218
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits
|
219
|
+
Enabled: true
|
220
|
+
Max: 100
|
221
|
+
AllowURI: true
|
222
|
+
URISchemes:
|
223
|
+
- http
|
224
|
+
- https
|
225
|
+
Metrics/MethodLength:
|
226
|
+
Description: Avoid methods longer than 15 lines of code.
|
227
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
228
|
+
Enabled: true
|
229
|
+
CountComments: true
|
230
|
+
Max: 15
|
231
|
+
Exclude:
|
232
|
+
- "spec/**/*"
|
233
|
+
Metrics/ParameterLists:
|
234
|
+
Description: Avoid long parameter lists.
|
235
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
236
|
+
Enabled: false
|
237
|
+
Max: 5
|
238
|
+
CountKeywordArgs: true
|
239
|
+
Lint/AssignmentInCondition:
|
240
|
+
Description: Don't use assignment in conditions.
|
241
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
242
|
+
Enabled: false
|
243
|
+
AllowSafeAssignment: true
|
244
|
+
Layout/EndAlignment:
|
245
|
+
Description: Align ends correctly.
|
246
|
+
Enabled: true
|
247
|
+
EnforcedStyleAlignWith: keyword
|
248
|
+
SupportedStylesAlignWith:
|
249
|
+
- keyword
|
250
|
+
- variable
|
251
|
+
Layout/DefEndAlignment:
|
252
|
+
Description: Align ends corresponding to defs correctly.
|
253
|
+
Enabled: true
|
254
|
+
EnforcedStyleAlignWith: start_of_line
|
255
|
+
SupportedStylesAlignWith:
|
256
|
+
- start_of_line
|
257
|
+
- def
|
258
|
+
Style/SymbolArray:
|
259
|
+
Description: Use %i or %I for arrays of symbols.
|
260
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
261
|
+
Enabled: false
|
262
|
+
Layout/ExtraSpacing:
|
263
|
+
Description: Do not use unnecessary spacing.
|
264
|
+
Enabled: false
|
265
|
+
Naming/AccessorMethodName:
|
266
|
+
Description: Check the naming of accessor methods for get_/set_.
|
267
|
+
Enabled: false
|
268
|
+
Style/Alias:
|
269
|
+
Description: Use alias_method instead of alias.
|
270
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
271
|
+
Enabled: false
|
272
|
+
Style/ArrayJoin:
|
273
|
+
Description: Use Array#join instead of Array#*.
|
274
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
275
|
+
Enabled: false
|
276
|
+
Style/AsciiComments:
|
277
|
+
Description: Use only ascii symbols in comments.
|
278
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
279
|
+
Enabled: false
|
280
|
+
Naming/AsciiIdentifiers:
|
281
|
+
Description: Use only ascii symbols in identifiers.
|
282
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
283
|
+
Enabled: false
|
284
|
+
Style/Attr:
|
285
|
+
Description: Checks for uses of Module#attr.
|
286
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
287
|
+
Enabled: false
|
288
|
+
Style/BlockComments:
|
289
|
+
Description: Do not use block comments.
|
290
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
291
|
+
Enabled: false
|
292
|
+
Style/CaseEquality:
|
293
|
+
Description: Avoid explicit use of the case equality operator(===).
|
294
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
295
|
+
Enabled: false
|
296
|
+
Style/CharacterLiteral:
|
297
|
+
Description: Checks for uses of character literals.
|
298
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
299
|
+
Enabled: false
|
300
|
+
Style/ClassVars:
|
301
|
+
Description: Avoid the use of class variables.
|
302
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
303
|
+
Enabled: false
|
304
|
+
Style/ColonMethodCall:
|
305
|
+
Description: 'Do not use :: for method call.'
|
306
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
307
|
+
Enabled: false
|
308
|
+
Style/PreferredHashMethods:
|
309
|
+
Description: Checks for use of deprecated Hash methods.
|
310
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
311
|
+
Enabled: false
|
312
|
+
Style/Documentation:
|
313
|
+
Description: Document classes and non-namespace modules.
|
314
|
+
Enabled: false
|
315
|
+
Style/DoubleNegation:
|
316
|
+
Description: Checks for uses of double negation (!!).
|
317
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
318
|
+
Enabled: false
|
319
|
+
Style/EachWithObject:
|
320
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
321
|
+
Enabled: false
|
322
|
+
Style/EmptyElse:
|
323
|
+
Description: Avoid empty else-clauses.
|
324
|
+
Enabled: true
|
325
|
+
Style/EmptyLiteral:
|
326
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
327
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
328
|
+
Enabled: false
|
329
|
+
Layout/EndOfLine:
|
330
|
+
Description: Use Unix-style line endings.
|
331
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
332
|
+
Enabled: true
|
333
|
+
Style/EvenOdd:
|
334
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
335
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
336
|
+
Enabled: false
|
337
|
+
Lint/FlipFlop:
|
338
|
+
Description: Checks for flip flops
|
339
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
340
|
+
Enabled: false
|
341
|
+
Style/IfWithSemicolon:
|
342
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
343
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
344
|
+
Enabled: false
|
345
|
+
Style/Lambda:
|
346
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
347
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
348
|
+
Enabled: false
|
349
|
+
Style/LineEndConcatenation:
|
350
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
351
|
+
end.
|
352
|
+
Enabled: false
|
353
|
+
Style/ModuleFunction:
|
354
|
+
Description: Checks for usage of `extend self` in modules.
|
355
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
356
|
+
Enabled: false
|
357
|
+
Style/MultilineBlockChain:
|
358
|
+
Description: Avoid multi-line chains of blocks.
|
359
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
360
|
+
Enabled: false
|
361
|
+
Layout/MultilineBlockLayout:
|
362
|
+
Description: Ensures newlines after multiline block do statements.
|
363
|
+
Enabled: false
|
364
|
+
Style/NegatedIf:
|
365
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
366
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
367
|
+
Enabled: false
|
368
|
+
Style/NegatedWhile:
|
369
|
+
Description: Favor until over while for negative conditions.
|
370
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
371
|
+
Enabled: false
|
372
|
+
Style/NilComparison:
|
373
|
+
Description: Prefer x.nil? to x == nil.
|
374
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
375
|
+
Enabled: false
|
376
|
+
Style/OneLineConditional:
|
377
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
378
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
379
|
+
Enabled: false
|
380
|
+
Naming/BinaryOperatorParameterName:
|
381
|
+
Description: When defining binary operators, name the argument other.
|
382
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
383
|
+
Enabled: false
|
384
|
+
Style/PerlBackrefs:
|
385
|
+
Description: Avoid Perl-style regex back references.
|
386
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
387
|
+
Enabled: false
|
388
|
+
Style/Proc:
|
389
|
+
Description: Use proc instead of Proc.new.
|
390
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
391
|
+
Enabled: false
|
392
|
+
Style/SelfAssignment:
|
393
|
+
Description: Checks for places where self-assignment shorthand should have been
|
394
|
+
used.
|
395
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
396
|
+
Enabled: false
|
397
|
+
Layout/SpaceBeforeFirstArg:
|
398
|
+
Description: Put a space between a method name and the first argument in a method
|
399
|
+
call without parentheses.
|
400
|
+
Enabled: true
|
401
|
+
Layout/SpaceAroundOperators:
|
402
|
+
Description: Use spaces around operators.
|
403
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
404
|
+
Enabled: true
|
405
|
+
Layout/SpaceInsideParens:
|
406
|
+
Description: No spaces after ( or before ).
|
407
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
408
|
+
Enabled: true
|
409
|
+
Style/SpecialGlobalVars:
|
410
|
+
Description: Avoid Perl-style global variables.
|
411
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
412
|
+
Enabled: false
|
413
|
+
Style/VariableInterpolation:
|
414
|
+
Description: Don't interpolate global, instance and class variables directly in
|
415
|
+
strings.
|
416
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
417
|
+
Enabled: false
|
418
|
+
Style/WhenThen:
|
419
|
+
Description: Use when x then ... for one-line cases.
|
420
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
421
|
+
Enabled: false
|
422
|
+
Lint/AmbiguousOperator:
|
423
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
424
|
+
without parentheses.
|
425
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
426
|
+
Enabled: false
|
427
|
+
Lint/AmbiguousRegexpLiteral:
|
428
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
429
|
+
invocation without parenthesis.
|
430
|
+
Enabled: false
|
431
|
+
Layout/BlockAlignment:
|
432
|
+
Description: Align block ends correctly.
|
433
|
+
Enabled: true
|
434
|
+
Layout/ConditionPosition:
|
435
|
+
Description: Checks for condition placed in a confusing position relative to the
|
436
|
+
keyword.
|
437
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
438
|
+
Enabled: false
|
439
|
+
Lint/DeprecatedClassMethods:
|
440
|
+
Description: Check for deprecated class method calls.
|
441
|
+
Enabled: false
|
442
|
+
Lint/ElseLayout:
|
443
|
+
Description: Check for odd code arrangement in an else block.
|
444
|
+
Enabled: false
|
445
|
+
Lint/HandleExceptions:
|
446
|
+
Description: Don't suppress exception.
|
447
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
448
|
+
Enabled: false
|
449
|
+
Lint/LiteralAsCondition:
|
450
|
+
Description: Checks of literals used in conditions.
|
451
|
+
Enabled: false
|
452
|
+
Lint/LiteralInInterpolation:
|
453
|
+
Description: Checks for literals used in interpolation.
|
454
|
+
Enabled: false
|
455
|
+
Lint/Loop:
|
456
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
457
|
+
for post-loop tests.
|
458
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
459
|
+
Enabled: false
|
460
|
+
Lint/ParenthesesAsGroupedExpression:
|
461
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
462
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
463
|
+
Enabled: false
|
464
|
+
Lint/RequireParentheses:
|
465
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
466
|
+
Enabled: false
|
467
|
+
Lint/UnderscorePrefixedVariableName:
|
468
|
+
Description: Do not use prefix `_` for a variable that is used.
|
469
|
+
Enabled: false
|
470
|
+
Lint/Void:
|
471
|
+
Description: Possible use of operator/literal/variable in void context.
|
472
|
+
Enabled: false
|
473
|
+
Rails/Delegate:
|
474
|
+
Description: Prefer delegate method for delegations.
|
475
|
+
Enabled: false
|
476
|
+
Performance/RedundantBlockCall:
|
477
|
+
Description: Use `yield` instead of `block.call`.
|
478
|
+
Reference: https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code
|
479
|
+
Enabled: false
|