digital-fabric / extralite

Ruby on SQLite
http://www.rubydoc.info/gems/extralite
MIT License
255 stars 8 forks source link

Add // to uri scheme #4

Closed ttilberg closed 2 years ago

ttilberg commented 2 years ago

The Readme (and the blog post) are missing the // from the scheme delimiter, and as such Sequel was not connecting to the file correctly.

Can you also update the blog post?

[1] pry(main)> require 'sequel'
=> true
[2] pry(main)> db1 = Sequel.connect 'extralite:my.db'
=> #<Sequel::Extralite::Database: "extralite:my.db">
[3] pry(main)> db1.opts
=> {:max_connections=>1,
 :database=>"",  # <----
 :orig_opts=>{},
 :uri=>"extralite:my.db",
 :adapter=>"extralite",
 :adapter_class=>Sequel::Extralite::Database,
 :single_threaded=>false}
[4] pry(main)> db2 = Sequel.connect 'extralite://my.db'
=> #<Sequel::Extralite::Database: "extralite://my.db">
[5] pry(main)> db2.opts
=> {:database=>"my.db",   # <----
 :orig_opts=>{},
 :uri=>"extralite://my.db",
 :adapter=>"extralite",
 :adapter_class=>Sequel::Extralite::Database,
 :single_threaded=>false}