From d882c10056adb69352485809a48f800f88972f41 Mon Sep 17 00:00:00 2001 From: Nicholas Lee Date: Fri, 5 Nov 2021 19:37:08 -0700 Subject: [PATCH] Remove `af_testing`, update `minitest` --- Gemfile | 7 ++++--- gemfiles/ruby_2.6.3_rails60.gemfile | 7 ++++--- gemfiles/ruby_2.6.3_rails61.gemfile | 7 ++++--- gemfiles/ruby_2.7.1_rails60.gemfile | 7 ++++--- gemfiles/ruby_2.7.1_rails61.gemfile | 7 ++++--- test/dsig_test.rb | 27 ++------------------------- test/test_helper.rb | 3 +-- 7 files changed, 23 insertions(+), 42 deletions(-) diff --git a/Gemfile b/Gemfile index ef03201..14d6550 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,15 @@ # frozen_string_literal: true +source 'https://rubygems.org' + source 'https://rubygems.org' do - gem 'minitest', '>= 5.8', '< 6' + gem 'minitest', '>= 5.14', '< 6' gem 'minitest-reporters', '>= 1.4', '< 2' - gem 'simplecov', '>= 0.18', '< 1', group: :test, require: false + gem 'simplecov', '>= 0.21', '< 1', group: :test, require: false end source 'https://rubygems.pkg.github.com/appfolio' do gem 'af_gems', '>= 9.2', '< 10', group: :development - gem 'af_testing', '>= 14.4', '< 15' end gemspec diff --git a/gemfiles/ruby_2.6.3_rails60.gemfile b/gemfiles/ruby_2.6.3_rails60.gemfile index d15388c..081ee5d 100644 --- a/gemfiles/ruby_2.6.3_rails60.gemfile +++ b/gemfiles/ruby_2.6.3_rails60.gemfile @@ -1,15 +1,16 @@ # This file was generated by Appraisal +source "https://rubygems.org" + source "https://rubygems.org" do - gem "minitest", ">= 5.8", "< 6" + gem "minitest", ">= 5.14", "< 6" gem "minitest-reporters", ">= 1.4", "< 2" - gem "simplecov", ">= 0.18", "< 1", group: :test, require: false + gem "simplecov", ">= 0.21", "< 1", group: :test, require: false gem "rails", "~> 6.0.0" end source "https://rubygems.pkg.github.com/appfolio" do gem "af_gems", ">= 9.2", "< 10", group: :development - gem "af_testing", ">= 14.4", "< 15" end gemspec path: "../" diff --git a/gemfiles/ruby_2.6.3_rails61.gemfile b/gemfiles/ruby_2.6.3_rails61.gemfile index 885b114..b23814d 100644 --- a/gemfiles/ruby_2.6.3_rails61.gemfile +++ b/gemfiles/ruby_2.6.3_rails61.gemfile @@ -1,15 +1,16 @@ # This file was generated by Appraisal +source "https://rubygems.org" + source "https://rubygems.org" do - gem "minitest", ">= 5.8", "< 6" + gem "minitest", ">= 5.14", "< 6" gem "minitest-reporters", ">= 1.4", "< 2" - gem "simplecov", ">= 0.18", "< 1", group: :test, require: false + gem "simplecov", ">= 0.21", "< 1", group: :test, require: false gem "rails", "~> 6.1.0" end source "https://rubygems.pkg.github.com/appfolio" do gem "af_gems", ">= 9.2", "< 10", group: :development - gem "af_testing", ">= 14.4", "< 15" end gemspec path: "../" diff --git a/gemfiles/ruby_2.7.1_rails60.gemfile b/gemfiles/ruby_2.7.1_rails60.gemfile index d15388c..081ee5d 100644 --- a/gemfiles/ruby_2.7.1_rails60.gemfile +++ b/gemfiles/ruby_2.7.1_rails60.gemfile @@ -1,15 +1,16 @@ # This file was generated by Appraisal +source "https://rubygems.org" + source "https://rubygems.org" do - gem "minitest", ">= 5.8", "< 6" + gem "minitest", ">= 5.14", "< 6" gem "minitest-reporters", ">= 1.4", "< 2" - gem "simplecov", ">= 0.18", "< 1", group: :test, require: false + gem "simplecov", ">= 0.21", "< 1", group: :test, require: false gem "rails", "~> 6.0.0" end source "https://rubygems.pkg.github.com/appfolio" do gem "af_gems", ">= 9.2", "< 10", group: :development - gem "af_testing", ">= 14.4", "< 15" end gemspec path: "../" diff --git a/gemfiles/ruby_2.7.1_rails61.gemfile b/gemfiles/ruby_2.7.1_rails61.gemfile index 885b114..b23814d 100644 --- a/gemfiles/ruby_2.7.1_rails61.gemfile +++ b/gemfiles/ruby_2.7.1_rails61.gemfile @@ -1,15 +1,16 @@ # This file was generated by Appraisal +source "https://rubygems.org" + source "https://rubygems.org" do - gem "minitest", ">= 5.8", "< 6" + gem "minitest", ">= 5.14", "< 6" gem "minitest-reporters", ">= 1.4", "< 2" - gem "simplecov", ">= 0.18", "< 1", group: :test, require: false + gem "simplecov", ">= 0.21", "< 1", group: :test, require: false gem "rails", "~> 6.1.0" end source "https://rubygems.pkg.github.com/appfolio" do gem "af_gems", ">= 9.2", "< 10", group: :development - gem "af_testing", ">= 14.4", "< 15" end gemspec path: "../" diff --git a/test/dsig_test.rb b/test/dsig_test.rb index 2301c4c..b5b7a3c 100644 --- a/test/dsig_test.rb +++ b/test/dsig_test.rb @@ -5,7 +5,7 @@ require 'base64' class DsigTest < Minitest::Test - def _test_generate_key #very slow so not run by default + def test_generate_key #very slow so not run by default signer=EzCrypto::Signer.generate assert signer.rsa? assert !signer.dsa? @@ -243,7 +243,7 @@ def test_load_trusted_truststore sf_root=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/sf-class2-root.crt" assert trust.verify(sf_root) starfield=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/sf_intermediate.crt" - assert trust.verify(starfield) if AfTesting.circle_ci? + assert trust.verify(starfield) if ENV.key?('CIRCLECI') agree2=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert" # DSS1 was dropped from OpenSSL in version 1.1 refute trust.verify(agree2) @@ -255,29 +255,6 @@ def test_load_trusted_truststore refute trust.verify(cert) end -# Disabling these until pkyp is back up -# def test_public_key_load_from_pkyp -# verifier=EzCrypto::Verifier.from_pkyp "e93e18114cbefaaa89fda908b09df63d3662879a" -# agree2=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert" -# assert_equal agree2.cert.to_s,verifier.cert.to_s -# assert verifier -# end -# -# def test_register_public_key_at_pkyp -# pub=EzCrypto::Verifier.from_file File.dirname(__FILE__) + "/agree2.com.cert" -# assert_equal pub.digest,pub.register_with_pkyp -# end -# -# def test_create_register_and_fetch_public_key -# signer=EzCrypto::Signer.generate -# assert_equal signer.verifier.digest,signer.verifier.register_with_pkyp -# verifier=EzCrypto::Verifier.from_pkyp signer.verifier.digest -# sig=signer.sign "hello" -# assert sig -# assert verifier.verify( sig,"hello") -# end -# - def assert_signer(signer) assert signer assert signer.public_key diff --git a/test/test_helper.rb b/test/test_helper.rb index e2ca104..e3043f8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -20,8 +20,7 @@ end end -require 'af_testing/mini_test' require 'minitest/autorun' require 'minitest/reporters' -MiniTest::Reporters.use! +MiniTest::Reporters.use! unless ENV['RM_INFO']