From d7a941ed652f1306908f65e3836994be50480055 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Sat, 30 Nov 2024 15:46:22 +0100 Subject: [PATCH 1/4] Update deps --- .github/workflows/ruby.yml | 4 ++-- concurrent_rails.gemspec | 2 +- gemfiles/Gemfile-rails-6-1 | 13 ------------- gemfiles/Gemfile-rails-7-2 | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 gemfiles/Gemfile-rails-6-1 create mode 100644 gemfiles/Gemfile-rails-7-2 diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index cd95625..42acf1e 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,10 +12,10 @@ jobs: strategy: matrix: gemfile: - - Gemfile # latest Rails (7.2) - - gemfiles/Gemfile-rails-6-1 + - Gemfile # latest Rails (8.0) - gemfiles/Gemfile-rails-7-0 - gemfiles/Gemfile-rails-7-1 + - gemfiles/Gemfile-rails-7-2 ruby: - "3.1" - "3.2" diff --git a/concurrent_rails.gemspec b/concurrent_rails.gemspec index 7f5cbe7..b00b49c 100644 --- a/concurrent_rails.gemspec +++ b/concurrent_rails.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.metadata["changelog_uri"] = "https://github.com/luizkowalski/concurrent_rails/blob/master/CHANGELOG.md" spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] - spec.add_dependency "railties", ">= 6.1" + spec.add_dependency "railties", ">= 7.0" spec.add_dependency "zeitwerk" spec.required_ruby_version = ">= 3.1" diff --git a/gemfiles/Gemfile-rails-6-1 b/gemfiles/Gemfile-rails-6-1 deleted file mode 100644 index 155c5b8..0000000 --- a/gemfiles/Gemfile-rails-6-1 +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -gemspec path: ".." - -gem "rails", github: "rails/rails", branch: "6-1-stable" -gem "minitest-reporters", "~> 1.6" -gem "rubocop", "~> 1.55" -gem "rubocop-minitest", "~> 0.31" -gem "rubocop-performance", "~> 1.18" -gem "rubocop-thread_safety", "~> 0.5" -gem "sqlite3", "~> 1.6" diff --git a/gemfiles/Gemfile-rails-7-2 b/gemfiles/Gemfile-rails-7-2 new file mode 100644 index 0000000..90be29f --- /dev/null +++ b/gemfiles/Gemfile-rails-7-2 @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gemspec path: ".." + +gem "rails", github: "rails/rails", branch: "7-2-stable" + +gem "minitest-reporters" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-performance" +gem "rubocop-thread_safety" +gem "sqlite3" From f35e85b38d63734e91edda9b52b878d97e43b832 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Sat, 30 Nov 2024 15:50:32 +0100 Subject: [PATCH 2/4] Appease rubocop --- Gemfile | 2 +- gemfiles/Gemfile-rails-7-0 | 12 ++++++------ test/dummy/bin/setup | 2 +- test/promises_test.rb | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index fe8db25..1bab3df 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Specify your gem's dependencies in concurrent_rails.gemspec. gemspec -gem "activerecord", "< 8" # needed for app_test test case +gem "activerecord" # needed for app_test test case gem "minitest-reporters" gem "sqlite3" diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/Gemfile-rails-7-0 index 3501c9c..4f67b06 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/Gemfile-rails-7-0 @@ -5,9 +5,9 @@ source "https://rubygems.org" gemspec path: ".." gem "rails", github: "rails/rails", branch: "7-0-stable" -gem "minitest-reporters", "~> 1.6" -gem "rubocop", "~> 1.55" -gem "rubocop-minitest", "~> 0.31" -gem "rubocop-performance", "~> 1.18" -gem "rubocop-thread_safety", "~> 0.5" -gem "sqlite3", "~> 1.6" +gem "minitest-reporters" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-performance" +gem "rubocop-thread_safety" +gem "sqlite3" diff --git a/test/dummy/bin/setup b/test/dummy/bin/setup index 7814c81..7f40b59 100755 --- a/test/dummy/bin/setup +++ b/test/dummy/bin/setup @@ -10,7 +10,7 @@ def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -FileUtils.chdir APP_ROOT do +FileUtils.chdir APP_ROOT do # rubocop:disable ThreadSafety/DirChdir # This script is a way to set up or update your development environment automatically. # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. diff --git a/test/promises_test.rb b/test/promises_test.rb index 945fcdf..6e90a87 100644 --- a/test/promises_test.rb +++ b/test/promises_test.rb @@ -3,20 +3,20 @@ require "test_helper" class PromisesTest < ActiveSupport::TestCase - test "should retrun value as expected" do + test "should return value as expected" do future = ConcurrentRails::Promises.future { 42 } assert_equal(42, future.value) end - test "should retrun `resolved?` with successful operation" do + test "should return `resolved?` with successful operation" do future = ConcurrentRails::Promises.future { 42 } future.value assert_predicate(future, :resolved?) end - test "should retrun `resolved?` with failed operation" do + test "should return `resolved?` with failed operation" do future = ConcurrentRails::Promises.future { 2 / 0 } future.value From 73d2b7ebd5109a471bdd0fb8fa55f341f9abc947 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Sat, 30 Nov 2024 15:52:23 +0100 Subject: [PATCH 3/4] pin sqlite --- gemfiles/Gemfile-rails-7-0 | 2 +- gemfiles/Gemfile-rails-7-1 | 2 +- gemfiles/Gemfile-rails-7-2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/Gemfile-rails-7-0 index 4f67b06..f2f163a 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/Gemfile-rails-7-0 @@ -10,4 +10,4 @@ gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3" +gem "sqlite3", "~> 1.6" diff --git a/gemfiles/Gemfile-rails-7-1 b/gemfiles/Gemfile-rails-7-1 index 55f382a..bb145a1 100644 --- a/gemfiles/Gemfile-rails-7-1 +++ b/gemfiles/Gemfile-rails-7-1 @@ -11,4 +11,4 @@ gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3" +gem "sqlite3", "~> 1.6" diff --git a/gemfiles/Gemfile-rails-7-2 b/gemfiles/Gemfile-rails-7-2 index 90be29f..2365789 100644 --- a/gemfiles/Gemfile-rails-7-2 +++ b/gemfiles/Gemfile-rails-7-2 @@ -11,4 +11,4 @@ gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3" +gem "sqlite3", "~> 1.6" From 2185b78c88a469ca4a3266dac9805410b0cdfcef Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Sat, 30 Nov 2024 15:58:38 +0100 Subject: [PATCH 4/4] Bump version --- CHANGELOG.md | 5 +++++ Gemfile | 3 ++- gemfiles/Gemfile-rails-7-0 | 1 + lib/concurrent_rails/version.rb | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49bd1fd..2a96507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.7.0 + +- Minimum Rails version bumped to 7.0 +- Marked as Rails 8 compatible + ## 0.6.1 - Fixed missing `ConcurrentRails` module definition diff --git a/Gemfile b/Gemfile index 1bab3df..cefc713 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gemspec gem "activerecord" # needed for app_test test case -gem "minitest-reporters" gem "sqlite3" +gem "minitest-reporters" + gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/Gemfile-rails-7-0 index f2f163a..f61376a 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/Gemfile-rails-7-0 @@ -5,6 +5,7 @@ source "https://rubygems.org" gemspec path: ".." gem "rails", github: "rails/rails", branch: "7-0-stable" + gem "minitest-reporters" gem "rubocop" gem "rubocop-minitest" diff --git a/lib/concurrent_rails/version.rb b/lib/concurrent_rails/version.rb index 87d0693..e05bd6a 100644 --- a/lib/concurrent_rails/version.rb +++ b/lib/concurrent_rails/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ConcurrentRails - VERSION = "0.6.1" + VERSION = "0.7.0" end