rf-stylez 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/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +3 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/rf/stylez.rb +7 -0
- data/lib/rf/stylez/version.rb +5 -0
- data/rf-stylez.gemspec +24 -0
- data/ruby/rubocop.yml +47 -0
- data/ruby/rubocop_lint.yml +233 -0
- metadata +85 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1219ef53392c4e1c9ae1782562666ea016856fbc
|
4
|
+
data.tar.gz: d07108670b18aa3c0f458fcf50726d4837639a19
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 67f18f5b0db9a78cb80f653666e2c0e89c1df9350d027b2600933aa47f843ab384835cc3f172fdc6c569729edbe9a08c59b4ce8190ad9093feb198a2ce110805
|
7
|
+
data.tar.gz: 90277f5dca69dd0c761814f859490dab0d069a0f85bb34c7a19b4aca47d76f7dc4d1a5fda326d8d181730bbfd4834f06b34c0bba7a7207059060db8dcc35e8ac
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Rainforest QA
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rf/stylez"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/rf/stylez.rb
ADDED
data/rf-stylez.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rf/stylez/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rf-stylez'
|
8
|
+
spec.version = Rf::Stylez::VERSION
|
9
|
+
spec.authors = ['Emanuel Evans']
|
10
|
+
spec.email = ['emanuel@rainforestqa.com']
|
11
|
+
spec.license = 'MIT'
|
12
|
+
|
13
|
+
spec.summary = %q{Styles for Rainforest code}
|
14
|
+
spec.description = 'Configurations for Rubocop and other style enforcers/linters'
|
15
|
+
spec.homepage = 'https://github.com/rainforestapp/rf-stylez'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = 'exe'
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
end
|
data/ruby/rubocop.yml
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
DisabledByDefault: true
|
4
|
+
Include:
|
5
|
+
- '**/Rakefile'
|
6
|
+
- '**/config.ru'
|
7
|
+
- '**/Gemfile'
|
8
|
+
Exclude:
|
9
|
+
- 'db/**/*'
|
10
|
+
- 'config/**/*'
|
11
|
+
- 'script/**/*'
|
12
|
+
- 'bin/**/*'
|
13
|
+
inherit_from:
|
14
|
+
./rubocop_lint.yml
|
15
|
+
|
16
|
+
# Good style cops
|
17
|
+
Style/TrailingBlankLines:
|
18
|
+
Enabled: true
|
19
|
+
Style/TrailingWhitespace:
|
20
|
+
Enabled: true
|
21
|
+
Style/FrozenStringLiteralComment:
|
22
|
+
Enabled: true
|
23
|
+
EnforcedStyle: always
|
24
|
+
Style/BlockDelimiters:
|
25
|
+
Enabled: true
|
26
|
+
Style/MethodName:
|
27
|
+
Enabled: true
|
28
|
+
Style/DefWithParentheses:
|
29
|
+
Enabled: true
|
30
|
+
Style/MethodCallParentheses:
|
31
|
+
Enabled: true
|
32
|
+
Style/InfiniteLoop:
|
33
|
+
Enabled: true
|
34
|
+
Style/EmptyLineBetweenDefs:
|
35
|
+
Enabled: true
|
36
|
+
Style/StringLiterals:
|
37
|
+
Enabled: true
|
38
|
+
Style/AndOr:
|
39
|
+
Enabled: true
|
40
|
+
Style/Not:
|
41
|
+
Enabled: true
|
42
|
+
Style/IndentationWidth:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
# Dumb lint cops
|
46
|
+
Lint/AmbiguousOperator:
|
47
|
+
Enabled: false
|
@@ -0,0 +1,233 @@
|
|
1
|
+
Lint/AmbiguousOperator:
|
2
|
+
Description: >-
|
3
|
+
Checks for ambiguous operators in the first argument of a
|
4
|
+
method invocation without parentheses.
|
5
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
6
|
+
Enabled: true
|
7
|
+
|
8
|
+
Lint/AmbiguousRegexpLiteral:
|
9
|
+
Description: >-
|
10
|
+
Checks for ambiguous regexp literals in the first argument of
|
11
|
+
a method invocation without parentheses.
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
Lint/AssignmentInCondition:
|
15
|
+
Description: "Don't use assignment in conditions."
|
16
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Lint/BlockAlignment:
|
20
|
+
Description: 'Align block ends correctly.'
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Lint/CircularArgumentReference:
|
24
|
+
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Lint/ConditionPosition:
|
28
|
+
Description: >-
|
29
|
+
Checks for condition placed in a confusing position relative to
|
30
|
+
the keyword.
|
31
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Lint/Debugger:
|
35
|
+
Description: 'Check for debugger calls.'
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
Lint/DefEndAlignment:
|
39
|
+
Description: 'Align ends corresponding to defs correctly.'
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Lint/DeprecatedClassMethods:
|
43
|
+
Description: 'Check for deprecated class method calls.'
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
Lint/DuplicateMethods:
|
47
|
+
Description: 'Check for duplicate method definitions.'
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Lint/DuplicatedKey:
|
51
|
+
Description: 'Check for duplicate keys in hash literals.'
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Lint/EachWithObjectArgument:
|
55
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Lint/ElseLayout:
|
59
|
+
Description: 'Check for odd code arrangement in an else block.'
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Lint/EmptyEnsure:
|
63
|
+
Description: 'Checks for empty ensure block.'
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Lint/EmptyInterpolation:
|
67
|
+
Description: 'Checks for empty string interpolation.'
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
Lint/EndAlignment:
|
71
|
+
Description: 'Align ends correctly.'
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Lint/EndInMethod:
|
75
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Lint/EnsureReturn:
|
79
|
+
Description: 'Do not use return in an ensure block.'
|
80
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Lint/Eval:
|
84
|
+
Description: 'The use of eval represents a serious security risk.'
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Lint/FloatOutOfRange:
|
88
|
+
Description: >-
|
89
|
+
Catches floating-point literals too large or small for Ruby to
|
90
|
+
represent.
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Lint/FormatParameterMismatch:
|
94
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
95
|
+
Enabled: true
|
96
|
+
|
97
|
+
Lint/HandleExceptions:
|
98
|
+
Description: "Don't suppress exception."
|
99
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
100
|
+
Enabled: true
|
101
|
+
|
102
|
+
Lint/ImplicitStringConcatenation:
|
103
|
+
Description: >-
|
104
|
+
Checks for adjacent string literals on the same line, which
|
105
|
+
could better be represented as a single string literal.
|
106
|
+
Enabled: true
|
107
|
+
|
108
|
+
Lint/IneffectiveAccessModifier:
|
109
|
+
Description: >-
|
110
|
+
Checks for attempts to use `private` or `protected` to set
|
111
|
+
the visibility of a class method, which does not work.
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Lint/InvalidCharacterLiteral:
|
115
|
+
Description: >-
|
116
|
+
Checks for invalid character literals with a non-escaped
|
117
|
+
whitespace character.
|
118
|
+
Enabled: true
|
119
|
+
|
120
|
+
Lint/LiteralInCondition:
|
121
|
+
Description: 'Checks of literals used in conditions.'
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Lint/LiteralInInterpolation:
|
125
|
+
Description: 'Checks for literals used in interpolation.'
|
126
|
+
Enabled: true
|
127
|
+
|
128
|
+
Lint/Loop:
|
129
|
+
Description: >-
|
130
|
+
Use Kernel#loop with break rather than begin/end/until or
|
131
|
+
begin/end/while for post-loop tests.
|
132
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Lint/NestedMethodDefinition:
|
136
|
+
Description: 'Do not use nested method definitions.'
|
137
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Lint/NextWithoutAccumulator:
|
141
|
+
Description: >-
|
142
|
+
Do not omit the accumulator when calling `next`
|
143
|
+
in a `reduce`/`inject` block.
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Lint/NonLocalExitFromIterator:
|
147
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Lint/ParenthesesAsGroupedExpression:
|
151
|
+
Description: >-
|
152
|
+
Checks for method calls with a space before the opening
|
153
|
+
parenthesis.
|
154
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
155
|
+
Enabled: true
|
156
|
+
|
157
|
+
Lint/RandOne:
|
158
|
+
Description: >-
|
159
|
+
Checks for `rand(1)` calls. Such calls always return `0`
|
160
|
+
and most likely a mistake.
|
161
|
+
Enabled: true
|
162
|
+
|
163
|
+
Lint/RequireParentheses:
|
164
|
+
Description: >-
|
165
|
+
Use parentheses in the method call to avoid confusion
|
166
|
+
about precedence.
|
167
|
+
Enabled: true
|
168
|
+
|
169
|
+
Lint/RescueException:
|
170
|
+
Description: 'Avoid rescuing the Exception class.'
|
171
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
172
|
+
Enabled: true
|
173
|
+
|
174
|
+
Lint/ShadowingOuterLocalVariable:
|
175
|
+
Description: >-
|
176
|
+
Do not use the same name as outer local variable
|
177
|
+
for block arguments or block local variables.
|
178
|
+
Enabled: true
|
179
|
+
|
180
|
+
Lint/StringConversionInInterpolation:
|
181
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
182
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
183
|
+
Enabled: true
|
184
|
+
|
185
|
+
Lint/UnderscorePrefixedVariableName:
|
186
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
Lint/UnneededDisable:
|
190
|
+
Description: >-
|
191
|
+
Checks for rubocop:disable comments that can be removed.
|
192
|
+
Note: this cop is not disabled when disabling all cops.
|
193
|
+
It must be explicitly disabled.
|
194
|
+
Enabled: true
|
195
|
+
|
196
|
+
Lint/UnusedBlockArgument:
|
197
|
+
Description: 'Checks for unused block arguments.'
|
198
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
199
|
+
Enabled: true
|
200
|
+
|
201
|
+
Lint/UnusedMethodArgument:
|
202
|
+
Description: 'Checks for unused method arguments.'
|
203
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
204
|
+
Enabled: true
|
205
|
+
|
206
|
+
Lint/UnreachableCode:
|
207
|
+
Description: 'Unreachable code.'
|
208
|
+
Enabled: true
|
209
|
+
|
210
|
+
Lint/UselessAccessModifier:
|
211
|
+
Description: 'Checks for useless access modifiers.'
|
212
|
+
Enabled: true
|
213
|
+
|
214
|
+
Lint/UselessAssignment:
|
215
|
+
Description: 'Checks for useless assignment to a local variable.'
|
216
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
217
|
+
Enabled: true
|
218
|
+
|
219
|
+
Lint/UselessComparison:
|
220
|
+
Description: 'Checks for comparison of something with itself.'
|
221
|
+
Enabled: true
|
222
|
+
|
223
|
+
Lint/UselessElseWithoutRescue:
|
224
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
225
|
+
Enabled: true
|
226
|
+
|
227
|
+
Lint/UselessSetterCall:
|
228
|
+
Description: 'Checks for useless setter call to a local variable.'
|
229
|
+
Enabled: true
|
230
|
+
|
231
|
+
Lint/Void:
|
232
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
233
|
+
Enabled: true
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rf-stylez
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Emanuel Evans
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Configurations for Rubocop and other style enforcers/linters
|
42
|
+
email:
|
43
|
+
- emanuel@rainforestqa.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- bin/console
|
55
|
+
- bin/setup
|
56
|
+
- lib/rf/stylez.rb
|
57
|
+
- lib/rf/stylez/version.rb
|
58
|
+
- rf-stylez.gemspec
|
59
|
+
- ruby/rubocop.yml
|
60
|
+
- ruby/rubocop_lint.yml
|
61
|
+
homepage: https://github.com/rainforestapp/rf-stylez
|
62
|
+
licenses:
|
63
|
+
- MIT
|
64
|
+
metadata: {}
|
65
|
+
post_install_message:
|
66
|
+
rdoc_options: []
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 2.5.1
|
82
|
+
signing_key:
|
83
|
+
specification_version: 4
|
84
|
+
summary: Styles for Rainforest code
|
85
|
+
test_files: []
|