diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..6c6df7e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ruby +{ + "name": "Ruby", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bullseye" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "ruby --version", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ba0385..f4f9b27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: - '2.7.2' - '3.0.0' - '3.1.2' + - '3.2' + - '3.3' - 'head' gemfile: - gemfiles/rails_5_1.gemfile diff --git a/Gemfile b/Gemfile index 4aa1cf6..b0799e1 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' gemspec group :development, :test do - gem "sqlite3", :platform => [:ruby, :mswin, :mingw] + gem "sqlite3", '~> 1.4', :platform => [:ruby, :mswin, :mingw] gem "activerecord-jdbcsqlite3-adapter", '~> 1.3.13', :platform => :jruby gem "test-unit", "~> 3.0" end diff --git a/derailed_benchmarks.gemspec b/derailed_benchmarks.gemspec index ba3ebb6..edaf812 100644 --- a/derailed_benchmarks.gemspec +++ b/derailed_benchmarks.gemspec @@ -29,15 +29,19 @@ Gem::Specification.new do |gem| gem.add_dependency "rack", ">= 1" gem.add_dependency "rake", "> 10", "< 14" gem.add_dependency "thor", ">= 0.19", "< 2" - gem.add_dependency "ruby-statistics", ">= 2.1" + gem.add_dependency "ruby-statistics", ">= 4.0" gem.add_dependency "mini_histogram", ">= 0.3.0" gem.add_dependency "dead_end", ">= 0" gem.add_dependency "rack-test", ">= 0" + gem.add_dependency "base64", ">= 0" + gem.add_dependency "mutex_m", ">= 0" + gem.add_dependency "bigdecimal", ">= 0" + gem.add_dependency "drb", ">= 0" gem.add_development_dependency "appraisal" gem.add_development_dependency "webrick", ">= 0" gem.add_development_dependency "capybara", "~> 2" gem.add_development_dependency "m" - gem.add_development_dependency "rails", "> 3", "<= 7" + gem.add_development_dependency "rails", "> 3", "< 7.1" gem.add_development_dependency "devise", "> 3", "< 6" end diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index 0535ff7..296d544 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -8,7 +8,7 @@ gem "net-imap", require: false gem "net-pop", require: false group :development, :test do - gem "sqlite3", platform: [:ruby, :mswin, :mingw] + gem "sqlite3", '~> 1.4', platform: [:ruby, :mswin, :mingw] gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.13", platform: :jruby gem "test-unit", "~> 3.0" end diff --git a/lib/derailed_benchmarks/stats_from_dir.rb b/lib/derailed_benchmarks/stats_from_dir.rb index 5c107e3..5900535 100644 --- a/lib/derailed_benchmarks/stats_from_dir.rb +++ b/lib/derailed_benchmarks/stats_from_dir.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'bigdecimal' -require 'statistics' +require 'ruby-statistics' require 'stringio' require 'mini_histogram' require 'mini_histogram/plot' diff --git a/test/test_helper.rb b/test/test_helper.rb index e8ecdf5..2ac440e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -32,7 +32,7 @@ # https://github.com/plataformatec/devise/blob/master/test/orm/active_record.rb migrate_path = File.expand_path("../rails_app/db/migrate", __FILE__) -if Rails.version >= "6.0" +if Rails.version >= "6.0" && Rails.version < "7.0" ActiveRecord::MigrationContext.new(migrate_path, ActiveRecord::SchemaMigration).migrate elsif Rails.version.start_with? "5.2" ActiveRecord::MigrationContext.new(migrate_path).migrate