Pārlūkot izejas kodu

Even more rubocop

Maarten van den Berg 6 gadi atpakaļ
vecāks
revīzija
e1ea826ea1
3 mainītis faili ar 3 papildinājumiem un 23 dzēšanām
  1. 0 20
      .rubocop.yml
  2. 2 2
      config/spring.rb
  3. 1 1
      lib/tasks/sessions.rake

+ 0 - 20
.rubocop.yml

@@ -58,30 +58,10 @@ Style/FrozenStringLiteralComment:
58 58
 
59 59
 # Offense count: 1
60 60
 # Cop supports --auto-correct.
61
-# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
62
-# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
63
-Style/HashSyntax:
64
-  Exclude:
65
-    - 'lib/tasks/sessions.rake'
66
-
67
-# Offense count: 1
68
-Style/MultilineTernaryOperator:
69
-  Exclude:
70
-    - 'app/models/session.rb'
71
-
72
-# Offense count: 1
73
-# Cop supports --auto-correct.
74 61
 # Configuration parameters: Strict.
75 62
 Style/NumericLiterals:
76 63
   MinDigits: 15
77 64
 
78
-# Offense count: 1
79
-# Cop supports --auto-correct.
80
-# Configuration parameters: PreferredDelimiters.
81
-Style/PercentLiteralDelimiters:
82
-  Exclude:
83
-    - 'config/spring.rb'
84
-
85 65
 # Offense count: 85
86 66
 # Cop supports --auto-correct.
87 67
 Style/RedundantSelf:

+ 2 - 2
config/spring.rb

@@ -1,6 +1,6 @@
1
-%w(
1
+%w[
2 2
   .ruby-version
3 3
   .rbenv-vars
4 4
   tmp/restart.txt
5 5
   tmp/caching-dev.txt
6
-).each { |path| Spring.watch(path) }
6
+].each { |path| Spring.watch(path) }

+ 1 - 1
lib/tasks/sessions.rake

@@ -1,6 +1,6 @@
1 1
 namespace :sessions do
2 2
   desc "Clean all expired sessions from the database"
3
-  task :clean => :environment do
3
+  task clean: :environment do
4 4
     expired = Session.where('sessions.expires < ?', Time.zone.now)
5 5
     deactivated = Session.where(active: false)
6 6
     puts "Cleaning #{expired.count} expired, #{deactivated.count} deactivated sessions."