Commit Graph

1274 Commits

Author SHA1 Message Date
dependabot-preview[bot] a4a7ee110b
Build(deps-dev): Bump rubocop-rspec from 1.38.1 to 1.39.0 (#9606)
Bumps [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec) from 1.38.1 to 1.39.0.
- [Release notes](https://github.com/rubocop-hq/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-rspec/compare/v1.38.1...v1.39.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-01 11:04:53 -04:00
dependabot-preview[bot] 43210004e5
DEV: Bump parser from 2.7.1.1 to 2.7.1.2 (#9602)
Bumps [parser](https://github.com/whitequark/parser) from 2.7.1.1 to 2.7.1.2.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v2.7.1.1...v2.7.1.2)

Very minor, used for ruby 2.7 support
2020-05-01 11:58:57 +10:00
dependabot-preview[bot] c092370847
Build(deps-dev): Bump rb-fsevent from 0.10.3 to 0.10.4 (#9599)
Bumps [rb-fsevent](https://github.com/thibaudgg/rb-fsevent) from 0.10.3 to 0.10.4.
- [Release notes](https://github.com/thibaudgg/rb-fsevent/releases)
- [Commits](https://github.com/thibaudgg/rb-fsevent/compare/0.10.3...v0.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-30 11:14:34 -04:00
Régis Hanol 501b19b6e0
FIX: server-side HtmlToMarkdown improvements (#9586)
TLDR; this commit vastly improves how whitespaces are handled when converting from HTML to Markdown.
It also adds support for converting HTML <tables> to markdown tables.

The previous 'remove_whitespaces!' method was traversing the whole HTML tree and used a heuristic to remove
leading and trailing whitespaces whenever it was appropriate (ie. mostly before and after HTML block elements)

It was a good idea, but it was very limited and leaded to bad conversion when the html had leading whitespaces on several lines for example.
One such example can be found [here](https://meta.discourse.org/t/86782).

For various reasons, most of the whitespaces in a HTML file is ignored when the page is being displayed in a browser.
The rules that the browsers follow are the [CSS' White Space Processing Rules](https://www.w3.org/TR/css-text-3/#white-space-rules).
They can be quite complicated when you take into account RTL languages and other various tidbits but they boils down to the following:

- Collapse whitespaces down to one space (0x20) inside an inline context (ie. nodes/tags that are being displaying on the same line)
- Remove any leading/trailing whitespaces inside an inline context

One quick & dirty way of getting this 90% solved would be to do 'HTML.gsub!(/[[:space:]]+/, " ")'.
We would also need to hoist <pre> elements in order to not mess with their whitespaces.
Unfortunately, this solution let some whitespaces creep around HTML tags which leads to more '.strip!' calls than I can bear.

I decided to "emulate" the browser's handling of whitespaces and came up with a solution in 4 parts

1. remove_not_allowed!

The HtmlToMarkdown library is recursively "visiting" all the nodes in the HTML in order to convert them to Markdown.
All the nodes that aren't handled by the library (eg. <script>, <style> or any non-textual HTML tags) are "swallowed".
In order to reduce the number of nodes visited, the method 'remove_not_allowed!' will automatically delete all the nodes
that have no "visitor" (eg. a 'visit_<tag>' method) defined.

2. remove_hidden!

Similar purpose as the previous method (eg. reducing number of nodes visited), there's no point trying to convert something that is hidden.
The 'remove_hidden!' method removes any nodes that was hidden using the "hidden" HTML attribute, some CSS or with a width or height equal to 0.

3. hoist_line_breaks!

The 'hoist_line_breaks!' method is there to handle <br> tags. I know those tiny <br> don't do much but they can be quite annoying.
The <br> tags are inline elements but they visually work like a block element (ie. they create a new line).
If you have the following HTML "<i>Foo<br>Bar</i>", it ends up visually similar to "<i>Foo</i><br><i>Bar</i>".
The latter being much more easy to process than the former, so that's what this method is doing.
The "hoist_line_breaks" will hoist <br> tags out of inline tags until their parent is a block element.

4. remove_whitespaces!

The "remove_whitespaces!" is where all the whitespace removal is happening. It's broken down into 4 methods as well

- remove_whitespaces!
- is_inline?
- collapse_spaces!
- remove_trailing_space!

The 'remove_whitespace!' method is recursively walking the HTML tree (skipping <pre> tags).
If a node has any children, they will be chunked into groups of inline elements vs block elements.
For each chunks of inline elements, it will call the "collapse_space!" and "remove_trailing_space!" methods.
For each chunks of block elements, it will call "remote_whitespace!" to keep walking the HTML tree recursively.

The "is_inline?" method determines whether a node is part of a inline context.
A node is inline iif it's a text node or it's an inline tag, but not <br>, and all its children are also inline.

The "collapse_spaces!" method will collapse any kind of (white) space into a single space (" ") character, even accros tags.
For example, if we have "  Foo \n<i> Bar </i>\t42", it will return "Foo <i>Bar </i>42".

Finally, the "remove_trailing_space!" method is there to remove any trailing space that might creep in at the end of the inline chunk.

This solution is not 100% bullet-proof.
It does not support RTL languages at all and has some caveats that I felt were not worth the work to get properly fixed.

FIX: better detection of hidden elements when converting HTML to Markdown
FIX: take into account the 'allowed_href_schemes' site setting when converting HTML <a> to Markdown
FIX: added support for 'mailto:' scheme when converting <a> from HTML to Markdown
FIX: added support for <img> dimensions when converting from HTML to Markdown
FIX: added support for <dl>, <dd> and <dt> when converting from HTML to Markdown
FIX: added support for multilines emphases, strongs and strikes when converting from HTML to Markdown
FIX: added support for <acronym> when converting from HTML to Markdown
DEV: remove unused 'sanitize' gem

Wow, did you just read all that?! Congratz, here's a cookie: 🍪.
2020-04-30 12:21:25 +02:00
Sam Saffron 4f5ed8e781
DEV: pry-nav was holding back on pry upgrades
pry-nav is not yet supported on latest pry, this holds off on
upgrading pry, which in turn holds off on upgrading deps

Stripping pry-nav for now till it works with latest pry
2020-04-30 09:40:50 +10:00
Robin Ward 3ec21b4124 SECURITY: Update onebox to add rel="noopener" 2020-04-29 10:57:05 -04:00
dependabot-preview[bot] 7ccfc73edb
Build(deps): Bump rqrcode_core from 0.1.1 to 0.1.2 (#9244)
Bumps [rqrcode_core](https://github.com/whomwah/rqrcode_core) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/whomwah/rqrcode_core/releases)
- [Commits](https://github.com/whomwah/rqrcode_core/commits)
2020-04-29 12:58:52 +01:00
David Taylor 6a9a7b56df
DEV: Bump Hashie and Faraday (#9583)
These were previously pinned due to a dependency in the zendesk plugin. That has now been resolved.
2020-04-29 12:55:30 +01:00
dependabot-preview[bot] d3dc8fc1b3
DEV: Bump message_bus from 3.0.0 to 3.1.0 (#9565)
Bumps [message_bus](https://github.com/SamSaffron/message_bus) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/SamSaffron/message_bus/releases)
- [Changelog](https://github.com/discourse/message_bus/blob/master/CHANGELOG)
- [Commits](https://github.com/SamSaffron/message_bus/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Very safe change introduces new API needed for message filtering. 

7fad5a3e7d
2020-04-28 15:46:40 +10:00
Blake Erickson a93ef2926d
DEV: Add rswag to aid in api documention (#9546)
Adding in rswag will allow us to write spec files to document and test
our api.
2020-04-27 16:40:07 -06:00
dependabot-preview[bot] e92a54f681
Build(deps): Bump aws-sigv4 from 1.1.2 to 1.1.3 (#9560)
Bumps [aws-sigv4](https://github.com/aws/aws-sdk-ruby) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sigv4/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.1.2...1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-27 16:08:31 -04:00
dependabot-preview[bot] f15fc0ebf3
Build(deps): Bump unicorn from 5.5.4 to 5.5.5 (#9552)
Bumps [unicorn](https://yhbt.net/unicorn/) from 5.5.4 to 5.5.5.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-27 12:50:03 -04:00
Guo Xiang Tan e0725fd123 Upgrade message_bus to 3.0.0
Fixes an issue where specifying `group_ids` and `user_ids` while
publishing a message would result in an intersection between both
options.
2020-04-27 12:45:23 +08:00
dependabot-preview[bot] 94d753ad16
Build(deps-dev): Bump better_errors from 2.6.0 to 2.7.0 (#9544)
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.6.0...v2.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-24 14:22:05 -04:00
dependabot-preview[bot] 8b0ac092d8 Build(deps-dev): Bump byebug from 11.1.2 to 11.1.3
Bumps [byebug](https://github.com/deivid-rodriguez/byebug) from 11.1.2 to 11.1.3.
- [Release notes](https://github.com/deivid-rodriguez/byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/byebug/compare/v11.1.2...v11.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-24 09:42:19 +08:00
dependabot-preview[bot] 4d45602517
Build(deps): Bump mini_racer from 0.2.9 to 0.2.10 (#9507)
Bumps [mini_racer](https://github.com/discourse/mini_racer) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/discourse/mini_racer/releases)
- [Changelog](https://github.com/rubyjs/mini_racer/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_racer/compare/v0.2.9...v0.2.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-22 10:26:31 -04:00
dependabot-preview[bot] 32f3f1c14b
Build(deps-dev): Bump mock_redis from 0.22.0 to 0.23.0 (#9506)
Bumps [mock_redis](https://github.com/sds/mock_redis) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/sds/mock_redis/releases)
- [Changelog](https://github.com/sds/mock_redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sds/mock_redis/compare/v0.22.0...v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-22 10:26:09 -04:00
Jarek Radosz 07e0490fe4
DEV: Update mocha (#9490)
The spec that was blocking the update was fixed in c08753dc34.
2020-04-21 18:32:42 +02:00
dependabot-preview[bot] 776caa24c9
DEV: Bump optimist from 3.0.0 to 3.0.1 (#9476)
Bumps [optimist](https://github.com/ManageIQ/optimist) from 3.0.0 to 3.0.1.

Mostly about fixing tests and adding a license file
2020-04-21 15:32:24 +10:00
dependabot-preview[bot] afe1407c75
Build(deps): Bump aws-sdk-s3 from 1.61.2 to 1.62.0 (#9479)
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.61.2 to 1.62.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits/v1.62.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 16:06:38 -04:00
dependabot-preview[bot] f63ac79b9d
Build(deps-dev): Bump ruby-prof from 1.3.1 to 1.3.2 (#9474)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.3.1...1.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 12:34:53 -04:00
Daniel Waterworth 7876ee2d67 DEV: upgrade Rails
Latest version of Rails contains compatibility fixes for Ruby 2.7 and some
minor security fixes we would like to have

It also broke some of the multisite tests.

Rails tries to use the same connection for reading from a replica as writing
to the leader during tests, because, with everything happening in a
transaction, changes to the DB wouldn't otherwise be reflected in the
replica connection.

The difference now is that Rails tries to do this for connections opened
after the test has started which affected rails multisite connections.

The upshot of this is that, as things stand, you are likely to
experience problems if you try to connect to a different multisite DB in
a test when the `current_db` is not 'default'.
2020-04-20 12:55:53 +01:00
dependabot-preview[bot] 3ac6e16250
Build(deps): Bump aws-sigv4 from 1.1.1 to 1.1.2 (#9465)
Bumps [aws-sigv4](https://github.com/aws/aws-sdk-ruby) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sigv4/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.1.1...1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-17 17:32:30 -04:00
dependabot-preview[bot] 80563705da
Build(deps-dev): Bump byebug from 11.1.1 to 11.1.2 (#9462)
Bumps [byebug](https://github.com/deivid-rodriguez/byebug) from 11.1.1 to 11.1.2.
- [Release notes](https://github.com/deivid-rodriguez/byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/byebug/compare/v11.1.1...v11.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-17 14:31:27 -04:00
dependabot-preview[bot] 77dd31a642
Build(deps): Bump sidekiq from 6.0.6 to 6.0.7 (#9460)
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.0.6 to 6.0.7.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.0.6...v6.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-17 12:10:39 -04:00
Robin Ward 6f391b9387 Upgrade rubocop 2020-04-17 11:16:14 -04:00
dependabot-preview[bot] 338eaf9167
Build(deps): Bump parser from 2.7.1.0 to 2.7.1.1 (#9425)
Bumps [parser](https://github.com/whitequark/parser) from 2.7.1.0 to 2.7.1.1.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v2.7.1.0...v2.7.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-15 10:30:30 -04:00
dependabot-preview[bot] 81c7f369eb
Build(deps): Bump aws-eventstream from 1.0.3 to 1.1.0 (#9395)
Bumps [aws-eventstream](https://github.com/aws/aws-sdk-ruby) from 1.0.3 to 1.1.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-eventstream/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.0.3...1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-09 09:57:50 -04:00
dependabot-preview[bot] 3e176f9bf4
Build(deps): Bump mini_sql from 0.2.4 to 0.2.5 (#9368)
Bumps [mini_sql](https://github.com/discourse/mini_sql) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/discourse/mini_sql/releases)
- [Changelog](https://github.com/discourse/mini_sql/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_sql/compare/v0.2.4...v0.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-07 10:29:49 -04:00
dependabot-preview[bot] ed74a6c126
Build(deps): Bump public_suffix from 4.0.3 to 4.0.4 (#9353)
Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/weppos/publicsuffix-ruby/releases)
- [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/weppos/publicsuffix-ruby/compare/4.0.3...v4.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 11:42:03 -04:00
dependabot-preview[bot] c72fb252a5
Build(deps): Bump loofah from 2.4.0 to 2.5.0 (#9352)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.4.0...v2.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 11:41:47 -04:00
dependabot-preview[bot] 24fbe3e796
Build(deps): Bump oj from 3.10.5 to 3.10.6 (#9351)
Bumps [oj](https://github.com/ohler55/oj) from 3.10.5 to 3.10.6.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.10.5...v3.10.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 11:40:45 -04:00
dependabot-preview[bot] 8c06c64bfb
Build(deps): Bump aws-sdk-s3 from 1.61.1 to 1.61.2 (#9348)
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.61.1 to 1.61.2.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 11:35:29 -04:00
dependabot-preview[bot] a00cfe853a
Build(deps): Bump parser from 2.7.0.5 to 2.7.1.0 (#9347)
Bumps [parser](https://github.com/whitequark/parser) from 2.7.0.5 to 2.7.1.0.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v2.7.0.5...v2.7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-06 11:34:59 -04:00
dependabot-preview[bot] 4500928a39
Build(deps-dev): Bump fabrication from 2.21.0 to 2.21.1 (#9341)
Bumps [fabrication](https://github.com/paulelliott/fabrication) from 2.21.0 to 2.21.1.
- [Release notes](https://github.com/paulelliott/fabrication/releases)
- [Changelog](https://github.com/paulelliott/fabrication/blob/master/Changelog.markdown)
- [Commits](https://github.com/paulelliott/fabrication/compare/2.21.0...2.21.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-03 10:32:05 -04:00
dependabot-preview[bot] 06de6f80f8
Build(deps): Bump tzinfo from 1.2.6 to 1.2.7 (#9340)
Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v1.2.6...v1.2.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-03 10:31:45 -04:00
dependabot-preview[bot] 0d646d1a26
Build(deps-dev): Bump rubocop from 0.80.1 to 0.81.0 (#9330)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.80.1 to 0.81.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.80.1...v0.81.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-01 11:31:14 -04:00
dependabot-preview[bot] 14b8e221e7
Build(deps): Bump cose from 0.11.0 to 1.0.0 (#9307)
Bumps [cose](https://github.com/cedarcode/cose-ruby) from 0.11.0 to 1.0.0.
- [Release notes](https://github.com/cedarcode/cose-ruby/releases)
- [Changelog](https://github.com/cedarcode/cose-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cedarcode/cose-ruby/compare/v0.11.0...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 11:18:55 -04:00
dependabot-preview[bot] 0841ba1c6b
Build(deps): Bump unf_ext from 0.0.7.6 to 0.0.7.7 (#9306)
Bumps [unf_ext](https://github.com/knu/ruby-unf_ext) from 0.0.7.6 to 0.0.7.7.
- [Release notes](https://github.com/knu/ruby-unf_ext/releases)
- [Changelog](https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knu/ruby-unf_ext/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 11:18:31 -04:00
dependabot-preview[bot] 8ab39f6916
Build(deps): Bump logster from 2.7.1 to 2.8.0 (#9310)
This includes Font Awesome upgrade to version 5.

Bumps [logster](https://github.com/discourse/logster) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/discourse/logster/releases)
- [Changelog](https://github.com/discourse/logster/blob/master/CHANGELOG.md)
- [Commits](https://github.com/discourse/logster/compare/v2.7.1...v2.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 07:52:04 +03:00
Jarek Radosz 7ff889574d
DEV: Add rubocop-rspec (#9288)
This adds rubocop-rspec, and enables some cops that were either already passing or are passing now, after fixing them in this commit.

Some new cops are disabled for now, with annotation: "TODO" or "To be decided". Those either need to be discussed first, or require manual changes, or the number of found and fixed offenses is too large to bundle them up in a single PR.

Includes:

* DEV: Update rubocop's `TargetRubyVersion` to 2.6
* DEV: Enable RSpec/VoidExpect
* DEV: Enable RSpec/SharedContext
* DEV: Enable RSpec/EmptyExampleGroup (Removed an obsolete empty spec file)
* DEV: Enable RSpec/ItBehavesLike
* DEV: Remove RSpec/ScatteredLet (It's too strict, as it doesn't recognize fab! as a let-like)
* DEV: Remove RSpec/MultipleExpectations
2020-03-27 17:35:40 +01:00
Jarek Radosz d21d80198c
DEV: Update rubocop-discourse (#9270)
Includes:
* DEV: Use `eq_time` matcher
2020-03-26 16:32:41 +01:00
Sam Saffron 25f1f23288
FEATURE: Stricter rules for user presence
Previously we would consider a user "present" and "last seen" if the
browser window was visible.

This has many edge cases, you could be considered present and around for
days just by having a window open and no screensaver on.

Instead we now also check that you either clicked, transitioned around app
or scrolled the page in the last minute in combination with window
visibility

This will lead to more reliable notifications via email and reduce load of
message bus for cases where a user walks away from the terminal
2020-03-26 17:36:52 +11:00
Sam Saffron 35e153d84f
DEV: update unicorn
This is a minor update to unicorn, in this update unicorn handles
chunked encoding a bit more correctly according to RFC

Should have no impact, but message bus will be validated in production
to confirm chunked encoding still works as expected
2020-03-25 15:38:25 +11:00
Sam Saffron c7151f0fd6
Revert "DEV: upgrade Rails"
This reverts commit 5b3bb4b2f0.

This erratically breaks multisite operation, we need more debugging
2020-03-24 17:11:13 +11:00
Sam Saffron 5b3bb4b2f0
DEV: upgrade Rails
Latest version of Rails contains compatibility fixes for Ruby 2.7 and some
minor security fixes we would like to have
2020-03-24 16:47:40 +11:00
dependabot-preview[bot] 4452817ed0
DEV: Bump pg from 1.2.2 to 1.2.3 (#9235)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Pretty safe, adds protection for 2 possible segfaults.
2020-03-24 16:25:52 +11:00
dependabot-preview[bot] ecda9dbf25
DEV: Bump annotate from 3.1.0 to 3.1.1 (#9261)
Bumps [annotate](https://github.com/ctran/annotate_models) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/ctran/annotate_models/releases)
- [Changelog](https://github.com/ctran/annotate_models/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ctran/annotate_models/compare/v3.1.0...v3.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

Very safe upgrade, annotate only used in dev
2020-03-24 16:23:16 +11:00
Sam Saffron 9726a0e0b4
DEV: upgrade json gem and add explicit dependency
json is shipped out of sync with Ruby. Even though we use OJ for many things
we still use the json gem sometimes, this ensures we use the latest

b8b29e79ad/config/initializers/100-oj.rb (L9-L9)
2020-03-24 15:21:50 +11:00
dependabot-preview[bot] 8b7dc35e76
Build(deps): Bump sidekiq from 6.0.5 to 6.0.6 (#9258)
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.0.5 to 6.0.6.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.0.5...v6.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 14:27:51 -04:00