# HG changeset patch # User Mahlon E. Smith # Date 1516224792 28800 # Node ID 686fbfe638bd4842d5436f1ef28ae04b28128597 # Parent 2f9a295bdba7f38b7df62d0a884fd04af46d5efe Remove deprecated calls for the Sequel ORM, add compatibility for Sequel 5. diff -r 2f9a295bdba7 -r 686fbfe638bd History.md --- a/History.md Mon Jan 16 12:48:37 2017 -0800 +++ b/History.md Wed Jan 17 13:33:12 2018 -0800 @@ -1,3 +1,8 @@ +## v0.2.0 [2018-01-17] Mahlon E. Smith + +Update for Sequel 5.x. + + ## v0.2.0 [2017-01-16] Mahlon E. Smith Update for Configurability 3.x. diff -r 2f9a295bdba7 -r 686fbfe638bd Rakefile --- a/Rakefile Mon Jan 16 12:48:37 2017 -0800 +++ b/Rakefile Wed Jan 17 13:33:12 2018 -0800 @@ -50,10 +50,10 @@ EOF s.required_ruby_version = '>= 2.3' - s.add_dependency 'thingfish', '~> 0.6' + s.add_dependency 'thingfish', '~> 0.7' s.add_dependency 'loggability', '~> 0.11' - s.add_dependency 'sequel', '~> 4.35' - s.add_dependency 'pg', '~> 0.19' + s.add_dependency 'sequel', '~> 5.4' + s.add_dependency 'pg', '~> 1.0' end Gem::PackageTask.new( spec ) do |pkg| diff -r 2f9a295bdba7 -r 686fbfe638bd lib/thingfish/metastore/pggraph.rb --- a/lib/thingfish/metastore/pggraph.rb Mon Jan 16 12:48:37 2017 -0800 +++ b/lib/thingfish/metastore/pggraph.rb Wed Jan 17 13:33:12 2018 -0800 @@ -24,7 +24,7 @@ # Package version - VERSION = '0.2.0' + VERSION = '0.3.0' # Version control revision REVISION = %q$Revision$ @@ -59,12 +59,13 @@ ### Set up the metastore database and migrate to the latest version. def self::setup_database Sequel.extension :pg_json_ops + Sequel.split_symbols = true + Sequel::Model.require_valid_table = false self.db = Sequel.connect( self.uri ) self.db.logger = Loggability[ Thingfish::Metastore::PgGraph ] self.db.extension :pg_streaming self.db.stream_all_queries = true - self.db.optimize_model_load = true self.db.sql_log_level = :debug self.db.extension( :pg_json ) self.db.log_warn_duration = self.slow_query_seconds @@ -103,8 +104,9 @@ def initialize( * ) # :notnew: require 'thingfish/metastore/pggraph/node' require 'thingfish/metastore/pggraph/edge' - Thingfish::Metastore::PgGraph::Node.db = self.class.db - Thingfish::Metastore::PgGraph::Edge.db = self.class.db + + Thingfish::Metastore::PgGraph::Node.dataset = self.class.db[ :nodes ] + Thingfish::Metastore::PgGraph::Edge.dataset = self.class.db[ :edges ] @model = Thingfish::Metastore::PgGraph::Node end