bq_factory 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/.env.sample +2 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.rubocop.yml +609 -0
- data/.travis.yml +11 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +132 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bq_factory.gemspec +31 -0
- data/lib/bq_factory/attribute.rb +32 -0
- data/lib/bq_factory/client.rb +56 -0
- data/lib/bq_factory/configuration.rb +13 -0
- data/lib/bq_factory/dsl.rb +15 -0
- data/lib/bq_factory/errors.rb +3 -0
- data/lib/bq_factory/query_builder.rb +17 -0
- data/lib/bq_factory/record.rb +63 -0
- data/lib/bq_factory/registory.rb +40 -0
- data/lib/bq_factory/registory_decorator.rb +27 -0
- data/lib/bq_factory/version.rb +3 -0
- data/lib/bq_factory.rb +76 -0
- metadata +194 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3bc8211483c62a953a3cc99c9ee1dd9073bfcdae
|
4
|
+
data.tar.gz: b7b7db7ed189385e5911144cdf5d96da4308ba95
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ed059d60e5a56227512a74c6443b34b4091125be7c127e9757e766a4a5af228c84065965b83236fed43f6f5c63f602aeadc489be58b4c208400c72744f184298
|
7
|
+
data.tar.gz: f982725b904d52ca2b6b24a48e47fee668270273b9c825a35b978742a0c9688dcd639d2433464121158dc92839be5abfa9a6284935acf8daab64a05a970a4ebf
|
data/.env.sample
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,609 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3
|
3
|
+
Exclude:
|
4
|
+
- "vendor/**/*"
|
5
|
+
- "lib/bq_factory/version.rb"
|
6
|
+
- "Rakefile"
|
7
|
+
- "Gemfile"
|
8
|
+
- "Guardfile"
|
9
|
+
- "bq_factory.gemspec"
|
10
|
+
DisplayCopNames: true
|
11
|
+
|
12
|
+
Rails:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Style/AccessorMethodName:
|
16
|
+
Description: Check the naming of accessor methods for get_/set_.
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Style/Alias:
|
20
|
+
Description: 'Use alias_method instead of alias.'
|
21
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/ArrayJoin:
|
25
|
+
Description: 'Use Array#join instead of Array#*.'
|
26
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/AsciiComments:
|
30
|
+
Description: 'Use only ascii symbols in comments.'
|
31
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/AsciiIdentifiers:
|
35
|
+
Description: 'Use only ascii symbols in identifiers.'
|
36
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/Attr:
|
40
|
+
Description: 'Checks for uses of Module#attr.'
|
41
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Metrics/BlockNesting:
|
45
|
+
Description: 'Avoid excessive block nesting'
|
46
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Style/CaseEquality:
|
50
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
51
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/CharacterLiteral:
|
55
|
+
Description: 'Checks for uses of character literals.'
|
56
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Style/ClassAndModuleChildren:
|
60
|
+
Description: 'Checks style of children classes and modules.'
|
61
|
+
Enabled: true
|
62
|
+
EnforcedStyle: nested
|
63
|
+
|
64
|
+
Metrics/ClassLength:
|
65
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Metrics/ModuleLength:
|
69
|
+
Description: 'Avoid modules longer than 100 lines of code.'
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Style/ClassVars:
|
73
|
+
Description: 'Avoid the use of class variables.'
|
74
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
Style/CollectionMethods:
|
78
|
+
Enabled: true
|
79
|
+
PreferredMethods:
|
80
|
+
find: detect
|
81
|
+
inject: reduce
|
82
|
+
collect: map
|
83
|
+
find_all: select
|
84
|
+
|
85
|
+
Style/ColonMethodCall:
|
86
|
+
Description: 'Do not use :: for method call.'
|
87
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
88
|
+
Enabled: false
|
89
|
+
|
90
|
+
Style/CommentAnnotation:
|
91
|
+
Description: >-
|
92
|
+
Checks formatting of special comments
|
93
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
94
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Metrics/CyclomaticComplexity:
|
98
|
+
Description: >-
|
99
|
+
A complexity metric that is strongly correlated to the number
|
100
|
+
of test cases needed to validate a method.
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Rails/Delegate:
|
104
|
+
Description: 'Prefer delegate method for delegations.'
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
Style/DeprecatedHashMethods:
|
108
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
109
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
Style/Documentation:
|
113
|
+
Description: 'Document classes and non-namespace modules.'
|
114
|
+
Enabled: false
|
115
|
+
|
116
|
+
Style/DotPosition:
|
117
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
118
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
119
|
+
EnforcedStyle: trailing
|
120
|
+
|
121
|
+
Style/DoubleNegation:
|
122
|
+
Description: 'Checks for uses of double negation (!!).'
|
123
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
124
|
+
Enabled: false
|
125
|
+
|
126
|
+
Style/EachWithObject:
|
127
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
128
|
+
Enabled: false
|
129
|
+
|
130
|
+
Style/EmptyLiteral:
|
131
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
132
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
133
|
+
Enabled: false
|
134
|
+
|
135
|
+
# Checks whether the source file has a utf-8 encoding comment or not
|
136
|
+
# AutoCorrectEncodingComment must match the regex
|
137
|
+
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
138
|
+
Style/Encoding:
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
Style/EvenOdd:
|
142
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
143
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
144
|
+
Enabled: false
|
145
|
+
|
146
|
+
Style/ExtraSpacing:
|
147
|
+
Description: 'Do not use unnecessary spacing.'
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Style/FileName:
|
151
|
+
Description: 'Use snake_case for source file names.'
|
152
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Style/FlipFlop:
|
156
|
+
Description: 'Checks for flip flops'
|
157
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Style/FormatString:
|
161
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
162
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
163
|
+
Enabled: false
|
164
|
+
|
165
|
+
Style/GlobalVars:
|
166
|
+
Description: 'Do not introduce global variables.'
|
167
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
168
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
Style/GuardClause:
|
172
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
173
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
174
|
+
Enabled: false
|
175
|
+
|
176
|
+
Style/IfUnlessModifier:
|
177
|
+
Description: >-
|
178
|
+
Favor modifier if/unless usage when you have a
|
179
|
+
single-line body.
|
180
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
181
|
+
Enabled: false
|
182
|
+
|
183
|
+
Style/IfWithSemicolon:
|
184
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
185
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
186
|
+
Enabled: false
|
187
|
+
|
188
|
+
Style/InlineComment:
|
189
|
+
Description: 'Avoid inline comments.'
|
190
|
+
Enabled: false
|
191
|
+
|
192
|
+
Style/Lambda:
|
193
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
194
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
Style/LambdaCall:
|
198
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
199
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
Style/LineEndConcatenation:
|
203
|
+
Description: >-
|
204
|
+
Use \ instead of + or << to concatenate two string literals at
|
205
|
+
line end.
|
206
|
+
Enabled: false
|
207
|
+
|
208
|
+
Metrics/LineLength:
|
209
|
+
Description: 'Limit lines to 120 characters.'
|
210
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
211
|
+
Max: 120
|
212
|
+
|
213
|
+
Metrics/MethodLength:
|
214
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
215
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
216
|
+
Enabled: false
|
217
|
+
|
218
|
+
Style/ModuleFunction:
|
219
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
220
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
221
|
+
Enabled: false
|
222
|
+
|
223
|
+
Style/MultilineOperationIndentation:
|
224
|
+
Description: >-
|
225
|
+
Checks indentation of binary operations that span more than
|
226
|
+
one line.
|
227
|
+
Enabled: true
|
228
|
+
EnforcedStyle: indented
|
229
|
+
|
230
|
+
Style/NegatedIf:
|
231
|
+
Description: >-
|
232
|
+
Favor unless over if for negative conditions
|
233
|
+
(or control flow or).
|
234
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
235
|
+
Enabled: false
|
236
|
+
|
237
|
+
Style/NegatedWhile:
|
238
|
+
Description: 'Favor until over while for negative conditions.'
|
239
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
240
|
+
Enabled: false
|
241
|
+
|
242
|
+
Style/Next:
|
243
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
244
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
245
|
+
Enabled: false
|
246
|
+
|
247
|
+
Style/NilComparison:
|
248
|
+
Description: 'Prefer x.nil? to x == nil.'
|
249
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
250
|
+
Enabled: false
|
251
|
+
|
252
|
+
Style/Not:
|
253
|
+
Description: 'Use ! instead of not.'
|
254
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
255
|
+
Enabled: false
|
256
|
+
|
257
|
+
Style/NumericLiterals:
|
258
|
+
Description: >-
|
259
|
+
Add underscores to large numeric literals to improve their
|
260
|
+
readability.
|
261
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
Style/OneLineConditional:
|
265
|
+
Description: >-
|
266
|
+
Favor the ternary operator(?:) over
|
267
|
+
if/then/else/end constructs.
|
268
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
269
|
+
Enabled: false
|
270
|
+
|
271
|
+
Style/OpMethod:
|
272
|
+
Description: 'When defining binary operators, name the argument other.'
|
273
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
274
|
+
Enabled: false
|
275
|
+
|
276
|
+
Metrics/ParameterLists:
|
277
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
278
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
279
|
+
Enabled: false
|
280
|
+
|
281
|
+
Style/PercentLiteralDelimiters:
|
282
|
+
Description: 'Use `%`-literal delimiters consistently'
|
283
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
284
|
+
Enabled: false
|
285
|
+
|
286
|
+
Style/PerlBackrefs:
|
287
|
+
Description: 'Avoid Perl-style regex back references.'
|
288
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
289
|
+
Enabled: false
|
290
|
+
|
291
|
+
Style/PredicateName:
|
292
|
+
Description: 'Check the names of predicate methods.'
|
293
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
294
|
+
NamePrefixBlacklist:
|
295
|
+
- is_
|
296
|
+
Exclude:
|
297
|
+
- spec/**/*
|
298
|
+
|
299
|
+
Style/Proc:
|
300
|
+
Description: 'Use proc instead of Proc.new.'
|
301
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
302
|
+
Enabled: false
|
303
|
+
|
304
|
+
Style/RaiseArgs:
|
305
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
306
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
307
|
+
Enabled: false
|
308
|
+
|
309
|
+
Style/RegexpLiteral:
|
310
|
+
Description: 'Use / or %r around regular expressions.'
|
311
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
312
|
+
Enabled: false
|
313
|
+
|
314
|
+
Style/SelfAssignment:
|
315
|
+
Description: >-
|
316
|
+
Checks for places where self-assignment shorthand should have
|
317
|
+
been used.
|
318
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
319
|
+
Enabled: false
|
320
|
+
|
321
|
+
Style/SingleLineBlockParams:
|
322
|
+
Description: 'Enforces the names of some block params.'
|
323
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
324
|
+
Enabled: false
|
325
|
+
|
326
|
+
Style/SingleLineMethods:
|
327
|
+
Description: 'Avoid single-line methods.'
|
328
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
329
|
+
Enabled: false
|
330
|
+
|
331
|
+
Style/SignalException:
|
332
|
+
Description: 'Checks for proper usage of fail and raise.'
|
333
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
334
|
+
Enabled: false
|
335
|
+
|
336
|
+
Style/SpecialGlobalVars:
|
337
|
+
Description: 'Avoid Perl-style global variables.'
|
338
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
339
|
+
Enabled: false
|
340
|
+
|
341
|
+
Style/StringLiterals:
|
342
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
343
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
344
|
+
Enabled: false
|
345
|
+
|
346
|
+
Style/TrailingCommaInLiteral:
|
347
|
+
Description: 'Checks for trailing comma in parameter lists and literals.'
|
348
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
349
|
+
EnforcedStyleForMultiline: comma
|
350
|
+
SupportedStyles:
|
351
|
+
- comma
|
352
|
+
- no_comma
|
353
|
+
Enabled: true
|
354
|
+
|
355
|
+
Style/TrivialAccessors:
|
356
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
357
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
358
|
+
Enabled: false
|
359
|
+
|
360
|
+
Style/VariableInterpolation:
|
361
|
+
Description: >-
|
362
|
+
Don't interpolate global, instance and class variables
|
363
|
+
directly in strings.
|
364
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
365
|
+
Enabled: false
|
366
|
+
|
367
|
+
Style/WhenThen:
|
368
|
+
Description: 'Use when x then ... for one-line cases.'
|
369
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
370
|
+
Enabled: false
|
371
|
+
|
372
|
+
Style/WhileUntilModifier:
|
373
|
+
Description: >-
|
374
|
+
Favor modifier while/until usage when you have a
|
375
|
+
single-line body.
|
376
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
377
|
+
Enabled: false
|
378
|
+
|
379
|
+
Style/WordArray:
|
380
|
+
Description: 'Use %w or %W for arrays of words.'
|
381
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
382
|
+
Enabled: false
|
383
|
+
|
384
|
+
# Lint
|
385
|
+
|
386
|
+
Lint/AmbiguousOperator:
|
387
|
+
Description: >-
|
388
|
+
Checks for ambiguous operators in the first argument of a
|
389
|
+
method invocation without parentheses.
|
390
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
391
|
+
Enabled: false
|
392
|
+
|
393
|
+
Lint/AmbiguousRegexpLiteral:
|
394
|
+
Description: >-
|
395
|
+
Checks for ambiguous regexp literals in the first argument of
|
396
|
+
a method invocation without parenthesis.
|
397
|
+
Enabled: false
|
398
|
+
|
399
|
+
Lint/AssignmentInCondition:
|
400
|
+
Description: "Don't use assignment in conditions."
|
401
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
402
|
+
Enabled: false
|
403
|
+
|
404
|
+
Lint/CircularArgumentReference:
|
405
|
+
Description: "Don't refer to the keyword argument in the default value."
|
406
|
+
Enabled: false
|
407
|
+
|
408
|
+
Lint/ConditionPosition:
|
409
|
+
Description: >-
|
410
|
+
Checks for condition placed in a confusing position relative to
|
411
|
+
the keyword.
|
412
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
413
|
+
Enabled: false
|
414
|
+
|
415
|
+
Lint/DeprecatedClassMethods:
|
416
|
+
Description: 'Check for deprecated class method calls.'
|
417
|
+
Enabled: false
|
418
|
+
|
419
|
+
Lint/DuplicatedKey:
|
420
|
+
Description: 'Check for duplicate keys in hash literals.'
|
421
|
+
Enabled: false
|
422
|
+
|
423
|
+
Lint/EachWithObjectArgument:
|
424
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
425
|
+
Enabled: false
|
426
|
+
|
427
|
+
Lint/ElseLayout:
|
428
|
+
Description: 'Check for odd code arrangement in an else block.'
|
429
|
+
Enabled: false
|
430
|
+
|
431
|
+
Lint/FormatParameterMismatch:
|
432
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
433
|
+
Enabled: false
|
434
|
+
|
435
|
+
Lint/HandleExceptions:
|
436
|
+
Description: "Don't suppress exception."
|
437
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
438
|
+
Enabled: false
|
439
|
+
|
440
|
+
Lint/InvalidCharacterLiteral:
|
441
|
+
Description: >-
|
442
|
+
Checks for invalid character literals with a non-escaped
|
443
|
+
whitespace character.
|
444
|
+
Enabled: false
|
445
|
+
|
446
|
+
Style/InitialIndentation:
|
447
|
+
Description: >-
|
448
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
449
|
+
Enabled: false
|
450
|
+
|
451
|
+
Lint/LiteralInCondition:
|
452
|
+
Description: 'Checks of literals used in conditions.'
|
453
|
+
Enabled: false
|
454
|
+
|
455
|
+
Lint/LiteralInInterpolation:
|
456
|
+
Description: 'Checks for literals used in interpolation.'
|
457
|
+
Enabled: false
|
458
|
+
|
459
|
+
Lint/Loop:
|
460
|
+
Description: >-
|
461
|
+
Use Kernel#loop with break rather than begin/end/until or
|
462
|
+
begin/end/while for post-loop tests.
|
463
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
464
|
+
Enabled: false
|
465
|
+
|
466
|
+
Lint/NestedMethodDefinition:
|
467
|
+
Description: 'Do not use nested method definitions.'
|
468
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
469
|
+
Enabled: false
|
470
|
+
|
471
|
+
Lint/NonLocalExitFromIterator:
|
472
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
473
|
+
Enabled: false
|
474
|
+
|
475
|
+
Lint/ParenthesesAsGroupedExpression:
|
476
|
+
Description: >-
|
477
|
+
Checks for method calls with a space before the opening
|
478
|
+
parenthesis.
|
479
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
480
|
+
Enabled: false
|
481
|
+
|
482
|
+
Lint/RequireParentheses:
|
483
|
+
Description: >-
|
484
|
+
Use parentheses in the method call to avoid confusion
|
485
|
+
about precedence.
|
486
|
+
Enabled: false
|
487
|
+
|
488
|
+
Lint/UnderscorePrefixedVariableName:
|
489
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
490
|
+
Enabled: false
|
491
|
+
|
492
|
+
Lint/UnneededDisable:
|
493
|
+
Description: >-
|
494
|
+
Checks for rubocop:disable comments that can be removed.
|
495
|
+
Note: this cop is not disabled when disabling all cops.
|
496
|
+
It must be explicitly disabled.
|
497
|
+
Enabled: false
|
498
|
+
|
499
|
+
Lint/Void:
|
500
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
501
|
+
Enabled: false
|
502
|
+
|
503
|
+
# Performance
|
504
|
+
|
505
|
+
Performance/CaseWhenSplat:
|
506
|
+
Description: >-
|
507
|
+
Place `when` conditions that use splat at the end
|
508
|
+
of the list of `when` branches.
|
509
|
+
Enabled: false
|
510
|
+
|
511
|
+
Performance/Count:
|
512
|
+
Description: >-
|
513
|
+
Use `count` instead of `select...size`, `reject...size`,
|
514
|
+
`select...count`, `reject...count`, `select...length`,
|
515
|
+
and `reject...length`.
|
516
|
+
Enabled: false
|
517
|
+
|
518
|
+
Performance/Detect:
|
519
|
+
Description: >-
|
520
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
521
|
+
`select.last`, and `find_all.last`.
|
522
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
523
|
+
Enabled: false
|
524
|
+
|
525
|
+
Performance/FlatMap:
|
526
|
+
Description: >-
|
527
|
+
Use `Enumerable#flat_map`
|
528
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
529
|
+
or `Enumberable#collect..Array#flatten(1)`
|
530
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
531
|
+
Enabled: false
|
532
|
+
|
533
|
+
Performance/ReverseEach:
|
534
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
535
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
536
|
+
Enabled: false
|
537
|
+
|
538
|
+
Performance/Sample:
|
539
|
+
Description: >-
|
540
|
+
Use `sample` instead of `shuffle.first`,
|
541
|
+
`shuffle.last`, and `shuffle[Fixnum]`.
|
542
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
543
|
+
Enabled: false
|
544
|
+
|
545
|
+
Performance/Size:
|
546
|
+
Description: >-
|
547
|
+
Use `size` instead of `count` for counting
|
548
|
+
the number of elements in `Array` and `Hash`.
|
549
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
550
|
+
Enabled: false
|
551
|
+
|
552
|
+
Performance/StringReplacement:
|
553
|
+
Description: >-
|
554
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
555
|
+
number of characters. Use `delete` instead of `gsub` when
|
556
|
+
you are deleting characters.
|
557
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
558
|
+
Enabled: false
|
559
|
+
|
560
|
+
Performance/RedundantBlockCall:
|
561
|
+
Enabled: false
|
562
|
+
|
563
|
+
# Rails
|
564
|
+
|
565
|
+
Rails/ActionFilter:
|
566
|
+
Description: 'Enforces consistent use of action filter methods.'
|
567
|
+
Enabled: false
|
568
|
+
|
569
|
+
Rails/Date:
|
570
|
+
Description: >-
|
571
|
+
Checks the correct usage of date aware methods,
|
572
|
+
such as Date.today, Date.current etc.
|
573
|
+
Enabled: false
|
574
|
+
|
575
|
+
Rails/FindBy:
|
576
|
+
Description: 'Prefer find_by over where.first.'
|
577
|
+
Enabled: false
|
578
|
+
|
579
|
+
Rails/FindEach:
|
580
|
+
Description: 'Prefer all.find_each over all.find.'
|
581
|
+
Enabled: false
|
582
|
+
|
583
|
+
Rails/HasAndBelongsToMany:
|
584
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
585
|
+
Enabled: false
|
586
|
+
|
587
|
+
Rails/Output:
|
588
|
+
Description: 'Checks for calls to puts, print, etc.'
|
589
|
+
Enabled: false
|
590
|
+
|
591
|
+
Rails/ReadWriteAttribute:
|
592
|
+
Description: >-
|
593
|
+
Checks for read_attribute(:attr) and
|
594
|
+
write_attribute(:attr, val).
|
595
|
+
Enabled: false
|
596
|
+
|
597
|
+
Rails/ScopeArgs:
|
598
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
599
|
+
Enabled: false
|
600
|
+
|
601
|
+
Rails/TimeZone:
|
602
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
603
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
604
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
605
|
+
Enabled: false
|
606
|
+
|
607
|
+
Rails/Validation:
|
608
|
+
Description: 'Use validates :attribute, hash of validations.'
|
609
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 yuemori
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|