Skip to content

Commit f80c5ff

Browse files
authored
Merge pull request #453 from sparklemotion/flavorjones-remove-version-proxy
remove `VersionProxy`, clean up version branching, and drop Ruby 2.7 support
2 parents 870eecc + c2e7e4c commit f80c5ff

16 files changed

+54
-127
lines changed

.github/workflows/sqlite3-ruby.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: [ubuntu-latest, macos-latest, windows-latest]
28-
ruby: ["3.3", "3.2", "3.1", "3.0", "2.7"]
28+
ruby: ["3.3", "3.2", "3.1", "3.0"]
2929
lib: [system, packaged]
3030
include:
3131
- { os: ubuntu-latest, ruby: truffleruby, lib: packaged }
@@ -65,16 +65,6 @@ jobs:
6565

6666
- run: bundle exec rake test
6767

68-
old_sqlite3:
69-
runs-on: ubuntu-latest
70-
container:
71-
image: ruby:2.7.5-buster # old enough to not support SQLITE_DBCONFIG_DQS_DDL
72-
steps:
73-
- uses: actions/checkout@v4
74-
- run: bundle install
75-
- run: bundle exec rake compile -- --enable-system-libraries
76-
- run: bundle exec rake test
77-
7868
# reported at https://github.com/sparklemotion/sqlite3-ruby/issues/354
7969
# TODO remove once https://github.com/flavorjones/mini_portile/issues/118 is fixed
8070
fedora:
@@ -95,7 +85,7 @@ jobs:
9585
fail-fast: false
9686
matrix:
9787
os: [ubuntu-latest, macos-latest, windows-latest]
98-
ruby: ["3.3", "2.7"] # oldest and newest
88+
ruby: ["3.3", "3.0"] # oldest and newest
9989
include:
10090
- { os: windows-latest, ruby: mingw }
10191
- { os: windows-latest, ruby: mswin }

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# sqlite3-ruby Changelog
22

3+
## next / unreleased
4+
5+
(will be 2.0.0)
6+
7+
### Ruby
8+
9+
This release drops support for Ruby 2.7.
10+
11+
12+
### Removed
13+
14+
- Remove `SQLite3::VersionProxy` which has been deprecated since v1.3.2.
15+
16+
317
## 1.7.0 / 2023-12-27
418

519
### Ruby

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Update `/dependencies.yml` to reflect:
2626
A quick checklist:
2727

2828
- [ ] make sure CI is green!
29-
- [ ] update `CHANGELOG.md` and `lib/sqlite3/version.rb` including `VersionProxy::{MINOR,TINY}`
29+
- [ ] update `CHANGELOG.md` and `lib/sqlite3/version.rb`
3030
- [ ] run `bin/build-gems` and make sure it completes and all the tests pass
3131
- [ ] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
3232
- [ ] `git push && git push --tags`

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_script:
2929

3030
environment:
3131
matrix:
32+
- ruby_version: "33"
3233
- ruby_version: "32"
3334
- ruby_version: "31"
3435
- ruby_version: "30"
35-
- ruby_version: "27"

bin/test-gem-file-contents

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Minitest::Reporters.use!([Minitest::Reporters::SpecReporter.new])
6666
puts "Testing '#{gemfile}' (#{gemspec.platform})"
6767
describe File.basename(gemfile) do
6868
let(:all_supported_ruby_versions) {
69-
["2.7", "3.0", "3.1", "3.2", "3.3"]
69+
["3.0", "3.1", "3.2", "3.3"]
7070
}
7171
let(:native_supported_ruby_versions) { ["3.0", "3.1", "3.2", "3.3"] }
7272
let(:ucrt_supported_ruby_versions) { ["3.1", "3.2", "3.3"] }
@@ -119,8 +119,7 @@ describe File.basename(gemfile) do
119119
end
120120

121121
it "contains the port files" do
122-
# TODO: once Ruby 2.7 is no longer supported, use symbolize_names: true
123-
dependencies = YAML.load_file(File.join(__dir__, "..", "dependencies.yml"))
122+
dependencies = YAML.load_file(File.join(__dir__, "..", "dependencies.yml"), symbolize_names: true)
124123
sqlite_tarball = File.basename(dependencies[:sqlite3][:files].first[:url])
125124
actual_ports = gemfile_contents.grep(%r{^ports/})
126125

dependencies.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# TODO: stop using symbols here once we no longer support Ruby 2.7 and can rely on symbolize_names
2-
:sqlite3:
1+
sqlite3:
32
# checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
43
# 6c427f0547e2f7babe636b748dd5d5a1f2f31601adadef7e2805e7d1f7171861
54
#
@@ -8,7 +7,7 @@
87
#
98
# $ sha256sum ports/archives/sqlite-autoconf-3440200.tar.gz
109
# 1c6719a148bc41cf0f2bbbe3926d7ce3f5ca09d878f1246fcc20767b175bb407 ports/archives/sqlite-autoconf-3440200.tar.gz
11-
:version: "3.44.2"
12-
:files:
13-
- :url: "https://sqlite.org/2023/sqlite-autoconf-3440200.tar.gz"
14-
:sha256: "1c6719a148bc41cf0f2bbbe3926d7ce3f5ca09d878f1246fcc20767b175bb407"
10+
version: "3.44.2"
11+
files:
12+
- url: "https://sqlite.org/2023/sqlite-autoconf-3440200.tar.gz"
13+
sha256: "1c6719a148bc41cf0f2bbbe3926d7ce3f5ca09d878f1246fcc20767b175bb407"

ext/sqlite3/extconf.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ def configure_packaged_libraries
9797
end
9898

9999
def configure_extension
100-
if Gem::Requirement.new("< 2.7").satisfied_by?(Gem::Version.new(RUBY_VERSION))
101-
append_cppflags("-DTAINTING_SUPPORT")
102-
end
103-
104100
append_cflags("-fvisibility=hidden") # see https://github.com/rake-compiler/rake-compiler-dock/issues/87
105101

106102
if find_header("sqlite3.h")
@@ -158,8 +154,7 @@ def sqlite3_config
158154
end
159155

160156
def mini_portile_config
161-
# TODO: once Ruby 2.7 is no longer supported, use symbolize_names: true
162-
YAML.load_file(File.join(package_root_dir, "dependencies.yml"))
157+
YAML.load_file(File.join(package_root_dir, "dependencies.yml"), symbolize_names: true)
163158
end
164159

165160
def abort_could_not_find(missing)

lib/sqlite3/version.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
11
module SQLite3
2-
32
VERSION = "2.0.0.dev"
4-
5-
module VersionProxy
6-
MAJOR = 2
7-
MINOR = 0
8-
TINY = 0
9-
BUILD = "dev"
10-
11-
STRING = [ MAJOR, MINOR, TINY, BUILD ].compact.join( "." )
12-
13-
VERSION = ::SQLite3::VERSION
14-
end
15-
16-
def self.const_missing(name)
17-
return super unless name == :Version
18-
warn(<<-eowarn) if $VERBOSE
19-
#{caller[0]}: `SQLite::Version` will be removed in sqlite3-ruby version 2.0.0
20-
eowarn
21-
VersionProxy
22-
end
233
end

rakelib/native.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def add_file_to_gem(relative_source_path)
4242
end
4343

4444
task gem_build_path do
45-
# TODO: once Ruby 2.7 is no longer supported, use symbolize_names: true
46-
dependencies = YAML.load_file(File.join(__dir__, "..", "dependencies.yml"))
45+
dependencies = YAML.load_file(File.join(__dir__, "..", "dependencies.yml"), symbolize_names: true)
4746
sqlite_tarball = File.basename(dependencies[:sqlite3][:files].first[:url])
4847
archive = Dir.glob(File.join("ports", "archives", sqlite_tarball)).first
4948
add_file_to_gem(archive)

sqlite3.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020

2121
s.licenses = ["BSD-3-Clause"]
2222

23-
s.required_ruby_version = Gem::Requirement.new(">= 2.7")
23+
s.required_ruby_version = Gem::Requirement.new(">= 3.0")
2424

2525
s.homepage = "https://github.com/sparklemotion/sqlite3-ruby"
2626
s.metadata = {

0 commit comments

Comments
 (0)