diff --git a/.travis.yml b/.travis.yml index 08901f4..f4e4330 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: ruby rvm: - 2.4.9 - 2.6.5 - - 2.7.0 addons: postgresql: "9.4" @@ -11,11 +10,6 @@ env: - REDMINE_VER=3.4-stable - REDMINE_VER=4.1-stable -matrix: - exclude: - - rvm: 2.7.0 - env: REDMINE_VER=3.4-stable - install: "echo skip bundle install" before_script: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aed2bf..aecc9f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.7.3 + +* Fix None protocol +* Fix conflict with redmineup/a_common_lib +* Fix runtime error +* Remove ruby 2.7.0 from build matrix + # 1.7.2 * Add API restriction option diff --git a/init.rb b/init.rb index 956cd05..d745455 100644 --- a/init.rb +++ b/init.rb @@ -17,7 +17,7 @@ Redmine::Plugin.register :redmine_2fa do name 'Redmine 2FA' - version '1.7.2' + version '1.7.3' url 'https://github.com/southbridgeio/redmine_2fa' description 'Two-factor authorization for Redmine' author 'Southbridge' diff --git a/lib/redmine_two_fa/patches/application_controller_patch.rb b/lib/redmine_two_fa/patches/application_controller_patch.rb index f673fdf..ffd9cd7 100644 --- a/lib/redmine_two_fa/patches/application_controller_patch.rb +++ b/lib/redmine_two_fa/patches/application_controller_patch.rb @@ -7,4 +7,6 @@ def find_current_user end end -ApplicationController.prepend(TwoFaApplicationControllerPatch) +Rails.configuration.to_prepare do + ApplicationController.prepend(TwoFaApplicationControllerPatch) +end diff --git a/lib/redmine_two_fa/protocols/google_auth.rb b/lib/redmine_two_fa/protocols/google_auth.rb index 10110df..5996a53 100644 --- a/lib/redmine_two_fa/protocols/google_auth.rb +++ b/lib/redmine_two_fa/protocols/google_auth.rb @@ -3,7 +3,7 @@ class GoogleAuth < BaseProtocol def generate_qr(user) qr_size ||= 10 RQRCode::QRCode.new(user.provisioning_uri("#{user.login}", issuer: "#{Setting.host_name}"), size: qr_size, level: :h) - rescue RQRCode::QRCodeRunTimeError => e + rescue RQRCodeCore::QRCodeRunTimeError=> e retry unless (qr_size += 1) > 20 raise e end diff --git a/lib/redmine_two_fa/protocols/none.rb b/lib/redmine_two_fa/protocols/none.rb index 1274f60..7240981 100644 --- a/lib/redmine_two_fa/protocols/none.rb +++ b/lib/redmine_two_fa/protocols/none.rb @@ -3,5 +3,9 @@ class None < BaseProtocol def bypass? true end + + def initial_partial + 'account/init_2fa/none' + end end end