Commit Graph

537 Commits

Author SHA1 Message Date
dependabot[bot]
f6ec007ecd Bump webdrivers from 4.4.1 to 4.6.0
Bumps [webdrivers](https://github.com/titusfortner/webdrivers) from 4.4.1 to 4.6.0.
- [Release notes](https://github.com/titusfortner/webdrivers/releases)
- [Changelog](https://github.com/titusfortner/webdrivers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/titusfortner/webdrivers/compare/v4.4.1...v4.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 23:11:33 +00:00
Javi Martín
eed6697056 Merge pull request #4410 from consul/dependabot/bundler/invisible_captcha-2.0.0
Bump invisible_captcha from 1.1.0 to 2.0.0
2021-08-11 01:09:58 +02:00
dependabot[bot]
ad17532107 Bump audited from 4.9.0 to 4.10.0
Bumps [audited](https://github.com/collectiveidea/audited) from 4.9.0 to 4.10.0.
- [Release notes](https://github.com/collectiveidea/audited/releases)
- [Changelog](https://github.com/collectiveidea/audited/blob/master/CHANGELOG.md)
- [Commits](https://github.com/collectiveidea/audited/compare/v4.9.0...v4.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 22:47:50 +00:00
dependabot[bot]
5fc927b313 Bump invisible_captcha from 1.1.0 to 2.0.0
Bumps [invisible_captcha](https://github.com/markets/invisible_captcha) from 1.1.0 to 2.0.0.
- [Release notes](https://github.com/markets/invisible_captcha/releases)
- [Changelog](https://github.com/markets/invisible_captcha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markets/invisible_captcha/compare/v1.1.0...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 22:46:18 +00:00
dependabot[bot]
6470a8dbd0 Bump database_cleaner from 1.8.5 to 2.0.1
Bumps [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner) from 1.8.5 to 2.0.1.
- [Release notes](https://github.com/DatabaseCleaner/database_cleaner/releases)
- [Changelog](https://github.com/DatabaseCleaner/database_cleaner/blob/main/History.rdoc)
- [Commits](https://github.com/DatabaseCleaner/database_cleaner/compare/v1.8.5...v2.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 19:39:41 +00:00
Javi Martín
4e6fc194cb Merge pull request #4400 from consul/dependabot/bundler/view_component-2.28.0
Bump view_component from 2.19.1 to 2.28.0
2021-08-10 21:19:35 +02:00
dependabot[bot]
ec7ed5496f Bump recipient_interceptor from 0.2.0 to 0.3.0
Bumps [recipient_interceptor](https://github.com/croaky/recipient_interceptor) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/croaky/recipient_interceptor/releases)
- [Commits](https://github.com/croaky/recipient_interceptor/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-10 12:46:06 +00:00
dependabot-preview[bot]
403bf87744 Bump view_component from 2.19.1 to 2.28.0
Bumps [view_component](https://github.com/github/view_component) from 2.19.1 to 2.28.0.
- [Release notes](https://github.com/github/view_component/releases)
- [Changelog](https://github.com/github/view_component/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/view_component/compare/v2.19.1...v2.28.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-10 14:08:09 +02:00
dependabot-preview[bot]
ffc8ed738d Bump rubocop-performance from 1.7.1 to 1.10.1
Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.7.1 to 1.10.1.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.7.1...v1.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-10 13:29:42 +02:00
Javi Martín
ab9e99f45c Merge pull request #4288 from consul/dependabot/bundler/rubocop-rails-2.9.1
Bump rubocop-rails from 2.6.0 to 2.9.1
2021-08-10 13:23:32 +02:00
Javi Martín
bab5cbf03a Merge pull request #4215 from consul/dependabot/bundler/rubocop-0.93.1
Bump rubocop from 0.91.1 to 0.93.1
2021-08-10 13:15:52 +02:00
Javi Martín
815de7fb37 Merge pull request #4354 from consul/dependabot/bundler/rollbar-3.1.2
Bump rollbar from 3.0.1 to 3.1.2
2021-08-09 23:57:15 +02:00
dependabot-preview[bot]
33c962c63c Bump rubocop-rails from 2.6.0 to 2.9.1
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails) from 2.6.0 to 2.9.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.6.0...v2.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 22:41:26 +02:00
dependabot-preview[bot]
8979472820 Bump rubocop from 0.91.1 to 0.93.1
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.91.1 to 0.93.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.91.1...v0.93.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 17:11:24 +02:00
dependabot-preview[bot]
126f7bfb97 Bump rubocop-rspec from 1.41.0 to 1.44.1
Bumps [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec) from 1.41.0 to 1.44.1.
- [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.41.0...v1.44.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 16:51:58 +02:00
dependabot-preview[bot]
ef7c631248 Bump pg from 1.0.0 to 1.2.3
Bumps [pg](https://github.com/ged/ruby-pg) from 1.0.0 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/compare/v1.0.0...v1.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 15:38:18 +02:00
dependabot-preview[bot]
66f470e629 Bump knapsack_pro from 2.6.0 to 2.11.0
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 2.6.0 to 2.11.0.
- [Release notes](https://github.com/KnapsackPro/knapsack_pro-ruby/releases)
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v2.6.0...v2.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 15:16:58 +02:00
Javi Martín
73f3a91221 Merge pull request #4417 from consul/dependabot/bundler/capistrano-3.16.0
Bump capistrano from 3.14.1 to 3.16.0
2021-08-09 15:11:28 +02:00
dependabot-preview[bot]
4260563964 Bump omniauth-facebook from 7.0.0 to 8.0.0
Bumps [omniauth-facebook](https://github.com/simi/omniauth-facebook) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/simi/omniauth-facebook/releases)
- [Changelog](https://github.com/simi/omniauth-facebook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/simi/omniauth-facebook/compare/v7.0.0...v8.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-08-09 14:37:18 +02:00
Javi Martín
0473f1a38b Merge pull request #4419 from consul/dependabot/bundler/omniauth-google-oauth2-0.8.2
Bump omniauth-google-oauth2 from 0.8.0 to 0.8.2
2021-08-09 14:30:09 +02:00
dependabot[bot]
0c83943dc1 Bump i18n-tasks from 0.9.31 to 0.9.34
Bumps [i18n-tasks](https://github.com/glebm/i18n-tasks) from 0.9.31 to 0.9.34.
- [Release notes](https://github.com/glebm/i18n-tasks/releases)
- [Changelog](https://github.com/glebm/i18n-tasks/blob/main/CHANGES.md)
- [Commits](https://github.com/glebm/i18n-tasks/compare/v0.9.31...v0.9.34)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 11:57:51 +00:00
dependabot[bot]
711d65846c Bump omniauth-google-oauth2 from 0.8.0 to 0.8.2
Bumps [omniauth-google-oauth2](https://github.com/zquestz/omniauth-google-oauth2) from 0.8.0 to 0.8.2.
- [Release notes](https://github.com/zquestz/omniauth-google-oauth2/releases)
- [Changelog](https://github.com/zquestz/omniauth-google-oauth2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zquestz/omniauth-google-oauth2/compare/v0.8.0...v0.8.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 11:57:48 +00:00
dependabot[bot]
c1491a7ce0 Bump capistrano from 3.14.1 to 3.16.0
Bumps [capistrano](https://github.com/capistrano/capistrano) from 3.14.1 to 3.16.0.
- [Release notes](https://github.com/capistrano/capistrano/releases)
- [Commits](https://github.com/capistrano/capistrano/compare/v3.14.1...v3.16.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 01:13:46 +00:00
dependabot[bot]
2a1c83a526 Bump paranoia from 2.4.2 to 2.4.3
Bumps [paranoia](https://github.com/rubysherpas/paranoia) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/rubysherpas/paranoia/releases)
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md)
- [Commits](https://github.com/rubysherpas/paranoia/compare/v2.4.2...2.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-09 01:11:59 +00:00
Javi Martín
e25b6f4ebe Merge pull request #4424 from consul/dependabot/bundler/pronto-rubocop-0.11.1
Bump pronto-rubocop from 0.11.0 to 0.11.1
2021-08-09 02:13:07 +02:00
dependabot[bot]
ff27f43d45 Bump pronto-rubocop from 0.11.0 to 0.11.1
Bumps [pronto-rubocop](https://github.com/mmozuras/pronto-rubocop) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/mmozuras/pronto-rubocop/releases)
- [Commits](https://github.com/mmozuras/pronto-rubocop/compare/v0.11.0...v0.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-08 23:46:11 +00:00
dependabot[bot]
354cc0ae6c Bump globalize from 5.3.0 to 5.3.1
Bumps [globalize](https://github.com/globalize/globalize) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/globalize/globalize/releases)
- [Changelog](https://github.com/globalize/globalize/blob/master/CHANGELOG.md)
- [Commits](https://github.com/globalize/globalize/compare/v5.3.0...v5.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-08 23:41:32 +00:00
dependabot[bot]
e59742067c Bump bullet from 6.1.0 to 6.1.4
Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.1.0 to 6.1.4.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/6.1.0...6.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-08 23:12:02 +00:00
dependabot[bot]
51d6d4712d Bump groupdate from 5.2.1 to 5.2.2
Bumps [groupdate](https://github.com/ankane/groupdate) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/ankane/groupdate/releases)
- [Changelog](https://github.com/ankane/groupdate/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/groupdate/compare/v5.2.1...v5.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-08 22:25:14 +00:00
Javi Martín
cb49e1c6bb Bump rails from 5.2.4.5 to 5.2.4.6
Bumps [rails](https://github.com/rails/rails) from 5.2.4.5 to 5.2.4.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v5.2.4.5...v5.2.4.6)
2021-05-20 18:38:17 +02:00
dependabot[bot]
41f83b387e Bump puma from 4.3.6 to 4.3.8
Bumps [puma](https://github.com/puma/puma) from 4.3.6 to 4.3.8.
- [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.6...v4.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 07:31:40 +00:00
Javi Martín
ad638b6a0f Merge pull request #4412 from consul/dependabot/bundler/rails-5.2.4.5
Bump rails from 5.2.4.4 to 5.2.4.5
2021-03-20 20:14:14 +01:00
dependabot[bot]
83f23b3ef1 Bump rails from 5.2.4.4 to 5.2.4.5
Bumps [rails](https://github.com/rails/rails) from 5.2.4.4 to 5.2.4.5.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v5.2.4.4...v5.2.4.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 20:02:02 +01:00
dependabot-preview[bot]
ebdd889a5d [Security] Bump redcarpet from 3.5.0 to 3.5.1
Bumps [redcarpet](https://github.com/vmg/redcarpet) from 3.5.0 to 3.5.1. **This update includes a security fix.**
- [Release notes](https://github.com/vmg/redcarpet/releases)
- [Changelog](https://github.com/vmg/redcarpet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vmg/redcarpet/compare/v3.5.0...v3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-20 18:56:01 +00:00
dependabot-preview[bot]
bd39e3ce4a Bump pg_search from 2.3.4 to 2.3.5
Bumps [pg_search](https://github.com/Casecommons/pg_search) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/Casecommons/pg_search/releases)
- [Changelog](https://github.com/Casecommons/pg_search/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Casecommons/pg_search/compare/v2.3.4...v2.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-20 15:36:11 +00:00
Javi Martín
9f394c6c61 Do not require Pronto when running the application
Pronto is an external tool which is use to check code conventions and is
not needed to run the application, just like rubocop or scss-lint.

Loading it caused a couple of issues. First, it loaded BetterHtml, and
we had to disable it in order to avoid crashes in the development
environment.

Second, it loaded ruby-progressbar, which loads the ProgressBar class,
which conflicts with our own ProgressBar class. This made the
application crash whenever the ProgressBar class was used.
2021-03-09 14:31:37 +01:00
Javi Martín
c6a90b266d Use Pronto to check code conventions
This way developers can run the checks on their machines and using
`bundle exec` we guarantee the right versions of all our gems are being
used; with Hound we can only use the versions supported by their
service.

When including the pronto-erb_lint gem, we're getting errors in
development where our ERB does not follow the conventions Better HTML
expects. Since we only use Better HTML because ERB Lint depends on it,
and right now we are not ready to follow its conventions, we're
disabling it.

Note pronto depends on rugged, which requires CMake and pkg-config to
build the `libgit2` library it depends on. CMake and pkg-config are
installed by default in some GNU/Linux distributions like Ubuntu, but
might not be installed on other systems, so we're adding them as
development dependencies.
2021-03-02 15:48:24 +01:00
dependabot-preview[bot]
4a2d4a2b15 Bump rollbar from 3.0.1 to 3.1.2
Bumps [rollbar](https://github.com/rollbar/rollbar-gem) from 3.0.1 to 3.1.2.
- [Release notes](https://github.com/rollbar/rollbar-gem/releases)
- [Changelog](https://github.com/rollbar/rollbar-gem/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollbar/rollbar-gem/compare/v3.0.1...v3.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-12 05:54:29 +00:00
dependabot-preview[bot]
4a61fd2d8c Bump social-share-button from 1.1.0 to 1.2.3
Bumps [social-share-button](https://github.com/huacnlee/social-share-button) from 1.1.0 to 1.2.3.
- [Release notes](https://github.com/huacnlee/social-share-button/releases)
- [Changelog](https://github.com/huacnlee/social-share-button/blob/master/CHANGELOG.md)
- [Commits](https://github.com/huacnlee/social-share-button/compare/v1.1.0...v1.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-08 16:31:23 +01:00
Javi Martín
9b0026061e Specify erb_lint version in Gemfile
Just like we do for the rest of the gems.
2021-02-05 16:24:55 +01:00
Javi Martín
beaff17bec Merge pull request #4202 from consul/dependabot/bundler/pg_search-2.3.4
Bump pg_search from 2.3.0 to 2.3.4
2020-11-03 12:39:06 +01:00
Javi Martín
1ac8085aa9 Merge pull request #4206 from consul/svg_icons
Allow loading icons from SVG files
2020-11-03 12:26:55 +01:00
dependabot-preview[bot]
c9245ccdc5 Bump pg_search from 2.3.0 to 2.3.4
Bumps [pg_search](https://github.com/Casecommons/pg_search) from 2.3.0 to 2.3.4.
- [Release notes](https://github.com/Casecommons/pg_search/releases)
- [Changelog](https://github.com/Casecommons/pg_search/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Casecommons/pg_search/compare/v2.3.0...v2.3.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 18:06:05 +00:00
dependabot-preview[bot]
6ca9c7136e Bump rollbar from 3.0.0 to 3.0.1
Bumps [rollbar](https://github.com/rollbar/rollbar-gem) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/rollbar/rollbar-gem/releases)
- [Changelog](https://github.com/rollbar/rollbar-gem/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollbar/rollbar-gem/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 16:59:49 +00:00
dependabot-preview[bot]
136b4a51dd Bump savon from 2.12.0 to 2.12.1
Bumps [savon](https://github.com/savonrb/savon) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/savonrb/savon/releases)
- [Changelog](https://github.com/savonrb/savon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/savonrb/savon/compare/v2.12.0...v2.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-02 16:41:22 +00:00
Javi Martín
925f04e3f3 Allow loading icons from SVG files
There are a dozen ways to add an icon used for decoration. Each of them
offers advantages and disadvantages regarding these topics:

* Accessibility
* Ease of use for developers
* Ease of customization for CONSUL installations
* Maintainability
* Resulting file size
* Number of HTTP requests
* Browser support
* Robustness

We were using one of the most common ones: icon fonts. This technique
shines in many of these aspects. However, it misses the most important
one: accessibility. Users who configure their browser to display a
custom font would see "missing character" icons where our icons should
be displayed. Some users have pointed out they use a custom font because
they're dyslexic and webs using icon fonts make it extremely painful for
them [1].

Screen reader users might also be affected, since screen readers might
try to read the UTF-8 character used by the icon (even if it uses a UTF
Private Use Area) and will react to it in inconsistent ways. Since right
now browser support for different techniques to prevent it with CSS
ranges from non-existant (CSS speech module) to limited (use an
alternative text in the `content` property [2]), we've been adding an
HTML element with an `aria-hidden` attribute. However, by doing so the
ease of customizations for CONSUL installations is reduced, since
customizing ERB files is harder than customizing CSS.

Finally, font icons are infamous for not being that robust and
conflicting with UTF settings in certain browsers/devices. Recently Font
Awesome had a bug [3] because they added icons out of the Private Use
Area, and those icons could conflict with other UTF characters.

So, instead of loading Font Awesome icons with a font, we can add them
using their SVG files. There are several ways to do so, and all of them
solve the accessibility and robustness issues we've mentioned, so that
point won't be mentioned from now on.

All these techniques imply having to manually download Font Awesome
icons every time we upgrade Font Awesome, since the `font-awesome-sass`
gem doesn't include the `sprites/` and `svgs/` folders Font Awesome
includes in every release. So, from the maintenance poing of view,
they're all pretty lacking.

Method 1: SVG sprites with inline HTML

We can use SVG files where template icons are defined, like so:

<svg>
  <use xlink:href="solid.svg#search"></use>
</svg>

This technique has great browser support and it only generates one HTTP
request for all icons. However, it requires adding <svg> tags in many
views, making it harder to customize for CONSUL installations. For
developers we could reduce the burden by adding a helper for these
icons.

Downloading all the icons just to use one (or a few) might also be
inconvenient, since the total file size of these icons will be up to a
megabyte. To reduce the impact of this issue, we could either minimize
the SVG file, compress it, or generate a file with just the icons we
use. However, generating that custom file would be harder to maintain.

Method 2: CSS with one SVG icon per file

We can use the separate SVG files provided by Font Awesome, like so:

background: url("solid/search.svg");

Or, if we want to add a color to the icon:

backgound: blue;
mask-image: url("solid/search.svg");

Using this technique will result in one HTTP request per icon, which
might affect performance. Browser support is also limited to browsers
supporting mask-image, which at the time of writing is 95% of the
browsers, with the notable exception of Internet Explorer 11.

On the plus side, using CSS makes it easy to customize and (IMHO) easy
to work with on a daily basis.

Method 3: CSS with SVG sprites

We can use the aforementioned sprites provided by Font Awesome and use
them with CSS:

backgound: blue;
mask-image: url("solid.svg#search");

The number of HTTP requests and file size are similar to Method 1, while
browser support, ease of customization and ease of use are similar to
Method 2.

There's one extra gotcha: this method requires doing minor changes to
the files provided by Font Awesome, which means this solution is harder
to maintain, since we'll have to do the same changes every time we
upgrade Font Awesome. Mainly we need to add these changes to every
sprite file:

- <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
+<!--
+This is a modified version of Font Awesome Free regular sprite file.
The icons are exactly as they originally were; the only changes are:
+
+* <symbol> tags have been replaced with <svg> tags and a <style> tag
has been added
+* A <style> tag has been added
+* The style="display:none" attribute of the main <svg> tag has been
removed
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+  <style>
+    svg svg { display: none }
+    svg svg:target { display: inline }
+  </style>

And then replace every <symbol> tag with a <svg> tag.

Method 4: CSS with Data URI

Finally, we can write the icons directly in the CSS:

backgound: blue;
mask-image: url('data:image/svg+xml;utf8,<svg...');

This method does not generate any extra HTTP requests and only downloads
the icons we need. However, maintaining it is really hard, since we need
to manually copy all the <svg> code for every icon we use, and do it
again every time we upgrade Font Awesome.

In this commit, we implement Method 2. To improve browser support, we're
falling back to font icons on browsers which don't support mask images.
So 5% of the browsers might still conflict with users changing the fonts
or with screen readers trying to announce the icon character. We believe
this is acceptable; the other option for these browsers would be to show
those icons as a background image, meaning the icons would always be
black, meaning users of these browsers would have trouble to distinguish
them if the background was dark as well.

Since we aren't sure whether the performance hit of having one HTTP
request per icon is overcome by only requesting the icons we actually
use, we aren't taking this factor into account when choosing between
methods 2 and 3. We believe this method will be the less painful one to
maintain and customize. Generating SVG sprites with just the icons we
use would increase performance, but it would make it harder for existing
CONSUL installations to use icons we haven't included in the sprites.

[1] https://speakerdeck.com/ninjanails/death-to-icon-fonts
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/content#Browser_compatibility
[3] https://blog.fontawesome.com/fixing-a-unicode-bug-in-5-14-0/
2020-10-26 16:26:21 +01:00
dependabot-preview[bot]
ae80fa4a1a Bump rubocop-rails from 2.3.2 to 2.6.0
Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails) from 2.3.2 to 2.6.0.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-rails/compare/v2.3.2...v2.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-26 10:53:20 +01:00
dependabot-preview[bot]
ac30f71bda Bump rubocop-rspec from 1.35.0 to 1.41.0
Bumps [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec) from 1.35.0 to 1.41.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.35.0...v1.41.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-25 14:23:53 +01:00
dependabot-preview[bot]
e5f4869c02 Bump rubocop from 0.83.0 to 0.91.0
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.83.0 to 0.91.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.91.0)

The `ConsiderPunctuation` option in the `OrderedGems` rule now defaults
to false. We're changing it to true so we keep the existing behavior and
because that's the way programs like vim sort lines.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-Authored-By: Javi Martín <javim@elretirao.net>
2020-10-23 12:01:39 +02:00
Javi Martín
dfb80b08c7 Bump devise-security from 0.10.1 to 0.11.1
The original devise_security_extension gem has not been maintained for
years. Its last release was version 0.10.0, and wasn't compatible with
Rails 5, and so we were using its master branch.

Since the gem was unmaintained, it was forked as devise-security and the
aforementioned master branch was released as version 0.10.1. This
version wasn't published in Rubygems, though, so we're now using the
first version that was published in Rubygems and had a release
announment [1].

Dependabot will probably open a pull request to upgrade to the latest
version, but for now I'm trying to keep the devise-security gem as
similar as the version we were using to make sure they're compatible,
particularly considering we're monkey-patching some of the modules
provided by this gem.

[1] https://github.com/devise-security/devise-security/releases/tag/v0.11.1
2020-10-22 13:58:14 +02:00