Skip to content

Commit 8ea3b5a

Browse files
authored
Merge pull request #61 from blocknotes/ci/workflows-refactor-2
ci: GitHub workflows refactor (2)
2 parents 85c40a6 + 4e13bda commit 8ea3b5a

14 files changed

Lines changed: 35 additions & 47 deletions

Appraisals

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ MATRIX = {
2222
}
2323
}.freeze
2424

25-
EXCEPTIONS = {
26-
["mysql", "3.0", "7.1"] => ->(ctx) {
27-
ctx.gem 'sqlite3', '~> 1.4'
28-
}
29-
}.freeze
30-
3125
ruby_version = ENV["RUBY_VERSION"]&.sub(/\.[^\.]+\z/, '')
3226
MATRIX.each do |db, versions|
3327
versions.each do |ruby, rails|
@@ -37,7 +31,8 @@ MATRIX.each do |db, versions|
3731
appraise "#{db}_ruby#{ruby.delete('.')}_rails#{version.delete('.')}" do
3832
gem 'pg'
3933
gem 'rails', "~> #{version}.0"
40-
EXCEPTIONS[[db, ruby, version]].call(self) if EXCEPTIONS.include?([db, ruby, version])
34+
35+
gem 'sqlite3', '~> 1.4' if ruby == "3.0"
4136
end
4237
end
4338
end

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

66
ruby_ver = ENV.fetch("RUBY_VERSION", "")
7-
rails_ver = ENV.fetch('RAILS_VERSION', "")
7+
rails_ver = ENV.fetch("RAILS_VERSION", "")
88

99
if ENV['DEVEL'] == '1'
1010
if !rails_ver.empty?

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
[![maintainability](https://api.codeclimate.com/v1/badges/92e1e703c308744a0f66/maintainability)](https://codeclimate.com/github/blocknotes/active_storage_db/maintainability)
66

77
[![linters](https://github.com/blocknotes/active_storage_db/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/linters.yml)
8-
[![specs Postgres](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_71.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_71.yml)
9-
[![specs MySQL](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_71.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_71.yml)
8+
[![Specs Postgres Ruby 3.4](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_ruby34.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_ruby34.yml)
9+
[![Specs MySQL Ruby 3.4](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_ruby34.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_ruby34.yml)
1010

1111
An Active Storage service upload/download plugin that stores files in a PostgreSQL or MySQL database.
1212
Experimental support also for MSSQL and SQLite.

gemfiles/mssql_ruby30_rails61.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem "activerecord-sqlserver-adapter"
1010
gem "tiny_tds"
1111
gem "mysql2"
1212
gem "pg"
13-
gem "sqlite3"
13+
gem "sqlite3", "~> 1.4"
1414
gem "zeitwerk", "~> 2.6.18"
1515
gem "concurrent-ruby", "1.3.4"
1616
gem "bigdecimal"

gemfiles/mssql_ruby30_rails61.gemfile.lock

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ GEM
107107
fasterer (0.11.0)
108108
ruby_parser (>= 3.19.1)
109109
ffi (1.17.1)
110-
ffi (1.17.1-arm64-darwin)
111-
ffi (1.17.1-x86_64-darwin)
112110
globalid (1.2.1)
113111
activesupport (>= 6.1)
114112
i18n (1.14.7)
@@ -284,10 +282,11 @@ GEM
284282
actionpack (>= 6.1)
285283
activesupport (>= 6.1)
286284
sprockets (>= 3.0.0)
287-
sqlite3 (2.0.4)
285+
sqlite3 (1.7.3)
288286
mini_portile2 (~> 2.8.0)
289-
sqlite3 (2.0.4-arm64-darwin)
290-
sqlite3 (2.0.4-x86_64-darwin)
287+
sqlite3 (1.7.3-arm64-darwin)
288+
sqlite3 (1.7.3-x86_64-darwin)
289+
sqlite3 (1.7.3-x86_64-linux)
291290
thor (1.3.2)
292291
timeout (0.4.3)
293292
tiny_tds (3.2.0)
@@ -340,7 +339,7 @@ DEPENDENCIES
340339
simplecov
341340
simplecov-lcov
342341
sprockets-rails
343-
sqlite3
342+
sqlite3 (~> 1.4)
344343
tiny_tds
345344
zeitwerk (~> 2.6.18)
346345

gemfiles/mssql_ruby30_rails70.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem "activerecord-sqlserver-adapter"
1010
gem "tiny_tds"
1111
gem "mysql2"
1212
gem "pg"
13-
gem "sqlite3"
13+
gem "sqlite3", "~> 1.4"
1414
gem "zeitwerk", "~> 2.6.18"
1515
gem "concurrent-ruby", "1.3.4"
1616
gem "bigdecimal"

gemfiles/mssql_ruby30_rails70.gemfile.lock

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ GEM
113113
fasterer (0.11.0)
114114
ruby_parser (>= 3.19.1)
115115
ffi (1.17.1)
116-
ffi (1.17.1-arm64-darwin)
117-
ffi (1.17.1-x86_64-darwin)
118116
globalid (1.2.1)
119117
activesupport (>= 6.1)
120118
i18n (1.14.7)
@@ -290,10 +288,11 @@ GEM
290288
actionpack (>= 6.1)
291289
activesupport (>= 6.1)
292290
sprockets (>= 3.0.0)
293-
sqlite3 (2.0.4)
291+
sqlite3 (1.7.3)
294292
mini_portile2 (~> 2.8.0)
295-
sqlite3 (2.0.4-arm64-darwin)
296-
sqlite3 (2.0.4-x86_64-darwin)
293+
sqlite3 (1.7.3-arm64-darwin)
294+
sqlite3 (1.7.3-x86_64-darwin)
295+
sqlite3 (1.7.3-x86_64-linux)
297296
thor (1.3.2)
298297
timeout (0.4.3)
299298
tiny_tds (3.2.0)
@@ -346,7 +345,7 @@ DEPENDENCIES
346345
simplecov
347346
simplecov-lcov
348347
sprockets-rails
349-
sqlite3
348+
sqlite3 (~> 1.4)
350349
tiny_tds
351350
zeitwerk (~> 2.6.18)
352351

gemfiles/mysql_ruby30_rails61.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem "activerecord-sqlserver-adapter"
1010
gem "tiny_tds"
1111
gem "mysql2"
1212
gem "pg"
13-
gem "sqlite3"
13+
gem "sqlite3", "~> 1.4"
1414
gem "zeitwerk", "~> 2.6.18"
1515
gem "concurrent-ruby", "1.3.4"
1616
gem "bigdecimal"

gemfiles/mysql_ruby30_rails61.gemfile.lock

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ GEM
107107
fasterer (0.11.0)
108108
ruby_parser (>= 3.19.1)
109109
ffi (1.17.1)
110-
ffi (1.17.1-arm64-darwin)
111-
ffi (1.17.1-x86_64-darwin)
112110
globalid (1.2.1)
113111
activesupport (>= 6.1)
114112
i18n (1.14.7)
@@ -284,10 +282,11 @@ GEM
284282
actionpack (>= 6.1)
285283
activesupport (>= 6.1)
286284
sprockets (>= 3.0.0)
287-
sqlite3 (2.0.4)
285+
sqlite3 (1.7.3)
288286
mini_portile2 (~> 2.8.0)
289-
sqlite3 (2.0.4-arm64-darwin)
290-
sqlite3 (2.0.4-x86_64-darwin)
287+
sqlite3 (1.7.3-arm64-darwin)
288+
sqlite3 (1.7.3-x86_64-darwin)
289+
sqlite3 (1.7.3-x86_64-linux)
291290
thor (1.3.2)
292291
timeout (0.4.3)
293292
tiny_tds (3.2.0)
@@ -340,7 +339,7 @@ DEPENDENCIES
340339
simplecov
341340
simplecov-lcov
342341
sprockets-rails
343-
sqlite3
342+
sqlite3 (~> 1.4)
344343
tiny_tds
345344
zeitwerk (~> 2.6.18)
346345

gemfiles/mysql_ruby30_rails71.gemfile.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ GEM
127127
fasterer (0.11.0)
128128
ruby_parser (>= 3.19.1)
129129
ffi (1.17.1)
130-
ffi (1.17.1-arm64-darwin)
131-
ffi (1.17.1-x86_64-darwin)
132130
globalid (1.2.1)
133131
activesupport (>= 6.1)
134132
i18n (1.14.7)

0 commit comments

Comments
 (0)