grape_on_rails 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2ed4afe08908b9f62bf233dc8f68f6e91103353c
4
+ data.tar.gz: ed365928cf7d9c8c071f7b34923f1d627ce2a2ec
5
+ SHA512:
6
+ metadata.gz: d782be09ea922b65bc9e5cf91983e98dc8e2db0bb2fb93eec442db5dcb771e11d227ee06119c5305309cd552cdde5aa5eebe448b49b16e1d936b6ad1d95c2088
7
+ data.tar.gz: 30c72a1cdb951990bf3ad1b9253b98c8d1b50e9133dd082131fc77bdb2df649e5ef1d8aa27db7af4ff626fc3c307e51f36a8068790d6beb9f535d8411c02f955
@@ -0,0 +1,186 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+ /.idea
20
+ .idea/
21
+ .idea
22
+ .idea/workspace.xml
23
+ tags
24
+
25
+ # Ignore application configuration
26
+ /config/application.yml
27
+
28
+ .byebug_history
29
+ ### Rails template
30
+ *.rbc
31
+ capybara-*.html
32
+ .rspec
33
+ /log
34
+ /tmp
35
+ /db/*.sqlite3
36
+ /db/*.sqlite3-journal
37
+ /public/system
38
+ /public/assets
39
+ /public/javascripts
40
+ /public/uploads
41
+ /coverage/
42
+ /spec/tmp
43
+ **.orig
44
+ rerun.txt
45
+ pickle-email-*.html
46
+ .framgia-ci-reports
47
+
48
+ # TODO Comment out this rule if you are OK with secrets being uploaded to the repo
49
+ config/initializers/secret_token.rb
50
+
51
+ # Only include if you have production secrets in this file, which is no longer a Rails default
52
+ # config/secrets.yml
53
+
54
+ # dotenv
55
+ # TODO Comment out this rule if environment variables can be committed
56
+ .env
57
+
58
+ ## Environment normalization:
59
+ /vendor/bundle
60
+
61
+ # these should all be checked in to normalize the environment:
62
+ # Gemfile.lock, .ruby-version, .ruby-gemset
63
+
64
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
65
+ .rvmrc
66
+
67
+ # if using bower-rails ignore default bower_components path bower.json files
68
+ /vendor/assets/bower_components
69
+ !/public/exception_permission.html.erb
70
+ !/public/uploads/redeem_product/test_files
71
+ !/public/GeoLiteCity.dat
72
+ *.bowerrc
73
+ bower.json
74
+
75
+ # Ignore pow environment settings
76
+ .powenv
77
+
78
+ /config/database.local.yml
79
+ /config/local_env.yml
80
+ # Ignore Byebug command history file.
81
+ ### JetBrains template
82
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
83
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
84
+
85
+ # User-specific stuff:
86
+ .idea/**/workspace.xml
87
+ .idea/**/tasks.xml
88
+ .idea/dictionaries
89
+
90
+ # Sensitive or high-churn files:
91
+ .idea/**/dataSources/
92
+ .idea/**/dataSources.ids
93
+ .idea/**/dataSources.xml
94
+ .idea/**/dataSources.local.xml
95
+ .idea/**/sqlDataSources.xml
96
+ .idea/**/dynamic.xml
97
+ .idea/**/uiDesigner.xml
98
+
99
+ # Gradle:
100
+ .idea/**/gradle.xml
101
+ .idea/**/libraries
102
+
103
+ # Mongo Explorer plugin:
104
+ .idea/**/mongoSettings.xml
105
+
106
+ ## File-based project format:
107
+ *.iws
108
+
109
+ ## Plugin-specific files:
110
+
111
+ # IntelliJ
112
+ /out/
113
+
114
+ # mpeltonen/sbt-idea plugin
115
+ .idea_modules/
116
+
117
+ # JIRA plugin
118
+ atlassian-ide-plugin.xml
119
+
120
+ # Crashlytics plugin (for Android Studio and IntelliJ)
121
+ com_crashlytics_export_strings.xml
122
+ crashlytics.properties
123
+ crashlytics-build.properties
124
+ fabric.properties
125
+ ### Ruby template
126
+ *.gem
127
+ /.config
128
+ /InstalledFiles
129
+ /pkg/
130
+ /spec/reports/
131
+ /spec/examples.txt
132
+ /test/tmp/
133
+ /test/version_tmp/
134
+ /tmp/
135
+
136
+ # Used by dotenv library to load environment variables.
137
+ # .env
138
+ /config/application.yml
139
+
140
+ # Ignore redis binary dump (dump.rdb) files
141
+ *.rdb
142
+ !.rubocop*
143
+ ## Specific to RubyMotion:
144
+ .dat*
145
+ .repl_history
146
+ build/
147
+ *.bridgesupport
148
+ build-iPhoneOS/
149
+ build-iPhoneSimulator/
150
+
151
+ # FramgiaCI
152
+ !.drone.yml
153
+ !.framgia-ci.yml
154
+ .framgia-ci-reports/
155
+ ## Specific to RubyMotion (use of CocoaPods):
156
+ #
157
+ # We recommend against adding the Pods directory to your .gitignore. However
158
+ # you should judge for yourself, the pros and cons are mentioned at:
159
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
160
+ #
161
+ # vendor/Pods/
162
+
163
+ ## Documentation cache and generated files:
164
+ /.yardoc/
165
+ /_yardoc/
166
+ /doc/
167
+ /rdoc/
168
+
169
+ ## Environment normalization:
170
+ /.bundle/
171
+ /lib/bundler/man/
172
+
173
+ # for a library or gem, you might want to ignore these files since the code is
174
+ # intended to run in multiple environments; otherwise, check them in:
175
+ # Gemfile.lock
176
+ # .ruby-version
177
+ # .ruby-gemset
178
+
179
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
180
+
181
+ # I18n
182
+ /app/assets/javascripts/translations.js
183
+
184
+ *.swp
185
+ .DS_Store
186
+
@@ -0,0 +1,530 @@
1
+ # This is rubocop configuration file for Framgia's coding style. Enabling and disabling is configured
2
+ # in separate files. This file adds all other parameters apart from Enabled.
3
+
4
+ # Put the following files into the same directory as this file.
5
+ inherit_from:
6
+ - .rubocop_enabled.yml
7
+ - .rubocop_disabled.yml
8
+
9
+ Rails:
10
+ Enabled: true
11
+
12
+
13
+ # Common configuration.
14
+ AllCops:
15
+ # Include gemspec and Rakefile
16
+ Include:
17
+ - '**/*.gemspec'
18
+ Exclude:
19
+ - 'vendor/**/*'
20
+ - 'config/unicorn.rb'
21
+ - 'bin/*'
22
+ - 'db/**/*'
23
+ - 'spec/**/*'
24
+ - 'script/rails'
25
+ - 'config/**/*'
26
+ - 'lib/tasks/**/*'
27
+ - '**/Rakefile'
28
+ - '**/Gemfile'
29
+ - '**/Capfile'
30
+ - '**/Guardfile'
31
+ - '**/config.ru'
32
+
33
+ TargetRubyVersion: 2.4.1
34
+ # By default, the rails cops are not run. Override in project or home
35
+ # directory .rubocop.yml files, or by giving the -R/--rails option.
36
+
37
+ # Indent private/protected/public as deep as method definitions
38
+ Layout/AccessModifierIndentation:
39
+ EnforcedStyle: indent
40
+ SupportedStyles:
41
+ - outdent
42
+ - indent
43
+
44
+ # Align the elements of a hash literal if they span more than one line.
45
+ Layout/AlignHash:
46
+ # Alignment of entries using hash rocket as separator. Valid values are:
47
+ #
48
+ # key - left alignment of keys
49
+ # 'a' => 2
50
+ # 'bb' => 3
51
+ # separator - alignment of hash rockets, keys are right aligned
52
+ # 'a' => 2
53
+ # 'bb' => 3
54
+ # table - left alignment of keys, hash rockets, and values
55
+ # 'a' => 2
56
+ # 'bb' => 3
57
+ EnforcedHashRocketStyle: key
58
+ # Alignment of entries using colon as separator. Valid values are:
59
+ #
60
+ # key - left alignment of keys
61
+ # a: 0
62
+ # bb: 1
63
+ # separator - alignment of colons, keys are right aligned
64
+ # a: 0
65
+ # bb: 1
66
+ # table - left alignment of keys and values
67
+ # a: 0
68
+ # bb: 1
69
+ EnforcedColonStyle: key
70
+ # Select whether hashes that are the last argument in a method call should be
71
+ # inspected? Valid values are:
72
+ #
73
+ # always_inspect - Inspect both implicit and explicit hashes.
74
+ # Registers an offense for:
75
+ # function(a: 1,
76
+ # b: 2)
77
+ # Registers an offense for:
78
+ # function({a: 1,
79
+ # b: 2})
80
+ # always_ignore - Ignore both implicit and explicit hashes.
81
+ # Accepts:
82
+ # function(a: 1,
83
+ # b: 2)
84
+ # Accepts:
85
+ # function({a: 1,
86
+ # b: 2})
87
+ # ignore_implicit - Ignore only implicit hashes.
88
+ # Accepts:
89
+ # function(a: 1,
90
+ # b: 2)
91
+ # Registers an offense for:
92
+ # function({a: 1,
93
+ # b: 2})
94
+ # ignore_explicit - Ignore only explicit hashes.
95
+ # Accepts:
96
+ # function({a: 1,
97
+ # b: 2})
98
+ # Registers an offense for:
99
+ # function(a: 1,
100
+ # b: 2)
101
+ EnforcedLastArgumentHashStyle: ignore_implicit
102
+ SupportedLastArgumentHashStyles:
103
+ - always_inspect
104
+ - always_ignore
105
+ - ignore_implicit
106
+ - ignore_explicit
107
+
108
+ Layout/AlignParameters:
109
+ # Alignment of parameters in multi-line method calls.
110
+ #
111
+ # The `with_first_parameter` style aligns the following lines along the same column
112
+ # as the first parameter.
113
+ #
114
+ # method_call(a,
115
+ # b)
116
+ #
117
+ # The `with_fixed_indentation` style aligns the following lines with one
118
+ # level of indentation relative to the start of the line with the method call.
119
+ #
120
+ # method_call(a,
121
+ # b)
122
+ EnforcedStyle: with_fixed_indentation
123
+ SupportedStyles:
124
+ - with_first_parameter
125
+ - with_fixed_indentation
126
+
127
+ Metrics/BlockNesting:
128
+ Max: 3
129
+
130
+ Metrics/AbcSize:
131
+ # The ABC size is a calculated magnitude, so this number can be a Fixnum or
132
+ # a Float.
133
+ Max: 30
134
+
135
+ Style/BracesAroundHashParameters:
136
+ EnforcedStyle: no_braces
137
+ SupportedStyles:
138
+ - braces
139
+ - no_braces
140
+
141
+ # Indentation of `when`.
142
+ Layout/CaseIndentation:
143
+ EnforcedStyle: case
144
+ SupportedStyles:
145
+ - case
146
+ - end
147
+ IndentOneStep: false
148
+
149
+ Style/ClassAndModuleChildren:
150
+ # Checks the style of children definitions at classes and modules.
151
+ #
152
+ # Basically there are two different styles:
153
+ #
154
+ # `nested` - have each child on a separate line
155
+ # class Foo
156
+ # class Bar
157
+ # end
158
+ # end
159
+ #
160
+ # `compact` - combine definitions as much as possible
161
+ # class Foo::Bar
162
+ # end
163
+ #
164
+ # The compact style is only forced, for classes / modules with one child.
165
+ EnforcedStyle: nested
166
+ SupportedStyles:
167
+ - nested
168
+ - compact
169
+
170
+ Style/ClassCheck:
171
+ EnforcedStyle: is_a?
172
+ SupportedStyles:
173
+ - is_a?
174
+ - kind_of?
175
+
176
+ Metrics/ClassLength:
177
+ CountComments: false # count full line comments?
178
+ Max: 100
179
+
180
+ # Align with the style guide.
181
+ Style/CollectionMethods:
182
+ # Mapping from undesired method to desired_method
183
+ # e.g. to use `detect` over `find`:
184
+ #
185
+ # CollectionMethods:
186
+ # PreferredMethods:
187
+ # find: detect
188
+ PreferredMethods:
189
+ collect: 'map'
190
+ collect!: 'map!'
191
+ inject: 'reduce'
192
+ detect: 'find'
193
+ find_all: 'select'
194
+
195
+ # Checks formatting of special comments
196
+ Style/CommentAnnotation:
197
+ Keywords:
198
+ - TODO
199
+ - FIXME
200
+ - OPTIMIZE
201
+ - HACK
202
+ - REVIEW
203
+
204
+ Layout/MultilineOperationIndentation:
205
+ Exclude:
206
+ - app/assets/stylesheets/application.css
207
+
208
+ # Avoid complex methods.
209
+ Metrics/CyclomaticComplexity:
210
+ Max: 6
211
+
212
+ # Multi-line method chaining should be done with leading dots.
213
+ Layout/DotPosition:
214
+ EnforcedStyle: leading
215
+ SupportedStyles:
216
+ - leading
217
+ - trailing
218
+
219
+ # Use empty lines between defs.
220
+ Layout/EmptyLineBetweenDefs:
221
+ # If true, this parameter means that single line method definitions don't
222
+ # need an empty line between them.
223
+ AllowAdjacentOneLineDefs: false
224
+
225
+ Layout/EmptyLinesAroundBlockBody:
226
+ EnforcedStyle: no_empty_lines
227
+ SupportedStyles:
228
+ - no_empty_lines
229
+
230
+ Layout/EmptyLinesAroundClassBody:
231
+ EnforcedStyle: no_empty_lines
232
+ SupportedStyles:
233
+ - no_empty_lines
234
+
235
+ Layout/EmptyLinesAroundModuleBody:
236
+ EnforcedStyle: no_empty_lines
237
+ SupportedStyles:
238
+ - no_empty_lines
239
+
240
+ Style/FileName:
241
+ Exclude:
242
+ - '**/Rakefile'
243
+ - '**/Gemfile'
244
+ - '**/Capfile'
245
+
246
+ # Checks use of for or each in multiline loops.
247
+ Style/For:
248
+ EnforcedStyle: each
249
+ SupportedStyles:
250
+ - for
251
+ - each
252
+
253
+ # Enforce the method used for string formatting.
254
+ Style/FormatString:
255
+ EnforcedStyle: format
256
+ SupportedStyles:
257
+ - format
258
+ - sprintf
259
+ - percent
260
+
261
+ # Built-in global variables are allowed by default.
262
+ Style/GlobalVars:
263
+ AllowedVariables: []
264
+
265
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
266
+ # needs to have to trigger this cop
267
+ Style/GuardClause:
268
+ MinBodyLength: 1
269
+
270
+ Style/HashSyntax:
271
+ EnforcedStyle: ruby19
272
+ SupportedStyles:
273
+ - ruby19
274
+ - hash_rockets
275
+
276
+ Metrics/LineLength:
277
+ Max: 80
278
+
279
+ # Checks the indentation of the first key in a hash literal.
280
+ Layout/IndentHash:
281
+ # The value `special_inside_parentheses` means that hash literals with braces
282
+ # that have their opening brace on the same line as a surrounding opening
283
+ # round parenthesis, shall have their first key indented relative to the
284
+ # first position inside the parenthesis.
285
+ # The value `consistent` means that the indentation of the first key shall
286
+ # always be relative to the first position of the line where the opening
287
+ # brace is.
288
+ EnforcedStyle: special_inside_parentheses
289
+ SupportedStyles:
290
+ - special_inside_parentheses
291
+ - consistent
292
+
293
+ Style/LambdaCall:
294
+ EnforcedStyle: call
295
+ SupportedStyles:
296
+ - call
297
+ - braces
298
+
299
+ Metrics/LineLength:
300
+ Max: 120
301
+ AllowURI: true
302
+ Exclude:
303
+ - config/routes.rb
304
+
305
+
306
+ Style/Next:
307
+ # With `always` all conditions at the end of an iteration needs to be
308
+ # replace by next - with `skip_modifier_ifs` the modifier if like this one
309
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
310
+ EnforcedStyle: skip_modifier_ifs
311
+ SupportedStyles:
312
+ - skip_modifier_ifs
313
+ - always
314
+
315
+ Style/NonNilCheck:
316
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
317
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
318
+ # **usually** OK, but might change behavior.
319
+ #
320
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
321
+ # offenses for `!x.nil?` and does no changes that might change behavior.
322
+ IncludeSemanticChanges: false
323
+
324
+ Style/MethodDefParentheses:
325
+ EnforcedStyle: require_no_parentheses
326
+ SupportedStyles:
327
+ - require_parentheses
328
+ - require_no_parentheses
329
+
330
+ Metrics/MethodLength:
331
+ CountComments: false # count full line comments?
332
+ Max: 10
333
+
334
+ Style/MethodName:
335
+ EnforcedStyle: snake_case
336
+ SupportedStyles:
337
+ - snake_case
338
+ - camelCase
339
+
340
+ Style/NumericLiterals:
341
+ MinDigits: 5
342
+
343
+ Metrics/ParameterLists:
344
+ Max: 5
345
+ CountKeywordArgs: true
346
+
347
+ # Allow safe assignment in conditions.
348
+ Style/ParenthesesAroundCondition:
349
+ AllowSafeAssignment: true
350
+
351
+ Style/PercentLiteralDelimiters:
352
+ PreferredDelimiters:
353
+ '%': ()
354
+ '%i': ()
355
+ '%q': ()
356
+ '%Q': ()
357
+ '%r': '{}'
358
+ '%s': ()
359
+ '%w': ()
360
+ '%W': ()
361
+ '%x': ()
362
+
363
+ Style/PredicateName:
364
+ NamePrefixBlacklist:
365
+ - get_
366
+
367
+ Style/RaiseArgs:
368
+ EnforcedStyle: exploded
369
+ SupportedStyles:
370
+ - compact # raise Exception.new(msg)
371
+ - exploded # raise Exception, msg
372
+
373
+
374
+ Style/RedundantReturn:
375
+ # When true allows code like `return x, y`.
376
+ AllowMultipleReturnValues: false
377
+
378
+ #Style/RegexpLiteral:
379
+ # # The maximum number of (escaped) slashes that a slash-delimited regexp is
380
+ # # allowed to have. If there are more slashes, a %r regexp shall be used.
381
+ # MaxSlashes: 0
382
+
383
+ Style/Semicolon:
384
+ # Allow ; to separate several expressions on the same line.
385
+ AllowAsExpressionSeparator: false
386
+
387
+ Style/SignalException:
388
+ EnforcedStyle: only_raise
389
+ SupportedStyles:
390
+ - only_raise
391
+ - only_fail
392
+ - semantic
393
+
394
+
395
+ Style/SingleLineBlockParams:
396
+ Methods:
397
+ - reduce:
398
+ - a
399
+ - e
400
+ - inject:
401
+ - a
402
+ - e
403
+
404
+ Style/SingleLineMethods:
405
+ AllowIfMethodIsEmpty: true
406
+
407
+ Style/StringLiterals:
408
+ EnforcedStyle: double_quotes
409
+ SupportedStyles:
410
+ - single_quotes
411
+ - double_quotes
412
+
413
+ Layout/SpaceAroundEqualsInParameterDefault:
414
+ EnforcedStyle: space
415
+ SupportedStyles:
416
+ - space
417
+ - no_space
418
+
419
+ Layout/SpaceBeforeBlockBraces:
420
+ EnforcedStyle: no_space
421
+ SupportedStyles:
422
+ - space
423
+ - no_space
424
+
425
+ Layout/SpaceInsideBlockBraces:
426
+ EnforcedStyle: no_space
427
+ SupportedStyles:
428
+ - space
429
+ - no_space
430
+ # Valid values are: space, no_space
431
+ EnforcedStyleForEmptyBraces: no_space
432
+ # Space between { and |. Overrides EnforcedStyle if there is a conflict.
433
+ SpaceBeforeBlockParameters: false
434
+
435
+ Layout/SpaceInsideHashLiteralBraces:
436
+ EnforcedStyle: no_space
437
+ EnforcedStyleForEmptyBraces: no_space
438
+ SupportedStyles:
439
+ - space
440
+ - no_space
441
+
442
+ Layout/TrailingBlankLines:
443
+ EnforcedStyle: final_newline
444
+ SupportedStyles:
445
+ - final_newline
446
+ - final_blank_line
447
+
448
+ Style/TrailingCommaInLiteral:
449
+ # If EnforcedStyleForMultiline is comma, the cop allows a comma after the
450
+ # last item of a list, but only for lists where each item is on its own line.
451
+ EnforcedStyleForMultiline: no_comma
452
+
453
+ Style/TrailingCommaInArguments:
454
+ # If EnforcedStyleForMultiline is comma, the cop allows a comma after the
455
+ # last item of a list, but only for lists where each item is on its own line.
456
+ EnforcedStyleForMultiline: no_comma
457
+
458
+ # TrivialAccessors doesn't require exact name matches and doesn't allow
459
+ # predicated methods by default.
460
+ Style/TrivialAccessors:
461
+ ExactNameMatch: false
462
+ AllowPredicates: false
463
+ # Allows trivial writers that don't end in an equal sign. e.g.
464
+ #
465
+ # def on_exception(action)
466
+ # @on_exception=action
467
+ # end
468
+ # on_exception :restart
469
+ #
470
+ # Commonly used in DSLs
471
+ AllowDSLWriters: false
472
+ Whitelist:
473
+ - to_ary
474
+ - to_a
475
+ - to_c
476
+ - to_enum
477
+ - to_h
478
+ - to_hash
479
+ - to_i
480
+ - to_int
481
+ - to_io
482
+ - to_open
483
+ - to_path
484
+ - to_proc
485
+ - to_r
486
+ - to_regexp
487
+ - to_str
488
+ - to_s
489
+ - to_sym
490
+
491
+ Style/VariableName:
492
+ EnforcedStyle: snake_case
493
+ SupportedStyles:
494
+ - snake_case
495
+ - camelCase
496
+
497
+ Style/WordArray:
498
+ MinSize: 0
499
+
500
+ ##################### Lint ##################################
501
+
502
+ # Allow safe assignment in conditions.
503
+ Lint/AssignmentInCondition:
504
+ AllowSafeAssignment: true
505
+
506
+ ##################### Rails ##################################
507
+
508
+ Rails/ActionFilter:
509
+ EnforcedStyle: action
510
+ SupportedStyles:
511
+ - action
512
+ - filter
513
+ Include:
514
+ - app/controllers/**/*.rb
515
+
516
+ Rails/HasAndBelongsToMany:
517
+ Include:
518
+ - app/models/**/*.rb
519
+
520
+ Rails/ReadWriteAttribute:
521
+ Include:
522
+ - app/models/**/*.rb
523
+
524
+ Rails/ScopeArgs:
525
+ Include:
526
+ - app/models/**/*.rb
527
+
528
+ Rails/Validation:
529
+ Include:
530
+ - app/models/**/*.rb