dbmlite3.gemspec in dbmlite3-1.0.0 vs dbmlite3.gemspec in dbmlite3-2.0.0.pre.alpha.3

- old
+ new

@@ -1,12 +1,27 @@ +JRUBY_GEM = (ENV['JRUBY_GEM'] == "yes") + +if JRUBY_GEM + SUFFIX = '_jruby' + DESC_EXTRA = <<EOF + + This is the JRuby version of dbmlite3; it is identical to the MRI + version except for its dependencies. +EOF +else + SUFFIX = '' + DESC_EXTRA = '' +end + + Gem::Specification.new do |s| - s.name = 'dbmlite3' - s.version = '1.0.0' + s.name = "dbmlite3#{SUFFIX}" + s.version = '2.0.0-alpha.3' s.date = '2022-02-21' s.summary = "A DBM-style key-value store using SQLite3" - s.description = <<-EOF + s.description = <<-EOF + DESC_EXTRA Lite3::DBM is an object that behaves like a Ruby Hash but stores its data in a SQLite3 database table. It is a drop-in replacement for DBM. Values are optionally serialized with YAML or Marshal, allowing @@ -17,18 +32,25 @@ s.authors = ["Chris Reuter"] s.email = 'chris@isplitonyourgrave.com' # I'm just going to add everything so that if you've got the gem, # you've also got the source distribution. Yay! Open source! - s.files = ["README.md", "LICENSE.txt", "dbmlite3.gemspec", - "Rakefile", ".yardopts"] + - Dir.glob('doc/**/*') + - Dir.glob('{spec,lib}/*.rb') + s.files = `git ls-files` + .split + .reject {|f| f =~ /\.org$/} # Skip local developer notes - s.required_ruby_version = '>= 2.2.0' - s.requirements << "sqlite3 gem, Ruby MRI (required by sqlite3)" + s.required_ruby_version = '>= 2.7.0' + s.requirements << (JRUBY_GEM ? + "Sequel, jdbc-sqlite3, JRuby" : + "Sequel, sqlite3, Ruby MRI") + + s.add_runtime_dependency "sequel", '~> 5.65.0' - s.add_runtime_dependency "sqlite3", '~> 1.4' + if JRUBY_GEM + s.add_runtime_dependency "jdbc-sqlite3", "~> 3.32.3.3" + else + s.add_runtime_dependency "sqlite3", "~> 1.6.1" + end s.add_development_dependency "rspec", '~> 3.10', '>= 3.10.0' s.add_development_dependency "yard", '~> 0.9.25', '>= 0.9.25' s.homepage = 'https://codeberg.org/suetanvil/dbmlite3'