From 8c2c1654803784bd1c642b5054ff136ef8ddbc8c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 14:10:35 +0000 Subject: [PATCH 1/3] Bump font-awesome-sass from 4.5.0 to 5.13.0 Bumps [font-awesome-sass](https://github.com/FortAwesome/font-awesome-sass) from 4.5.0 to 5.13.0. - [Release notes](https://github.com/FortAwesome/font-awesome-sass/releases) - [Commits](https://github.com/FortAwesome/font-awesome-sass/commits) Signed-off-by: dependabot-preview[bot] --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 5a0c005a..840bf529 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ gem 'chartjs-ror', :git => 'git://github.com/ZeiP/chartjs-ror.git' # gem 'jbuilder', '~> 1.2' gem "bootstrap-sass", "3.4.1" -gem "font-awesome-sass", "~> 4.5.0" +gem "font-awesome-sass", "~> 5.13.0" group :development do gem "spring" diff --git a/Gemfile.lock b/Gemfile.lock index 1f36a807..7132255e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,8 +101,8 @@ GEM factory_bot (~> 6.1.0) railties (>= 5.0.0) ffi (1.9.25) - font-awesome-sass (4.5.0) - sass (>= 3.2) + font-awesome-sass (5.13.0) + sassc (>= 1.11) globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) @@ -307,7 +307,7 @@ DEPENDENCIES coffee-rails (~> 5.0.0) database_cleaner factory_bot_rails - font-awesome-sass (~> 4.5.0) + font-awesome-sass (~> 5.13.0) htmlentities jquery-rails (~> 4.4) jquery-ui-rails (~> 5.0.5) From ea6c11c3a41c6df7df35b570a3dd1132c11bde3d Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Wed, 19 Aug 2020 11:54:50 +0300 Subject: [PATCH 2/3] Add the style parameter --- app/helpers/icon_helper.rb | 4 ++-- app/views/shared/_navbar.html.erb | 10 +++++----- test/helpers/icon_helper_test.rb | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb index 3fb817fa..108a9e9b 100644 --- a/app/helpers/icon_helper.rb +++ b/app/helpers/icon_helper.rb @@ -1,7 +1,7 @@ module IconHelper include FontAwesome::Sass::Rails::ViewHelpers - def icon_fw(icon, text = nil, html_options = {}) + def icon_fw(style, name, text = nil, html_options = {}) text, html_options = nil, text if text.is_a?(Hash) if html_options.key?(:class) @@ -10,6 +10,6 @@ module IconHelper html_options[:class] = "fa-fw" end - icon(icon, text, html_options) + icon(style, name, text, html_options) end end diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 709670c5..dd664fe8 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -67,16 +67,16 @@ <%= content_tag :span, t('layouts.navigation.options'), class: 'visible-xs-inline' %> diff --git a/test/helpers/icon_helper_test.rb b/test/helpers/icon_helper_test.rb index 5ab2e43f..90eaf3f4 100644 --- a/test/helpers/icon_helper_test.rb +++ b/test/helpers/icon_helper_test.rb @@ -4,10 +4,10 @@ class IconHelperTest < ActionView::TestCase include IconHelper test 'icon_fw generates fixed-width class' do - assert_equal '', icon_fw('gear') + assert_equal '', icon_fw('fas', 'gear') end test 'icon_fw accepts an additional class' do - assert_equal '', icon_fw('gear', class: 'myclass') + assert_equal '', icon_fw('fas', 'gear', class: 'myclass') end end From 7bad259d2c2630616127f9274982d1abb2b9147e Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Wed, 19 Aug 2020 12:25:59 +0300 Subject: [PATCH 3/3] Fixed a few more uses of the library icon helper --- app/views/search/_index.html.erb | 2 +- app/views/shared/_navbar.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/search/_index.html.erb b/app/views/search/_index.html.erb index b77fae66..ced351fc 100644 --- a/app/views/search/_index.html.erb +++ b/app/views/search/_index.html.erb @@ -4,7 +4,7 @@ <%= text_field_tag(:search, params[:search], class: 'form-control') %>
<%= button_tag(type: 'submit', class: 'btn pull-right') do%> - <%= icon('search', class: 'hidden-xs') %> + <%= icon('fas', 'search', class: 'hidden-xs') %> <% end %>
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index dd664fe8..f0f5fdf9 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -63,7 +63,7 @@