Commit Graph

1393 Commits

Author SHA1 Message Date
dependabot-preview[bot] 14dc6f350e
Build(deps): Bump logster from 2.8.0 to 2.9.0 (#10035)
Bumps [logster](https://github.com/discourse/logster) from 2.8.0 to 2.9.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/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-06-13 10:46:57 +03:00
dependabot-preview[bot] d47dc1e92d
DEV: Bump ffi from 1.13.0 to 1.13.1 (#10006)
Bumps [ffi](https://github.com/ffi/ffi) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/ffi/ffi/releases)
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/compare/1.13.0...1.13.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 change, should not impact anything.
2020-06-11 17:49:36 +10:00
Arpit Jalan 0061f758bd Bump onebox version.
- temporary workaround to fetch Twitter OpenGraph data
2020-06-11 11:40:44 +05:30
Guo Xiang Tan a3dfd553a1
Revert "Bump redis to 4.2.0."
This reverts commit 98bc28cea2.
2020-06-10 14:52:05 +08:00
Guo Xiang Tan 98bc28cea2
Bump redis to 4.2.0. 2020-06-10 14:28:56 +08:00
Guo Xiang Tan 2ce829cc01
DEV: Allow multisite apps to boot with reading connection handler. 2020-06-10 14:18:29 +08:00
Guo Xiang Tan 8b434531e4
Bump message_bus to 3.3.1. 2020-06-09 14:12:14 +08:00
Guo Xiang Tan 4ce618e55b
Bump rails_failover. 2020-06-08 17:04:58 +08:00
Guo Xiang Tan 2ffda2b320
Bump rails_failover. 2020-06-08 12:19:33 +08:00
Guo Xiang Tan dc8b773765
Update rails_failover. 2020-06-08 11:03:25 +08:00
dependabot-preview[bot] cb015efb74 Bump rubocop from 0.85.0 to 0.85.1
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.85.0 to 0.85.1.
- [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.85.0...v0.85.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-08 09:11:58 +08:00
dependabot-preview[bot] dc633f299f
Bump email_reply_trimmer from 0.1.12 to 0.1.13 (#9980)
Bumps [email_reply_trimmer](https://github.com/discourse/email_reply_trimmer) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/discourse/email_reply_trimmer/releases)
- [Commits](https://github.com/discourse/email_reply_trimmer/commits/v0.1.13)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-05 10:00:59 -04:00
Martin Brennan e84ffb4861
DEV: Add pry-byebug and optionally require pry behind a ENV var for better spec debugging (#9984)
We removed pry-nav a while back because it is not up to date with pry but it is super useful. Luckily pry-byebug is here to save us all from Satan's power.

To get this to work you need to add the following to your $HOME/.pryrc file.

```
if defined?(PryByebug)
  Pry.commands.alias_command 'c', 'continue'
  Pry.commands.alias_command 's', 'step'
  Pry.commands.alias_command 'n', 'next'
  Pry.commands.alias_command 'f', 'finish'
end

Pry::Commands.command /^$/, "repeat last command" do
  pry_instance.run_command Pry.history.to_a.last
end
```

The require-ing of pry, pry-rails, and pry-byebug in specs is controlled by the IMPROVED_SPEC_DEBUGGING flag (disabled by default).
2020-06-05 12:30:34 +10:00
Guo Xiang Tan e82d4d8a75
DEV: Update rails_failover to avoid monkey patching Rails config. 2020-06-05 09:05:19 +08:00
Guo Xiang Tan aaece34e8b DEV: Update rails_failover so that we can move middleware up the stack. 2020-06-04 17:14:13 +08:00
Guo Xiang Tan 8e1681d356 Bump rails_failover. 2020-06-04 15:22:35 +08:00
dependabot-preview[bot] fc0f112f16
Bump connection_pool from 2.2.2 to 2.2.3 (#9967)
Bumps [connection_pool](https://github.com/mperham/connection_pool) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/mperham/connection_pool/releases)
- [Changelog](https://github.com/mperham/connection_pool/blob/master/Changes.md)
- [Commits](https://github.com/mperham/connection_pool/compare/v2.2.2...v2.2.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-06-03 09:29:30 -04:00
Guo Xiang Tan a4a33fccb0
DEV: Update rails_failover. 2020-06-03 14:31:11 +08:00
Guo Xiang Tan 439db7ca1e
DEV: Add `REDIS_RAILS_FAILOVER` env to test our new redis failover. 2020-06-02 17:24:14 +08:00
Guo Xiang Tan deb84017f2
Update `rails_failover`. 2020-06-02 17:01:45 +08:00
Guo Xiang Tan 4120ef7305
Bump rails_multisite to 2.2.2. 2020-06-02 16:49:33 +08:00
dependabot-preview[bot] 111e8dec10
DEV: Bump rubocop from 0.84.0 to 0.85.0 (#9960)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.84.0 to 0.85.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.84.0...v0.85.0)

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

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

Change looks safe, everything is still passing lint
2020-06-02 15:11:33 +10:00
dependabot-preview[bot] d8b258b4e5
Build(deps): Bump ffi from 1.12.2 to 1.13.0 (#9954)
Bumps [ffi](https://github.com/ffi/ffi) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/ffi/ffi/releases)
- [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ffi/ffi/compare/1.12.2...1.13.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-06-01 10:29:34 -04:00
dependabot-preview[bot] 2c43c21abc
Build(deps): Bump coderay from 1.1.2 to 1.1.3 (#9943)
Bumps [coderay](https://github.com/rubychan/coderay) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/rubychan/coderay/releases)
- [Changelog](https://github.com/rubychan/coderay/blob/master/Changes.textile)
- [Commits](https://github.com/rubychan/coderay/compare/v1.1.2...v1.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-06-01 10:21:46 -04:00
Guo Xiang Tan 5c24f83a6b
DEV: Bump rails_failover. 2020-06-01 10:22:04 +08:00
Guo Xiang Tan 3b311f6b15
DEV: Bump `rails_failover`. 2020-05-29 09:02:34 +08:00
Robin Ward cae839ca96
DEV: Update gems to latest versions (#9909) 2020-05-28 13:13:10 -04:00
dependabot-preview[bot] 0e9a380b13
Build(deps): Bump parser from 2.7.1.2 to 2.7.1.3 (#9884)
Bumps [parser](https://github.com/whitequark/parser) from 2.7.1.2 to 2.7.1.3.
- [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.2...v2.7.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-05-28 10:00:57 -04:00
Robin Ward 2033c3ec9c Revert "Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals""
This reverts commit b10e995d9d.
2020-05-28 08:42:36 -04:00
Guo Xiang Tan 8c86a109bb
DEV: Add ENV flag to test out `ActiveRecord::Failover`. 2020-05-28 16:24:22 +08:00
Blake Erickson b10e995d9d Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals"
This reverts commit 9dddbcc00d.
2020-05-27 16:14:09 -06:00
Robin Ward 9dddbcc00d DEV: Import `MessageBus` from `message-bus-client` instead of globals 2020-05-27 16:42:42 -04:00
Robin Ward 0f71d38d3a Revert "DEV: Import `MessageBus` from `message-bus-client` instead of globals (#9902)"
This reverts commit d3bd482142.
2020-05-27 16:34:30 -04:00
Robin Ward d3bd482142
DEV: Import `MessageBus` from `message-bus-client` instead of globals (#9902) 2020-05-27 15:56:46 -04:00
dependabot-preview[bot] 63b3155983
Build(deps): Bump onebox from 1.9.28.2 to 1.9.28.3 (#9887)
Bumps [onebox](https://github.com/discourse/onebox) from 1.9.28.2 to 1.9.28.3.
- [Release notes](https://github.com/discourse/onebox/releases)
- [Changelog](https://github.com/discourse/onebox/blob/master/CHANGELOG.md)
- [Commits](https://github.com/discourse/onebox/compare/v1.9.28.2...v1.9.28.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-05-27 08:38:16 +05:30
Arpit Jalan a6189c5070 Bump onebox version
- use oEmbed for Instagram onebox
2020-05-26 22:03:51 +05:30
dependabot-preview[bot] d38e571cba
Build(deps): Bump excon from 0.72.0 to 0.73.0 (#9228)
Bumps [excon](https://github.com/excon/excon) from 0.72.0 to 0.73.0.
- [Release notes](https://github.com/excon/excon/releases)
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](https://github.com/excon/excon/compare/v0.72.0...v0.73.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-26 12:28:28 -04:00
dependabot-preview[bot] 098c9e5950
Build(deps-dev): Bump rspec-rails from 4.0.0 to 4.0.1 (#9804)
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/rspec/rspec-rails/releases)
- [Changelog](https://github.com/rspec/rspec-rails/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v4.0.0...v4.0.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-05-25 15:50:56 +10:00
dependabot-preview[bot] 32d13ab97f
DEV: Bump rack-mini-profiler from 2.0.1 to 2.0.2 (#9865)
Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases)
- [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v2.0.1...v2.0.2)

This is a simple fix to restore client timings in the UI
2020-05-25 15:43:55 +10:00
Michael Brown d9a02d1336
Revert "Revert "Merge branch 'master' of https://github.com/discourse/discourse""
This reverts commit 20780a1eee.

* SECURITY: re-adds accidentally reverted commit:
  03d26cd6: ensure embed_url contains valid http(s) uri
* when the merge commit e62a85cf was reverted, git chose the 2660c2e2 parent to land on
  instead of the 03d26cd6 parent (which contains security fixes)
2020-05-23 00:56:13 -04:00
Jeff Atwood 20780a1eee Revert "Merge branch 'master' of https://github.com/discourse/discourse"
This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
2020-05-22 20:25:56 -07:00
dependabot-preview[bot] 11304ba27c
Build(deps): Bump rubocop from 0.83.0 to 0.84.0 (#9849)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.83.0 to 0.84.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.83.0...v0.84.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-21 09:23:34 -04:00
Guo Xiang Tan a2d939608d
Bump rails_failover to 0.2.0. 2020-05-21 11:41:58 +08:00
dependabot-preview[bot] cfff8b1f27
Build(deps): Bump puma from 4.3.4 to 4.3.5 (#9836)
Bumps [puma](https://github.com/puma/puma) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/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-05-20 10:37:43 -04:00
Guo Xiang Tan f7f436e536
DEV: Install `rails_failover` gem to test our Redis changes. 2020-05-20 15:40:27 +08:00
dependabot-preview[bot] 42229fecad
Build(deps): Bump rbtrace from 0.4.12 to 0.4.13 (#9827)
Bumps [rbtrace](https://github.com/tmm1/rbtrace) from 0.4.12 to 0.4.13.
- [Release notes](https://github.com/tmm1/rbtrace/releases)
- [Commits](https://github.com/tmm1/rbtrace/compare/v0.4.12...v0.4.13)

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-19 12:46:16 -04:00
dependabot-preview[bot] b23fe547ab
Build(deps): Bump puma from 4.3.3 to 4.3.4 (#9824)
Bumps [puma](https://github.com/puma/puma) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v4.3.3...v4.3.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-05-19 12:40:39 -04:00
dependabot-preview[bot] 01c27d991a
Build(deps-dev): Bump minitest from 5.14.0 to 5.14.1 (#9807)
Bumps [minitest](https://github.com/seattlerb/minitest) from 5.14.0 to 5.14.1.
- [Release notes](https://github.com/seattlerb/minitest/releases)
- [Changelog](https://github.com/seattlerb/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/seattlerb/minitest/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-05-19 11:34:53 -04:00
Krzysztof Kotlarek 16f6240782
FIX: Bump rack version from 2.0.8 to 2.2.2 (#9811)
Version 2.1.1 was not working with our Sidekiq but version 2.2.2 is fine
2020-05-19 08:43:45 +10:00
dependabot-preview[bot] 769611f2d9
Build(deps-dev): Bump ruby-prof from 1.4.0 to 1.4.1 (#9790)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.0 to 1.4.1.
- [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.4.0...1.4.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-05-15 10:13:49 -04:00
Sam Saffron 4601833e4e
PERF: ensure we run full GC on contexts
Prior to this change we would never clear memory from contexts and
rely on V8 reacting to pressure

This could lead to bloating of PrettyText and Transpiler contexts

This optimisations ensures that we will clear memory 2 seconds after
the last eval on the context
2020-05-15 14:01:54 +10:00
Sam Saffron 5b603cb3ab
FIX: update mini racer to correct heap dumps
This corrects an issue where mini racer's `write_heap_snapshot`
produces corrupt heaps cause the file is not flushed.
2020-05-14 17:52:05 +10:00
dependabot-preview[bot] e1f11f4374
Build(deps-dev): Bump better_errors from 2.7.0 to 2.7.1 (#9767)
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.7.0...v2.7.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-05-13 16:03:56 -04:00
dependabot-preview[bot] d69263f934
Build(deps-dev): Bump ruby-prof from 1.3.2 to 1.4.0 (#9761)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.3.2 to 1.4.0.
- [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.2...1.4.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-13 10:57:39 -04:00
dependabot-preview[bot] 4ea7a7cf67 Build(deps): Bump rubocop from 0.82.0 to 0.83.0
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.82.0 to 0.83.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.82.0...v0.83.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 14:28:29 +08:00
dependabot-preview[bot] 33b8314ac5
Build(deps): Bump public_suffix from 4.0.4 to 4.0.5 (#9733)
Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.4 to 4.0.5.
- [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/v4.0.4...v4.0.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-05-11 11:20:35 -04:00
dependabot-preview[bot] 22ed36e483
Build(deps): Bump rspec-expectations from 3.9.1 to 3.9.2 (#9732)
Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/rspec/rspec-expectations/releases)
- [Changelog](https://github.com/rspec/rspec-expectations/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-expectations/compare/v3.9.1...v3.9.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-05-11 11:20:15 -04:00
dependabot-preview[bot] dae29afd7d
Build(deps): Bump jquery-rails from 4.3.5 to 4.4.0 (#9709)
Bumps [jquery-rails](https://github.com/rails/jquery-rails) from 4.3.5 to 4.4.0.
- [Release notes](https://github.com/rails/jquery-rails/releases)
- [Changelog](https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/jquery-rails/compare/v4.3.5...v4.4.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-08 13:50:56 -04:00
Sam Saffron 609e929186
Revert "Revert "DEV: upgrade to Rails 6.0.3""
This reverts commit 2ff8b4f5d9.

Attempt #2 at a Rails update this time we also update the
rails_multisite gem to allow for cleaner reordering
2020-05-08 11:49:22 +10:00
David Taylor 2ff8b4f5d9
Revert "DEV: upgrade to Rails 6.0.3"
This was causing issues during multisite:migrate

https://meta.discourse.org/t/multisite-migrate-broken-since-rails-6-0-3-update/150691

This reverts commit 136a545653.
2020-05-07 11:44:39 +01:00
Sam Saffron 136a545653
DEV: upgrade to Rails 6.0.3
Upgrades Rails to latest, this version has better compatibility
with Ruby 2.7

During the upgrade we needed a new cleaner mechanism for configuring
message bus.

All tests are green.

If anything weird pops up please revert.
2020-05-07 15:53:40 +10:00
Jarek Radosz 666823d4b7 Revert "Revert "DEV: Move rubocop config to rubocop-discourse (#9616)""
This reverts commit 2d31a14789.

Should be good now - all the plugins are using the updated rubocop config.
2020-05-06 18:41:15 +02:00
Jarek Radosz 2d31a14789 Revert "DEV: Move rubocop config to rubocop-discourse (#9616)"
This reverts commit e23f1a9071.

Reverting as this currently breaks our plugin linting job in GithHub Action and Jenkins. Will re-revert after all the plugins get the latest rubocop config and/or a (potential) rubocop issue is fixed.
2020-05-06 17:22:25 +02:00
Arpit Jalan 10ca6968af Bump onebox version
- reuse existing video icon class
- CSS changes for reddit video onebox
2020-05-06 19:34:03 +05:30
Jarek Radosz e23f1a9071
DEV: Move rubocop config to rubocop-discourse (#9616) 2020-05-06 15:03:06 +02:00
Arpit Jalan 8ede0e7bc2 Bump onebox version.
- add linkedin and meetedgar to whitelist
- FEATURE: reddit video onebox
- FEATURE: facebook video onebox
2020-05-06 17:55:00 +05:30
Sam Saffron 57fcea7709
DEV: update rspec dependencies
rspec-rails 4.0 was released so we no longer need to depend on a
beta version. Also updates minor on a bunch of rspec gems.

Thanks to @ryanwi for raising this.
2020-05-04 15:21:34 +10:00
Guo Xiang Tan e32ac831ee
DEV: Update rubocop-discourse to 2.1.2. 2020-05-04 10:51:33 +08:00
dependabot-preview[bot] 85605efe84
Build(deps): Bump redis from 4.1.3 to 4.1.4 (#9608)
Bumps [redis](https://github.com/redis/redis-rb) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/redis/redis-rb/releases)
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v4.1.3...v4.1.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-05-01 11:06:03 -04:00
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