Skip to content

Commit 1dfdbb0

Browse files
committed
ci: gracefully handle missing version.rb in the gemspec
because when we test the installed gem in CI we delete `lib`, but the gemspec is always loaded by bundler anyway.
1 parent 1065b5c commit 1dfdbb0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sqlite3.gemspec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# -*- encoding: utf-8 -*-
22

3-
require_relative "lib/sqlite3/version"
3+
begin
4+
require_relative "lib/sqlite3/version"
5+
rescue LoadError
6+
puts "WARNING: could not load Sqlite3::VERSION"
7+
end
48

59
Gem::Specification.new do |s|
610
s.name = "sqlite3"
7-
s.version = SQLite3::VERSION
11+
s.version = defined?(SQLite3::VERSION) ? SQLite3::VERSION : "0.0.0"
812

913
s.summary = "This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org)"
1014
s.description = "This module allows Ruby programs to interface with the SQLite3\ndatabase engine (http://www.sqlite.org). You must have the\nSQLite engine installed in order to build this module.\n\nNote that this module is only compatible with SQLite 3.6.16 or newer."

0 commit comments

Comments
 (0)