Skip to content

Commit

Permalink
Address code review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuravel committed Nov 11, 2024
1 parent 94b9537 commit f5619c3
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 143 deletions.
42 changes: 6 additions & 36 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,69 +1,39 @@
appraise "activerecord-6.0" do
gem "activerecord", "~> 6.0.0"
gem "activesupport", "~> 6.0.0"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.4.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.4", platforms: [:ruby, :truffleruby]
end

appraise "activerecord-6.1" do
gem "activerecord", "~> 6.1.0"
gem "activesupport", "~> 6.1.0"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.4.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.4", platforms: [:ruby, :truffleruby]
end

appraise "activerecord-7.0" do
gem "activerecord", "~> 7.0.0"
gem "activesupport", "~> 7.0.0"
gem "sqlite3", "~> 1.6", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.6.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
end

appraise "activerecord-7.1" do
gem "activerecord", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"
gem "sqlite3", "~> 1.6", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.6.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
end

appraise "activerecord-7.2" do
gem "activerecord", "~> 7.2.0"
gem "activesupport", "~> 7.2.0"
gem "sqlite3", "~> 2.0", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 2.0.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
end

appraise "activerecord-8.0" do
gem "activerecord", "~> 8.0.0"
gem "activesupport", "~> 8.0.0"
gem "sqlite3", "~> 2.1", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 2.2.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
end
11 changes: 0 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
source "https://rubygems.org"

gemspec

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", ">= 0.0.1", "< 2.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end
17 changes: 1 addition & 16 deletions gemfiles/activerecord_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,8 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", ">= 0.0.1", "< 2.0"
gem "activerecord", "~> 6.0.0"
gem "activesupport", "~> 6.0.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.4.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.4", platforms: [:ruby, :truffleruby]

gemspec path: "../"
17 changes: 1 addition & 16 deletions gemfiles/activerecord_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,8 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", ">= 0.0.1", "< 2.0"
gem "activerecord", "~> 6.1.0"
gem "activesupport", "~> 6.1.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.4.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.4", platforms: [:ruby, :truffleruby]

gemspec path: "../"
18 changes: 2 additions & 16 deletions gemfiles/activerecord_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", "~> 1.31"
gem "activerecord", "~> 7.0.0"
gem "activesupport", "~> 7.0.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.6.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.6", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

gemspec path: "../"
18 changes: 2 additions & 16 deletions gemfiles/activerecord_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", "~> 1.31"
gem "activerecord", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 1.6.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 1.6", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

gemspec path: "../"
18 changes: 2 additions & 16 deletions gemfiles/activerecord_7.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", "~> 1.31"
gem "activerecord", "~> 7.2.0"
gem "activesupport", "~> 7.2.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 2.0.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 2.0", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

gemspec path: "../"
18 changes: 2 additions & 16 deletions gemfiles/activerecord_8.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,9 @@

source "https://rubygems.org"

gem "rspec", "~> 3.13"
gem "rake", "~> 13.0"
gem "simplecov", "~> 0.21"
gem "standard", "~> 1.31"
gem "activerecord", "~> 8.0.0"
gem "activesupport", "~> 8.0.0"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter", ">= 60.0"
gem "activerecord-jdbcpostgresql-adapter", ">= 60.0"
gem "activerecord-jdbcmysql-adapter", ">= 60.0"
end

platforms :ruby, :truffleruby do
gem "sqlite3", "~> 2.2.0"
gem "pg", "~> 1.5.8"
gem "mysql2", "~> 0.5.6"
end
gem "sqlite3", "~> 2.1", platforms: [:ruby, :truffleruby]
gem "standard", "~> 1.31"

gemspec path: "../"
21 changes: 21 additions & 0 deletions temping.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,25 @@ Gem::Specification.new do |s|
s.add_dependency "activesupport", ">= 6.0", "< 8.1"

s.add_development_dependency "appraisal", "~> 2.5"

skipped_adapters = ENV["SKIPPED_ADAPTERS"].to_s.downcase
sqlite_skipped = skipped_adapters.include?("sqlite")
postgresql_skipped = skipped_adapters.include?("postgres")
mysql_skipped = skipped_adapters.include?("mysql")
if RUBY_PLATFORM.include?("java")
s.add_development_dependency "activerecord-jdbcsqlite3-adapter", ">= 60.0" unless sqlite_skipped
unless postgresql_skipped
s.add_development_dependency "activerecord-jdbcpostgresql-adapter", ">= 60.0"
end
s.add_development_dependency "activerecord-jdbcmysql-adapter", ">= 60.0" unless mysql_skipped
else
s.add_development_dependency "sqlite3", ">= 1.3", "< 3.0" unless sqlite_skipped
s.add_development_dependency "pg", ">= 1.2", "< 2.0" unless postgresql_skipped
s.add_development_dependency "mysql2", "~> 0.5" unless mysql_skipped
end

s.add_development_dependency "rspec", "~> 3.13"
s.add_development_dependency "rake", "~> 13.0"
s.add_development_dependency "simplecov", "~> 0.21"
s.add_development_dependency "standard", ">= 0.0.1", "< 2.0"
end

0 comments on commit f5619c3

Please sign in to comment.