Skip to content

Commit

Permalink
Remove discarded flash messages if session cookie size is exceeded
Browse files Browse the repository at this point in the history
Discard bad redirects
  • Loading branch information
donv committed Nov 4, 2016
1 parent 61daf61 commit fcca4e1
Show file tree
Hide file tree
Showing 11 changed files with 423 additions and 58 deletions.
18 changes: 18 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.1
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- '**/Gemfile'
- '**/Rakefile'

Rails:
Enabled: true

Style/Encoding:
Enabled: true

Style/SafeNavigation:
ConvertCodeThatCanStartToReturnNil: true
307 changes: 307 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 100`
# on 2016-11-04 12:58:10 +0100 using RuboCop version 0.45.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'lib/simple_workflow/helper.rb'

# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'lib/simple_workflow/middleware.rb'

# Offense count: 5
Metrics/AbcSize:
Max: 59

# Offense count: 1
Metrics/CyclomaticComplexity:
Max: 11

# Offense count: 40
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
# URISchemes: http, https
Metrics/LineLength:
Max: 1909

# Offense count: 5
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 29

# Offense count: 1
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 1
Style/AccessorMethodName:
Exclude:
- 'lib/simple_workflow/controller.rb'

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: with_first_parameter, with_fixed_indentation
Style/AlignParameters:
Exclude:
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/railtie.rb'
- 'test/helper_test.rb'
- 'test/middleware_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
Style/AndOr:
Exclude:
- 'lib/simple_workflow/controller.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'Rakefile'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'test/controller_test.rb'

# Offense count: 7
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/simple_workflow.rb'
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/detour.rb'
- 'lib/simple_workflow/helper.rb'
- 'lib/simple_workflow/middleware.rb'
- 'lib/simple_workflow/test_helper.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/ClosingParenthesisIndentation:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/CommentIndentation:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 9
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/simple_workflow.rb'
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/detour.rb'
- 'lib/simple_workflow/helper.rb'
- 'lib/simple_workflow/middleware.rb'
- 'lib/simple_workflow/railtie.rb'
- 'lib/simple_workflow/test_helper.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, empty_lines_except_namespace, no_empty_lines
Style/EmptyLinesAroundClassBody:
Exclude:
- 'lib/simple_workflow/middleware.rb'
- 'test/middleware_test.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, empty_lines_except_namespace, no_empty_lines
Style/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/helper.rb'

# Offense count: 1
Style/EndOfLine:
Exclude:
- 'Rakefile'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
Exclude:
- 'script/console'

# Offense count: 3
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/middleware.rb'
- 'test/controller_test.rb'

# Offense count: 26
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Style/HashSyntax:
Exclude:
- 'lib/simple_workflow/controller.rb'
- 'lib/simple_workflow/helper.rb'
- 'lib/simple_workflow/test_helper.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Exclude:
- 'test/controller_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Style/IndentHash:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: symmetrical, new_line, same_line
Style/MultilineMethodCallBraceLayout:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
Style/MultilineMethodCallIndentation:
Exclude:
- 'lib/simple_workflow/middleware.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Style/MultilineOperationIndentation:
Exclude:
- 'lib/simple_workflow/middleware.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/MutableConstant:
Exclude:
- 'Rakefile'
- 'lib/simple_workflow/version.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/Not:
Exclude:
- 'lib/simple_workflow/helper.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Exclude:
- 'simple_workflow.gemspec'

# Offense count: 4
# Cop supports --auto-correct.
Style/SpaceAfterComma:
Exclude:
- 'simple_workflow.gemspec'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceAroundEqualsInParameterDefault:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
Exclude:
- 'script/console'

# Offense count: 120
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
# SupportedStyles: space, no_space, compact
Style/SpaceInsideHashLiteralBraces:
Exclude:
- 'lib/simple_workflow/helper.rb'
- 'lib/simple_workflow/test_helper.rb'
- 'test/controller_test.rb'
- 'test/helper_test.rb'
- 'test/middleware_test.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names

# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'lib/simple_workflow/middleware.rb'
- 'script/console'
- 'test/middleware_test.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: final_newline, final_blank_line
Style/TrailingBlankLines:
Exclude:
- 'Rakefile'
- 'script/console'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowNamedUnderscoreVariables.
Style/TrailingUnderscoreVariable:
Exclude:
- 'test/middleware_test.rb'

# Offense count: 4
# Cop supports --auto-correct.
Style/UnneededPercentQ:
Exclude:
- 'simple_workflow.gemspec'

# Offense count: 1
# Cop supports --auto-correct.
Style/ZeroLengthPredicate:
Exclude:
- 'lib/simple_workflow/middleware.rb'
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ language: ruby
sudo: false
rvm:
- jruby-head
- 2.3.0
- jruby-9.0.5.0
- 2.2.4
- 2.1.8
- 2.3.1
- jruby-9.1.5.0
- 2.2.5
- 2.1.9

jdk:
- oraclejdk8
Expand Down
Loading

0 comments on commit fcca4e1

Please sign in to comment.