This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec
Joffrey JAFFEUX 8edd2b38cb
FIX: ensures timeline_lookup includes last tuple (#11829)
A simplified version of the logic used in the function before my fix is as follow:

```ruby
result = []
things = [0,1,2,3]
max_values = 2
every = (things.size.to_f / max_values).ceil

things.each_with_index do |t, index|
  next unless (t % every) === 0
  result << t
end

p result # [0, 2]
# 3 doesn’t get included
```

The problem is that if you get unlucky two times you won't get last tuple(s) and might get a very erroneous date.

Double unlucky:
- last tuple index % computed every !== 0 and you don't get the last tuple
- the last tuple is related to a post with a very different date than the previous tuples (on year difference in our case)
2021-01-25 11:30:59 +01:00
..
components FIX: reindex_search job should work on model with no search data (#11819) 2021-01-25 11:23:36 +01:00
fabricators FIX: Change default for IncomingEmail#created_via to 0 (unknown) and make NOT NULL (#11782) 2021-01-21 12:59:50 +10:00
fixtures FIX: Use ImageMagick to detect animated images (#11702) 2021-01-13 19:01:30 +02:00
helpers UX: Use appropriate logo on static pages (#11211) 2020-11-12 10:50:55 -08:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
integrity DEV: Add i18n fallback specs (#11669) 2021-01-08 17:47:28 +01:00
jobs FIX: reindex_search job should work on model with no search data (#11819) 2021-01-25 11:23:36 +01:00
lib FIX: ensures timeline_lookup includes last tuple (#11829) 2021-01-25 11:30:59 +01:00
mailers FEATURE: Add English (UK) as locale (#11768) 2021-01-20 21:32:22 +01:00
models FEATURE: Add English (UK) as locale (#11768) 2021-01-20 21:32:22 +01:00
multisite FEATURE: Add English (UK) as locale (#11768) 2021-01-20 21:32:22 +01:00
requests FIX: reindex_search job should work on model with no search data (#11819) 2021-01-25 11:23:36 +01:00
script/import_scripts DEV: add specs for Vanilla import script improvements (#11712) 2021-01-16 19:35:19 +05:30
serializers UX: warn about messages to be orphaned while deleting a group. (#11727) 2021-01-22 03:29:34 +05:30
services FIX: Remove scheduled DND timings when schedule is disabed (#11814) 2021-01-22 13:02:11 -06:00
support DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
tasks FIX: remove migrate_from_s3 task that silently corrupts data (#11703) 2021-01-17 22:33:29 +01:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: Update DB.after_commit to be compatible with 'real' transactions (#11294) 2020-12-08 11:03:31 +11:00
swagger_helper.rb DEV: Add schema checking to api doc testing (#11721) 2021-01-21 16:28:08 -07:00