arkenstone 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.hound.yml +2 -0
  4. data/.ruby-style.yml +245 -0
  5. data/.ruby-version +1 -1
  6. data/Gemfile +3 -1
  7. data/README.md +31 -21
  8. data/arkenstone.gemspec +8 -11
  9. data/bin/arkenstone +2 -10
  10. data/circle.yml +9 -0
  11. data/lib/arkenstone.rb +1 -2
  12. data/lib/arkenstone/forge.rb +41 -0
  13. data/lib/arkenstone/templates/Vagrantfile.erb +13 -0
  14. data/lib/arkenstone/templates/ansible/roles/base/tasks/main.yml +26 -0
  15. data/lib/arkenstone/templates/ansible/roles/postgresql/tasks/main.yml +14 -0
  16. data/lib/arkenstone/templates/ansible/roles/rails/defaults/main.yml +3 -0
  17. data/lib/arkenstone/templates/ansible/roles/rails/tasks/main.yml +31 -0
  18. data/lib/arkenstone/templates/ansible/roles/ruby/defaults/main.yml +5 -0
  19. data/lib/arkenstone/templates/ansible/roles/ruby/tasks/main.yml +26 -0
  20. data/lib/arkenstone/templates/ansible/site.yml +9 -0
  21. data/lib/arkenstone/version.rb +1 -3
  22. data/ruby.yml +243 -0
  23. data/spec/features/new_project_spec.rb +11 -120
  24. data/spec/features/new_project_with_ansible_spec.rb +20 -0
  25. data/spec/features/new_project_with_ubuntu_trusty_spec.rb +14 -0
  26. data/spec/features/new_project_with_virtualbox_spec.rb +14 -0
  27. data/spec/spec_helper.rb +7 -0
  28. data/spec/support/features/new_project.rb +7 -23
  29. metadata +41 -60
  30. data/.codeclimate.yml +0 -19
  31. data/.rubocop.yml +0 -1148
  32. data/.travis.yml +0 -5
  33. data/lib/arkenstone/app_builder.rb +0 -118
  34. data/lib/arkenstone/generators/app_generator.rb +0 -56
  35. data/lib/arkenstone/templates/.travis.yml.erb +0 -3
  36. data/lib/arkenstone/templates/Gemfile.erb +0 -52
  37. data/lib/arkenstone/templates/README.md.erb +0 -1
  38. data/lib/arkenstone/templates/_flashes.html.erb +0 -3
  39. data/lib/arkenstone/templates/_form.html.erb +0 -13
  40. data/lib/arkenstone/templates/application.html.erb +0 -16
  41. data/lib/arkenstone/templates/application.scss +0 -7
  42. data/lib/arkenstone/templates/database.yml.erb +0 -12
  43. data/lib/arkenstone/templates/database_cleaner.rb +0 -21
  44. data/lib/arkenstone/templates/en.yml.erb +0 -3
  45. data/lib/arkenstone/templates/factories.rb +0 -2
  46. data/lib/arkenstone/templates/high_voltage.rb +0 -4
  47. data/lib/arkenstone/templates/home.html.erb +0 -2
  48. data/lib/arkenstone/templates/rails +0 -9
  49. data/lib/arkenstone/templates/rails_helper.rb +0 -16
  50. data/lib/arkenstone/templates/rake +0 -9
  51. data/lib/arkenstone/templates/simple_form.en.yml +0 -31
  52. data/lib/arkenstone/templates/simple_form.rb +0 -165
  53. data/lib/arkenstone/templates/spring +0 -15
  54. data/lib/arkenstone/templates/user.rb +0 -3
  55. data/spec/features/new_project_with_authentication_spec.rb +0 -24
@@ -0,0 +1,20 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe "Generating a new project with the Ansible provisioner" do
4
+ before(:example) do
5
+ remove_dummy_app
6
+ run_arkenstone("--provisioner=ansible")
7
+ end
8
+
9
+ it "correctly configures Vagrant" do
10
+ vagrantfile = File.read("#{app_path}/Vagrantfile")
11
+
12
+ expect(vagrantfile).to include('config.vm.provision "ansible"')
13
+ end
14
+
15
+ it "copies the ansible directory" do
16
+ ansible_dir = "#{app_path}/provisioners/ansible"
17
+
18
+ expect(File).to exist(ansible_dir)
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe "Generating a new project with a 64-bit Ubuntu 14.04 box" do
4
+ before(:example) do
5
+ remove_dummy_app
6
+ run_arkenstone("--box=ubuntu/trusty64")
7
+ end
8
+
9
+ it "correctly configures Vagrant" do
10
+ vagrantfile = File.read("#{app_path}/Vagrantfile")
11
+
12
+ expect(vagrantfile).to include('config.vm.box = "ubuntu/trusty64"')
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe "Generating a new project with the VirtualBox provider" do
4
+ before(:example) do
5
+ remove_dummy_app
6
+ run_arkenstone("--provisioner=vagrant")
7
+ end
8
+
9
+ it "correctly configures Vagrant" do
10
+ vagrantfile = File.read("#{app_path}/Vagrantfile")
11
+
12
+ expect(vagrantfile).to include('config.vm.provider "virtualbox"')
13
+ end
14
+ end
@@ -1,3 +1,10 @@
1
+ require "simplecov"
2
+ SimpleCov.start
3
+ if ENV["CI"] == "true"
4
+ require "codecov"
5
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
6
+ end
7
+
1
8
  Dir["./spec/support/**/*.rb"].each { |file| require file }
2
9
 
3
10
  RSpec.configure do |config|
@@ -1,38 +1,22 @@
1
1
  module Features
2
- APP_NAME = "arkenstone_test"
2
+ APP_NAME = "arkenstone_test".freeze
3
3
 
4
- def app_name
5
- APP_NAME
6
- end
7
-
8
- def run_arkenstone(args = nil)
4
+ def run_arkenstone(options = nil)
9
5
  Dir.chdir(Dir.tmpdir) do
10
- `#{arkenstone_bin} #{args} #{project_path}`
6
+ `#{arkenstone_bin} new #{APP_NAME} #{options}`
11
7
  end
12
8
  end
13
9
 
14
10
  def remove_dummy_app
15
- FileUtils.rm_rf(project_path)
11
+ FileUtils.rm_rf(app_path)
16
12
  end
17
13
 
18
- def project_path
14
+ def app_path
19
15
  File.join(Dir.tmpdir, APP_NAME)
20
16
  end
21
17
 
22
- def models_path
23
- "#{project_path}/app/models"
24
- end
25
-
26
- def controllers_path
27
- "#{project_path}/app/controllers"
28
- end
29
-
30
- def config_path
31
- "#{project_path}/config"
32
- end
33
-
34
18
  def lib_path
35
- "#{project_path}/lib"
19
+ "#{app_path}/lib"
36
20
  end
37
21
 
38
22
  def file_contents(file)
@@ -40,7 +24,7 @@ module Features
40
24
  end
41
25
 
42
26
  def project_file_exist?(file)
43
- Dir.chdir(project_path) do
27
+ Dir.chdir(add_path) do
44
28
  File.exist?(file)
45
29
  end
46
30
  end
metadata CHANGED
@@ -1,37 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arkenstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Scheurich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: codecov
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 4.2.0
23
- type: :runtime
19
+ version: '0'
20
+ type: :development
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '4.2'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 4.2.0
26
+ version: '0'
33
27
  - !ruby/object:Gem::Dependency
34
- name: bitters
28
+ name: pry
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
@@ -45,78 +39,75 @@ dependencies:
45
39
  - !ruby/object:Gem::Version
46
40
  version: '0.1'
47
41
  - !ruby/object:Gem::Dependency
48
- name: bundler
42
+ name: rake
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '1.0'
47
+ version: '10.0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: '1.0'
54
+ version: '10.0'
61
55
  - !ruby/object:Gem::Dependency
62
- name: pry
56
+ name: rspec
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
59
  - - "~>"
66
60
  - !ruby/object:Gem::Version
67
- version: '0.1'
61
+ version: '3.4'
68
62
  type: :development
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
66
  - - "~>"
73
67
  - !ruby/object:Gem::Version
74
- version: '0.1'
68
+ version: '3.4'
75
69
  - !ruby/object:Gem::Dependency
76
- name: rake
70
+ name: rspec_junit_formatter
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
- - - "~>"
73
+ - - '='
80
74
  - !ruby/object:Gem::Version
81
- version: '10.0'
75
+ version: 0.2.2
82
76
  type: :development
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - "~>"
80
+ - - '='
87
81
  - !ruby/object:Gem::Version
88
- version: '10.0'
82
+ version: 0.2.2
89
83
  - !ruby/object:Gem::Dependency
90
- name: rspec
84
+ name: thor
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
87
  - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: '3.4'
89
+ version: '0'
96
90
  type: :development
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
94
  - - "~>"
101
95
  - !ruby/object:Gem::Version
102
- version: '3.4'
96
+ version: '0'
103
97
  description: |
104
- The Arkenstone is a Ruby on Rails application generator set up to use my
105
- preferred development configuration. It is heavily influenced by thoughtbot’s
106
- Suspenders; I simply prefer to have something that I’ve pruned from infancy
107
- and just totally *get*, you know?
98
+ The Arkenstone is a Ruby on Rails development environment generator.
99
+ Its goal is to provide an easy way to spin up a new Vagrant box provisioned for Rails development.
108
100
  email: nick@scheurich.me
109
101
  executables:
110
102
  - arkenstone
111
103
  extensions: []
112
104
  extra_rdoc_files: []
113
105
  files:
114
- - ".codeclimate.yml"
115
106
  - ".gitignore"
107
+ - ".hound.yml"
116
108
  - ".rspec"
117
- - ".rubocop.yml"
109
+ - ".ruby-style.yml"
118
110
  - ".ruby-version"
119
- - ".travis.yml"
120
111
  - CODE_OF_CONDUCT.md
121
112
  - Gemfile
122
113
  - LICENSE
@@ -126,33 +117,24 @@ files:
126
117
  - bin/arkenstone
127
118
  - bin/console
128
119
  - bin/setup
120
+ - circle.yml
129
121
  - lib/arkenstone.rb
130
- - lib/arkenstone/app_builder.rb
131
- - lib/arkenstone/generators/app_generator.rb
132
- - lib/arkenstone/templates/.travis.yml.erb
133
- - lib/arkenstone/templates/Gemfile.erb
134
- - lib/arkenstone/templates/README.md.erb
135
- - lib/arkenstone/templates/_flashes.html.erb
136
- - lib/arkenstone/templates/_form.html.erb
137
- - lib/arkenstone/templates/application.html.erb
138
- - lib/arkenstone/templates/application.scss
139
- - lib/arkenstone/templates/database.yml.erb
140
- - lib/arkenstone/templates/database_cleaner.rb
141
- - lib/arkenstone/templates/en.yml.erb
142
- - lib/arkenstone/templates/factories.rb
143
- - lib/arkenstone/templates/high_voltage.rb
144
- - lib/arkenstone/templates/home.html.erb
145
- - lib/arkenstone/templates/rails
146
- - lib/arkenstone/templates/rails_helper.rb
147
- - lib/arkenstone/templates/rake
148
- - lib/arkenstone/templates/simple_form.en.yml
149
- - lib/arkenstone/templates/simple_form.rb
150
- - lib/arkenstone/templates/spring
151
- - lib/arkenstone/templates/user.rb
122
+ - lib/arkenstone/forge.rb
123
+ - lib/arkenstone/templates/Vagrantfile.erb
124
+ - lib/arkenstone/templates/ansible/roles/base/tasks/main.yml
125
+ - lib/arkenstone/templates/ansible/roles/postgresql/tasks/main.yml
126
+ - lib/arkenstone/templates/ansible/roles/rails/defaults/main.yml
127
+ - lib/arkenstone/templates/ansible/roles/rails/tasks/main.yml
128
+ - lib/arkenstone/templates/ansible/roles/ruby/defaults/main.yml
129
+ - lib/arkenstone/templates/ansible/roles/ruby/tasks/main.yml
130
+ - lib/arkenstone/templates/ansible/site.yml
152
131
  - lib/arkenstone/version.rb
132
+ - ruby.yml
153
133
  - spec/arkenstone_spec.rb
154
134
  - spec/features/new_project_spec.rb
155
- - spec/features/new_project_with_authentication_spec.rb
135
+ - spec/features/new_project_with_ansible_spec.rb
136
+ - spec/features/new_project_with_ubuntu_trusty_spec.rb
137
+ - spec/features/new_project_with_virtualbox_spec.rb
156
138
  - spec/spec_helper.rb
157
139
  - spec/support/features/new_project.rb
158
140
  homepage: https://github.com/ngscheurich/arkenstone
@@ -175,9 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
157
  version: '0'
176
158
  requirements: []
177
159
  rubyforge_project:
178
- rubygems_version: 2.5.2
160
+ rubygems_version: 2.5.1
179
161
  signing_key:
180
162
  specification_version: 4
181
- summary: A Rails bootstrapper
163
+ summary: A Rails development environment generator
182
164
  test_files: []
183
- has_rdoc:
@@ -1,19 +0,0 @@
1
- ---
2
- engines:
3
- bundler-audit:
4
- enabled: true
5
- duplication:
6
- enabled: true
7
- config:
8
- languages:
9
- - ruby
10
- fixme:
11
- enabled: true
12
- rubocop:
13
- enabled: true
14
- ratings:
15
- paths:
16
- - Gemfile.lock
17
- - "**.rb"
18
- exclude_paths:
19
- - spec/
@@ -1,1148 +0,0 @@
1
- AllCops:
2
- DisabledByDefault: true
3
-
4
- #################### Lint ################################
5
-
6
- Lint/AmbiguousOperator:
7
- Description: >-
8
- Checks for ambiguous operators in the first argument of a
9
- method invocation without parentheses.
10
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
11
- Enabled: true
12
-
13
- Lint/AmbiguousRegexpLiteral:
14
- Description: >-
15
- Checks for ambiguous regexp literals in the first argument of
16
- a method invocation without parenthesis.
17
- Enabled: true
18
-
19
- Lint/AssignmentInCondition:
20
- Description: "Don't use assignment in conditions."
21
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
22
- Enabled: true
23
-
24
- Lint/BlockAlignment:
25
- Description: 'Align block ends correctly.'
26
- Enabled: true
27
-
28
- Lint/CircularArgumentReference:
29
- Description: "Don't refer to the keyword argument in the default value."
30
- Enabled: true
31
-
32
- Lint/ConditionPosition:
33
- Description: >-
34
- Checks for condition placed in a confusing position relative to
35
- the keyword.
36
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
37
- Enabled: true
38
-
39
- Lint/Debugger:
40
- Description: 'Check for debugger calls.'
41
- Enabled: true
42
-
43
- Lint/DefEndAlignment:
44
- Description: 'Align ends corresponding to defs correctly.'
45
- Enabled: true
46
-
47
- Lint/DeprecatedClassMethods:
48
- Description: 'Check for deprecated class method calls.'
49
- Enabled: true
50
-
51
- Lint/DuplicateMethods:
52
- Description: 'Check for duplicate methods calls.'
53
- Enabled: true
54
-
55
- Lint/EachWithObjectArgument:
56
- Description: 'Check for immutable argument given to each_with_object.'
57
- Enabled: true
58
-
59
- Lint/ElseLayout:
60
- Description: 'Check for odd code arrangement in an else block.'
61
- Enabled: true
62
-
63
- Lint/EmptyEnsure:
64
- Description: 'Checks for empty ensure block.'
65
- Enabled: true
66
-
67
- Lint/EmptyInterpolation:
68
- Description: 'Checks for empty string interpolation.'
69
- Enabled: true
70
-
71
- Lint/EndAlignment:
72
- Description: 'Align ends correctly.'
73
- Enabled: true
74
-
75
- Lint/EndInMethod:
76
- Description: 'END blocks should not be placed inside method definitions.'
77
- Enabled: true
78
-
79
- Lint/EnsureReturn:
80
- Description: 'Do not use return in an ensure block.'
81
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
82
- Enabled: true
83
-
84
- Lint/Eval:
85
- Description: 'The use of eval represents a serious security risk.'
86
- Enabled: true
87
-
88
- Lint/FormatParameterMismatch:
89
- Description: 'The number of parameters to format/sprint must match the fields.'
90
- Enabled: true
91
-
92
- Lint/HandleExceptions:
93
- Description: "Don't suppress exception."
94
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
95
- Enabled: true
96
-
97
- Lint/InvalidCharacterLiteral:
98
- Description: >-
99
- Checks for invalid character literals with a non-escaped
100
- whitespace character.
101
- Enabled: true
102
-
103
- Lint/LiteralInCondition:
104
- Description: 'Checks of literals used in conditions.'
105
- Enabled: true
106
-
107
- Lint/LiteralInInterpolation:
108
- Description: 'Checks for literals used in interpolation.'
109
- Enabled: true
110
-
111
- Lint/Loop:
112
- Description: >-
113
- Use Kernel#loop with break rather than begin/end/until or
114
- begin/end/while for post-loop tests.
115
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
116
- Enabled: true
117
-
118
- Lint/NestedMethodDefinition:
119
- Description: 'Do not use nested method definitions.'
120
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
121
- Enabled: true
122
-
123
- Lint/NonLocalExitFromIterator:
124
- Description: 'Do not use return in iterator to cause non-local exit.'
125
- Enabled: true
126
-
127
- Lint/ParenthesesAsGroupedExpression:
128
- Description: >-
129
- Checks for method calls with a space before the opening
130
- parenthesis.
131
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
132
- Enabled: true
133
-
134
- Lint/RequireParentheses:
135
- Description: >-
136
- Use parentheses in the method call to avoid confusion
137
- about precedence.
138
- Enabled: true
139
-
140
- Lint/RescueException:
141
- Description: 'Avoid rescuing the Exception class.'
142
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
143
- Enabled: true
144
-
145
- Lint/ShadowingOuterLocalVariable:
146
- Description: >-
147
- Do not use the same name as outer local variable
148
- for block arguments or block local variables.
149
- Enabled: true
150
-
151
- Style/SpaceBeforeFirstArg:
152
- Description: >-
153
- Put a space between a method name and the first argument
154
- in a method call without parentheses.
155
- Enabled: true
156
-
157
- Lint/StringConversionInInterpolation:
158
- Description: 'Checks for Object#to_s usage in string interpolation.'
159
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
160
- Enabled: true
161
-
162
- Lint/UnderscorePrefixedVariableName:
163
- Description: 'Do not use prefix `_` for a variable that is used.'
164
- Enabled: true
165
-
166
- Lint/UnneededDisable:
167
- Description: >-
168
- Checks for rubocop:disable comments that can be removed.
169
- Note: this cop is not disabled when disabling all cops.
170
- It must be explicitly disabled.
171
- Enabled: true
172
-
173
- Lint/UnusedBlockArgument:
174
- Description: 'Checks for unused block arguments.'
175
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
176
- Enabled: true
177
-
178
- Lint/UnusedMethodArgument:
179
- Description: 'Checks for unused method arguments.'
180
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
181
- Enabled: true
182
-
183
- Lint/UnreachableCode:
184
- Description: 'Unreachable code.'
185
- Enabled: true
186
-
187
- Lint/UselessAccessModifier:
188
- Description: 'Checks for useless access modifiers.'
189
- Enabled: true
190
-
191
- Lint/UselessAssignment:
192
- Description: 'Checks for useless assignment to a local variable.'
193
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
194
- Enabled: true
195
-
196
- Lint/UselessComparison:
197
- Description: 'Checks for comparison of something with itself.'
198
- Enabled: true
199
-
200
- Lint/UselessElseWithoutRescue:
201
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
202
- Enabled: true
203
-
204
- Lint/UselessSetterCall:
205
- Description: 'Checks for useless setter call to a local variable.'
206
- Enabled: true
207
-
208
- Lint/Void:
209
- Description: 'Possible use of operator/literal/variable in void context.'
210
- Enabled: true
211
-
212
- ###################### Metrics ####################################
213
-
214
- Metrics/AbcSize:
215
- Description: >-
216
- A calculated magnitude based on number of assignments,
217
- branches, and conditions.
218
- Reference: 'http://c2.com/cgi/wiki?AbcMetric'
219
- Enabled: false
220
- Max: 20
221
-
222
- Metrics/BlockNesting:
223
- Description: 'Avoid excessive block nesting'
224
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
225
- Enabled: true
226
- Max: 4
227
-
228
- Metrics/ClassLength:
229
- Description: 'Avoid classes longer than 250 lines of code.'
230
- Enabled: true
231
- Max: 250
232
-
233
- Metrics/CyclomaticComplexity:
234
- Description: >-
235
- A complexity metric that is strongly correlated to the number
236
- of test cases needed to validate a method.
237
- Enabled: true
238
-
239
- Metrics/LineLength:
240
- Description: 'Limit lines to 80 characters.'
241
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
242
- Enabled: false
243
-
244
- Metrics/MethodLength:
245
- Description: 'Avoid methods longer than 30 lines of code.'
246
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
247
- Enabled: true
248
- Max: 30
249
-
250
- Metrics/ModuleLength:
251
- Description: 'Avoid modules longer than 250 lines of code.'
252
- Enabled: true
253
- Max: 250
254
-
255
- Metrics/ParameterLists:
256
- Description: 'Avoid parameter lists longer than three or four parameters.'
257
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
258
- Enabled: true
259
-
260
- Metrics/PerceivedComplexity:
261
- Description: >-
262
- A complexity metric geared towards measuring complexity for a
263
- human reader.
264
- Enabled: false
265
-
266
- ##################### Performance #############################
267
-
268
- Performance/Count:
269
- Description: >-
270
- Use `count` instead of `select...size`, `reject...size`,
271
- `select...count`, `reject...count`, `select...length`,
272
- and `reject...length`.
273
- Enabled: true
274
-
275
- Performance/Detect:
276
- Description: >-
277
- Use `detect` instead of `select.first`, `find_all.first`,
278
- `select.last`, and `find_all.last`.
279
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
280
- Enabled: true
281
-
282
- Performance/FlatMap:
283
- Description: >-
284
- Use `Enumerable#flat_map`
285
- instead of `Enumerable#map...Array#flatten(1)`
286
- or `Enumberable#collect..Array#flatten(1)`
287
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
288
- Enabled: true
289
- EnabledForFlattenWithoutParams: false
290
- # If enabled, this cop will warn about usages of
291
- # `flatten` being called without any parameters.
292
- # This can be dangerous since `flat_map` will only flatten 1 level, and
293
- # `flatten` without any parameters can flatten multiple levels.
294
-
295
- Performance/ReverseEach:
296
- Description: 'Use `reverse_each` instead of `reverse.each`.'
297
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
298
- Enabled: true
299
-
300
- Performance/Sample:
301
- Description: >-
302
- Use `sample` instead of `shuffle.first`,
303
- `shuffle.last`, and `shuffle[Fixnum]`.
304
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
305
- Enabled: true
306
-
307
- Performance/Size:
308
- Description: >-
309
- Use `size` instead of `count` for counting
310
- the number of elements in `Array` and `Hash`.
311
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
312
- Enabled: true
313
-
314
- Performance/StringReplacement:
315
- Description: >-
316
- Use `tr` instead of `gsub` when you are replacing the same
317
- number of characters. Use `delete` instead of `gsub` when
318
- you are deleting characters.
319
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
320
- Enabled: true
321
-
322
- ##################### Rails ##################################
323
-
324
- Rails/ActionFilter:
325
- Description: 'Enforces consistent use of action filter methods.'
326
- Enabled: false
327
-
328
- Rails/Date:
329
- Description: >-
330
- Checks the correct usage of date aware methods,
331
- such as Date.today, Date.current etc.
332
- Enabled: false
333
-
334
- Rails/Delegate:
335
- Description: 'Prefer delegate method for delegations.'
336
- Enabled: false
337
-
338
- Rails/FindBy:
339
- Description: 'Prefer find_by over where.first.'
340
- Enabled: false
341
-
342
- Rails/FindEach:
343
- Description: 'Prefer all.find_each over all.find.'
344
- Enabled: false
345
-
346
- Rails/HasAndBelongsToMany:
347
- Description: 'Prefer has_many :through to has_and_belongs_to_many.'
348
- Enabled: false
349
-
350
- Rails/Output:
351
- Description: 'Checks for calls to puts, print, etc.'
352
- Enabled: false
353
-
354
- Rails/ReadWriteAttribute:
355
- Description: >-
356
- Checks for read_attribute(:attr) and
357
- write_attribute(:attr, val).
358
- Enabled: false
359
-
360
- Rails/ScopeArgs:
361
- Description: 'Checks the arguments of ActiveRecord scopes.'
362
- Enabled: false
363
-
364
- Rails/TimeZone:
365
- Description: 'Checks the correct usage of time zone aware methods.'
366
- StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
367
- Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
368
- Enabled: false
369
-
370
- Rails/Validation:
371
- Description: 'Use validates :attribute, hash of validations.'
372
- Enabled: false
373
-
374
- ################## Style #################################
375
-
376
- Style/AccessModifierIndentation:
377
- Description: Check indentation of private/protected visibility modifiers.
378
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
379
- Enabled: false
380
-
381
- Style/AccessorMethodName:
382
- Description: Check the naming of accessor methods for get_/set_.
383
- Enabled: false
384
-
385
- Style/Alias:
386
- Description: 'Use alias_method instead of alias.'
387
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
388
- Enabled: false
389
-
390
- Style/AlignArray:
391
- Description: >-
392
- Align the elements of an array literal if they span more than
393
- one line.
394
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
395
- Enabled: false
396
-
397
- Style/AlignHash:
398
- Description: >-
399
- Align the elements of a hash literal if they span more than
400
- one line.
401
- Enabled: false
402
-
403
- Style/AlignParameters:
404
- Description: >-
405
- Align the parameters of a method call if they span more
406
- than one line.
407
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
408
- Enabled: false
409
-
410
- Style/AndOr:
411
- Description: 'Use &&/|| instead of and/or.'
412
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
413
- Enabled: false
414
-
415
- Style/ArrayJoin:
416
- Description: 'Use Array#join instead of Array#*.'
417
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
418
- Enabled: false
419
-
420
- Style/AsciiComments:
421
- Description: 'Use only ascii symbols in comments.'
422
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
423
- Enabled: false
424
-
425
- Style/AsciiIdentifiers:
426
- Description: 'Use only ascii symbols in identifiers.'
427
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
428
- Enabled: false
429
-
430
- Style/Attr:
431
- Description: 'Checks for uses of Module#attr.'
432
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
433
- Enabled: false
434
-
435
- Style/BeginBlock:
436
- Description: 'Avoid the use of BEGIN blocks.'
437
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
438
- Enabled: false
439
-
440
- Style/BarePercentLiterals:
441
- Description: 'Checks if usage of %() or %Q() matches configuration.'
442
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
443
- Enabled: false
444
-
445
- Style/BlockComments:
446
- Description: 'Do not use block comments.'
447
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
448
- Enabled: false
449
-
450
- Style/BlockEndNewline:
451
- Description: 'Put end statement of multiline block on its own line.'
452
- Enabled: false
453
-
454
- Style/BlockDelimiters:
455
- Description: >-
456
- Avoid using {...} for multi-line blocks (multiline chaining is
457
- always ugly).
458
- Prefer {...} over do...end for single-line blocks.
459
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
460
- Enabled: false
461
-
462
- Style/BracesAroundHashParameters:
463
- Description: 'Enforce braces style around hash parameters.'
464
- Enabled: false
465
-
466
- Style/CaseEquality:
467
- Description: 'Avoid explicit use of the case equality operator(===).'
468
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
469
- Enabled: false
470
-
471
- Style/CaseIndentation:
472
- Description: 'Indentation of when in a case/when/[else/]end.'
473
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
474
- Enabled: false
475
-
476
- Style/CharacterLiteral:
477
- Description: 'Checks for uses of character literals.'
478
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
479
- Enabled: false
480
-
481
- Style/ClassAndModuleCamelCase:
482
- Description: 'Use CamelCase for classes and modules.'
483
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
484
- Enabled: false
485
-
486
- Style/ClassAndModuleChildren:
487
- Description: 'Checks style of children classes and modules.'
488
- Enabled: false
489
-
490
- Style/ClassCheck:
491
- Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
492
- Enabled: false
493
-
494
- Style/ClassMethods:
495
- Description: 'Use self when defining module/class methods.'
496
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
497
- Enabled: false
498
-
499
- Style/ClassVars:
500
- Description: 'Avoid the use of class variables.'
501
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
502
- Enabled: false
503
-
504
- Style/ClosingParenthesisIndentation:
505
- Description: 'Checks the indentation of hanging closing parentheses.'
506
- Enabled: false
507
-
508
- Style/ColonMethodCall:
509
- Description: 'Do not use :: for method call.'
510
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
511
- Enabled: false
512
-
513
- Style/CommandLiteral:
514
- Description: 'Use `` or %x around command literals.'
515
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
516
- Enabled: false
517
-
518
- Style/CommentAnnotation:
519
- Description: >-
520
- Checks formatting of special comments
521
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
522
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
523
- Enabled: false
524
-
525
- Style/CommentIndentation:
526
- Description: 'Indentation of comments.'
527
- Enabled: false
528
-
529
- Style/ConstantName:
530
- Description: 'Constants should use SCREAMING_SNAKE_CASE.'
531
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
532
- Enabled: false
533
-
534
- Style/DefWithParentheses:
535
- Description: 'Use def with parentheses when there are arguments.'
536
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
537
- Enabled: false
538
-
539
- Style/DeprecatedHashMethods:
540
- Description: 'Checks for use of deprecated Hash methods.'
541
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
542
- Enabled: false
543
-
544
- Style/Documentation:
545
- Description: 'Document classes and non-namespace modules.'
546
- Enabled: false
547
-
548
- Style/DotPosition:
549
- Description: 'Checks the position of the dot in multi-line method calls.'
550
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
551
- Enabled: false
552
-
553
- Style/DoubleNegation:
554
- Description: 'Checks for uses of double negation (!!).'
555
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
556
- Enabled: false
557
-
558
- Style/EachWithObject:
559
- Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
560
- Enabled: false
561
-
562
- Style/ElseAlignment:
563
- Description: 'Align elses and elsifs correctly.'
564
- Enabled: false
565
-
566
- Style/EmptyElse:
567
- Description: 'Avoid empty else-clauses.'
568
- Enabled: false
569
-
570
- Style/EmptyLineBetweenDefs:
571
- Description: 'Use empty lines between defs.'
572
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
573
- Enabled: false
574
-
575
- Style/EmptyLines:
576
- Description: "Don't use several empty lines in a row."
577
- Enabled: false
578
-
579
- Style/EmptyLinesAroundAccessModifier:
580
- Description: "Keep blank lines around access modifiers."
581
- Enabled: false
582
-
583
- Style/EmptyLinesAroundBlockBody:
584
- Description: "Keeps track of empty lines around block bodies."
585
- Enabled: false
586
-
587
- Style/EmptyLinesAroundClassBody:
588
- Description: "Keeps track of empty lines around class bodies."
589
- Enabled: false
590
-
591
- Style/EmptyLinesAroundModuleBody:
592
- Description: "Keeps track of empty lines around module bodies."
593
- Enabled: false
594
-
595
- Style/EmptyLinesAroundMethodBody:
596
- Description: "Keeps track of empty lines around method bodies."
597
- Enabled: false
598
-
599
- Style/EmptyLiteral:
600
- Description: 'Prefer literals to Array.new/Hash.new/String.new.'
601
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
602
- Enabled: false
603
-
604
- Style/EndBlock:
605
- Description: 'Avoid the use of END blocks.'
606
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
607
- Enabled: false
608
-
609
- Style/EndOfLine:
610
- Description: 'Use Unix-style line endings.'
611
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
612
- Enabled: false
613
-
614
- Style/EvenOdd:
615
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
616
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
617
- Enabled: false
618
-
619
- Style/ExtraSpacing:
620
- Description: 'Do not use unnecessary spacing.'
621
- Enabled: false
622
-
623
- Style/FileName:
624
- Description: 'Use snake_case for source file names.'
625
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
626
- Enabled: false
627
-
628
- Style/InitialIndentation:
629
- Description: >-
630
- Checks the indentation of the first non-blank non-comment line in a file.
631
- Enabled: false
632
-
633
- Style/FirstParameterIndentation:
634
- Description: 'Checks the indentation of the first parameter in a method call.'
635
- Enabled: false
636
-
637
- Style/FlipFlop:
638
- Description: 'Checks for flip flops'
639
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
640
- Enabled: false
641
-
642
- Style/For:
643
- Description: 'Checks use of for or each in multiline loops.'
644
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
645
- Enabled: false
646
-
647
- Style/FormatString:
648
- Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
649
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
650
- Enabled: false
651
-
652
- Style/GlobalVars:
653
- Description: 'Do not introduce global variables.'
654
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
655
- Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
656
- Enabled: false
657
-
658
- Style/GuardClause:
659
- Description: 'Check for conditionals that can be replaced with guard clauses'
660
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
661
- Enabled: false
662
-
663
- Style/HashSyntax:
664
- Description: >-
665
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
666
- { :a => 1, :b => 2 }.
667
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
668
- Enabled: false
669
-
670
- Style/IfUnlessModifier:
671
- Description: >-
672
- Favor modifier if/unless usage when you have a
673
- single-line body.
674
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
675
- Enabled: false
676
-
677
- Style/IfWithSemicolon:
678
- Description: 'Do not use if x; .... Use the ternary operator instead.'
679
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
680
- Enabled: false
681
-
682
- Style/IndentationConsistency:
683
- Description: 'Keep indentation straight.'
684
- Enabled: false
685
-
686
- Style/IndentationWidth:
687
- Description: 'Use 2 spaces for indentation.'
688
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
689
- Enabled: false
690
-
691
- Style/IndentArray:
692
- Description: >-
693
- Checks the indentation of the first element in an array
694
- literal.
695
- Enabled: false
696
-
697
- Style/IndentHash:
698
- Description: 'Checks the indentation of the first key in a hash literal.'
699
- Enabled: false
700
-
701
- Style/InfiniteLoop:
702
- Description: 'Use Kernel#loop for infinite loops.'
703
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
704
- Enabled: false
705
-
706
- Style/Lambda:
707
- Description: 'Use the new lambda literal syntax for single-line blocks.'
708
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
709
- Enabled: false
710
-
711
- Style/LambdaCall:
712
- Description: 'Use lambda.call(...) instead of lambda.(...).'
713
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
714
- Enabled: false
715
-
716
- Style/LeadingCommentSpace:
717
- Description: 'Comments should start with a space.'
718
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
719
- Enabled: false
720
-
721
- Style/LineEndConcatenation:
722
- Description: >-
723
- Use \ instead of + or << to concatenate two string literals at
724
- line end.
725
- Enabled: false
726
-
727
- Style/MethodCallParentheses:
728
- Description: 'Do not use parentheses for method calls with no arguments.'
729
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
730
- Enabled: false
731
-
732
- Style/MethodDefParentheses:
733
- Description: >-
734
- Checks if the method definitions have or don't have
735
- parentheses.
736
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
737
- Enabled: false
738
-
739
- Style/MethodName:
740
- Description: 'Use the configured style when naming methods.'
741
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
742
- Enabled: false
743
-
744
- Style/ModuleFunction:
745
- Description: 'Checks for usage of `extend self` in modules.'
746
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
747
- Enabled: false
748
-
749
- Style/MultilineBlockChain:
750
- Description: 'Avoid multi-line chains of blocks.'
751
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
752
- Enabled: false
753
-
754
- Style/MultilineBlockLayout:
755
- Description: 'Ensures newlines after multiline block do statements.'
756
- Enabled: false
757
-
758
- Style/MultilineIfThen:
759
- Description: 'Do not use then for multi-line if/unless.'
760
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
761
- Enabled: false
762
-
763
- Style/MultilineOperationIndentation:
764
- Description: >-
765
- Checks indentation of binary operations that span more than
766
- one line.
767
- Enabled: false
768
-
769
- Style/MultilineTernaryOperator:
770
- Description: >-
771
- Avoid multi-line ?: (the ternary operator);
772
- use if/unless instead.
773
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
774
- Enabled: false
775
-
776
- Style/NegatedIf:
777
- Description: >-
778
- Favor unless over if for negative conditions
779
- (or control flow or).
780
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
781
- Enabled: false
782
-
783
- Style/NegatedWhile:
784
- Description: 'Favor until over while for negative conditions.'
785
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
786
- Enabled: false
787
-
788
- Style/NestedTernaryOperator:
789
- Description: 'Use one expression per branch in a ternary operator.'
790
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
791
- Enabled: false
792
-
793
- Style/Next:
794
- Description: 'Use `next` to skip iteration instead of a condition at the end.'
795
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
796
- Enabled: false
797
-
798
- Style/NilComparison:
799
- Description: 'Prefer x.nil? to x == nil.'
800
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
801
- Enabled: false
802
-
803
- Style/NonNilCheck:
804
- Description: 'Checks for redundant nil checks.'
805
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
806
- Enabled: false
807
-
808
- Style/Not:
809
- Description: 'Use ! instead of not.'
810
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
811
- Enabled: false
812
-
813
- Style/NumericLiterals:
814
- Description: >-
815
- Add underscores to large numeric literals to improve their
816
- readability.
817
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
818
- Enabled: false
819
-
820
- Style/OneLineConditional:
821
- Description: >-
822
- Favor the ternary operator(?:) over
823
- if/then/else/end constructs.
824
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
825
- Enabled: false
826
-
827
- Style/OpMethod:
828
- Description: 'When defining binary operators, name the argument other.'
829
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
830
- Enabled: false
831
-
832
- Style/OptionalArguments:
833
- Description: >-
834
- Checks for optional arguments that do not appear at the end
835
- of the argument list
836
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
837
- Enabled: false
838
-
839
- Style/ParenthesesAroundCondition:
840
- Description: >-
841
- Don't use parentheses around the condition of an
842
- if/unless/while.
843
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
844
- Enabled: false
845
-
846
- Style/PercentLiteralDelimiters:
847
- Description: 'Use `%`-literal delimiters consistently'
848
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
849
- Enabled: false
850
-
851
- Style/PercentQLiterals:
852
- Description: 'Checks if uses of %Q/%q match the configured preference.'
853
- Enabled: false
854
-
855
- Style/PerlBackrefs:
856
- Description: 'Avoid Perl-style regex back references.'
857
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
858
- Enabled: false
859
-
860
- Style/PredicateName:
861
- Description: 'Check the names of predicate methods.'
862
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
863
- Enabled: false
864
-
865
- Style/Proc:
866
- Description: 'Use proc instead of Proc.new.'
867
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
868
- Enabled: false
869
-
870
- Style/RaiseArgs:
871
- Description: 'Checks the arguments passed to raise/fail.'
872
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
873
- Enabled: false
874
-
875
- Style/RedundantBegin:
876
- Description: "Don't use begin blocks when they are not needed."
877
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
878
- Enabled: false
879
-
880
- Style/RedundantException:
881
- Description: "Checks for an obsolete RuntimeException argument in raise/fail."
882
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
883
- Enabled: false
884
-
885
- Style/RedundantReturn:
886
- Description: "Don't use return where it's not required."
887
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
888
- Enabled: false
889
-
890
- Style/RedundantSelf:
891
- Description: "Don't use self where it's not needed."
892
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
893
- Enabled: false
894
-
895
- Style/RegexpLiteral:
896
- Description: 'Use / or %r around regular expressions.'
897
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
898
- Enabled: false
899
-
900
- Style/RescueEnsureAlignment:
901
- Description: 'Align rescues and ensures correctly.'
902
- Enabled: false
903
-
904
- Style/RescueModifier:
905
- Description: 'Avoid using rescue in its modifier form.'
906
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
907
- Enabled: false
908
-
909
- Style/SelfAssignment:
910
- Description: >-
911
- Checks for places where self-assignment shorthand should have
912
- been used.
913
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
914
- Enabled: false
915
-
916
- Style/Semicolon:
917
- Description: "Don't use semicolons to terminate expressions."
918
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
919
- Enabled: false
920
-
921
- Style/SignalException:
922
- Description: 'Checks for proper usage of fail and raise.'
923
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
924
- Enabled: false
925
-
926
- Style/SingleLineBlockParams:
927
- Description: 'Enforces the names of some block params.'
928
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
929
- Enabled: false
930
-
931
- Style/SingleLineMethods:
932
- Description: 'Avoid single-line methods.'
933
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
934
- Enabled: false
935
-
936
- Style/SpaceAfterColon:
937
- Description: 'Use spaces after colons.'
938
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
939
- Enabled: false
940
-
941
- Style/SpaceAfterComma:
942
- Description: 'Use spaces after commas.'
943
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
944
- Enabled: false
945
-
946
- Style/SpaceAfterControlKeyword:
947
- Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
948
- Enabled: false
949
-
950
- Style/SpaceAfterMethodName:
951
- Description: >-
952
- Do not put a space between a method name and the opening
953
- parenthesis in a method definition.
954
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
955
- Enabled: false
956
-
957
- Style/SpaceAfterNot:
958
- Description: Tracks redundant space after the ! operator.
959
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
960
- Enabled: false
961
-
962
- Style/SpaceAfterSemicolon:
963
- Description: 'Use spaces after semicolons.'
964
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
965
- Enabled: false
966
-
967
- Style/SpaceBeforeBlockBraces:
968
- Description: >-
969
- Checks that the left block brace has or doesn't have space
970
- before it.
971
- Enabled: false
972
-
973
- Style/SpaceBeforeComma:
974
- Description: 'No spaces before commas.'
975
- Enabled: false
976
-
977
- Style/SpaceBeforeComment:
978
- Description: >-
979
- Checks for missing space between code and a comment on the
980
- same line.
981
- Enabled: false
982
-
983
- Style/SpaceBeforeSemicolon:
984
- Description: 'No spaces before semicolons.'
985
- Enabled: false
986
-
987
- Style/SpaceInsideBlockBraces:
988
- Description: >-
989
- Checks that block braces have or don't have surrounding space.
990
- For blocks taking parameters, checks that the left brace has
991
- or doesn't have trailing space.
992
- Enabled: false
993
-
994
- Style/SpaceAroundBlockParameters:
995
- Description: 'Checks the spacing inside and after block parameters pipes.'
996
- Enabled: false
997
-
998
- Style/SpaceAroundEqualsInParameterDefault:
999
- Description: >-
1000
- Checks that the equals signs in parameter default assignments
1001
- have or don't have surrounding space depending on
1002
- configuration.
1003
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
1004
- Enabled: false
1005
-
1006
- Style/SpaceAroundOperators:
1007
- Description: 'Use a single space around operators.'
1008
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1009
- Enabled: false
1010
-
1011
- Style/SpaceBeforeModifierKeyword:
1012
- Description: 'Put a space before the modifier keyword.'
1013
- Enabled: false
1014
-
1015
- Style/SpaceInsideBrackets:
1016
- Description: 'No spaces after [ or before ].'
1017
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1018
- Enabled: false
1019
-
1020
- Style/SpaceInsideHashLiteralBraces:
1021
- Description: "Use spaces inside hash literal braces - or don't."
1022
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1023
- Enabled: false
1024
-
1025
- Style/SpaceInsideParens:
1026
- Description: 'No spaces after ( or before ).'
1027
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1028
- Enabled: false
1029
-
1030
- Style/SpaceInsideRangeLiteral:
1031
- Description: 'No spaces inside range literals.'
1032
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1033
- Enabled: false
1034
-
1035
- Style/SpaceInsideStringInterpolation:
1036
- Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1037
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1038
- Enabled: false
1039
-
1040
- Style/SpecialGlobalVars:
1041
- Description: 'Avoid Perl-style global variables.'
1042
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
1043
- Enabled: false
1044
-
1045
- Style/StringLiterals:
1046
- Description: 'Checks if uses of quotes match the configured preference.'
1047
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1048
- Enabled: false
1049
-
1050
- Style/StringLiteralsInInterpolation:
1051
- Description: >-
1052
- Checks if uses of quotes inside expressions in interpolated
1053
- strings match the configured preference.
1054
- Enabled: false
1055
-
1056
- Style/StructInheritance:
1057
- Description: 'Checks for inheritance from Struct.new.'
1058
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1059
- Enabled: false
1060
-
1061
- Style/SymbolLiteral:
1062
- Description: 'Use plain symbols instead of string symbols when possible.'
1063
- Enabled: false
1064
-
1065
- Style/SymbolProc:
1066
- Description: 'Use symbols as procs instead of blocks when possible.'
1067
- Enabled: false
1068
-
1069
- Style/Tab:
1070
- Description: 'No hard tabs.'
1071
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1072
- Enabled: false
1073
-
1074
- Style/TrailingBlankLines:
1075
- Description: 'Checks trailing blank lines and final newline.'
1076
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1077
- Enabled: false
1078
-
1079
- Style/TrailingCommaInLiteral:
1080
- Description: 'Checks for trailing comma in parameter lists and literals.'
1081
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1082
- Enabled: false
1083
-
1084
- Style/TrailingWhitespace:
1085
- Description: 'Avoid trailing whitespace.'
1086
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1087
- Enabled: false
1088
-
1089
- Style/TrivialAccessors:
1090
- Description: 'Prefer attr_* methods to trivial readers/writers.'
1091
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1092
- Enabled: false
1093
-
1094
- Style/UnlessElse:
1095
- Description: >-
1096
- Do not use unless with else. Rewrite these with the positive
1097
- case first.
1098
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1099
- Enabled: false
1100
-
1101
- Style/UnneededCapitalW:
1102
- Description: 'Checks for %W when interpolation is not needed.'
1103
- Enabled: false
1104
-
1105
- Style/UnneededPercentQ:
1106
- Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1107
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1108
- Enabled: false
1109
-
1110
- Style/TrailingUnderscoreVariable:
1111
- Description: >-
1112
- Checks for the usage of unneeded trailing underscores at the
1113
- end of parallel variable assignment.
1114
- Enabled: false
1115
-
1116
- Style/VariableInterpolation:
1117
- Description: >-
1118
- Don't interpolate global, instance and class variables
1119
- directly in strings.
1120
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1121
- Enabled: false
1122
-
1123
- Style/VariableName:
1124
- Description: 'Use the configured style when naming variables.'
1125
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1126
- Enabled: false
1127
-
1128
- Style/WhenThen:
1129
- Description: 'Use when x then ... for one-line cases.'
1130
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1131
- Enabled: false
1132
-
1133
- Style/WhileUntilDo:
1134
- Description: 'Checks for redundant do after while or until.'
1135
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1136
- Enabled: false
1137
-
1138
- Style/WhileUntilModifier:
1139
- Description: >-
1140
- Favor modifier while/until usage when you have a
1141
- single-line body.
1142
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1143
- Enabled: false
1144
-
1145
- Style/WordArray:
1146
- Description: 'Use %w or %W for arrays of words.'
1147
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1148
- Enabled: false