Maintenance: Bump rubocop-rails from 2.13.1 to 2.13.2
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.13.1 to 2.13.2. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.13.1...v2.13.2)
This commit is contained in:
parent
84b071a039
commit
4018904fd8
4 changed files with 14 additions and 14 deletions
|
@ -527,7 +527,7 @@ GEM
|
||||||
rubocop-performance (1.13.2)
|
rubocop-performance (1.13.2)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-ast (>= 0.4.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
rubocop-rails (2.13.1)
|
rubocop-rails (2.13.2)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
rack (>= 1.1)
|
rack (>= 1.1)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
|
|
|
@ -235,8 +235,8 @@ returns
|
||||||
if event.rrule
|
if event.rrule
|
||||||
|
|
||||||
# loop till days
|
# loop till days
|
||||||
interval_frame_start = Date.parse("#{Time.zone.now - 1.year}-01-01")
|
interval_frame_start = Date.parse("#{1.year.ago}-01-01")
|
||||||
interval_frame_end = Date.parse("#{Time.zone.now + 3.years}-12-31")
|
interval_frame_end = Date.parse("#{3.years.from_now}-12-31")
|
||||||
occurrences = event.occurrences_between(interval_frame_start, interval_frame_end)
|
occurrences = event.occurrences_between(interval_frame_start, interval_frame_end)
|
||||||
if occurrences.present?
|
if occurrences.present?
|
||||||
occurrences.each do |occurrence|
|
occurrences.each do |occurrence|
|
||||||
|
@ -247,8 +247,8 @@ returns
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
next if event.dtstart < Time.zone.now - 1.year
|
next if event.dtstart < 1.year.ago
|
||||||
next if event.dtstart > Time.zone.now + 3.years
|
next if event.dtstart > 3.years.from_now
|
||||||
|
|
||||||
result = Calendar.day_and_comment_by_event(event, event.dtstart)
|
result = Calendar.day_and_comment_by_event(event, event.dtstart)
|
||||||
next if !result
|
next if !result
|
||||||
|
|
|
@ -225,7 +225,7 @@ with dedicated times
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
|
||||||
def self.cleanup(max_age = Time.zone.now - 9.months, max_own_seen = 10.minutes.ago, max_auto_seen = 8.hours.ago)
|
def self.cleanup(max_age = 9.months.ago, max_own_seen = 10.minutes.ago, max_auto_seen = 8.hours.ago)
|
||||||
OnlineNotification.where('created_at < ?', max_age).delete_all
|
OnlineNotification.where('created_at < ?', max_age).delete_all
|
||||||
OnlineNotification.where('seen = ? AND updated_at < ?', true, max_own_seen).each do |notification|
|
OnlineNotification.where('seen = ? AND updated_at < ?', true, max_own_seen).each do |notification|
|
||||||
|
|
||||||
|
|
|
@ -560,8 +560,8 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
user_id: @agent_user1.id,
|
user_id: @agent_user1.id,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_at: Time.zone.now - 10.months,
|
created_at: 10.months.ago,
|
||||||
updated_at: Time.zone.now - 10.months,
|
updated_at: 10.months.ago,
|
||||||
)
|
)
|
||||||
online_notification2 = OnlineNotification.add(
|
online_notification2 = OnlineNotification.add(
|
||||||
type: 'create',
|
type: 'create',
|
||||||
|
@ -571,8 +571,8 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
user_id: @agent_user1.id,
|
user_id: @agent_user1.id,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_at: Time.zone.now - 10.months,
|
created_at: 10.months.ago,
|
||||||
updated_at: Time.zone.now - 10.months,
|
updated_at: 10.months.ago,
|
||||||
)
|
)
|
||||||
online_notification3 = OnlineNotification.add(
|
online_notification3 = OnlineNotification.add(
|
||||||
type: 'create',
|
type: 'create',
|
||||||
|
@ -652,8 +652,8 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
user_id: @agent_user1.id,
|
user_id: @agent_user1.id,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_at: Time.zone.now - 10.months,
|
created_at: 10.months.ago,
|
||||||
updated_at: Time.zone.now - 10.months,
|
updated_at: 10.months.ago,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
assert_raises(ActiveRecord::RecordNotFound) do
|
assert_raises(ActiveRecord::RecordNotFound) do
|
||||||
|
@ -665,8 +665,8 @@ class OnlineNotificationTest < ActiveSupport::TestCase
|
||||||
user_id: @agent_user1.id,
|
user_id: @agent_user1.id,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_at: Time.zone.now - 10.months,
|
created_at: 10.months.ago,
|
||||||
updated_at: Time.zone.now - 10.months,
|
updated_at: 10.months.ago,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue