Fix login button for battle net

This commit is contained in:
2021-08-09 20:40:48 +02:00
parent 8e5e5336c7
commit 2a37c27c30
5 changed files with 47 additions and 40 deletions

16
Gemfile
View File

@@ -7,42 +7,42 @@ ruby '3.0.1'
# Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. # Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity.
# It encourages beautiful code by favoring convention over configuration. # It encourages beautiful code by favoring convention over configuration.
gem 'rails', '~> 6.1.3', '>= 6.1.3.1' gem 'rails', '~> 6.1.4'
# A set of common locale data and translations to internationalize and/or localize your Rails applications # A set of common locale data and translations to internationalize and/or localize your Rails applications
gem 'rails-i18n', '~> 6.0.0' gem 'rails-i18n', '~> 6.0.0'
# Use postgresql as the database for Active Record # Use postgresql as the database for Active Record
gem 'pg', '~> 1.1' gem 'pg', '~> 1.1'
# Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications # Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications
gem 'puma', '~> 5.0' gem 'puma', '~> 5.4.0'
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '>= 6' gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0' gem 'webpacker', '~> 5.0'
# The speed of a single-page web application without having to write any JavaScript. # The speed of a single-page web application without having to write any JavaScript.
gem 'turbo-rails' gem 'turbo-rails', '~> 0.6.0'
# Use Redis adapter to run Action Cable in production # Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.2.5' gem 'redis', '~> 4.2.5'
# Autoload dotenv in Rails # Autoload dotenv in Rails
gem 'dotenv-rails', '~> 2.7.6' gem 'dotenv-rails', '~> 2.7.6'
# Use Active Model has_secure_password # Use Active Model has_secure_password
gem 'bcrypt', '~> 3.1.7' gem 'bcrypt', '~> 3.1.16'
# Flexible authentication solution for Rails with Warden # Flexible authentication solution for Rails with Warden
gem 'devise', '~> 4.8.0' gem 'devise', '~> 4.8.0'
# Tame Rails' multi-line logging into a single line per request # Tame Rails' multi-line logging into a single line per request
gem 'lograge', '~> 0.11.2' gem 'lograge', '~> 0.11.2'
# Stores and retrieves localized data through attributes on a Ruby class, with flexible support for different storage strategies # Stores and retrieves localized data through attributes on a Ruby class, with flexible support for different storage strategies
gem 'mobility', '~> 1.1.1' gem 'mobility', '~> 1.1.3'
# A generalized Rack framework for multiple-provider authentication. # A generalized Rack framework for multiple-provider authentication.
gem 'omniauth' gem 'omniauth', '~> 2.0.4'
# Omniauth Strategy for Battle.net OAuth Login. For more info visit https://dev.battle.net # Omniauth Strategy for Battle.net OAuth Login. For more info visit https://dev.battle.net
gem 'omniauth-bnet', '~> 2.0.1', git: 'https://github.com/Dainii/omniauth-bnet' gem 'omniauth-bnet', '~> 2.0.1', git: 'https://github.com/Dainii/omniauth-bnet'
# This gem provides a mitigation against CVE-2015-9284 # This gem provides a mitigation against CVE-2015-9284
gem 'omniauth-rails_csrf_protection' gem 'omniauth-rails_csrf_protection', '~> 1.0.0'
# A Ruby wrapper around Blizzard's Game Data and Profile APIs # A Ruby wrapper around Blizzard's Game Data and Profile APIs
gem 'rbattlenet', '~> 2.2.9', git: 'https://github.com/Dainii/rbattlenet' gem 'rbattlenet', '~> 2.2.9', git: 'https://github.com/Dainii/rbattlenet'
# A gem that provides Rails integration for the Sentry error logger # A gem that provides Rails integration for the Sentry error logger
gem 'sentry-rails', '~> 4.4.0' gem 'sentry-rails', '~> 4.4.0'
gem 'sentry-ruby', '~> 4.4.1' gem 'sentry-ruby', '~> 4.4.2'
# Simple, efficient background processing for Ruby # Simple, efficient background processing for Ruby
gem 'sidekiq', '~> 6.2.1' gem 'sidekiq', '~> 6.2.1'
# Agnostic pagination in plain ruby # Agnostic pagination in plain ruby

View File

@@ -419,15 +419,15 @@ DEPENDENCIES
listen (~> 3.3) listen (~> 3.3)
lograge (~> 0.11.2) lograge (~> 0.11.2)
mobility (~> 1.1.1) mobility (~> 1.1.1)
omniauth omniauth (~> 2.0.4)
omniauth-bnet (~> 2.0.1)! omniauth-bnet (~> 2.0.1)!
omniauth-rails_csrf_protection omniauth-rails_csrf_protection (~> 1.0.0)
pagy (~> 4.3.0) pagy (~> 4.3.0)
pg (~> 1.1) pg (~> 1.1)
pry-rails (~> 0.3.9) pry-rails (~> 0.3.9)
puma (~> 5.0) puma (~> 5.0)
rack-mini-profiler (~> 2.3.2) rack-mini-profiler (~> 2.3.2)
rails (~> 6.1.3, >= 6.1.3.1) rails (~> 6.1.4)
rails-erd rails-erd
rails-i18n (~> 6.0.0) rails-i18n (~> 6.0.0)
rbattlenet (~> 2.2.9)! rbattlenet (~> 2.2.9)!

View File

@@ -37,7 +37,9 @@
<% else %> <% else %>
<ul class="navbar-nav ms-auto mb-2 mb-lg-0"> <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<%= render 'layouts/locales' %> <%= render 'layouts/locales' %>
<%= link_to 'Sign in with <i class="fab fa-battle-net"></i>'.html_safe, user_bnet_omniauth_authorize_path, method: :post, class: "btn btn-primary nav-item" %> <%= button_to user_bnet_omniauth_authorize_path, class: 'btn btn-primary nav-item', name: 'login', form: { 'data-turbo': false } do %>
Sign in with <i class="fab fa-battle-net"></i>
<% end %>
</ul> </ul>
<% end %> <% end %>
</ul> </ul>

View File

@@ -3,13 +3,13 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.3", "@fortawesome/fontawesome-free": "^5.15.3",
"@hotwired/turbo-rails": "^7.0.0-beta.5", "@hotwired/turbo-rails": "^7.0.0-rc.1",
"@popperjs/core": "^2.9.2", "@popperjs/core": "^2.9.2",
"@rails/actioncable": "^6.0.0", "@rails/actioncable": "^6.1.4",
"@rails/activestorage": "^6.0.0", "@rails/activestorage": "^6.1.4",
"@rails/ujs": "^6.0.0", "@rails/ujs": "^6.1.4",
"@rails/webpacker": "5.2.1", "@rails/webpacker": "5.2.1",
"bootstrap": "^5.0.0-beta3", "bootstrap": "^5.1.0",
"flag-icon-css": "^3.5.0", "flag-icon-css": "^3.5.0",
"jquery": "^3.6.0" "jquery": "^3.6.0"
}, },

51
yarn.lock generated
View File

@@ -852,18 +852,18 @@
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz#c36ffa64a2a239bf948541a97b6ae8d729e09a9a"
integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w== integrity sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==
"@hotwired/turbo-rails@^7.0.0-beta.5": "@hotwired/turbo-rails@^7.0.0-rc.1":
version "7.0.0-beta.5" version "7.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@hotwired/turbo-rails/-/turbo-rails-7.0.0-beta.5.tgz#a0efdb7a20613845c43afe6f376b353e62f7e68d" resolved "https://registry.yarnpkg.com/@hotwired/turbo-rails/-/turbo-rails-7.0.0-rc.1.tgz#68cc07b2a1e7d9b29240c525c657722b3f0c3842"
integrity sha512-zj+ZYbs2IHeJHtLavcLX5K0oW/3K8s3zjok4lpujxqLactp3OpuqBZxKBr+tgODnAX/WYFoKLpzivyx3xVRfTw== integrity sha512-LLOgtHWb/cnz0bXlfJ9khWHapQuCOuUI48yiSVgL3veklvbX1vyQlk/ALn35Z6nHTi7Bf+MHMS9H5W2c/vwKuw==
dependencies: dependencies:
"@hotwired/turbo" "^7.0.0-beta.4" "@hotwired/turbo" "^7.0.0-rc.1"
"@rails/actioncable" "^6.1.0" "@rails/actioncable" "^6.0.0"
"@hotwired/turbo@^7.0.0-beta.4": "@hotwired/turbo@^7.0.0-rc.1":
version "7.0.0-beta.5" version "7.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-7.0.0-beta.5.tgz#3167e8e882b9075c5b3b2e2f32432cca2862c61c" resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-7.0.0-rc.1.tgz#a5c1be86def1cc39b3011c935c5734b8632af5c3"
integrity sha512-z10dI2U/StkMSmnfJUsyez6jrhnitgzjyw2CxE3LnAAzW/TBhvsMYKsVG7Xu337r3gh0r6UwIFWyvvtm3in6gg== integrity sha512-niNA68ku4TZYbV3biwTPf1L5CidP50S2xfeb5rGQfodvPB9UAtkqKFFRIA0LL8y0DG4MGIZ/QFlbvlmFea5p4w==
"@npmcli/move-file@^1.0.1": "@npmcli/move-file@^1.0.1":
version "1.1.2" version "1.1.2"
@@ -878,22 +878,27 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353"
integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q== integrity sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==
"@rails/actioncable@^6.0.0", "@rails/actioncable@^6.1.0": "@rails/actioncable@^6.0.0":
version "6.1.3" version "6.1.3"
resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.1.3.tgz#c8a67ec4d22ecd6931f7ebd98143fddbc815419a" resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.1.3.tgz#c8a67ec4d22ecd6931f7ebd98143fddbc815419a"
integrity sha512-m02524MR9cTnUNfGz39Lkx9jVvuL0tle4O7YgvouJ7H83FILxzG1nQ5jw8pAjLAr9XQGu+P1sY4SKE3zyhCNjw== integrity sha512-m02524MR9cTnUNfGz39Lkx9jVvuL0tle4O7YgvouJ7H83FILxzG1nQ5jw8pAjLAr9XQGu+P1sY4SKE3zyhCNjw==
"@rails/activestorage@^6.0.0": "@rails/actioncable@^6.1.4":
version "6.1.3" version "6.1.4"
resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-6.1.3.tgz#d76ce0fe59b5778e05b967c22c61b2964fde112a" resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-6.1.4.tgz#c3c5a9f8302c429af9722b6c50ab48049016d2a3"
integrity sha512-9it2rc+79E+GP4GWX/P2M9/INcp1SicJaiF5yqj+k40x/JY+/eVdSAGfRCgq2G/FwkUdGlaKnG2OoDcXchczlw== integrity sha512-0LmSKJTuo2dL6BQ+9xxLnS9lbkyfz2mBGeBnQ2J7o9Bn0l0q+ZC6VuoZMZZXPvABI4QT7Nfknv5WhfKYL+boew==
"@rails/activestorage@^6.1.4":
version "6.1.4"
resolved "https://registry.yarnpkg.com/@rails/activestorage/-/activestorage-6.1.4.tgz#7772f539cc846df5f4364fc57ccb48860f9e966e"
integrity sha512-1Tm8uaVBhLTDEG4YaFPvqguhjbUGSPVItm0CfkRpIFZIkybWzFAxatIrk4YVOOxB8ZdXS7GdeYa1qVwjdiDkgQ==
dependencies: dependencies:
spark-md5 "^3.0.0" spark-md5 "^3.0.0"
"@rails/ujs@^6.0.0": "@rails/ujs@^6.1.4":
version "6.1.3" version "6.1.4"
resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.3.tgz#90ef26caa0925492b1a3b1495db09cfbe49e745e" resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.4.tgz#093d5341595a02089ed309dec40f3c37da7b1b10"
integrity sha512-9mip5o+LVouWAqLMNJWhxda+D5uP+4RziNECgOGJlL6k3rc5SC/ljCHpV9Cym4i3oeGZkpZJ2tu4frCwt84kzQ== integrity sha512-O3lEzL5DYbxppMdsFSw36e4BHIlfz/xusynwXGv3l2lhSlvah41qviRpsoAlKXxl37nZAqK+UUF5cnGGK45Mfw==
"@rails/webpacker@5.2.1": "@rails/webpacker@5.2.1":
version "5.2.1" version "5.2.1"
@@ -1555,10 +1560,10 @@ boolbase@^1.0.0, boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
bootstrap@^5.0.0-beta3: bootstrap@^5.1.0:
version "5.0.0-beta3" version "5.1.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.0-beta3.tgz#c959f61fbd03667a1b158f763856994859d7a465" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.1.0.tgz#543ef8f44f4b9af67b0230f19508542fec38ef55"
integrity sha512-0urccjfIOzhrb9qJysN8XW/DRw6rg3zH7qLeKIp4Zyl8+Ens4JWB0NC0cB5AhnSFPd2tftRggjwCMxablo6Tpg== integrity sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==
brace-expansion@^1.1.7: brace-expansion@^1.1.7:
version "1.1.11" version "1.1.11"